Post by TomSut » Tue Jul 10, 2018 9:50 pm

Hello,

Our website sells Art Posters, 50cm x 70cm paper posters weighing (70g). When a customer buys multiple posters opencart adds the weights of all the posters up.

Our posters are shipped in cardboard poster tubes weighing (170g).

Even if the customer buys 6 posters they will be rolled up together and put in one poster tube.

I have altered the checkout code so it adds in 170g for the tube at the checkout. It is very important that the checkout weight is the correct weight of the product ready to be shipped, if its wrong it will be rejected by the courier.

Our courier called Royal Mail uses an extension in opencart where it makes the shipping labels automatically using the final weight at the checkout. It is all managed within the orders window in Admin

Now for the problem.

We are wanting to add different types of products to sell and these will be all different weights and sizes. eg. Ceramic mugs(390g), pack of Coasters(80g), Towel(140g).

Depending what combination of products the customers buys will change what size and weight of box it is being shipped in. We have 3 box sizes Small, Medium, Large. Small Box Weighs 196g, Medium 290g and a large box is 480g.

As an example, if a customer buys one poster, one Ceramic mug and one pack of coasters it will all be shipped in a Medium sized box.

At the checkout opencart needs to do this calculation
1 x 70 x 50 poster - 70g
1 x poster tube - 170g
1 xceramic mug - 390g
1x Pack of coasters - 80g
1x Medium box - 290g
Total checkout weight = 1000g

Another checkout example would be
1 x ceramic mug - 390g
1x Pack of coasters - 80g
1x Small box - 196g
Total checkout weight = 666g

I need opencart to be able to pick the correct box size depending on what combination is in the checkout and alter the weights accordingly.
It also needs to understand that a poster will always need a poster tube to go in.

I really hope this makes sense. It's been very difficult to describe what we are wanting to achieve.

Please ask if something or all of it doesn't make sense and i will try and explain it another way.

We are using opencart version 1.5.5.1 (yes i know it's old but it works)
VQ Mod 2.4.1

Extensions Installed.
Customer_grp_qty_packs
extra_product_tab_admin
extra_product_tab_catalog
GroupDiscounts
MyHermesOrders
onestepcheckout
options_boost_batch_copy
options_boost_vqmod
options_price_update_redux
royal_mail_shipping_api
testimonials-1-5-x
vq-replicate-customer-order-confirmation-email-for-owner
Zb_PackingSlip

Thanks again

Tom

New member

Posts

Joined
Wed Nov 01, 2017 10:41 pm

Post by Qphoria » Wed Jul 11, 2018 12:59 am

What you need is a packaging algorithm. I have one I made for my mods that I was looking to spin off into a general purpose mod, but it works in a different way than this one. I have another commercial design that reflects what you are looking for but haven't had the time to make one yet. Perhaps I will revisit this idea sometime in the next few months.

The issue is that they are complicated: https://en.wikipedia.org/wiki/Bin_packing_problem
But I think for box type matching it should be doable.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 27 guests