Jump to content

Exclude Products From Cart Rule


ramlov

Recommended Posts

Hey

 

I have some products that I would like not to be considered in the cart rule. More specific I would like that if they buy one of the excluded products it don’t count in the order total used to calculate discounts, free shipping ect.

 

I have tried to ad following code to the cartrule.php and ad it in the override folder but it does not work. Anyone who can see the error? 

foreach ($package_products as $product)    
        if ($product['id_product'] == 129 || $product['id_product'] == 130 || $product['id_product'] == 131 || $product['id_product'] == 132 || $product['id_product'] == 133 || $product['id_product'] == 134 || $product['id_product'] == 135 || $product['id_product'] == 136 || $product['id_product'] == 137 || $product['id_product'] == 138) 
        $order_total -= $use_tax ? $product['total_wt'] : $product['total'];

// Jacob

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...