![]() |
Add text to cart / checkout if cart contains certain product?
Is this possible?
|
Re: Add text to cart / checkout if cart contains certain product?
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.
--- |
Re: Add text to cart / checkout if cart contains certain product?
Should be something like this. Open cart.php
Find: Code:
# Assign the current location line Before add: Code:
// WCM - Identify product In your .tpl file of checkout use: Code:
{* WCM - Identify product *} |
Re: Add text to cart / checkout if cart contains certain product?
Wow - thanks Jon - I'll test it out :)
|
Re: Add text to cart / checkout if cart contains certain product?
Let me know!
|
Re: Add text to cart / checkout if cart contains certain product?
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.
|
All times are GMT -8. The time now is 06:48 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.