News:

Support the VirtueMart project and become a member

Main Menu

How to get the total packaging of an order?

Started by lindapowers, January 06, 2014, 08:58:26 AM

Previous topic - Next topic

lindapowers

Hi,

For the transport system we need to define the number of boxes an order has.

We sell per kg but we have no clue on how to make the system tell us the number of boxes an order may have depending on the total kg.

If we have boxes of 5,10 and 15 kg.

An order of 30 kg would be 2 boxes.


Is this even possible? I have been searching for hours but can't find a solution.

Is there a field for total packaging somewhere?


Regards

VM 2.024c and Joomla 2.5.16

PRO

what will you use the field for?   shipment costs?

have you looked in the dimensions & weight tab of a product?

lindapowers

#2
Hi, the field is for both our warehouse and mandatory for our transport system in each delivery.

We need to show the total weight which is easy with VM and the number of boxes ("bultos" in spanish) I don't know if the correct word in english is packaging. bundles? packages?

Im refering to the total number of boxes of an order, here is something required by transport systems.


I'm looking at those tabs but have no clue on how to achieve it, even if its possible, any advise is welcome,

Regards

PRO

Linda,
so

you box in 15kg ?   mixed sometimes?

so if they get
10kg oranges, 5 kg other its going to be in a single box?

OR:

you sell "by the box" ?

Does a calculation need to me made that calculates how many boxes you need?

for example, they order 5 different fruits. BUT they fit into 3 different boxes?


lindapowers

#4
Quote from: PRO on January 06, 2014, 19:58:57 PM

so if they get
10kg oranges, 5 kg other its going to be in a single box?


That would be one box yes.

Quote from: PRO on January 06, 2014, 19:58:57 PM

for example, they order 5 different fruits. BUT they fit into 3 different boxes?


They will fit in one single box since they buy per kg, we just need to tell that that would be 1 box, no matter if is a box of 5, 10 or 15 kg.

We also have boxes of 5, 10 and 15 kg which would be packaging 1 already.


We mix them yes since some products have a packaging of 5,10 or 15 kg and others are sold per kg.

So basicly you can order 10 kg of oranges and 2 kg of tomatoes or you can buy a single 15 kg box.

You could also order per kg and if the total weight is 18 kg that would require 2 boxes.



Thats the tricky part that we need a calculation that tells us the number of boxes.


I though that would be possible with the logic of the total order weight but I have no clue on how to play with those tabs to obtain the total number of boxes for an order.

Are those tabs meant for this? Does VM calculate something like total packaging?


Well im really lost as you can see


Regards

PRO

so you just need it to show on the order email? & backend right?

lindapowers

Quote from: PRO on January 06, 2014, 21:51:15 PM
so you just need it to show on the order email? & backend right?

Yeah, just in the backend will do, maybe in the details of the order itself as a custom field?

If this info is shown somewhere we could export it also with CCVAOM.

Regards

PRO

Quote from: lindapowers on January 06, 2014, 22:02:06 PM
Quote from: PRO on January 06, 2014, 21:51:15 PM
so you just need it to show on the order email? & backend right?

Yeah, just in the backend will do, maybe in the details of the order itself as a custom field?

If this info is shown somewhere we could export it also with CCVAOM.

Regards


display ONLY? or stored in the database?

display only is just a matter of writing the calculation, then outputting it.

storing in database., is something different


lindapowers

As a field we could export, thats stored in the database I guess, but at least display only would help a lot.

Are custom fields stored in the database? is some information we need to export somehow.

Regards

PRO

I can write the code to make it display on order email & on backend order view,

but it needs to be standardized like by weight etc?

If this is good, give me the exact # that it then turns to the next box?

is it more complex than that?


lindapowers

#10
Quote from: PRO on January 08, 2014, 02:08:43 AM
but it needs to be standardized like by weight etc


Sorry what you mean by standardized?

http://comenaranjas.com/en/shop/clementines.html

This category has 3 products:  5 kg, the other one of 10 kg and the other one of 15 kg. Each of them are one package, (1 box) if the order 2 or more you just add up the quantity of boxes thats the simple part i guess.

Things get tricky with this category: http://comenaranjas.com/en/shop/seasonal-fruits.html

We sell per kg of 1 kg or pieces (mainly 1 or 2 kg)

So basicly the interval of boxes for the packaging depends on the total weight, it could be divided by 15 since 15 kg is our biggest box.

----------------------

The complex part:

If someone orders 1xTable Oranges 10 kg 1xSmall veg box (5 kg) although the total weight is 15 kg the packing is of 2 boxes.

So basicly some fruits are mixed up while others are independent boxes.



I guess there must be some logic to make it more simple, maybe just playing with the 15 kg box and the total weight?


Thanks a lot for help,

Regards

lindapowers

#11

PRO

i tried to do it the way I was thinking, but would not work in order_email, or backend order view.

It would only show on the cart page

lindapowers

#13
Quote from: PRO on January 12, 2014, 02:44:16 AM
i tried to do it the way I was thinking, but would not work in order_email, or backend order view.

It would only show on the cart page


Anyway thanks PRO.

This issue is a really tricky one.

In an ideal world this should be a custom field in VM defined in the product dimensions. Similar to the packaing field where we could define what values make a package or if a concrete product is already a package itself.

This would be printed in the order email and backend, therefore as an exportable field. So basicly a calculation plugin in a custom field will be the solution.

If you could assign a value to each product and then make a calculation to obtain the "totalpackaging" divided by your product packages (15) in our case it would give you a quite precise amount of packages (boxes) you have to use.




The values in this case are printed in the shipment name which is fine, even better if there was another field for it. I think that custom fields by default appear in the order emails and backend anyway.

Reinholds solution plays with total weight which is fine, even better if values were obtained from a field for packages, for now this is what we are doing:

Variable=totalboxes; Value=ceil(Weight/15)
Name=Spain,  {totalboxes}; 01000<=ZIP<07000; Weight<=6; Shipping=4.81

The result gives us: Zeleris (Spain, Boxes 2)


Is not perfect but close, this will be fine for people dividing boxes just per kg. If you need to specify packaging per product is where it becomes madness.

Regards