mag80 Posted January 12, 2013 Share Posted January 12, 2013 (edited) hi, I am facing strange issue with my presta 1.5.3. (but the same problem appeared on my 1.5.2.) I am trying to disable "add to cart" option for all products with attributes - so the customer has first to choose product attribute and add to cart after that. I switched that option off in Preferences -> Products but it does not work for any product that is marked as "New". For rest of products "add to cart" option is disabled as it should, only "new products" are not affected. Attached is a screenshot showing the issue. Can anyone help on that one? Also , when adding new product I am getting this on top of the screen : Warning: Wrong parameter count for clearstatcache() in /home/...../public_html/classes/ImageManager.php on line 122 I didn't find any option that this would affect, but it could be somehow connected with main issue. Edited January 12, 2013 by mag80 (see edit history) Link to comment Share on other sites More sharing options...
chrasty Posted January 18, 2013 Share Posted January 18, 2013 I have same problem, but i dont know how repair that. Link to comment Share on other sites More sharing options...
Bill Dalton Posted January 18, 2013 Share Posted January 18, 2013 (edited) I have the same problem. I'm not sure if it is theme related, (coding in the tpl). I do know that products display fine on my homepage, (just view button, no "add to cart"), but on category pages the page may or may not show the "add to cart". So I disabled the add to cart using a work around hack. It will do until I find a better solution. What I did was change one line in my theme product-list.tpl Around line 35 {if ($product.id_product_attribute == 0 || Change 0 to 1 {if ($product.id_product_attribute == 1 || Edited January 18, 2013 by Bill Dalton (see edit history) Link to comment Share on other sites More sharing options...
mag80 Posted January 19, 2013 Author Share Posted January 19, 2013 it's strange. I had this issue with presta 1.5.2. Because of other errors, instead of updating I decided to install fresh copy of 1.5.3 and adopt it again to my needs. Exactly the same error is occurring in my fresh install. Now I'm sure it's not related to only to "new" products as currently some products marked as "new" got "add to cart" option visible and some others don't. As Bill Dalton mentioned the problem occurs only in category view. I got no clue why fresh copy got same big error. Link to comment Share on other sites More sharing options...
mag80 Posted January 19, 2013 Author Share Posted January 19, 2013 (edited) got it! I just checked few options and found out that when you add new product, this option is not working correctly. "add to cart" "on" and "off" option works only for products that were already bought in store. For instance: 1 add new product and check if this option is working 2. if not , login as customer in your store and buy 1pc of this product 3. check the store again and you'll see is working fine now I now it's not a long term solution but can do for now. Hope that someone with more experience can put some more light on that issue. Edited January 19, 2013 by mag80 (see edit history) Link to comment Share on other sites More sharing options...
gonssal Posted June 10, 2013 Share Posted June 10, 2013 This issue is related to the Layered navigation (blocklayered) module. If you are having this same issue please check this: http://forge.prestashop.com/browse/PNM-313 Fix for 1.5.x versions is included. 1 Link to comment Share on other sites More sharing options...
mandrin Posted January 5, 2014 Share Posted January 5, 2014 I don't know if this will help you, but I am posting my solution everywhere on these forums where I see people pulling their hair out for such a simple solution to a massive problem... I MUST have my customers choosing product attributes before they click the "ADD TO CART" button. Yes I know you can set in admin to hide the "ADD TO CART" button if there are product attributes, but when viewing product lists, non-attributed products will have an "ADD TO CART" button and attributed products will have nothing at all. This is confusing as hell to clients and looks horribly messy. They will not know to click the product image to take them to the product screen, and will leave the store. So what I did was - when viewing product lists, I swopped the "ADD TO CART" button for the "VIEW" button. The text and functionality work. Running PS 1.5.6 I edited "product-list.tpl" on lines 49-52 Like so: <a class="button exclusive view_button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}"><i class="icon-eye-2 icon-1x icon-mar-lr2"></i><span>{l s='View'}</span></a> {*<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}" title="{l s='Add to Cart'}"><i class="icon-basket icon-1x icon-mar-lr2"></i><span>{l s='Add to Cart'}</span></a>*} {else} {*//<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}" title="{l s='Add to Cart'}"><i class="icon-basket icon-1x icon-mar-lr2"></i><span>{l s='Add to Cart'}</span></a>*} 1 Link to comment Share on other sites More sharing options...
Josh75 Posted June 4, 2014 Share Posted June 4, 2014 if it helps anyone, I found the problem is that if you don't assign a default combination to a product, then any settings you change in the back office will be ignored. so, in order to fix this go to Products > (chose your product) Combinations > edit > then check the boxes to make a particular item the default product and save. Check your front office for confirmation. Link to comment Share on other sites More sharing options...
Recommended Posts