Post by kg0925 » Fri May 04, 2018 5:04 pm

i used this code to disable cod for coupon code. it's working perfectly. but i also want to disable cod for a particular manufacturer what change will i need any suggestion?

Code: Select all

if (isset($this->session->data['coupon'])) {   $status = false; }

Newbie

Posts

Joined
Wed Mar 29, 2017 11:09 pm

Post by grgr » Sat May 05, 2018 7:30 am

Yuu will have to loop through all the cart products at checkout page and test the manufacturer of each product. If you find a match for the manufacurer in question you could set a session variable for this and do the same as above.

Image Image Image Image Image Image


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm

Post by Johnathan » Mon May 07, 2018 9:34 pm

If you don't want to do the coding yourself, Restrict Payment Methods can do this. It can enable/disable any payment method based on a variety of rules, including manufacturer.

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.

Image
Image Image Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 43 guests