Jump to content

Tpl modification issue


paolagomez7310

Recommended Posts

Hi, 

 

I am trying to amend the product-list.tpl file. I wanted to include an extra image with his link at the end of my product list (this bit is not a product itself just an image linked to an external site).

 

The problem is that, as I am modifying the product-list.tpl file, that new bit is not appearing in all the pages of my products (in all the categories, subcategories and every single product).

 

How can I do it to make that bit only visible only in the main page of products (the page with the overall view of products) and not in each product/pack of products etc. 

 

Not sure if I am explaining myself but just in case:

 

- Overall page of products (contains Product A + Product B + Pack of products C  all of them with their price, description etc) ONLY here is where I want my extra image/link to be displayed.

      

 

         -Product A page  it's being displayed here as well but don't want it to be shown here

         -Product B page it's being displayed here as well but don't want it to be shown here

         - Pack of products C it's being displayed here as well but don't want it to be shown here

                  - Sub-product 1 of pack C it's being displayed here as well but don't want it to be shown here

                  - Sub-product 2 of pack C it's being displayed here as well but don't want it to be shown here

 

 

This is how I have my code for that bit at the moment in product-list.tpl:

 

<!-- Extra bit to be added in main product page -->

 
<div class="block_content row">
<a class="product_img_link" href="https://xxxxxx" title="Self Decoration" itemprop="url">
<img class="replace-2x img-responsive front-image" src="https://xxxxx/p/1/1-home_default.jpg" alt="Self Decoration" title="Decorative objects" width="272" height="310" itemprop="image"/>
                                       
                    </a>
 
</div>
 
 
 
I would really appreciate if you can help me
 
 
Thanks
 
 
 
 
Link to comment
Share on other sites

I have read your post two times and didn't understand anything. Maybe others have the same problem.

 

 

Hi Scully, thank you for your reply.

 

I am going to try to explain better:

 

I have a theme downloaded.  In my products section I have different packs of products.

 

Example:

 

Products:

 

Pack1: this pack contains oranges, limes and lemons.

Pack 2: this pack contains strawberries, lemons and watermelon.

Pack 3: this pack contains pineapple and kiwis

 

And in this page of products (home>products), right after the 3 packs I wanted to add an extra image with a link. (this last image is not a product is just an image with a link) 

 

 

So I went to filezilla and searched for the code of that page. The code was in product-list.tpl 

 

An I edited the document and added at the end this: 

 

 

<!-- Extra bit to be added in main product page -->

 
<div class="block_content row">
<a class="product_img_link" href="https://xxxxxx" title="Self Decoration" itemprop="url">
<img class="replace-2x img-responsive front-image" src="https://xxxxx/p/1/1-home_default.jpg" alt="Self Decoration" title="Decorative objects" width="272" height="310" itemprop="image"/>
                                       
                    </a>
 
</div>
 
And I worked! the image was then shown in mi products section after the Pack , pack 2 and pack 3.  Everything fine then BUTTT...
 
Then I realised that, when clicking in Pack 1 (Products>Pack1) the image that I added was also there. 
 
And, even More, when clicking in each one of the products of that pack (Products>Pack1> limes) or (Products>pack1>Oranges) the image was there again. 
 
My question is: how can I make that image to appear only in the overall Products page but NOT in all the others.
 
Home> products.    YES
Home>products>Pack 1   NO
Home> products>Pack 1>oranges  NO
Home>products>Pack 2   NO 
Home>products>Pack 2>strawberries   NO
etc
 
 
 
Thanks a lot for your help
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...