| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Add text to cart / checkout if cart contains certain product? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Is this possible?
__________________
Today is a beautiful day, grab it while you can and live it to the full ![]() Version 4.2.3 UNIX |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Yes, it should be possible. On the page you want to modify, you can use webmaster mod to find an array that the products are stored in. You can look for the template where that array gets looped though to display the products. You can add a test to see if the product in question is in the array. If it is, you can set a variable that you can use to display the text.
---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Should be something like this. Open cart.php
Find: Code:
Before add: Code:
In your .tpl file of checkout use: Code:
|
|||||||||
#4
|
|||||||
|
|||||||
![]() Wow - thanks Jon - I'll test it out
![]()
__________________
Today is a beautiful day, grab it while you can and live it to the full ![]() Version 4.2.3 UNIX |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Let me know!
|
|||||||||
#6
|
|||||||
|
|||||||
![]() For some reason, I couldn't get this to work (in 4.4.5) with the is_array($cart) condition in the if statement - but it seems to work without it just fine. I'm trying to take this a step further and change the user's membership level based on purchasing a certain product (the membership). Thanks for this info.
__________________
X-Cart v4.4.5 ********* Power Filter BCSE Refer-A-Friend BCSE Auth.Net DPM/CIM |
|||||||
|
|||
X-Cart forums © 2001-2020
|