Jump to content


  • Posts

  • Joined

  • Last visited


About adhd_kid

  • Birthday 09/17/1982

adhd_kid's Achievements


Newbie (1/14)



  1. @dromansab are you sure you put the code into /overrides/classes/ImageManager.php ? If you replaced the /classes/ImageManager.php then you need to bring it back After you've done everything be sure to delete this file: /cache/class_index.php to make Prestashop aware of the changes.
  2. @martinf you see this should not be a big task: the zoom-crop code is taken directly from Timthumb and all current versions of that script contain a number of ways you can crop the image (crop to left, right, bottom, top), so the only thing to do would be to paste the missing code and create additional conditions somewhere after the _btt suffix such as "_btt_l" (for zoop-crop left) or "_btt_r" for zoom-crop right :-)
  3. Mlis82 I've been using this piece of code throughout all the versions of Prestashop 1.5.x and it always works (either starting with a fresh installation or updating an existing one).
  4. Hi Vincenzo, I just think that what you need to do is simple but you need a bit of further explanation. Tomorrow i should be having my day off from work so mail me: [email protected] and i'll see what your page outputs then will tell you what to do exactly so you can write this in your own words for others who might not understand what they need to do here, ok?
  5. Ok Vinc3nzo, i updated the first post with an image example (ps have you used the new name of the file size in your template?)
  6. Hello, did anybody have this problem? I'm trying to get the products list using Prestashop Webservices API but when I add sortingby price, the return xml is empty, it contains no products as if they disappear. http://www.my_shop_address.com/api/products/?display=full&sort=[price_DESC] From what I tested already sort returns no products for: price, position_in_category and several other important sortable attributes. [sOLUTION] A Question to the Presta Team Hi Presta Team! If one of you guys/girls could spare a few seconds to explain me why it's impossible to simply sort Products by Price using MYSQL "ORDER BY" clause? I would greatly, greatly appreciate a short answer as it would help me a lot in understanding the shop. I'm a beginner PHP enthusiast and I'm totally backwards in learning MYSQL. Second: The quick, temporal solution Edit /overrides/classes/webservice/WebservicesRequest.php and put this inside between the brackets: public function getFilteredObjectList() { $objects = array(); $filters = $this->manageFilters(); $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_join']; $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_filter']; $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_sort']; $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_limit']; //list entities $tmp = new $this->resourceConfiguration['retrieveData']['className'](); $sqlObjects = call_user_func_array(array($tmp, $this->resourceConfiguration['retrieveData']['retrieveMethod']), $this->resourceConfiguration['retrieveData']['params']); if ($sqlObjects) { $comparo = array(); /* THE CHANGE: */ foreach ($sqlObjects as $sqlObject) { $newProdo = new $this->resourceConfiguration['retrieveData']['className']((int)$sqlObject[$this->resourceConfiguration['fields']['id']['sqlId']]); $objects[] = $newProdo; $comparo[] = (float)$newProdo->price; } if(!empty($this->urlFragments['baziprice'])) { if ($this->urlFragments['baziprice']=='DESC') array_multisort($comparo, SORT_DESC, $objects); else array_multisort($comparo, $objects); } return $objects; } } Usage: Instead of using: http://www.your.page.com/api/products/?display=full&sort=[price_ASC] Call this address (sort: ascending): http://www.your.page.com/api/products/?display=full&baziprice=ASC Or this (sort: descending): http://www.your.page.com/api/products/?display=full&baziprice=DESC
  7. Hey guys, recently i've done 2 Prestashop templates that needed the zoom-crop functionality for certain image types ( see timthumb to know what i mean) . My first approach (it was Presta 1.4.x) was to override the The admin tabs and do lots of unneccessary stuff, then the other project came and when i was about to copy my old code i thought of a much better solution, so here it is : 0. Read our short introduction and copy code from here: http://www.bazingade...restashop-1-5-2 or here (without introduction): http://pastebin.com/eg2tLztL 1. Go to Preferences -> Images -> Add new and set the new image size that you want to be zoom-cropped (to fit the whole area) 2. Name the new image size adding the "_btt" suffix to it 3. regenerate your pictures, use the new picture name in your templates where neccessary and enjoy *** In the attachment you will find an example of how should new image size with crop be named in the backoffice **** Remember to actually use the new image size in your templates, like: <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'fbmag_btt')}" >
  8. Good to hear that aQs . There's one more thing that will be corrected in the next release though: if you run Kinky on a shop with SSL ( https://...) it won't work because it uses relative paths and gets wrong image URLs. To fix that now (only if you run with SSL) just change the paths in kinkyslider.tpl file to absolute paths: such like https://name_of_your_site.com/
  9. Hi aQs, which version of IE is bothering you? If it's 7.0 then indeed - this slider took it a bit into account but i'm generally in favour of the idea of not supporting oldies and let people update. Send me some screenshots: [email protected] I tested Kinky on IE 8.0 / IE9 and it worked fine, could be some problems though - all of them will be addressed in the next release.
  10. Hey aQs, thank you for using Kinky Slider, i see you customised the colours, they look great as well as the whole shop Here's a little fix for the problem- i should have modified one more thing before sending you the last modification. it's all about checking in one more place if the slider is not animating, here: 1. go to line 265 in kinkyslider.tpl 2. find this: $(document).everyTime(bazingaSlideDelay,'changeSlide',function(){ bazingaFindCurrentAndNextSlide('next'); bazingaAnimateTo(elementsContainer, allElements, currentSlide, nextSlide, headerOutSwingSpeed, headerRotateSpeed, priceAppearSpeed, priceDisappearSpeed, slideChangeSpeed); oldCurrentSlide=currentSlide; currentSlide--; if (currentSlide<0) { currentSlide=elementsCount-1 } allElements.eq(oldCurrentSlide).removeClass('kinkyActive'); allElements.eq(currentSlide).addClass('kinkyActive'); }); 3. change that for this: $(document).everyTime(bazingaSlideDelay,'changeSlide',function(){ if (!allElements.is(':animated')) { bazingaFindCurrentAndNextSlide('next'); bazingaAnimateTo(elementsContainer, allElements, currentSlide, nextSlide, headerOutSwingSpeed, headerRotateSpeed, priceAppearSpeed, priceDisappearSpeed, slideChangeSpeed); oldCurrentSlide=currentSlide; currentSlide--; if (currentSlide<0) { currentSlide=elementsCount-1 } allElements.eq(oldCurrentSlide).removeClass('kinkyActive'); allElements.eq(currentSlide).addClass('kinkyActive'); } }); I'm almost done with getting feedback about the first revision of Kinky, i'll keep you updated with the new version soon - it will have automatic re-start of sliding after some time even when the user clicked the arrows. cheers, Greg
  11. aQs after i get as much comments and suggestions as i can, we'll return to kinky and try to introduce the changes in a nice way, but for now if you want the slider to be automatic even after the user clicked the buttons , go to line 290 and line 309 inside the kinkyslider.tpl file and comment these lines: $(document).stopTime('changeSlide'); Aha, chodziło Ci o tłumaczenie napisów dla wielojęzycznych sklepów: hah, nie przeszło mi to przez myśl, postaram się znaleźć rozwiązanie chyba że ktoś wcześniej na to wpadnie :-) Sorry Jovil, i didn't get what you meant before: i'll take multilingual headers into account when i sit again to kinky , unless somebody does this first
  12. Hi guys, thank you for fast reply! aQs i made that by design thinking that when you click = you are interested so the automatic slide stops but now i see there's a need for the slider to resume sliding after some time - thanks this is because the custom font we load here doesn't contain the national characters of most of European countries, including mine: i updated the post to say that. the only solution here is to use a different font i'm afraid. great idea, will think about that Evona problem leży w tym foncie - nie posiada polskich znaków. Jedyne rozwiązanie dla polskich sklepów to wybrać inną czcionkę. Dzięki za pierwsze polskie miłe słowa ! :-D same thing jolvil as with aQs report
  13. Hi guys, i along with my brothers from Bazinga Designs studio wanted to contribute a bit to the community and thank you all this way that we can use PrestaShop. We'd like to also thank for all the help we got here from the forums. --Update------------------------------------------------------------------------ - Guys if your images don't upload first make sure that the uploads/images directory inside the module dir is writeable. - The SFMoviePoster font unfortunatelly doesn't contain national signs. There is a newer version of this font with multiple national characters but it's not free - You can put any custom font you like inside Kinky Slider: 1. Upload & convert it with http://www.fontsquirrel.com/fontface/generator 2. Download the font pack and put the font files in modules/kinkyslider/css/fonts 3. Insert the CSS code that FontSuirrel sends you to: modules/kinkyslider/css/style.css 4. Change the css snippet to reflect the path to the fonts ----------------------------------------------------------------------------------- License: Free/GPL3 Parts of the code/libraries i used here were licensed under GPL so i just couldn't make it Public Domain although i wanted Download: http://www.bazingade...lider_v_0_1.zip First part of the tutorial that will show how the module was made: http://www.bazingade...y-slider-part-1 Works with PrestaShop 1.4.x - that's for sure, it should also work with 1.3.x but this i'm not sure. So here's our little slider that is packed with functionality that we find useful in our own projects: 1. image upload in BackOffice 2. slide re-ordering (simple, but functional) 3. automatic image resizing to fit the set width & height 4. configurable width & height (in the admin panel) 5. nice but configurable looks 6. animations 7. works great in all modern browsers, works quite nice in IE8 although some tricks had to be used. it even works in IE7 but the speed is so dramatic we couldn't stand it 8. setting the slide state to active/inactive and there are also 2 special features: - interactive headers : you can put any header over the image - price tags - just enter any text string you like there Here's a choppy video showing the slider in action. It's choppy because my computer is a slow machine and i'm yet to buy a MacBook or other decent machine to run my Ubuntu Please note that this is my first public release and almost first tutorial so i just beg for a bit of understanding. I did my best to make the slider work out of the box but if any problem arises please post here and we'll see what's happening. There are a few configuration options available, but they're all pre-filled during the instalation of the module so you'll know what is what. Note: as the slider installs , it is hooked to 'home' by default and its width is set to 556px (the default width od the middle column in the default theme). Just set it to anything that suits you. After you change the width & height of the slider and reload the page by pressing 'Update configuration' button , Kinky Slider will tell you how big the images should be to fit in perfectly (the calculation takes the border width in account but it does not take the margins). Imortant: the slider by default uses a custom font called SFMoviePosterBold. It looks really awesome and i'm quite sure we are safe to use it for ourselves, but i'm afraid the license doesn't allow for commercial usage so if you use Kinky Slider in your commercial projects just change the font to some other in order not to break somebody's Copyright. The list of all code/libraries that contributed to Kinky Slider is listed in the kinkyslider.php file. Well.. i'll be honoured if you give it a try and tell me how it works Aloha, Greg / Bazinga Designs
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More