 |
| CRE Legend |
 |
Joined: Thu Jun 12, 2008 6:39 am Posts: 2394 Location: New Zealand
|
|
Hello,
We sell 100s of products in several categories, some of which are on special in each category. We also run 10% discount coupons. I'd rather not just list those product ids in the coupon admin because it would be an admin nightmare.
What I'd like to do is hardcode it so specials don't get a discount from a coupon but other products would.
This is one way (which hides the coupon entry box if a special is included):
[php]<?php
$products_array = $cart->get_products();
$xc_count=0;
for($ii=0; $ii<count($products_array); $ii++)
{
if(strlen(tep_get_products_special_price( $products_array[$ii]['id']))<=0 )
$xc_count=$xc_count+1;
}
if($xc_count>0)echo $order_total_modules->credit_selection();
?>[/php]
But this won't work if a non-Special product is added to the same cart (and the coupon discount will then get applied to both products)
Thanks for your time
Simon
_________________ www.codemehappy.com For Cre Loaded tips, how-to articles and more
|
|