VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Shipping Modules => Topic started by: harty83 on October 01, 2010, 21:54:36 PM

Title: Multi-Location Shipping Module
Post by: harty83 on October 01, 2010, 21:54:36 PM
I've developed a shipping module that supports shipping from multiple locations based on vendor or top parent category.  

The module is a shipping module that basically controls all the others.  It sorts the shopping cart by either vendor or top parent category, sends each sorted cart to the selected shipping modules for shipping options and then presents the options by vendor/category to the customer.  The customer chooses the shipping options per location and pays the total.

Read more about it and download it from here (http://hartlessbydesign.com/joomlaextensions/virtuemart/129-multi-location-shipping-module-for-vm-1-1).

Note: The standard shipping module does not allow itself to be called more than once.  Thus, it will not work with the multi-vendor shipping module without a slight hack.  

Open administrator/components/com_virtuemart/classes/shipping/standard_shipping.php.  Around line 34 you'll see:

// Prevent that list_rates is called more than once
// as this is a fallback method when other classes fail to
// list their rates
define( __CLASS__ . '_list_rates_called', 1 ) ;


Change it to be

// Prevent that list_rates is called more than once
// as this is a fallback method when other classes fail to
// list their rates
//define( __CLASS__ . '_list_rates_called', 1 ) ;


Just be aware, as it is noted in the code, that you may end up with duplicate entries if another shipping module that uses the standard shipping module as a fallback when there is an error.

Thanks,
Alan
HartlessByDesign

Edit: Updated with name change and new feature to sort by top parent category or by vendor.

[attachment cleanup by admin]
Title: Re: Multi-Vendor Shipping Module
Post by: onurb on October 03, 2010, 18:20:40 PM
hi
thanks for the module .
i m using the module with the standard shiping activated for all vendors . but the shiping options only apear for  the first vendor .

can you help ?

thanks

[attachment cleanup by admin]
Title: Re: Multi-Vendor Shipping Module
Post by: harty83 on October 03, 2010, 18:32:52 PM
Can you post a screenshot of your config for the multivendor shipping mod?

Thanks,
Alan


Sent from my iPhone using Tapatalk
Title: Re: Multi-Vendor Shipping Module
Post by: onurb on October 03, 2010, 23:04:08 PM
the only one that dosent work is the standard shiping module
thanks


[attachment cleanup by admin]
Title: Re: Multi-Vendor Shipping Module
Post by: onurb on October 04, 2010, 22:15:33 PM
do you see any misconfiguration?
Title: Re: Multi-Vendor Shipping Module
Post by: harty83 on October 05, 2010, 00:32:06 AM
Ah I remember. The standard shipping module does not allow multiple calls. I forgot to post how to bypass that. I'll post instructions when I get home. If you are somewhat familiar with code and VMs file structure, you can find it and comment it out before then. Otherwise I'll post back ASAP.

Thanks,
Alan


Sent from my iPhone using Tapatalk
Title: Re: Multi-Vendor Shipping Module
Post by: harty83 on October 05, 2010, 01:59:53 AM
Updated the first post to include the standard shipping hack.  Let me know if this does not fix the issue for you.

Thanks,
Alan
Title: Re: Multi-Location Shipping Module
Post by: onurb on October 06, 2010, 13:37:09 PM
hi
thanks ,
now the shiping options , for standard shiping are there foir all vendors .
but wen i choose them . the folowing error apears to me .

error : please chose another shiping metod .

and this strings in botom of the page :
<input type='hidden' name='shipping_rate_id' id='shipping_rate_id' value='multivendor_shipping|Mixed|vendedor1: UPS-ctt, Washupito\'s Tiendita: UPS-ctt|16.54|M3xzdGFuZGFyZF9zaGlwcGluZ3xVUFN8Y3R0fDguMjd8MjI={vendorbreak}MXxzdGFuZGFyZF9zaGlwcGluZ3xVUFN8Y3R0fDguMjd8MjI=' />
Title: Re: Multi-Location Shipping Module
Post by: harty83 on October 06, 2010, 13:46:49 PM
Can you give me another screenshot of that?


Sent from my iPhone using Tapatalk
Title: Re: Multi-Location Shipping Module
Post by: harty83 on October 06, 2010, 13:52:31 PM
Or better, if you are comfortable with it, pm me credentials to login and test so that I can look at HTML.

Thanks.


Sent from my iPhone using Tapatalk
Title: Re: Multi-Location Shipping Module
Post by: harty83 on October 07, 2010, 05:54:20 AM
Quote from: onurb on October 06, 2010, 13:37:09 PM
hi
thanks ,
now the shiping options , for standard shiping are there foir all vendors .
but wen i choose them . the folowing error apears to me .

error : please chose another shiping metod .

and this strings in botom of the page :
<input type='hidden' name='shipping_rate_id' id='shipping_rate_id' value='multivendor_shipping|Mixed|vendedor1: UPS-ctt, Washupito\'s Tiendita: UPS-ctt|16.54|M3xzdGFuZGFyZF9zaGlwcGluZ3xVUFN8Y3R0fDguMjd8MjI={vendorbreak}MXxzdGFuZGFyZF9zaGlwcGluZ3xVUFN8Y3R0fDguMjd8MjI=' />


Actually after reading through that again, it sounds like you have other shipping mods enabled in addition to the multilocation shipping mod.  In Admin -> Configuration -> Shipping tab, make sure all shipping mods are disabled except the multivendor/multilocation (new version) mods enabled.  ONLY the multivendor/multilocation mod should be enabled.  It will manage the others.

Thanks,
Alan
Title: Re: Multi-Location Shipping Module
Post by: onurb on October 08, 2010, 03:14:10 AM
every thing is like you say .
but it still dont work :(
Title: Re: Multi-Location Shipping Module
Post by: harty83 on October 08, 2010, 04:22:39 AM
Quote from: onurb on October 08, 2010, 03:14:10 AM
every thing is like you say .
but it still dont work :(


Please PM me login details so that I can take a look as I cannot reproduce this.

Thanks,
Alan
Title: Re: Multi-Location Shipping Module
Post by: onurb on October 09, 2010, 00:24:29 AM
you have pm !
Title: Re: Multi-Location Shipping Module
Post by: harty83 on October 09, 2010, 17:42:10 PM
Quote from: onurb on October 09, 2010, 00:24:29 AM
you have pm !

Thanks.  Took a look and can't seem to reproduce.  What items are you putting in your cart to cause this?  I added the three items from your ULTIMOS PRODUTOS section and all looked okay in the cart.  What browser are you using?

Thanks
Alan
Title: Re: Multi-Location Shipping Module
Post by: onurb on October 09, 2010, 18:13:56 PM
didyou finalize the order ?
it doesnt pass from shiping metod to payment .
at least on my computers
thanks
Title: Re: Multi-Location Shipping Module
Post by: harty83 on October 10, 2010, 02:44:42 AM
Version 1.1 released with bug fixes and a couple extra features.  Read the changelog (http://hartlessbydesign.com/joomlaextensions/virtuemart/129-multi-location-shipping-module-for-vm-1-1) for more info.

Thanks,
Alan
Title: Re: Multi-Location Shipping Module
Post by: onurb on October 10, 2010, 15:27:37 PM
already working
thanks !