If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / Can I stop Money Order showing for Gift Certificate purchase?

Can I stop Money Order showing for Gift Certificate purchase?

Started by srlaird on 14 Mar 2013, 10:34 PM · Views: 1,082

Results 1 to 5 of 5
14 Mar 2013, 10:34 PM
#1
srlaird avatar

srlaird

New Zenner

Join Date:
May 2010
Posts:
74
Plugin Contributions:
0

Post #1 by srlaird

We followed the instructions for setting up the gift certificates located here:
http://www.zen-cart.com/content.php?106-how-do-i-set-up-gift-certificates

We thought setting the product to virtual would disable the COD payment module option.

The gift card product is set as virtual, but it still shows COD as a payment option at checkout. Is there a setting we missed?

14 Mar 2013, 11:04 PM
#2
ajeh avatar

ajeh

Oba-san

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

Post #2 by ajeh

Could you hit reply and answer the questions that come up ...

On this Virtual Product ... what are the settings for:
Product is Virtual?
Always Free Shipping?
Product Model?
Product Weight?

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!

14 Mar 2013, 11:24 PM
#3
srlaird avatar

srlaird

New Zenner

Join Date:
May 2010
Posts:
74
Plugin Contributions:
0

Post #3 by srlaird

Thank you for your quick response.

This is not actually for COD, it is for Check or Money Order. Is there a way to not accept check or money order for gift certificates?

Product is Virtual? Yes, Skip Shipping Address
Always Free Shipping? No, Normal Shipping Rules
Product Model? GIFT-D402
Product Weight? 0

14 Mar 2013, 11:53 PM
#4
ajeh avatar

ajeh

Oba-san

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

Post #4 by ajeh

To make the Payment module Money Order moneyorder not work on Orders that are not Physical, you could add the code in RED:

// class methods
    function update_status() {
      global $order, $db;

      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) {
        $check_flag = false;
        $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
        while (!$check->EOF) {
          if ($check->fields['zone_id'] < 1) {
            $check_flag = true;
            break;
          } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
            $check_flag = true;
            break;
          }
          $check->MoveNext();
        }

        if ($check_flag == false) {
          $this->enabled = false;
        }
      }
[B]// disable the module if the order only contains virtual products
      if ($this->enabled == true) {
        if ($order->content_type != 'physical') {
          $this->enabled = false;
        }
      }
[/B]    }

This means that it will NOT work for Gift Certificates or Download Products or any other Virtual Product ...

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!

15 Mar 2013, 12:09 AM
#5
srlaird avatar

srlaird

New Zenner

Join Date:
May 2010
Posts:
74
Plugin Contributions:
0

Post #5 by srlaird

Thank you! Yes, we did exactly as you suggested, and it works perfectly. The change was made in includes/modules/payment/moneyorder.php. We just pulled that little code snip from the cod.php file.

Would it be possible for you to change the title of this thread from "COD" to "Money Order", so we can help others who might want to do the same with Money Orders?