Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Adding forumla into weight field

Adding forumla into weight field

Locked

Views: 1,455

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
17 Sep 2006, 1:46 AM
#1
blarney avatar

blarney

New Zenner

Join Date:
Oct 2005
Location:
Connectiuct
Posts:
69
Plugin Contributions:
1

Adding forumla into weight field

The shipping per item is close to what I'm looking for but I desperately need to tweak it and need some collaboration.

I have a client with per item shipping needs but those include formulas. He wants to do this on the cheap so I'm stuck doing this myself.

His shipping needs are based on prices per quantities. For example, for one product, for up to 500 widgets, it costs $4 shipping and 501-1000 is $8, etc. I could set up a formula:
if (qtty < 500) = $4
if (qtty >500 < 1000) +$8
etc.

Other items have different formulas. I tried to change the weight field to text which now will take a formula but it still processes it as the initial number.

Any suggestions on how to hack the weight field to accept a formula related to the quantity value rather than just using a number?

17 Sep 2006, 3:14 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Adding forumla into weight field

Are all products based this way or do each have their own charges based on qty for shipping?

17 Sep 2006, 4:12 AM
#3
blarney avatar

blarney

New Zenner

Join Date:
Oct 2005
Location:
Connectiuct
Posts:
69
Plugin Contributions:
1

Re: Adding forumla into weight field

Hi Linda. This is the client with vast shipping variation needs <grin>. And, yes, many products have unique formulas. In looking at his existing shopping cart, I realized that in addition to having individual shipping costs per item, it was possible to include formulas into those. If there is a way to do this in ZenCart, that might solve a lot of issues that people have with shipping costs.

The formulas don't need to be pretty nor understandable to the client. I just need to be able to put something like:

$3+($4 for each 100 qtty)

for some products,

$3+($4 for each 500 qtty)

for other products, and

$15 for other products (I can do that one).

So a variable weight field seemed like a possible solution. Or is there a better solution?

Thanks. js

17 Sep 2006, 4:22 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Adding forumla into weight field

Oh ... that client ... :eek:

Nasty bit of work on those shipping ideas ...

You might be able to build a special shipping module where you can treat the products_weight as if it were a table rate ...

But you would need to processes that totally different and it would make messies and you'd have to touch a herd of files ...

Or make a new field ... and use that for this sliding scale of shipping per product ... then processes that per product to produce the shipping costs ...

To be safe, I'd go for the new field ...

First try the concept ... before re-writting the Admin for it ...

Then make a shipping module that grabs all the products in the cart and loop through the list and grab the products_shipping_table_rates field and you may be able to come up with a final result on this premise ...

Still rather scary ... :unsure:

17 Sep 2006, 5:00 AM
#5
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Adding forumla into weight field

Oh ... that client ...:eek:
oh linda your to funny

18 Sep 2006, 5:07 AM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Adding forumla into weight field

You should of seen the specs on that one ... scary scary scary stuff ... did I mention it was scary? :shocking:

18 Sep 2006, 1:01 PM
#7
blarney avatar

blarney

New Zenner

Join Date:
Oct 2005
Location:
Connectiuct
Posts:
69
Plugin Contributions:
1

Re: Adding forumla into weight field

Scary?? Let's just say that Halloween in the States pales in comparison to the customization this shipping module could take :shocking:. I would love to find a less frightful solution but likely I'm fighting a losing battle.

Thanks anyway.

Jim