Zen Cart Logo
Forums / Addon Shipping Modules / Trouble cloning UPSXML

Trouble cloning UPSXML

Views: 1,223

Results 1 to 4 of 4
24 Aug 2011, 9:13 AM
#1
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Trouble cloning UPSXML

I'm having trouble cloning UPSXML to use as an alternate shipping method. I'm changing it to upsxmlfrozen and UPSXMLFROZEN, no underscore or hyphen, and I'm getting...

Fatal error: Cannot redeclare exclude_choices() (previously declared in E:\web\public_html\fiesta\texastamale\store\includes\modules\shipping\upsxml.php:880) in E:\web\public_html\fiesta\texastamale\store\includes\modules\shipping\upsxmlfrozen.php on line 910

I cloned Store Pickup to list 2 stores and didn't have a problem.

Any ideas?

24 Aug 2011, 6:04 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Trouble cloning UPSXML

You will see that the upsxml.php contains a function on line 880:
function exclude_choices($type) {

sounds like both modules, the original and the clone, are loading the same function so you get a duplicate ...

24 Aug 2011, 8:19 PM
#3
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Re: Trouble cloning UPSXML

Thanks Ajeh. I did see that but was hesitant to just yank it out. I just deleted both the function exclude_choices($type) and the function ready_to_shipCmp( $a, $b) sections as that gives a duplicate error too, and Admin now gives me...

Fatal error: Cannot redeclare class XMLDocument in E:\web\public_html\fiesta\texastamale\store\adminarea\includes\classes\xmldocument.php on line 29

That's a completely different file so maybe there's more to cloning this UPSXML module.

What I'm trying to do is create a separate UPS shipping module for assigning to frozen food products my client sells which will have a different zone (US and Territories only), weights are all 0, and shipping is included in the price already.

I've read several of your threads about using the Document / Product category ID so you can assign a cloned shipping module to the specific requirement you have (frozen sent UPS 2-day in my case). Can you kindly show me those couple of code edits that says if UPSXMLFROZEN, use this module... otherwise use UPSXML? And how to finish cloning the upsxml module so Admin likes it?

Many, many thanks ahead of time! Been struggling with this not being a developer.

http://www.texastamale.com/store/
(Tamales/Survival Kits category have the frozen items)

24 Aug 2011, 8:28 PM
#4
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Re: Trouble cloning UPSXML

And how might I create a new Category ID that's more like products_frozen instead of document_product? Must be done with code as I can't see where to create one from the Admin. :frusty: