Jump to content

adhd_kid

Members
  • Posts

    8
  • Joined

  • Last visited

2 Followers

About adhd_kid

  • Birthday 09/17/1982

adhd_kid's Achievements

Newbie

Newbie (1/14)

9

Reputation

  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. mam ten sam problem jak mogę dodać/poprawić to? zrobiłem tak jak bylo podane: Linijka 466 w PDF.php w katalogu classes - zamieniesz: array(self::l('Pre-Tax Total'), 'R'), na: array(self::l('Total with Tax'), 'R'), Jest to funkcja ProdTab. ale po tym zabiegu są dwie ceny te same (suma brutto) a jak dodać aby w jednej była suma netto a potem suma brutto Hej, zrób tak: Trzeba zmienić: (w okolicach 515 linijki PDF.php) $total_without_tax = $product['total_price']; na: $total_without_tax = $unit_without_tax*(intval($product['product_quantity']) - intval($product['customizationQuantityTotal'])); Potem tylko pozostaje dobrze pozmieniać nazwy nagłówków: pole, o którym piszesz będzie od tej pory zawierało cenę netto (pomnożoną przez ilość zamawianego produktu)
×
×
  • Create New...