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
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
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.)
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.)
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.
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
Thank you Qphoria for your reply.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
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
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.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
I think all the related shipping files are: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?
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
/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
}
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..
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
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.
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.
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?
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
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
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
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..
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
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
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?
Please help? 

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 );

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
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
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
Who is online
Users browsing this forum: No registered users and 2 guests