astolf Posted September 18, 2013 Share Posted September 18, 2013 Good evening, I use configurable products so I need to remove the image "add to cart" from the category view because it would add to the cart a standard product. If you did enter instead of enter it directly in the cart that product would be configurable. Otherwise, if it were possible, would be even better if clicking on it would bring to the board of that product in a way that allows then to add to cart Product configured. In the "accessories" of a product I would also like there to remove the button "add to cart" because all the accessory products are also configurable. Finally I would like to remove the quantity field in the product having the amount used as an attribute. thanks Link to comment Share on other sites More sharing options...
PascalVG Posted September 19, 2013 Share Posted September 19, 2013 Astolf, Normally (I say, normally, on previous versions there were problems with it...) The add to cart button should not be displayed when setting the following option: Preferences->Products scroll down until you see an option: Display the "add to cart" button when a product has attributes Turn this to OFF See if it works. For the other 2 questions, can you show me a screenshot where exactly you want them to be removed? pascal Link to comment Share on other sites More sharing options...
abellasmith Posted September 19, 2013 Share Posted September 19, 2013 worked for me. Thanks! Link to comment Share on other sites More sharing options...
PascalVG Posted September 19, 2013 Share Posted September 19, 2013 Vekia, a little too fast. There are still two questions from the original post left open... In the "accessories" of a product I would also like there to remove the button "add to cart" because all the accessory products are also configurable. Finally I would like to remove the quantity field in the product having the amount used as an attribute. I asked for some screenshots where exactly Astolf want these have removed... Astolf? pascal Link to comment Share on other sites More sharing options...
astolf Posted September 20, 2013 Author Share Posted September 20, 2013 Thank you! In the attached image Link to comment Share on other sites More sharing options...
gabiatti Posted September 20, 2013 Share Posted September 20, 2013 I have the same problem here. The option under preferences/products tab hides the add to cart button of main products that has a combination. But If I include an accessory with combinations too, the add to cart button is enabled. PrestaShop™ 1.5.4.1 Default theme with minor changes Link to comment Share on other sites More sharing options...
PascalVG Posted September 21, 2013 Share Posted September 21, 2013 Hi Astolf, For quantity: Edit themes/<your theme folder>/product.tpl: Find this code and comment it out: {* <-- comment out <!-- quantity wanted --> <p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> <label>{l s='Quantity:'}</label> <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> </p> *} <-- /comment out <!-- minimal quantity wanted --> For the add to cart in accessories: Same file, almost at the end (2 screens before end): Find code and comment out: {if isset($accessories) AND $accessories} <!-- accessories --> <div id="idTab4" class="bullet"> <div class="block products_block accessories_block clearfix"> <div class="block_content"> <ul> {foreach from=$accessories item=accessory name=accessories_list} {if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0 || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode)} {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} <li class="ajax_block_product{if $smarty.foreach.accessories_list.first} first_item{elseif $smarty.foreach.accessories_list.last} last_item{else} item{/if} product_accessories_description"> <p class="s_title_block"> <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}">{$accessory.name|escape:'htmlall':'UTF-8'}</a> {if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} - <span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span>{/if} </p> <div class="product_desc"> <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'medium_default')|escape:'html'}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /></a> <div class="block_description"> <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:400:'...'}</a> </div> <div class="clear_product_desc"> </div> </div> <p class="clearfix" style="margin-top:5px"> <a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> {* <-- comment out {if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0)} <a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")|escape:'html'}" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {/if} *} <-- /comment out </p> </li> {/if} {/foreach} </ul> </div> </div> </div> {/if} <!-- Customizable products --> (Code snippets from 1.5.5.0.) Hope this does the trick pascal 1 Link to comment Share on other sites More sharing options...
PascalVG Posted September 21, 2013 Share Posted September 21, 2013 Astolf, gabiatti, One second thought: I'm not sure if you can (i.e. should) take out the accessories add to cart button, as I believe there's no other place/way to add them! Please check how it's working for you to go through the WHOLE add product process. Can the customer get all additions, combinations etc. it wants? Can it order any acessories now? pascal Link to comment Share on other sites More sharing options...
astolf Posted September 22, 2013 Author Share Posted September 22, 2013 Astolf, gabiatti, One second thought: I'm not sure if you can (i.e. should) take out the accessories add to cart button, as I believe there's no other place/way to add them! Please check how it's working for you to go through the WHOLE add product process. Can the customer get all additions, combinations etc. it wants? Can it order any acessories now? pascal PascalVG thanks for the time dedicated to me, I was able to edit the file product.tpl and now it works. Then I ask you to excuse my English but I'm Italian. Regarding your last message you are quite right, it's the same thing that I was thinking. Inside the accessories section, the user can now view them but then can not order them directly. It would be possible to propose the accessories after entering the item in your shopping cart? Let me explain: a person buys, for example (in my site: http://goo.gl/0q32DZ) a pen drive. After you have added in your shopping cart accessories are proposed. In this way you can add accessories with the combinations with the purchased product. I hope I was clear. I preferred to add the link to my site still in development to be more clear, if it is prohibited to take off right away. thanks Link to comment Share on other sites More sharing options...
PascalVG Posted September 25, 2013 Share Posted September 25, 2013 Hi Astolf, I don't see an easy way to add accessoiries LATER to a product, when it's added to the cart already. Maybe what you can try to do is to add some procedural changes to the add to cart button, like this: First you don't show the accessoiries (or you let it just as it is, if you don't mind if the customer adds accessories any time, either before or after setting the combinations). Then: When the customer Presses the add to cart-button (and the product indeed has accessories), you can show a message box with two buttons. and a message that "There are accessories for this product available in which you might be interested". It goes then either back to the product detail page (when pressing a button "Let me have a look"), now showing the accessories if turned off before, or it just adds the product to the cart, when pressing a button "No thanks, just add" or so. Some idea how to add a dialog box, can be found here. http://nemops.com/better-prestashop-add-to-cart/ (Thanks Nemo !) Needs some tweaking of course to fit to the story above, but it may work for you. Give it a try, and you can always ask for more help if needed. My 2 cents, pascal Link to comment Share on other sites More sharing options...
astolf Posted September 25, 2013 Author Share Posted September 25, 2013 Thank you, I think it is the best solution Link to comment Share on other sites More sharing options...
astolf Posted September 26, 2013 Author Share Posted September 26, 2013 In the mobile version remained "quantity" - "add to cart in the accessories." you can remove them? I then noticed that is missing the "product customization", which is present in the PC version next to "data sheet" and "accessories" in the tabs under the article. Link to comment Share on other sites More sharing options...
tomerg3 Posted September 26, 2013 Share Posted September 26, 2013 Just a suggestion, you can offer the customers to select the attributes on the product list pages, using the following module. http://www.prestashop.com/forums/topic/79758-module-product-list-attributes-allow-customers-to-select-product-attributes-on-the-category-manufacturer-supplier-and-search-pages/ Link to comment Share on other sites More sharing options...
Recommended Posts