Post by thegeekz » Wed Nov 10, 2010 5:24 pm

Hi,

I'm in need to configure 2 types of shipping -- one for wholesale,and one for retail

Retail will use our local post, and Wholesale will use Fedex & EMS.

Is there anyway to differentiate and have 2 shipping by weight modules?

Thank you.

Regards

Faustine
Last edited by thegeekz on Tue Apr 12, 2011 12:37 pm, edited 1 time in total.

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by Johnathan » Wed Nov 10, 2010 10:17 pm

To get a second weight-based shipping module, you could duplicate all the relevant files of the original and then change all instances of "weight" to "weight2" or something like that. For displaying different shipping options to different customer groups, you'd probably have to edit the shipping controller/view files to add an "if-then" statement to display the different shipping options. Unless you don't mind both options being visible to both customer groups.

If you're not comfortable doing this yourself and want paid support, I could do it for you -- let me know and I can give you an estimate.

(For the OpenCart team: Restriction of shipping options by customer groups would probably would be a good thing to add to the core at some point.)

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Qphoria » Wed Nov 10, 2010 10:25 pm

you will never need to clone the weight based module. It is geozone based. You can create as many geozones as you want

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by thegeekz » Thu Nov 11, 2010 11:24 am

Hi Johnathan,

Thank you for your help..

I understand about the 1st part, easy enough.. But where are the weight.php file & related files based? Still a newbie, and groping around the directories.... :)

2nd part about the showing if-then options, could you explain further with an example, so that I can edit the code based on that?

Thank you.
Johnathan wrote:To get a second weight-based shipping module, you could duplicate all the relevant files of the original and then change all instances of "weight" to "weight2" or something like that. For displaying different shipping options to different customer groups, you'd probably have to edit the shipping controller/view files to add an "if-then" statement to display the different shipping options. Unless you don't mind both options being visible to both customer groups.

If you're not comfortable doing this yourself and want paid support, I could do it for you -- let me know and I can give you an estimate.

(For the OpenCart team: Restriction of shipping options by customer groups would probably would be a good thing to add to the core at some point.)

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Thu Nov 11, 2010 11:27 am

Qphoria wrote:you will never need to clone the weight based module. It is geozone based. You can create as many geozones as you want
Thank you Qphoria for your reply.

Yes its possible, but even more additional configuration is required...

At the moment, I have configured for Fedex weight based shipping, and now to even use it for EMS, I have to configure another set of geo zones just for EMS...

Then also configure another set for the local postage...

That's tedious.. hehe :)

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by Johnathan » Thu Nov 11, 2010 12:49 pm

Qphoria wrote:you will never need to clone the weight based module. It is geozone based. You can create as many geozones as you want
The issue is that he wants to display different shipping based on customer group. There's no way to do that in a default installation. I suppose you could skip the duplicating of the weight-based shipping module and set up two geo-zones that are the same, then use an if-then to display them to different customer groups.
thegeekz wrote:I understand about the 1st part, easy enough.. But where are the weight.php file & related files based? Still a newbie, and groping around the directories.... :)

2nd part about the showing if-then options, could you explain further with an example, so that I can edit the code based on that?
I think all the related shipping files are:

Code: Select all

/admin/controller/shipping/weight.php
/admin/language/english/shipping/weight.php
/admin/view/template/shipping/weight.php
/catalog/language/english/shipping/weight.php
/catalog/model/shipping/weight.php
For the "if-then" part, you'd probably put it in:
/catalog/view/theme/YOURTHEME/template/checkout/shipping.tpl
You'd need to find out the customer group id numbers in the database and do something like:

Code: Select all

if ($this->customer->getCustomerGroupId() == '123') {
    // display wholesale customer shipping
} else {
    // display retail customer shipping
} 

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by thegeekz » Thu Nov 11, 2010 5:18 pm

ok, so you're saying in the weight related files.. other than changing the file names, in all the files -- any "weight" word has to be replaced by the new "weight2"?

I'll try it right now.. and feedback later..

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by Johnathan » Thu Nov 11, 2010 10:04 pm

Yes...and no. Probably all of them can be changed, except I know there's a weight conversion function that won't work if you change its name to 'weight2'. There might be more, I haven't looked.

What about doing what Qphoria suggested, and setting up two Geozones that are exactly the same but have different titles? For example, "Wholesale Customers U.S." and "Retail Customers U.S.". It'd probably work out to be the same thing.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by thegeekz » Fri Nov 12, 2010 10:17 am

Hmm.. but Qphoria's way will be slightly long winded,..... especially if I'll need EMS for another set of weight shipping..... for the wholesale customers..

Retail customers still ok, as I can have a geozone configured for that..

Or do you have a shortcut on how to configure the geozones -- almost same ones as the ones I've configured for Fedex?

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by Johnathan » Fri Nov 12, 2010 12:02 pm

No real shortcut on configuring geozones that I know of. However, you should only need to do this once, right? So you may just need to invest the time now to get everything set up the way you want it, then you'll never need to mess with it.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by thegeekz » Fri Nov 12, 2010 1:09 pm

hmm ok..

Anyway, I tried the duplicate module solution, and it didn't work.. maybe because I simply do not comprehend the phps... haha

Fatal error: Class 'Controllershippingweightf' not found in /home/thegeekz/public_html/system/engine/front.php on line 44

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Tue Apr 05, 2011 4:09 pm

I'm back again... I need to know other than Qphoria's Geozones idea, anyone else could assist?

I'm still wanting to duplicate the module, but since the last round where I'm not successful. I'm not sure if I should go for it again..

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by Qphoria » Tue Apr 05, 2011 7:22 pm

My way is the simplest.. not sure why you are having trouble with it.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by thegeekz » Wed Apr 06, 2011 10:09 am

Hi Qphoria, Thanks again for your reply... Cos Its very tedious to get up to 7 zones adding 30 or more countries with duplicates.... It is taking a very long time... even for my 1st 'copy' of definition, much less starting on duplicating the same with a different name for the zones..

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Wed Apr 06, 2011 3:24 pm

Nvrmind, I think I'm successful this time with multiple weight shipping configured for Expedited and Standard Shipping now :)

Edit: Appears successful in the Admin, but when testing out the cart.. this error shows:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/thegeekz/public_html/o-cart/catalog/model/shipping/weight_s.php on line 49

I replaced all the "weight" references to my modified weight_fe & weight_s

Maybe a part of the coding in that file will help you to detect the problem?

Code: Select all

42  if ($this->config->get('weight_fe_' . $result['geo_zone_id'] . '_basecost')) {
43  $cost += $this->config->get('weight_fe_' . $result['geo_zone_id'] . '_basecost');
44 } 
45
46  if ((float)$cost > $this->config->get('weight_fe_' . $result['geo_zone_id'] . '_basecost')) {
47  $quote_data['weight_fe_' . $result['geo_zone_id']] = array(
48  'id' => 'weight.weight_fe_' . $result['geo_zone_id'],
49  'title' => $result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight_fe, $this->config->get('config_weight_class')) . ')',
50  'cost' => $cost,
51 'tax_class_id' => $this->config->get('weight_fe_tax_class_id'),
52  'text' => $this->currency->format($this->tax->calculate($cost, $this->config->get('weight_fe_tax_class_id'), $this->config->get('config_tax')))
53  );
Please help? :)

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by Hansonv » Mon Apr 11, 2011 1:22 am

Have anyone managed to duplicate the weight based shipping module?

Newbie

Posts

Joined
Tue Dec 28, 2010 6:05 pm

Post by Johnathan » Mon Apr 11, 2011 7:45 am

Have you tried renaming every instance of "weight" to "weight2" in all the relevant files? I'm pretty sure that's all that's involved.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by thegeekz » Tue Apr 12, 2011 11:59 am

I did.. but it doesn't work.....

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Tue Apr 12, 2011 12:40 pm

Hi everyone!!

I've just explored Elmstreet's Weight3D, and find that it would suit my purpose without having to define the dimensions as well.

So I considered this topic solved.

Here's the discussion with Elmstreet, about his Weight3D module, take a look for those looking for a similar fix:

http://forum.opencart.com/viewtopic.php ... 06#p147906

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by Memes11 » Thu Feb 21, 2013 12:39 pm

I should be more careful, there was a mistake, here is the good one

Welcome Chez Memes


Newbie

Posts

Joined
Wed Feb 20, 2013 4:21 pm
Who is online

Users browsing this forum: No registered users and 1 guest