Lucky#13 Posted April 19, 2007 Posted April 19, 2007 Hello Again, I was just wondering if it were possible to add a package qty box in the product entry page; a simple text box that the user could specify the number of boxes the product would ship in. I would think this would have to over-ride the dimensional support. The product weight could then be divided by the number specified in this box. I am not sure how to incorporate this or even where to start as my PHP is at a beginner level. If anyone may know how or where to start any help would be greatly appreciated. Thanks. :D Quote
Jan Zonjee Posted April 22, 2007 Posted April 22, 2007 I was just wondering if it were possible to add a package qty box in the product entry page; a simple text box that the user could specify the number of boxes the product would ship in. I would think this would have to over-ride the dimensional support. The product weight could then be divided by the number specified in this box. You can add your own logic for certain products in the catalog/includes/modules/shipping/upsxml.php file (around line 224) where the products and dimensions are imported into upsxml.php: $productsArray = $cart->get_products(); if ($this->dimensions_support > 0) { $productsArray = $this->more_dimensions_to_productsArray($productsArray); } if ($this->dimensions_support == '2') { // sort $productsArray according to ready-to-ship (first) and not-ready-to-ship (last) usort($productsArray, ready_to_shipCmp); // Use packing algoritm to return the number of boxes we'll ship You could e.g. go through the $productsArray and then change/pack the particular product to your needs, mark the packed product as ready_to_ship and then let the code continue pack the rest of the products. The information needed for a/the particular product(s) could be read from a text file. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.