Jump to content

[SOLVED] Change featured product text


Recommended Posts

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.php
I 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

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.

31574_oT6GaFsHLuFhD0vPwmSu_t

Link to comment
Share on other sites

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

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 you
want to comment out and *} after. The code between those tags will be
ignored.
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

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

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

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

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.

31749_3w3ejpiQJ9kg4bt7Srqp_t

Link to comment
Share on other sites

  • 7 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...