| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Improved Related Products for 4.3.2 | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
|
#2
|
|||||||||
|
|||||||||
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.
__________________
Carl Tice X-Cart 4.6.6 X-Payments 3.0 ReBOOT 3.4.1 PHP 5.6.30 MySQL 5.6.35 Linux 2.6.32-042stab120.18 ionCube PHP Loader v4.7.3 Perl 5.10.1 |
|||||||||
#3
|
|||||||
|
|||||||
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.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#4
|
|||||||||
|
|||||||||
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:
__________________
Carl Tice X-Cart 4.6.6 X-Payments 3.0 ReBOOT 3.4.1 PHP 5.6.30 MySQL 5.6.35 Linux 2.6.32-042stab120.18 ionCube PHP Loader v4.7.3 Perl 5.10.1 |
|||||||||
#5
|
|||||||
|
|||||||
Re: Improved Related Products for 4.3.2
Quote:
/skin1/modules/Upselling_Products/related_products.tpl is the file to use |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Improved Related Products for 4.3.2
Code goes to related_products.TPL not related_products.PHP - skin1/modules/Upselling_Products
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#7
|
|||||||||
|
|||||||||
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!
__________________
Carl Tice X-Cart 4.6.6 X-Payments 3.0 ReBOOT 3.4.1 PHP 5.6.30 MySQL 5.6.35 Linux 2.6.32-042stab120.18 ionCube PHP Loader v4.7.3 Perl 5.10.1 |
|||||||||
#8
|
|||||||||
|
|||||||||
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.
__________________
Carl Tice X-Cart 4.6.6 X-Payments 3.0 ReBOOT 3.4.1 PHP 5.6.30 MySQL 5.6.35 Linux 2.6.32-042stab120.18 ionCube PHP Loader v4.7.3 Perl 5.10.1 |
|||||||||
#9
|
|||||||||
|
|||||||||
Re: Improved Related Products for 4.3.2
You probably have it listed twice in skin1/customer/main/product.tpl
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#10
|
|||||||||
|
|||||||||
Re: Improved Related Products for 4.3.2
Well - I found it, but not where I thought....
Code:
By commenting out the Related Products inclusion file... that fixed it.
__________________
Carl Tice X-Cart 4.6.6 X-Payments 3.0 ReBOOT 3.4.1 PHP 5.6.30 MySQL 5.6.35 Linux 2.6.32-042stab120.18 ionCube PHP Loader v4.7.3 Perl 5.10.1 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|