Jump to content

Remove text from some pages, but not all


Recommended Posts

Hi,

I'm new to PrestaShop and was wondering if anyone can help me. I'm trying to remove the words "Available" and "Add to cart" from the travel section of this website:

http://www.baby-international.com/35-travel

How do I remove those words from this section but retain them in all the other sections such as strollers, food, etc? Many thanks in advance for any help.

Best regards,
JB

  • Like 1
Link to comment
Share on other sites

Just to add to my question above:

Is it possible to modify text that's displayed by default in just 1 category and not in all? Specifically, I'd like to remove "available" and "add to cart", as well as add "starting from" to each price in the travel section of my website but not in the other sections. Also, under each product description, I'd like to remove the following text just from the travel category - "quantity", "availability", "items in stock" and "add to cart." Is this possible? Here's the link:

http://www.baby-international.com/35-travel

Many thanks again for any help.

Link to comment
Share on other sites

Hi JB,

I’m trying to remove the words “Available” and “Add to cart” from the travel section of this website:


I don't have a full solution, but I have found that editing the product-list.tpl you will find the code to change the default Available and Add to Cart text and a few other items I believe you mentioned.

Here is the code in the product-list.tpl to look for Add to Cart and Available follows
{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
{l s='Add to cart'}
               {else}
{l s='Add to cart'}
               {/if}



and




Hope that helps...
What I have not found is the best way to only change that for a specific category or specific product. This is same question I have . If you find a solution to the code to target a specific category please post it.
Suz

{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}
Link to comment
Share on other sites

Many thanks for the reply Suz. I saw that bit of code as well but since my coding skills are pretty much non-existent, I didn't know how to edit it correctly. I did post the same query on a smarty forum though and got this response:

You need to find a variable in your template that tells you what section you are in, and do something like:

Code:
{if $section eq "Travel"}
put travel section stuff here
{else}
put non-travel section stuff here
{/if}


Maybe $section is the one, otherwise you can (temporarily) put this in the template:

Code:
{debug}


and it will pop up a window with all the available template variables.


I'll try that and see if I get anywhere with it. I hope that helps you too.

Link to comment
Share on other sites

  • 3 years later...

Hi,

 

I'm new to PrestaShop and was wondering if anyone can help me. I'm trying to remove the words "Available" and "Add to cart" from the travel section of this website:

 

http://www.baby-inte...l.com/35-travel

 

How do I remove those words from this section but retain them in all the other sections such as strollers, food, etc? Many thanks in advance for any help.

 

Best regards,

JB

 

 

I think you may change your post settings

 

H M Hannan from Bangladesh

Edited by hmhannan (see edit history)
Link to comment
Share on other sites

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