wotnots Posted October 12, 2010 Share Posted October 12, 2010 I am adapting Prestashop as a Restaurant Guide and need to know how to disable / delete the price/weight etc. data that appears when adding a product. Is this possible and where do I go to do this, please? Link to comment Share on other sites More sharing options...
noesac Posted October 12, 2010 Share Posted October 12, 2010 Hi there, you should be able to find these values in Themes > YourTheme > product.tpl Link to comment Share on other sites More sharing options...
wotnots Posted October 12, 2010 Author Share Posted October 12, 2010 Yes, thanks, I have looked there but I am wary about what to delete or disable. I also think that the code will have to be changed on the add prooduct and perhaps other pages. Link to comment Share on other sites More sharing options...
noesac Posted October 12, 2010 Share Posted October 12, 2010 Hi there, I'm not an expert on this so maybe wait for one of the other guys:)If in doubt, just comment out (I rarely ever delete anything, always comment out). Also it's good practice to setup a test site. It's saved me a lot of headache in the past. Link to comment Share on other sites More sharing options...
wotnots Posted October 12, 2010 Author Share Posted October 12, 2010 Actually, It is a test site, but ti is onbline now. I test on my own server.What do you mean bt "comment out" it is not an expression I know? Link to comment Share on other sites More sharing options...
noesac Posted October 12, 2010 Share Posted October 12, 2010 Basically it's a way to say "don't use this in the code"There are a few ways to do this: <!-- don't show this -->// don't show this/* don't show this */Only some of them work depending on the code you're working with. To be honest I've never really understood the rule here (when to best use each style).Rocky recommends /* */ but like I said it doesn't seem to work in all types of code!!Also the first type sometimes causes problems in Firefox so just be careful. Link to comment Share on other sites More sharing options...
wotnots Posted October 12, 2010 Author Share Posted October 12, 2010 Thank you. I'll have a lok and see what happens. I usually test in at least 4 browsers before I am happy. Link to comment Share on other sites More sharing options...
wotnots Posted October 12, 2010 Author Share Posted October 12, 2010 I tried to delete in product.tpl It worked to a degree. The price etc. has gone from the product page. However, it is still on the index page. under the image. Also on the product page is the "add to cart" button.Can anyone help me go further.Here is the URL http://www.the-restaurant-guide.info/index.php. I have a simple intro page on the html index. Link to comment Share on other sites More sharing options...
wotnots Posted October 13, 2010 Author Share Posted October 13, 2010 The site is looking OK apart from the cart showing here http://www.the-restaurant-guide.info/product.php?id_product=5if I can stop this showing here and on other pages I will be delighted.I also need to remove the price and buy now button from the index page http://www.the-restaurant-guide.info/index.phphelp greatly appreciated an rewarded by free advertising on one of my websites. Link to comment Share on other sites More sharing options...
jhnstcks Posted October 13, 2010 Share Posted October 13, 2010 You need to edit all the following files to remove or comment out add-to-cart and prices etc.modules/homefeatured/homefeatured.tpl line 21-24 {l s='Add to cart' mod='homefeatured'} {else} {l s='Add to cart' mod='homefeatured'} {/if} themes/youtheme/product.tpl 176-177 <!-- add to cart form--> <form id="buy_block" action="{$base_dir}cart.php" method="post"> 187-234 <!-- prices --> {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 %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))} {l s='Price lowered!'} {/if} {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {if $priceDisplay == 2} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} {/if} {if ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))} {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPriceWithoutReduct()} {if $tax_enabled}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPriceWithoutReduct(true)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {/if} {if $product->reduction_percent != 0 && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))} {l s='(price reduced by'} {$product->reduction_percent|floatval} %{l s=')'} {/if} {if $packItems|@count} {l s='instead of'} {convertPrice price=$product->getNoPackPrice()} {/if} {if $product->ecotax != 0} {l s='include'} {convertPrice price=$product->ecotax} {l s='for green tax'} {/if} themes/yourtheme/product-list.tpl Line 22-25 {l s='Add to cart'} {else} {l s='Add to cart'} {/if} You might also have to fiddle with the css styling of the pages that you remove the code from as everything will move around when the code isnt being used. Link to comment Share on other sites More sharing options...
wotnots Posted October 13, 2010 Author Share Posted October 13, 2010 Thanks John,I'll give that a try.Clive Link to comment Share on other sites More sharing options...
wotnots Posted October 13, 2010 Author Share Posted October 13, 2010 Hi John, I have now lost the products , their images and they do not appear on the Front page., nor do they apppear in the product list. I followed your instructions to the letter. What can I do to remedy this, please?Clive Link to comment Share on other sites More sharing options...
wotnots Posted October 14, 2010 Author Share Posted October 14, 2010 I replaced all of the deleted code that you said to remove...I did this step by step. Iy seems as though it was the change in modules/homefeatured/homefeatured.tpl line 21-24 that caused the products to disappear from the index page. It is now back toi the way it was.After removing the codes above, the add to cart and price were still to be seen on the category page and on the product details.I don't thnk this was the ricght code to remove. 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