Forums / Built-in Shipping and Payment Modules / How do I prevent "Cash on Delivery" on dropship products?

How do I prevent "Cash on Delivery" on dropship products?

Locked

Views: 4,267

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
31 Aug 2008, 7:26 PM
#1
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

How do I prevent "Cash on Delivery" on dropship products?

I have some dropship product and regular own stock products in store.

Is there a way to prevent users to order the drop ship products without "Cash on Delivery" feature, without removing the "Cash on Delivery" feature compleately?

31 Aug 2008, 7:54 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,685
Plugin Contributions:
0

Re: How do I prevent "Cash on Delivery" on dropship products?

What happens if the customer orders one of each?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

31 Aug 2008, 8:37 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,685
Plugin Contributions:
0

Re: How do I prevent "Cash on Delivery" on dropship products?

Almost anything is possible. You will need some sort of a "flag" on the products that are dropship only and then you need to test the cart for products with that flag. Can you write php?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

1 Sep 2008, 2:54 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How do I prevent "Cash on Delivery" on dropship products?

As Kim suggested, there would need to be some type of flag or indicator that can be checked for concerning the products to know what kinds are in the cart ...

Do you have a flag already, such as:
All Products in a specific Category
Model Number
Additional Field
etc. etc. etc.

With a flag, that can use a function in the shopping_cart.php class to test the cart content to know if 1 or more Products have the "flag" ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Sep 2008, 4:55 PM
#7
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: How do I prevent "Cash on Delivery" on dropship products?

OK I was wondering is sutch feature allready existed and according to your resposes it does not.

Therefore I will program it my self.

I installed allready the dropshipping module which flags each product if it is from own stock or a drop ship supplier.

I must take a closer look at the code how to det the "flag" info.

Thanks for your comments and especially the reference to shopping_cart.php class was wery helpfull. Now I know where to start.

3 Sep 2008, 10:46 PM
#8
dutchkiwis avatar

dutchkiwis

New Zenner

Join Date:
Sep 2008
Posts:
20
Plugin Contributions:
0

Re: How do I prevent "Cash on Delivery" on dropship products?

Hi Marksu,

I am very surprised to hear there is no 'ready' solution for your problem yet. Let me know how you get on with this development - I have a similar situation: when the customer selects shipping method table rate I want to disable payment method cash on delivery. I don't want the mailman to collect the cash.

Our problem screams for a generic approach that allows admin to set allowed the shipment/payment combinations AND default settings for any combination.

My PHP skills are limited but let me know if I can help.

Thanks,
Ed

4 Sep 2008, 3:36 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How do I prevent "Cash on Delivery" on dropship products?

You could edit the payment module for cod.php and change:

        $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);

to read:

      if ($_SESSION['shipping']['id'] != 'table_table') {
        $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
      }

This would stop it from showing COD when Table Rate table has been selected as the shipping method ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

5 Sep 2008, 8:30 PM
#10
dutchkiwis avatar

dutchkiwis

New Zenner

Join Date:
Sep 2008
Posts:
20
Plugin Contributions:
0

Re: How do I prevent "Cash on Delivery" on dropship products?

:clap:Works fine as a quick fix - thanks heaps!!!

I still believe there is an opportunity for a generic framework controlling allowed payment/shipment options but that is perhaps for another time!

6 Sep 2008, 8:32 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How do I prevent "Cash on Delivery" on dropship products?

Thanks for the update that this worked for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!