Forums / Built-in Shipping and Payment Modules / Free shipping for one item

Free shipping for one item

Locked

Views: 2,035

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
3 Aug 2007, 7:41 AM
#1
webfeathers avatar

webfeathers

New Zenner

Join Date:
Jun 2007
Posts:
7
Plugin Contributions:
0

Free shipping for one item

Hey Zenners-

I've got two zones:

  • US
  • Non-US

I've got two product types:

  • Magazines
  • Subscriptions

To support this, I am using the Per Unit perunitweight/Per Unit International perunitweightint Hack as described by Linda McGrath, however I've got one sticky situation.

The weight unit for the magazines is '4'
The per unit price is '1' for US
The per unit price is '2' for Non-us

This makes shipping to US : $4 AND NON-US $8

Perfect so far

Subscriptions have a weight unit of '20'
Shipping for US is $20
Shipping for Non-US is $40

Still good, but shipping for US should be FREE

SO - I've also added the Free Shipping Options freeoptions module, and set it so that I offer free shipping when the weight is >= 20 <= and set my zone to US, so indeed I get the free option for subscriptions

Here's the catch - if a customer orders a subscription AND a magazine, the weight is now '24' and the free option goes away... the total shipping here should be $4 (the subscription should be free, the magazine $4)

I can't just make the free option show up for orders over 20 units, because five magazines should cost $20 to ship to US, but this would end up being free

HELP!?!?!

I am SO CLOSE!!!

Thank you!
Ron

3 Aug 2007, 2:47 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Free shipping for one item

Free Shipping Options freeoptions is used for when you want Free Shipping to show with all the other shipping modules ...

You could use the Modules ... Order Total ... Shipping ot_shipping and set the Free Shipping on for orders >= 20.00 for National ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

3 Aug 2007, 10:01 PM
#3
markrs avatar

markrs

New Zenner

Join Date:
Jul 2006
Location:
Wiltshire, England
Posts:
69
Plugin Contributions:
0

Re: Free shipping for one item

webfeathers:

To support this, I am using the Per Unit perunitweight/Per Unit International perunitweightint Hack as described by Linda McGrath

This sounds like what I want, but what is this hack? I can't find it with a search. :no:

4 Aug 2007, 3:58 PM
#4
webfeathers avatar

webfeathers

New Zenner

Join Date:
Jun 2007
Posts:
7
Plugin Contributions:
0

Re: Free shipping for one item

Essentially, Linda's idea is this:

Use the Per Unit perunitweight Shipping module for US Zone.
Then, (after creating another Non-Us Zone) clone the Per Unit perunitweight shipping module, and name it "Per Unit International" (or something). Clone by copying the two files:- /includes/modules/shipping/perweightunit.php- Name this new file 'perweightunitint.php'

  • /includes/languages/english/modules/shipping/perweightunitint.php- Name this new file 'perweightunitint.php'You'll need to go through those two files, and change every instance (upper and lower case) from 'PERWEIGHTUNIT' to PERWEIGHTUNITINT'

Then, in Admin -> Modules -> Shipping,make sure your two modules are installed

For the Per Unit Module, go to Edit and change the Shipping Cost per Unit to 1 (or whatever you need your multiplier to be)

For the Per Unit International Module, go to Edit and change the Shipping Cost per Unit to 1.5 (or whatever you need your multiplier to be).

Next - give each of your products a weight.

The math is pretty simple - if you want to charge $5 to ship in the US, make the weight of your product '5 units' (since the Per Unit multiplier is '1' the shipping fee will be '5'. If you wanted to charge $7.50 to ship Internationally for that same product, the multiplier for the international module would be 1.5 (5 * 1.5 = 7.50)

Finally, make sure that you've got the correct module available for the correct Zones and you're all set.

Hope that helps.
R

5 Aug 2007, 12:55 AM
#5
markrs avatar

markrs

New Zenner

Join Date:
Jul 2006
Location:
Wiltshire, England
Posts:
69
Plugin Contributions:
0

Re: Free shipping for one item

D'you think we can trust this Linda person??? :P

Ha!

Well, that looks pretty good, and not (apparently) hard to do. Thank you very much.

I picked up on your post particularly because you seem to be selling magazines, which is what my query was about. In which case, how d'you stop the shopping cart displaying the (fictitious) "weights"?

And of course, now I have to follow up the other posts about product specific billing and shipping methods 'cos we not only sell a magazine but also beef & pork :wacko:

Many thanks again
Mark
https://www.vowleyfarm.co.uk

5 Aug 2007, 2:25 AM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Free shipping for one item

MarkRS:

D'you think we can trust this Linda person??? :P

/me fools them again with the friendly elf suit and the winning smile ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

5 Aug 2007, 10:44 AM
#7
markrs avatar

markrs

New Zenner

Join Date:
Jul 2006
Location:
Wiltshire, England
Posts:
69
Plugin Contributions:
0

Re: Free shipping for one item

Ajeh:

/me fools them again with the friendly elf suit and the winning smile ... :cool:

Don't try it in Ireland :lookaroun

Of course, with this strategy it looks like

Finally, make sure that you've got the correct module available for the correct Zones and you're all set.

isn't necessarily trivial.
Can the "rest of the world" zone be set as a "catchall" somehow?
I s'pose it's not too bad adding lots of them in by hand, but...

5 Aug 2007, 3:16 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Free shipping for one item

You can build a select that you can export then import via phpMyAdmin ...

Make your new Zone for: The Rest of the World

In phpMyAdmin run this select statement:

SELECT countries_id as zone_country_id, 0 as zone_id, 2 as geo_zone_id FROM countries WHERE countries_id !=223

NOTE: this assumes that 2 is the new geo_zone_id that you made for Rest of the World and when in the Admin it would match the zID in the URL if you click on it in the Zone Definitions ...

Export that list to a file ...

Backup your database before doing this ...

Edit the file you created on the export and change the table name from countries to:
zones_to_geo_zones

Import that file and it should build the rest of the world for you ...

Your import file for all countries except the US or 223 should be similar to:

INSERT INTO `zones_to_geo_zones` (`zone_country_id`, `zone_id`, `geo_zone_id`) VALUES
(1, 0, 2),
(2, 0, 2),
(3, 0, 2),
(4, 0, 2),
(5, 0, 2),
(6, 0, 2),
(7, 0, 2),
(8, 0, 2),
(9, 0, 2),
(10, 0, 2),
(11, 0, 2),
(12, 0, 2),
(13, 0, 2),
(14, 0, 2),
(15, 0, 2),
(16, 0, 2),
(17, 0, 2),
(18, 0, 2),
(19, 0, 2),
(20, 0, 2),
(21, 0, 2),
(22, 0, 2),
(23, 0, 2),
(24, 0, 2),
(25, 0, 2),
(26, 0, 2),
(27, 0, 2),
(28, 0, 2),
(29, 0, 2),
(30, 0, 2),
(31, 0, 2),
(32, 0, 2),
(33, 0, 2),
(34, 0, 2),
(35, 0, 2),
(36, 0, 2),
(37, 0, 2),
(38, 0, 2),
(39, 0, 2),
(40, 0, 2),
(41, 0, 2),
(42, 0, 2),
(43, 0, 2),
(44, 0, 2),
(45, 0, 2),
(46, 0, 2),
(47, 0, 2),
(48, 0, 2),
(49, 0, 2),
(50, 0, 2),
(51, 0, 2),
(52, 0, 2),
(53, 0, 2),
(54, 0, 2),
(55, 0, 2),
(56, 0, 2),
(57, 0, 2),
(58, 0, 2),
(59, 0, 2),
(60, 0, 2),
(61, 0, 2),
(62, 0, 2),
(63, 0, 2),
(64, 0, 2),
(65, 0, 2),
(66, 0, 2),
(67, 0, 2),
(68, 0, 2),
(69, 0, 2),
(70, 0, 2),
(71, 0, 2),
(72, 0, 2),
(73, 0, 2),
(74, 0, 2),
(75, 0, 2),
(76, 0, 2),
(77, 0, 2),
(78, 0, 2),
(79, 0, 2),
(80, 0, 2),
(81, 0, 2),
(82, 0, 2),
(83, 0, 2),
(84, 0, 2),
(85, 0, 2),
(86, 0, 2),
(87, 0, 2),
(88, 0, 2),
(89, 0, 2),
(90, 0, 2),
(91, 0, 2),
(92, 0, 2),
(93, 0, 2),
(94, 0, 2),
(95, 0, 2),
(96, 0, 2),
(97, 0, 2),
(98, 0, 2),
(99, 0, 2),
(100, 0, 2),
(101, 0, 2),
(102, 0, 2),
(103, 0, 2),
(104, 0, 2),
(105, 0, 2),
(106, 0, 2),
(107, 0, 2),
(108, 0, 2),
(109, 0, 2),
(110, 0, 2),
(111, 0, 2),
(112, 0, 2),
(113, 0, 2),
(114, 0, 2),
(115, 0, 2),
(116, 0, 2),
(117, 0, 2),
(118, 0, 2),
(119, 0, 2),
(120, 0, 2),
(121, 0, 2),
(122, 0, 2),
(123, 0, 2),
(124, 0, 2),
(125, 0, 2),
(126, 0, 2),
(127, 0, 2),
(128, 0, 2),
(129, 0, 2),
(130, 0, 2),
(131, 0, 2),
(132, 0, 2),
(133, 0, 2),
(134, 0, 2),
(135, 0, 2),
(136, 0, 2),
(137, 0, 2),
(138, 0, 2),
(139, 0, 2),
(140, 0, 2),
(141, 0, 2),
(142, 0, 2),
(143, 0, 2),
(144, 0, 2),
(145, 0, 2),
(146, 0, 2),
(147, 0, 2),
(148, 0, 2),
(149, 0, 2),
(150, 0, 2),
(151, 0, 2),
(152, 0, 2),
(153, 0, 2),
(154, 0, 2),
(155, 0, 2),
(156, 0, 2),
(157, 0, 2),
(158, 0, 2),
(159, 0, 2),
(160, 0, 2),
(161, 0, 2),
(162, 0, 2),
(163, 0, 2),
(164, 0, 2),
(165, 0, 2),
(166, 0, 2),
(167, 0, 2),
(168, 0, 2),
(169, 0, 2),
(170, 0, 2),
(171, 0, 2),
(172, 0, 2),
(173, 0, 2),
(174, 0, 2),
(175, 0, 2),
(176, 0, 2),
(177, 0, 2),
(178, 0, 2),
(179, 0, 2),
(180, 0, 2),
(181, 0, 2),
(182, 0, 2),
(183, 0, 2),
(184, 0, 2),
(185, 0, 2),
(186, 0, 2),
(187, 0, 2),
(188, 0, 2),
(189, 0, 2),
(190, 0, 2),
(191, 0, 2),
(192, 0, 2),
(193, 0, 2),
(194, 0, 2),
(195, 0, 2),
(196, 0, 2),
(197, 0, 2),
(198, 0, 2),
(199, 0, 2),
(200, 0, 2),
(201, 0, 2),
(202, 0, 2),
(203, 0, 2),
(204, 0, 2),
(205, 0, 2),
(206, 0, 2),
(207, 0, 2),
(208, 0, 2),
(209, 0, 2),
(210, 0, 2),
(211, 0, 2),
(212, 0, 2),
(213, 0, 2),
(214, 0, 2),
(215, 0, 2),
(216, 0, 2),
(217, 0, 2),
(218, 0, 2),
(219, 0, 2),
(220, 0, 2),
(221, 0, 2),
(222, 0, 2),
(224, 0, 2),
(225, 0, 2),
(226, 0, 2),
(227, 0, 2),
(228, 0, 2),
(229, 0, 2),
(230, 0, 2),
(231, 0, 2),
(232, 0, 2),
(233, 0, 2),
(234, 0, 2),
(235, 0, 2),
(236, 0, 2),
(237, 0, 2),
(238, 0, 2),
(239, 0, 2),
(240, 0, 2);

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

5 Aug 2007, 3:19 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Free shipping for one item

Note: you should tidy this up for things you may consider or not consider the US ...

As in if you consider the United States Minor Outlying Islands or Virgin Islands (U.S.) ... that needs to be removed from the list ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

5 Aug 2007, 9:24 PM
#10
markrs avatar

markrs

New Zenner

Join Date:
Jul 2006
Location:
Wiltshire, England
Posts:
69
Plugin Contributions:
0

Re: Free shipping for one item

Ajeh:

Note: you should tidy this up for things you may consider or not consider the US ...
I'd assumed (probably on dodgy ground already) that people in these places would give their address as "US" if pushed to it?

More importantly, here in Europe I don't just have a here/not here postage to consider, I've got three zones; domestic (UK), Europe, & rest of the world. But I should be able to build this with just a slightly more complex query using the Euro zone that I've ready set up :flex:

Cover me, I'm going in... :cool:

Thanks for your help Linda.

5 Aug 2007, 9:39 PM
#11
markrs avatar

markrs

New Zenner

Join Date:
Jul 2006
Location:
Wiltshire, England
Posts:
69
Plugin Contributions:
0

Re: Free shipping for one item

Looks like

SELECT countries_id AS zone_country_id, 0 AS zone_id, 2 AS geo_zone_id
FROM zen_countries
WHERE countries_id NOT
IN (
	SELECT zone_country_id
	FROM zen_zones_to_geo_zones
)

should do the trick, assuming the only reason rows appear in the zen_zones_to_geo_zones table is because they've been allocated, it certainly looks that way.