Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by FluffyCat

  1. Hi We have just spotted a weird thing with the Paypal confirmation email. Up until the 9/2 everything was ok but from the 10/2 and onward there is an additional post in all invoices. It is written in incorrect Spanish and looks like this: Envio Gratuirt Artículo n.º 220 €0,00 EUR 1 €0,00 EUR There has been no update of neither Prestashop or the Paypal module since December (we are on version 3.8.1). The shipping is correctly calculated so no extra cost is added but this looks bad in the customer confirmation email, especially since there is no free shipping and even more since the word "Gratuirt" is misspelled. I have done a grep on our whole site and the word "Gratuirt" is not found anywhere so I do not think it comes from Prestashop at all and since we have not done any maintenance I think it comes from Paypal. Again, last order on the 9:th of February was ok and first order of the 10:th had this line added. Also, product 220 is a regular product that has nothing to do with free shipping and none of the customers so far have ordered article 220. I really want to get rid of this line but we have no idea why it starts showing these last 5 days.
  2. Ok, but how do I create this object then in the .tpl file :-)
  3. Thanks for the reply. It is strange since I have managed to call other static functions from the tpl file without problems. I would prefer not to alter any php code, I mean, it must be possible to do the simple check if a product belongs to a specific category frmo the tpl file. This can not be that dificult right? Other solution proposals are welcome, it does not have to be using this function.
  4. Hi I want to make a simple check to see if a product id belongs to a special category from smarty. I found this function: Product::idIsOnCategoryId which seems to do exactly what I want but it always return false. I am calling it like this: {assign var=catarray value=[84]} {if Product::idIsOnCategoryId(414, $catarray)}OK{else}NOT OK{/if} If I print the categories for product 414 using {Product::getProductCategories(414)|@print_r} then it correctly prints the array like this: ( [0] => 2 [1] => 38 [2] => 78 [3] => 79 [4] => 84 [5] => 152 [6] => 153 [7] => 160 ) So product 424 is indeed in category 84 but the call to idIsOnCategoryId is not working as I expect. I think I am passing the array of categories the correct way but still no luck. Can anyone advise if I am doing this correctly or if there is another better or more efficient way to make a quick check if a product belongs to a category. Thanks in advance for any advice, this can not be that complex.
  5. Hi Vekia Thanks for the answer. I checked the function and I understand how to fix this in the php. However I was hoping to just remove this check from the theme. If I browse github in the 1.6 bootstrap theme I see this is used from the tpl here: https://github.com/PrestaShop/PrestaShop/blob/e48c6f4ddd65565dba9e59e4ff6bc792f138cbcc/themes/default-bootstrap/order-opc-new-account.tpl#L254 but in my installation, I do not find this check in my tpl file. Do you know if its done only in php in 1.5.x or if its possible to remove it from the theme to not mess too much with the Classes? Thanks again
  6. Hi I have had a few complaints from customers not being able to register because their phone number is not valid. I have not been able to reproduce it even using the same numbers so the suspicion is that its a browsers related problem? Is that possible, at least one user confirmed he was using Firefox but could not tell the version. Its not a frequent problem but it has happened enough times to be concerning. So, for me the actual check of the phone number format is not important and I would like to just remove it. Can anyone indicate which file I need to modify? I am using Prestashop Thanks in advance.
  7. I have been testing this module and it looks really promising. However we are using the EU Cookie module developed by Vekia. It shows a popup to accept cookies but when this module is used, the popup keeps coming back on each page even if the visitor has already clicked ok. Also, if the first visitor after a cache clear has already accepted cookies, then the popup is not shown at all for everyone else. How can we resolve this problem. As it looks now, we can not use the caching since its very intrusive keeping asking the visitor to accept cookies on every page or they are not shown at all depending on who did the first cache. I have activated the EU cookie module in Dynamic Modules but it still does not work. Keep up the good work. The speed improvements looks great we must just ensure its not breaking other things. Edit: I can not wrap my head around this but now it seemed to work better so I will continue to test.
  8. Hi I ran our shop through deepcrawl and it reports we have duplicated pages for our categories. The only difference is that the duplicated url's have the ? in the end but no url params, like this: mysite/es/accesorios-cocina Ok link mysite/es/accesorios-cocina? Duplicated link with empty url params. We are using PS Does anyone know where this ? comes from, its not visible when browsing the category pages and the links in the sitemap are also ok. Any ideas on how to get rid of it? Thanks in advance
  9. Hi Thanks for the reply. As I mentioned, for my test country Belgium I only have one carrier available, when doing the full checkout, Prestashop correctly shows this carrier in the carrier list so it must be properly configured. The default Carrier in my shop has id 144, this carrier does not shop to the Zone where Belgium is, it only ships to a custom zone that includes Spain and Portugal. The Carrier that ships to the rest of Europe has id 146. When doing like this: $belgium = new Country(3); print_r( $this->getDeliveryOption($belgium)); I only get an array with carrier 144 inside but this is not correct. The carrier with id 144 is not available for Belgium, again, when listing the carriers in the checkout process, then it works and carrier 146 is the one shown. So, the main issue here is that when calling getDeliveryOption I just get the default carrier, that is 144. I need a way to get the carrier for a specific country like in the example above.
  10. Hi I am trying to calculate the shipping cost for a specific carrier and I just can not get it to return anything else but 0. I have created a new carrier that serves lets say Belgium. Now I thought I would be able to use the Cart.php function getCarrierCost($id_carrier, $useTax = true, Country $default_country = null, $delivery_option = null) to properly calculate the cost using this carrier. I have tried several combinations, creating the country, trying to get the delivery_option array but all I get back is 0. The carrier is enabled for the zone where Belgium is located and the id of the carrier I have just taken from the backoffice. I have printed the Country info and its also initated ok to Belgium. Nevertheless, I just can´t get it to return the correct shipping cost. Can anyone please advice on how to use this function? I just want it to return the correct price for a hardcoded country and carrier_id. Thanks in advance
  11. Hi I have a weird issue. I do not use block layered module so I simply want to deactivate it. However if I do that, the top categories stop showing any products. The subcategories work fine. Just enabling blocklayered again makes the products come back. This is 100% reproducible. Anyone have any idea on what to try? I can give access to the test site as well if it helps. I use Prestashop and initially I had blocklayered 1.x installed but today I upgraded to 2.0 which is the latest and the problem is the same. Thanks in advance for any advice.
  12. Does Yotpo now work when clicking the review button in Outlook or Office365? When testing it, it seems as it is not.
  13. Hi I am using Prestashop and I am having trouble getting chrome to refresh my CSS changes. I have tested deleting the CCC file in the theme/cache folder and the new CCC file is generated properly but it is always generated with the same name as before. I guess this can lead to the browser using a cached version right? I would expect that a recompilation of the CCC file should give it a new filename so the browsers update it or?
  14. Hi Sorry I forgot to add that, it is I have seen that the combinations are managed from the js file in the theme so it is working ok now. However it would be really interesting to know if this can be managed from the tpl file to simplify things but maybe that is not an option?
  15. Hi I am making a minor change in product.tpl for my theme. I simply want to show a specific image when the product is in stock and another image when it is not. This works almost perfectly simply using $product->quantity. However, if the product is out of stock in a certain color but is in stock in another color, then $product->quantity still says there is products in stock when I am looking at the color that is out of stock. So I guess $product->quantity is the quantity for all items in stock of this product regardless of color. How can I get the number of products in stock with the color that is currently being shown to the user. Prestashop seems to handle this correctly but I do not understand how they do it. Thanks in advice for any hints.
  16. Thanks dioniz Actually that button did not show at all yesterday. I even took a screenshot. Logging in and out of the backoffice today seemed to have resolved it. Now the </> button is visible. No idea on why Prestashop choosed not to show it :-)
  17. Hi I am testing an update from to 1.6 and one thing I do not get is that I see no way to enter html edit mode. There is simply no button anymore in the editor. Not for product and not for third party module either. I really need to be able to edit the html code directly. Is this a bug after my update or a "feature" in 1.6?
  18. Hi So, out of curiosity. Why have Prestashop choosen the tab approach for 1.6. Is it for performance or something else? It just seems a bit rough to rule out the classic flow layout like that for these very common modules? Is there a reason to switch to tabs that I am not seeing?
  19. Hi I am testing the 1.6 release. I have done the update from Initially I wanted to remove the tabs on the main page so I unhooked topsellers, featured and new from the tabs and tried to transplant them to displayHome instead. I only succeeded with featuredProducts. The other two give me an error that they can not be transplanted to displayHome. Any ideas on why?
  20. Great, I will have a look at the block categories and the smarty cache stuff. Thanks for all the help
  21. Thanks for all the help, Actually, in the Prestashop backoffice the cache is not enabled but it is set to use APC from Plesk so it should be caching. For the Smarty cache, is this something I must enable for my module? I thought it was on by default?
  22. Now I have tested Fabiens suggestion as well and it works fine, thanks a lot for the help. Can I assume that this approach with storing the main categories in the Configuration should be faster than calling Category::getMainCategories for each pageload? Or am I trying to optimize something that does not really make a big difference? Thanks again
  23. Thanks for the answers. I am testing with the Cache approach now but it seems that it is clearing the cache between page loads right? I have this code: public function getCachedTopcats() { $cache_id = 'topcats_array' . $this->context->language->id; if (!Cache::isStored($cache_id)) { echo "NOT CACHED"; $topcats = Category::getHomeCategories($this->context->language->id); Cache::store($cache_id, $topcats); } else { echo "WAS CACHED"; } return Cache::retrieve($cache_id); } But reloading the page or moving to another page always prints the "NOT CACHED". So it seems this cache is invalidated between pageloads. Am I understanding that correctly? That the Cache class is only for caching things while on the same page or am I missing something here.
  24. Hi I have a small module that gets all the categories and puts them in an array like this: $myCategories = Category::getHomeCategories($this->context->language->id); However this is done in hookDisplayTop so every time a new page shows we have to ask the database for these categories. This just seems a bit unnecessary. So I wonder if there is a way to cache, for the whole shop or for each user, this array with objects so that when I enter hookDisplayTop I could do something like: if ($myCategories == NULL) $myCategories = Category::getHomeCategories($this->context->language->id); Would this be more efficient than calling the function above for each page?
  25. Hi Today after an update of the layered navigation module I have a very strange problem. I am using Prestashop and the latest version of the layered navigation block module. After changing the module the rewrite for the manufacturers has stopped working. The manufactuer name is simply nothing. I have last nights backup and there it is ok but if possible I would like to avoid loosing todays work and fix the problem. It basically looks like on this page: http://givensa.com/en/our-brands for instance for one manufacture that should be: http://givensa.com/en/3_propaganda it just prints: http://givensa.com/en/3_ The Alt tags for the brand contains the name so it is still there but it is not being used in the link so the link only contains the id and nothing more. I have a one day old version of the site to compare with but I am not able to find the solutions so anyone that knows about how this rewriting works and could give me ideas to test would be very welcome. Thanks in advance
  • Create New...

Important Information

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