Alkaye Posted March 18, 2010 Share Posted March 18, 2010 I have product options that must be seen in order for the order to be filled properly. if the customer does not "VIEW" the entire descxription, they will not see these options.One of the options is shipping as its the only way I can add shipping or free pick up.Please help,,,here is the ruff draft of my site http://www.soundmemories.com/orders/category.php?id_category=12 Link to comment Share on other sites More sharing options...
cream Posted March 19, 2010 Share Posted March 19, 2010 I think you mean the category list, where the products are sorted by category.To remove the "add to card" button, you have to edit the template "product-list.tpl".You find it in the folder "/themes/prestashop/" as long as you still use the prestashop theme. If you use another theme, replace "prestashop" with your theme.Delete following lines in "product-list.tpl": {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Add to cart'} {else} {l s='Add to cart'} {/if} That's it.Be careful and save this file first somewhere else. Link to comment Share on other sites More sharing options...
Alkaye Posted March 19, 2010 Author Share Posted March 19, 2010 thank you..but how do i open and edit the TPL file? Link to comment Share on other sites More sharing options...
Alkaye Posted March 19, 2010 Author Share Posted March 19, 2010 here is the code...can you fix it and send it back to me?<?xml version="1.0" encoding="utf-8" ?>{if isset($products)} <!-- Products list --> {foreach from=$products item=product name=products} {if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" />{if $product.new == 1}{l s='new'}{/if}{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'} {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} {if $product.on_sale}{l s='On sale!'} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product.reduction_from))}{l s='Price lowered!'} {/if}{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}{l s='Add to cart'} {else}{l s='Add to cart'} {/if}{l s='View'} {/foreach} <!-- /Products list -->{/if} Link to comment Share on other sites More sharing options...
cream Posted March 20, 2010 Share Posted March 20, 2010 An easy way to edit a “.tpl” or “.php” file is to download the file on your desktop via FTP. Open and edit the file with a simple text editor.I have a mac, so I use TextEdit. There should be a similar program on a PC.After editing the file, you have to save it again. It is important that the file is saved as plain text (this should be the normal setting of the text editor. Check the preferences if this option is selected).After saving the file, you just need to upload it again via FTP.Next time you post a code here, you should use the “code” button, so it will be displayed correctly and the others can modify it.For now, I used my “product-list.tpl” and edited it for you. You can simply replace your code with the following (Make a copy of your “product-list.tpl” first, in case something goes wrong with my code here): >{if isset($products)} <!-- Products list --> </pre> <ul> {foreach from=$products item=product name=products} {if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if} getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /> {if $product.new == 1}{l s='new'}{/if}{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'} {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} {if $product.on_sale} {l s='On sale!'} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product.reduction_from))} {l s='Price lowered!'} {/if} {if !$priceDisplay || $priceDisplay == 2}{convertPrice price=$product.price}{if $priceDisplay == 2} {l s='+Tx'}{/if}{/if} {if $priceDisplay}{convertPrice price=$product.price_tax_exc}{if $priceDisplay == 2} {l s='-Tx'}{/if}{/if} {l s='View'} {/foreach} </ul> <br> <!-- /Products list --><br Link to comment Share on other sites More sharing options...
Alkaye Posted March 20, 2010 Author Share Posted March 20, 2010 thank you..I did as you said..and it was so easy...BUT THEN...my entire list of products was missing..under categories...it was lost--so I reinstalled ... Link to comment Share on other sites More sharing options...
cream Posted March 20, 2010 Share Posted March 20, 2010 It was lost?What did you do exactly? Did you use my code or did you changed yours?Were the products missing in the list of the front office or as well in the back office?Because editing a .tpl does not cause a lost of data.Hope it will work for you after you installed presta again... Link to comment Share on other sites More sharing options...
Alkaye Posted March 20, 2010 Author Share Posted March 20, 2010 the back office was fine...and I just put back in the 'saved' code and it worked finebut when I used your code (copy/paste) the categories showed up...but the product list within the categories did not appear Link to comment Share on other sites More sharing options...
Rogerio Lima Posted April 3, 2010 Share Posted April 3, 2010 There is any way to do not show "add to cart button" only when a product as attributes related?Best regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now