Sorry to do this to you all, but hopefully this is the final form of my mod, really and truly.
Added a description to the order review and cleaned code.
Sorry to do this to you all, but hopefully this is the final form of my mod, really and truly.
Added a description to the order review and cleaned code.
OK, I've finally gotten this module to work with the ability to set a shipping zone that causes the module to be DISABLED. If the shipping address is IN the shipping zone, this module is DISABLED. If the shipping address is NOT IN the shipping zone, this module is ENABLED.
I've attached an updated rfq.php file with all the above corrections and my corrections. This is for Zen-Cart 1.38a.
Here's my corrections:
Starting at line 40 replace this code:
With this code:Code:$check_flag = true; $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id <> '" . MODULE_SHIPPING_RFQ_ZONE . "' and zone_country_id = '" . $order->delivery['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->delivery['zone_id']) { $check_flag = false; break; } $check->MoveNext(); }
WOO HOO!Code:$check_flag = true; $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id <> '" . MODULE_SHIPPING_RFQ_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while (!$check ->EOF) { if ($check->fields['zone_id'] == $order->delivery['zone_id']) { $check_flag = false; break; } $check->MoveNext(); }
Last edited by 3rdCoast; 21 Jun 2011 at 10:07 PM.
One last (fingers crossed) minor correction. (Change <> to =).
I'll submit update to the add ons directory as well.Code:$check_flag = true; $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_RFQ_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while (!$check ->EOF) { if ($check->fields['zone_id'] == $order->delivery['zone_id']) { $check_flag = false; break; } $check->MoveNext(); }
Last edited by 3rdCoast; 27 Jun 2011 at 01:57 PM.
I am using your RFQ139 and activate both under payment and shipping. I got the shipping module "orange" status and thus cannot see this method when I am doing a check out. My version is 1.3.9h and is a fresh installation under localhost. Can you help?
Hi asiamarinehub
I get orange in admin also and believe it has to do with the setup of this mod to activate only when certain products are in cart eg oversized, overweight, specific categories/products.
Because I use Australia Post (OzPost mod) as my default shipper, who themselves prescribe limits upon what they will ship, I have no need for RFQ unless the certain products are in cart.
As I assume you are flagging my mod variation, you may wish to compare my mod variation with the original mod to get an idea how it works.
Hope this helps.
Hi dw08gm
You mean there is special setting or conditions in order to use RFQ? I did not quite get your last paragraph.
"As I assume you are flagging my mod variation, you may wish to compare my mod variation with the original mod to get an idea how it works."
Hi asiamarinehub
I am no expert on the mod and only shared what worked for me. I have added conditional statements to the mod but IIRC these were remmed out in those uploaded.
Your problem could be anything. You may not have installed the mod correctly.
Have you uninstalled my variant and installed the older version to see if you get the same result.
Cheers
1) Try removing/remming out the following code in both:
a )includes\modules\payment\rfqpay.php
b) includes\modules\shipping\rfqship.php
2) If the above does not work, try removing/remming out the following code in both:Code:// enable-disable the module if order contains certain products or categories if (IS_ADMIN_FLAG == false) { if ( ($_SESSION['cart']->in_cart_check('master_categories_id','4') < 1) && ($_SESSION['cart']->in_cart_check('master_categories_id','5') < 1) && ($_SESSION['cart']->in_cart_check('master_categories_id','6') < 1)) { $this->enabled = false; } }
a )includes\modules\payment\rfqpay.php
b) includes\modules\shipping\rfqship.php
3) Report back here whether any of the above solves your problem or not.Code:// disable the module if order only contains virtual products if ($this->enabled == true) { if ($order->content_type == 'virtual') { $this->enabled = false; } }
Cheers
Hi dw08gm
I remmed out the enable/disable and no change then remmed out disable as well and no change?