News:

Looking for documentation? Take a look on our wiki

Main Menu

Shipvalue - Shipping charge based on order total

Started by lemonyellow, September 09, 2005, 15:34:22 PM

Previous topic - Next topic

lemonyellow

Hi,

Here's a shipping module called Shipvalue that I developed for a client who wanted shipping charges based on the value of the order total rather than on product weight.

The Module allows you to set up to 10 individual shipping charges based on the total order value.  For example the default configuration for the module is a follows:

Orders less than £20.00 shipping charge = £2.95
Orders less than £50.00 shipping charge = £4.70
Orders less than £70.00 shipping charge = £5.50
Orders greater than £70.00 but less than £10,000 shipping charge = £0.00 FREE

You can also include tax in the shipping total.

NOTE: This shipping module has only been tested on Mambo 4.5.1.3 Stable [Three For Rum Reassigned] and mambo-phpShop 1.2 stable 3  [Good Young Progress].

Installation instructions are in the readme.txt file. Hope you find it useful.

Regards

Rhys

[attachment cleanup by admin]

lemonyellow

#1
A number of people have reported a problem when configuring the Shipvalue shipping method.  When they try to save their changes they get the following message:

shippingmethodSave is not a valid MOS_com_phpShop function

This seems to occur in mambo 4.5.2.  (see http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=13286.0)

I am guessing that the shippingmethodSave function has changed between versions.  Unfortunately I haven't got the time to investigate/fix the bug at the moment.

A quick workaround would be to replace the default values in the administrator\components\com_phpshop\classes\shipping\shipvalue.cfg.php file with your own default values.  Then you won't have to edit the values in admin.

At the moment the default values in the shipvalue.cfg.php file are:

define ('BASE_SHIP1', '20.00');
define ('BASE_SHIP2', '50.00');
define ('BASE_SHIP3', '70.00');
define ('BASE_SHIP4', '10000.00');
define ('BASE_SHIP5', '');
define ('BASE_SHIP6', '');
define ('BASE_SHIP7', '');
define ('BASE_SHIP8', '');
define ('BASE_SHIP9', '');
define ('BASE_SHIP10', '');
define ('BASE_CHARGE1', '2.95');
define ('BASE_CHARGE2', '4.70');
define ('BASE_CHARGE3', '5.50');
define ('BASE_CHARGE4', '0');
define ('BASE_CHARGE5', '');
define ('BASE_CHARGE6', '');
define ('BASE_CHARGE7', '');
define ('BASE_CHARGE8', '');
define ('BASE_CHARGE9', '');
define ('BASE_CHARGE10', '');
define ('SHIPVALUE_TAX_CLASS', '3');


You can change the "Order total values" by editing the BASE_SHIPx values. The corresponding "Shipping charges" can be changed by editing the BASE_CHARGEx values. Don't forget to change the tax class (if required).  Replace the default shipvalue.cfg.php file with your edited version.

Hopefully someone will find the code changes required to fix the admin.

Regards

lemonyellow

Further to the above - someone has informed me that ShipValue works ok on the latest version of joomla/virtuemart.

Regards

trip

Hi
quick question I am getting the following error on this module

Notice: Undefined variable: flat_charge in /home/*****/public_html/administrator/components/com_phpshop/classes/shipping/shipvalue.php on line 80

can you explain what the problem is here
using mambo 4.5.2.3

regards
TriP
quote
A successful person is one who can lay a firm foundation with the bricks that others throw at him. (D. Brinkley)

www.raramuridesign.com

weatherangel

Quote from: lemonyellow on January 04, 2006, 11:44:35 AM
A number of people have reported a problem when configuring the Shipvalue shipping method.  When they try to save their changes they get the following message:

shippingmethodSave is not a valid MOS_com_phpShop function

This seems to occur in mambo 4.5.2.  (see http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=13286.0)

I went looking for the above thread, and keep getting a message saying that the topic is off limits to me and it keeps setting me back to guest, even though I'm logged into the forums?  Does anyone still have the contents of the topic?  I'd really like to fix this bug in my version of VirtueMart...

David Wyatt

#5
I'm using lemonyellow's ShipValue with the current version of joomla/virtuemart. I would like to use two copies, one for UK, a second one for International. Anyone know if this is possible?

June 14: I've managed to create a second copy, and it all works except that both copies get the same value of the shipping for any order, instead of 2 values, one from each cfg file. They seem to read from the cfg file belonging to the first copy accessed. For the moment I've given up and am using a workaround I picked up elsewhere of putting a supplemtary postage item in the shop which International purchasers have to put in the basket, but it's an ugly way of doing it. I feel having got this far messing with the code I could eventually get there - perhaps someone could cast some light on how the shipping values are read, cos I'm missing something along the line.

alyssa

Can this be modified from a value to list of zip codes?

dj_mystic82

Quote from: David Wyatt on June 07, 2007, 13:57:52 PM
I'm using lemonyellow's ShipValue with the current version of joomla/virtuemart. I would like to use two copies, one for UK, a second one for International. Anyone know if this is possible?

June 14: I've managed to create a second copy, and it all works except that both copies get the same value of the shipping for any order, instead of 2 values, one from each cfg file. They seem to read from the cfg file belonging to the first copy accessed. For the moment I've given up and am using a workaround I picked up elsewhere of putting a supplemtary postage item in the shop which International purchasers have to put in the basket, but it's an ugly way of doing it. I feel having got this far messing with the code I could eventually get there - perhaps someone could cast some light on how the shipping values are read, cos I'm missing something along the line.

Not sure if you managed to get this working in the end, but I needed the same fix (I wanted a standard and recorded delivery option) and came across the same problem, but managed to fix it. I renamed each variable to:

BASE_SHIPA1
BASE_SHIPA2 etc and
BASE_CHARGEA1
BASE_CHARGEA2

I applied this in my new files "shipvalue2.cfg.php" and "shipvalue2.php"

David Wyatt

Brilliant! I had abandoned it because the customer decided to charge by weight in the end, but I'm sure that fix will come in very handy elsewhere. Thanks.

nuwud

Hi LemonYellow,

I was wondering if the 1.1.3 VM shipvalue module can be set to do international rates too? That is crucial.

Thanks!
All your base are belong to us!

Gary

Do any of you know if this still works?

Thanks

Gary

Gary

I have created 2 versions of this, one for standard delivery and one for special delivery.

The special delivery one is kicking out

/home/site/public_html/administrator/components/com_virtuemart/classes/shipping/shipvalue2.cfg.php :: Writeable
Shipping Module Configuration: shipvalue2.php

Fatal error: Call to a member function show_configuration() on a non-object in /home/site/public_html/administrator/components/com_virtuemart/html/store.shipping_module_form.php on line 48

Any ideas?

Many Thanks

Gary

purestore

Hi,

I am using the Shopvalue module and Japanese Yen as currency on my site. I have free shipping for sales over Y6000 as below.

Order total value 1: 6000.00 Shipping charge 1: 600.00           
Order total value 2: 6001.00 Shipping charge 2:0.00

This does not work. I get an error message Error: Please select a Shipping Method upon check out.

If I cahnge Order total value 2 to from 6001.00 to 1000000.00 it works fine.

What am I doing wrong?

Please help,

J-E
      

belindab

The way you have it set now you only give free shipping for orders between 6000 and 6001. Use the maximum value of your orders (just like you tried for value 2 e.g. 1000000) and you should get the result you want.

hotelathome

These guys have some brilliant mods to help if you want to use shipvalue rates, one for home and one for international
http://forum.virtuemart.net/index.php?topic=53372.msg203017#msg203017
use metaship and two versions of shipvalue, one called shipvalue and one called intshipvalue
http://forum.virtuemart.net/index.php?topic=36152.0