View Single Post
  #3  
Old 01-11-2012, 09:28 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default 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 $smarty->assign("location", $location);

Before add:

Code:
// WCM - Identify product // Change X to your numeric productid if (is_array($cart) AND !empty($cart['products']) foreach($cart['products'] as $k=>$v) if ($v['productid'] == X) $smarty->assign('found_product', 1); // / WCM - Identify product

In your .tpl file of checkout use:

Code:
{* WCM - Identify product *} {if $found_product eq 1} Display my message {/if} {* / WCM - Identify product *}
Reply With Quote