CRE Loaded Community

Banner


Board index » Loaded Commerce Support » Tips & Tricks

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Stop coupon discount being applied to a product on Special
PostPosted: Wed May 20, 2009 12:47 pm 
Offline
CRE Legend
User avatar

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


Top
 Profile  
 
 Post subject: Re: Stop coupon discount being applied to a product on Special
PostPosted: Fri May 14, 2010 5:21 pm 
Offline
CRE Newbie

Joined: Fri May 14, 2010 5:19 pm
Posts: 1
Hi,

Did you get any further with this. All I want is for that damn coupon box to not disappear and for a discount to be put onto the none special items in the cart.


Top
 Profile  
 
 Post subject: Re: Stop coupon discount being applied to a product on Special
PostPosted: Sat Aug 14, 2010 5:36 am 
Offline
CRE Newbie

Joined: Fri Oct 09, 2009 8:54 pm
Posts: 2
hello i think you should try this

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]



Good LUCk!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Board index » Loaded Commerce Support » Tips & Tricks

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
It is currently Thu May 17, 2012 9:42 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy