![]() |
Improved Related Products for 4.3.2
I've just done a bit of work updating the Related Products in 4.3.2, which originally showed only the title of the product - not very inspiring!
I changed modules\Upselling_Products\related_products.tpl to the following (just back up your original related_products.tpl and install this instead): Code:
{* I created a new class called '.related', which I added to the end of altskin.css: .related { margin: 0 0 8px 0; } This just makes a bigger margin at the bottom of the picture of the product. I added paragraph tags around the product title, as it then appears in the standard paragraph style I have set for the product description. I created a new templated called 'currencyrelated.tpl', which I needed to do, to change the size and colour of the price. I just copied currency.tpl to my hard drive, edited it to use the class ".currencyrelated", and then was able to apply CSS to that class, rather than having to rely on the CSS that applies to 'currency.tpl'. (If anybody knows of another way to do this, I would be very interested - because currency.tpl is a complete template, I couldn't apply any CSS to it, without affecting all other prices on the site (i.e. making them all bigger and red! Which I didn't want.) This is 'currencyrelated.tpl': Code:
{* The only difference is the span at the top, which now uses the style .currencyrelated. I also added some styles to reduce the size of the gap at the bottom of the Related Products section - in altskin.css I added: .uproducts { margin-bottom: 0; } .uproducts .content { padding-bottom: 0; } .uproducts img { border: 1px solid black; } (I gave .uproducts a bottom margin of zero to negate the 30px bottom margin which .dialog has, the HTML is <div class="dialog uproducts"> As .uproducts comes second, it overrides .dialog. But .dialog is used for other parts of the product page, such as Recommended Products, etc. so I didn't want to remove the bottom margin on .dialog, as it looks okay (for me) on those other parts. I also added the .currencyrelated class to the end of altskin.css, as follows: .currencyrelated { font: bold 1.5em Arial, Helvetica, sans-serif; color: #b00; } You can view the results here: http://www.mrdtrading.co.uk/store/home.php?shopkey=martin I'm surprised it wasn't done this way as standard - I think that having a photo and price of the product makes customers much more likely to click on them, rather than just having text. |
Re: Improved Related Products for 4.3.2
Looks promising... Am running 4.3.2 as well, but my \Upselling_Products\related_products.tpl looks different:
Code:
{* Not sure where your mod what plug in. |
Re: Improved Related Products for 4.3.2
Hi Vacman, I would recommend making a backup of your related_products.tpl, and installing mine instead - I forgot that I had included a lot of code from a much older site I did three years ago, I'll amend my original post to say that the whole thing should be used to replace related_products.tpl.
|
Re: Improved Related Products for 4.3.2
Did that...
Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /home/vacsew/public_html/modules/Upselling_Products/related_products.php on line 40 Line 40: Code:
{if $product_links ne ""} |
Re: Improved Related Products for 4.3.2
Quote:
/skin1/modules/Upselling_Products/related_products.tpl is the file to use |
Re: Improved Related Products for 4.3.2
Code goes to related_products.TPL not related_products.PHP - skin1/modules/Upselling_Products
|
Re: Improved Related Products for 4.3.2
Wow.... I am such a noob! I must be getting to screw that one up... lol.
Works now - thanks! |
Re: Improved Related Products for 4.3.2
Check this out:
http://www.vacsew.com/eureka-dcf-9-filter-74481-genuine-filter-dcf9.html Notice that there are two Related Products boxes. Obviously I only need the one with the image. |
Re: Improved Related Products for 4.3.2
You probably have it listed twice in skin1/customer/main/product.tpl
|
Re: Improved Related Products for 4.3.2
Well - I found it, but not where I thought....
Code:
{if $active_modules.Upselling_Products} By commenting out the Related Products inclusion file... that fixed it. |
Re: Improved Related Products for 4.3.2
This are 2 different modules. Upselling products is what you define for every product as an upsell products, recommended products are random.
|
Re: Improved Related Products for 4.3.2
I'm glad it works fine for you Vacman - I think Qualiteam should make it look like this as standard.
|
Re: Improved Related Products for 4.3.2
Yep - Thanks for the help as well.
|
Re: Improved Related Products for 4.3.2
Thanks! This works great for me. :D
|
Re: Improved Related Products for 4.3.2
I've updated the code a little - I've edited the first post so the new code is in there. I've added two more <a href> elements, to go around the product title and price. Before I did this, there were problems with Internet Explorer underlining them both, and I couldn't target them properly using CSS (as the image, product title and price were all contained within one <a> element.)
Just copy and paste it over your current related_products.tpl, everything else should be the same. |
Re: Improved Related Products for 4.3.2
Great. Maybe flip these two lines around so the open/close tags line up nicer:
PHP Code:
|
Re: Improved Related Products for 4.3.2
Thanks for that Torres, I've fixed it now.
|
Re: Improved Related Products for 4.3.2
Hi Sisom,
Nice mod. Unrelated to this, on your product thumbnails, you have "See Details" link added. How did you do this? |
Re: Improved Related Products for 4.3.2
I think the 'See Details' link was already there, in 4.3.2?
This is my code for /customer/main/products_list.tpl Code:
{* I think if you insert it in the same place in your template, it will work. It's odd that you don't have it, because it was there in 4.1.0! |
All times are GMT -8. The time now is 08:23 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.