Forums / Addon Shipping Modules / MZMT MultiGeoZone MultiTable Shipping [Support Thread]

MZMT MultiGeoZone MultiTable Shipping [Support Thread]

Views: 103,656

Results 241 to 246 of 246
29 Dec 2016, 10:28 AM
#241
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

MZMT MultiGeoZone MultiTable Shipping [Support Thread]

Hi All,

I am using a modules that is not original post on this zen cart web site, it can find from zencart.cn

This module named "MultiGeoZone MultiTable Shipping for Zen Cart - version 1.101"

Someone using ZC as a long time maybe hear this module ...

OK ...

I am try integration it to a new ZC 1.5.5b web site, it work ... but ....

I see the log have this error
PHP Deprecated: Function split() is deprecated in /store/includes/modules/shipping/mzmt.php on line 103

Then I find it is a split PHP function ...

$shipping = $this->determineShipping(split("[:,]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j)));

OK, then I try change it to preg_split

$shipping = $this->determineShipping(preg_split("[:,]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j)));

Then the big problems starting ...

The PRICE from $15 change to $0 when I am try to testing the shipping ...

And for who good on PHP, I link this module
You can download it and unzip it for look on
_zen_cart_folder\includes\modules\shipping\mzmt.php (Here are the file, and line 103)

And the
$this->determineShipping function are on line about 219

Download here
http://www.myezlap.com/mzmt.zip

http://www.myezlap.com/mzmt.zip
29 Dec 2016, 10:30 AM
#242
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Re: MZMT MultiGeoZone MultiTable Shipping [Support Thread]

And my shop front end
http://www.myezlap.com/store/
You need reg to help for test the shipping (It is named EMS)

Thank you.

29 Dec 2016, 10:32 AM
#243
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Re: MZMT MultiGeoZone MultiTable Shipping [Support Thread]

If anyone can fix it.

I will make a new fixed zip version and upload there for other using, this is a good modules that I am using many year since 2007 with ZC 1.3.X until now I see this PHP Deprecated log

29 Dec 2016, 12:34 PM
#244
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: MZMT MultiGeoZone MultiTable Shipping [Support Thread]

preg_split has a little different way of specifying its associated regex. Instead of

$shipping = $this->determineShipping(preg_split("[:,]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j))); 

you'll need to specify a starting and ending character in the regex for the function to work properly:

$shipping = $this->determineShipping(preg_split("[B]/[/B][:,][B]/[/B]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j))); 
30 Dec 2016, 1:43 AM
#245
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Re: MZMT MultiGeoZone MultiTable Shipping [Support Thread]

lat9:

preg_split has a little different way of specifying its associated regex. Instead of

$shipping = $this->determineShipping(preg_split("[:,]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . 'TABLE' . $j)));

> you'll need to specify a starting and ending character in the regex for the function to work properly:
> ```
$shipping = $this->determineShipping(preg_split("[B]/[/B][:,][B]/[/B]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j))); 

Dear lat9,

Thank you, your coding work for me :hug:

30 May 2017, 10:43 PM
#246
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: MZMT MultiGeoZone MultiTable Shipping [Support Thread]

Updated version 1.2 uploaded https://www.zen-cart.com/downloads.php?do=file&id=2138 ... contains fixes to broken regex/split code, fixes to avoid SQL strict mode errors, fixes to work with PHP 7, auto-setup of additional zones, simpler installation.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.