wotnots Posted October 15, 2010 Share Posted October 15, 2010 Ineed to edit the text for the featured products module. Just the heading "Featiured products" which I would like to change to "Featured Restaurants" here www.the-restaurant guider.infp/index.phpI am still trying to remove the price and Add to cart buttoins on the products and the featured product (in fact, I want to remove it from everywhere. All I need is the facility to charge people for featured producta and for advertisements. Link to comment Share on other sites More sharing options...
rocky Posted October 16, 2010 Share Posted October 16, 2010 To change "Featured Products" to "Featured Restaurants", go to Tools > Translations, select "Module translations" in the dropdown, click the USA flag, then scroll down to the "prestashop - homefeatured" section and enter "Featured Restaurants" as the translation for "Featured Products", then click "Update translations" at the bottom.PrestaShop v1.4 lets you choose whether a product can be bought and whether the price is displayed (see screenshot). Until it is released, you will have to modify code to do it. For example, edit modules/homefeatured/homefeatured.tpl and change lines 17-25 (in PrestaShop v1.3.2) from: {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {l s='View' mod='homefeatured'} {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} {l s='Add to cart' mod='homefeatured'} {else} {l s='Add to cart' mod='homefeatured'} {/if} to: {* {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}*} {l s='View' mod='homefeatured'} {* {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} {l s='Add to cart' mod='homefeatured'} {else} {l s='Add to cart' mod='homefeatured'} {/if}*} You will need to comment out the price and add to cart buttons in other files like product.tpl and product-list.tpl in a similar way. Link to comment Share on other sites More sharing options...
wotnots Posted October 16, 2010 Author Share Posted October 16, 2010 Hi Rocky,As always you are the best moderator on Prestashop. Thank you for your time and patience. I will try this. I can't wait for 1.4 to be available.I really like Prestashop and never cease to be amazed by the different ways it can be adapted. The support on the forum is excellent.Thanks again.I will update you on my final result.Cheers,Clive Link to comment Share on other sites More sharing options...
wotnots Posted October 16, 2010 Author Share Posted October 16, 2010 The name change worked great. Thank you.Just one more thing, I may be very niaive but how do I coment out? Link to comment Share on other sites More sharing options...
rocky Posted October 16, 2010 Share Posted October 16, 2010 To comment code in TPL files, you put {* before the code you want to comment out and *} after. The code between those tags will be ignored. Link to comment Share on other sites More sharing options...
wotnots Posted October 17, 2010 Author Share Posted October 17, 2010 Thank you. I will try that. However the email notification I received was this:Message:To comment code in TPL files, you put {* before the code youwant to comment out and *} after. The code between those tags will beignored.I am not to sure now. I have seen your posting {*before the code...and * after} Do I put the brackets and the atserisk before and after the code I want to comment out or do I put the {* ?I am not sure if this will show OK on this message. Link to comment Share on other sites More sharing options...
wotnots Posted October 17, 2010 Author Share Posted October 17, 2010 Ni, it did not show correctly I will try putting spaces between & # 123 ; * Link to comment Share on other sites More sharing options...
rocky Posted October 17, 2010 Share Posted October 17, 2010 You put a left curly bracket then an asterisk before the code and an asterisk then a right curly bracket after the code, just like displayed in my post. Link to comment Share on other sites More sharing options...
wotnots Posted October 17, 2010 Author Share Posted October 17, 2010 Thanks Rocky. It was just that it appeared differently in my email notification. Link to comment Share on other sites More sharing options...
wotnots Posted October 17, 2010 Author Share Posted October 17, 2010 I am sorry to pester you. I am not really sure which code to put the comment out before and after. Can you show me one example, for the cart say in the product.tpl file, please? Also do I change it in the Prestashop theme, the free2 theme which I am using or both? Link to comment Share on other sites More sharing options...
rocky Posted October 18, 2010 Share Posted October 18, 2010 There is too much code to post here, so I will have to abbreviate. You need to change lines 176-289 of product.tpl from: <!-- add to cart form--> <form id="buy_block" action="{$base_dir}cart.php" method="post"> ... </form> to: {*<!-- add to cart form--> <form id="buy_block" action="{$base_dir}cart.php" method="post"> ... </form>*} You need to do this for whatever theme you are currently using. Link to comment Share on other sites More sharing options...
wotnots Posted October 18, 2010 Author Share Posted October 18, 2010 Thanks Rocky,That is great. I am sorry but I am very new to PHP and to Prestashop but you are helping me to learn more al of the time.Thanks again,Clive Link to comment Share on other sites More sharing options...
wotnots Posted October 19, 2010 Author Share Posted October 19, 2010 Hi Rocky and anyone else who can help,I only have one more problem to overcome on the web site http://the-restaurant-guide.info I need some way for visitors to leave a comment about any restuarant. The Prestashop requirement is for visitors to log in to leave a comment. However the Prestashop login here http://www.the-restaurant-guide.info/authentication.php?back=order.php?step=1 requires shipping and payment details. Is there any way to skip these details and just have a simple login procedure without shipping and payment details? I can then put the login/sign up link on the index page.Please also tell me where to go to make a donation to or to Prestashop for all the help I have received.Clive Link to comment Share on other sites More sharing options...
hhashim Posted October 19, 2010 Share Posted October 19, 2010 I am not aware if there is any other way, if there is I would like to know too - you can do this by editing the order-steps.tpl in the active theme folder. Change the five steps to three steps. Adjust the lines so that they match the steps you needed. Based on your requirement as I understand it you want to get rid of the two steps ( shipping and payment). Therefore you may replace the lines in the particular file like the following code. ></pre> <ul> {l s='1'} {if $current_step=='address' || $current_step=='login'} {l s='Summary'} {else} {l s='Summary'} {/if} {l s='2'} {if $current_step=='address'} {l s='Login'} {else} {l s='Login'} {/if} {l s='3'} {l s='Address'} And you should end up with something like this picture attached here. Link to comment Share on other sites More sharing options...
wotnots Posted October 19, 2010 Author Share Posted October 19, 2010 Thank you for that code. I am sure this will do what I want.I'll give it a try and update you shortly.Thanks again.Clive Link to comment Share on other sites More sharing options...
wotnots Posted October 19, 2010 Author Share Posted October 19, 2010 Hi Hhashim,Thank you. That worked fine apart from one small thing. The address does not show correctly in the steps at the top.Have a look herer, please http://www.the-restaurant-guide.info/authentication.php?back=order.php?step=1Thanks again,Clive Link to comment Share on other sites More sharing options...
hhashim Posted October 19, 2010 Share Posted October 19, 2010 the last bit of the code should be {l s='Address'} It should look and work OK. Link to comment Share on other sites More sharing options...
wotnots Posted October 20, 2010 Author Share Posted October 20, 2010 Hhashim, you are a star. Thank you for your help.Clive Link to comment Share on other sites More sharing options...
kadiev Posted June 9, 2011 Share Posted June 9, 2011 Hi anybody know how to do featured products be changed automatically each time you visit the site. Thank you. http://www.topoffer.bg 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