queasyprawn Posted December 26, 2004 Share Posted December 26, 2004 Is it possible to have the shipping prices calculated seperately. All of my products ship in their own box. Quote Link to comment Share on other sites More sharing options...
WiseWombat Posted December 26, 2004 Share Posted December 26, 2004 Is it possible to have the shipping prices calculated seperately. All of my products ship in their own box. <{POST_SNAPBACK}> Try one of these contribution for Individual Product Shipping Prices. http://www.oscommerce.com/community/contri...vidual+shipping Quote ( WARNING ) I think I know what Im talking about. BACK UP BACK UP BACK UP BACK UP Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 26, 2004 Share Posted December 26, 2004 I understand that UPS XML has a packaging option that enables you to calculate shipping more accurately. Again, from what I understand is that you can keep products that have their own packaging box as separate boxes for the UPS Shipping. Don't know what you mean with "Is it possible to have the shipping prices calculated seperately." because everything is supposed to go in one shipping and it doesn't give any prices for the separate packages. Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 26, 2004 Author Share Posted December 26, 2004 ...because everything is supposed to go in one shipping and it doesn't give any prices for the separate packages. Well, each product in the cart will ship in its own box. This affects the weight of each package and in return affects the price. The way it is now assumes I am shipping everything together in one package, which is not true, Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 26, 2004 Author Share Posted December 26, 2004 this is a simliar thread as what I need. http://www.oscommerce.com/forums/index.php?showtopic=85577&hl= Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 26, 2004 Share Posted December 26, 2004 From what I understand enabling the dimensional support in UPS XML will give you the option to indicate that a product will be shipped in its own box (and therefore not be put together with other stuff in a box to the maximum weight you allow per box). I never used it, so I'm not infinately familiar with it. Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 27, 2004 Author Share Posted December 27, 2004 From what I understand enabling the dimensional support in UPS XML will give you the option to indicate that a product will be shipped in its own box (and therefore not be put together with other stuff in a box to the maximum weight you allow per box). I never used it, so I'm not infinately familiar with it. <{POST_SNAPBACK}> How do I enable the dimensional support. I don't see that option in the admin. Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 27, 2004 Author Share Posted December 27, 2004 I've found the docs for it. I will look into it. Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted December 27, 2004 Share Posted December 27, 2004 Is it possible to have the shipping prices calculated seperately. All of my products ship in their own box. <{POST_SNAPBACK}> If your individual products are always about the same weight you might be able to maniuplate osC through defining the Maximum package weight to ie. 1 kg. or 0.5 kg In theory osC should then divide the products ordered over more packages with the appropriate shipping price tag to it. Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 27, 2004 Author Share Posted December 27, 2004 If your individual products are always about the same weight you might be able to maniuplate osC through defining the Maximum package weight to ie. 1 kg. or 0.5 kg That might be a problem. They are not all the same weight. They range from 4lbs. to 20lbs. Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted December 27, 2004 Share Posted December 27, 2004 That might be a problem. They are not all the same weight. They range from 4lbs. to 20lbs. <{POST_SNAPBACK}> Aah, I was afraid you would say that :-( It would have been an easy way to solve it but I am afraid this will now probably going to be a tough one. I am sorry I can't be of any more help in this. :( Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 27, 2004 Author Share Posted December 27, 2004 Thanks anyway wheeloftime Maybe this will better help explain what I want to do... Since I have just implemented UPSxml, thanks to JanZ, I now see this text when I check out. United Parcel Service (XML) (1 pkg x 5 lbs total) No matter how many items I have it always has 1pkg. What I want to be able to do is have 1 package for each item in the cart. However, doing this would change how the price was calculated. For example, 3 pkg's x 10lbs totat DOES NOT equal the proper shipping price. However, (1pkg x 4)+(1pkg x 4)+(1pkg x 2) DOES equal the price, or at least closer to it than shipping it all together. Hopefully this makes what I want to do a little clearer. Can this be done? Quote Link to comment Share on other sites More sharing options...
mugitty Posted December 27, 2004 Share Posted December 27, 2004 txcrew; If the UPSXML module is set up properly WITH packaging support included, you should have a checkbox in your Admin where you add products that says something like "Ready to ship". This being checked for an item SHOULD result in a separate package being created for that item. You probably also need to be sure that the dimensions are indicated for each item and that you have at least one package defined in the packaging module. If all of your items have this checkbox checked and someone orders 3 different items, you should see 3 packages in the UPSXML rate quotes. If someone orders 2 of the same item and you have set it up as "Ready to ship", you should see 2 packages in the rate quotes. Quote ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
queasyprawn Posted December 27, 2004 Author Share Posted December 27, 2004 Thanks mugitty, looks like this should do the trick. Although, after I set it all up I now get this strange sql error as seen in this thread I started for it: http://www.oscommerce.com/forums/index.php?showtopic=127656 Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 28, 2004 Author Share Posted December 28, 2004 Got everything installed and working correctly. Is it normal that when I check the "Ready to ship" box in the products admin that it does not stay checked when I got back to edit it again? I think this is causing incorrect shipping totals when I checkout. Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 28, 2004 Author Share Posted December 28, 2004 Okay, I ran some tests, here is the scenario: Catalog has a prouduct: Food Combo weight: 25lbs Length: 16 Width: 9 Height: 14 Ready to ship: unchecked (only because it doesn't stay checked) Packaging Admin has 1 package: Name: Food Description: Cardboard Length: 16.00 Width: 9.00 Height: 14.00 Empty Weight: 0.00 Maximum Weight:25.00 Cost/Pref:1 My Cart has: 3 x Food Combo's When I checkout the shipping dialog box says this: United Parcel Service (XML) (2 pkg(s), 50 lbs total) when it should say: United Parcel Service (XML) (3 pkg(s), 75 lbs total) I don't understand why it wouldn't be counting one of the products in the shipping if it is counting the other two. Any Ideas? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 29, 2004 Share Posted December 29, 2004 I tried to find an error in the code this morning and I although I don't totally understand what it is doing (especially in the crucial function packProducts($productsArray)) it seems like nothing is wrong with it (at least I don't see it...). There has been an issue with it, where if products that were ready-to-ship were put in the shopping cart after other products it was not dealt with properly. That appeared to be solved when the $productsArray was sorted before packProducts was called, with ready-to-ship items first. I guess the only way to find the bug (because it looks like one) is to output the arrays to the screen on certain points. For example starting around line 443 you find: // Get the product array and expand multiple qty items. $productsRemaining = array(); for ($i = 0; $i < count($productsArray); $i++) { $product = $productsArray[$i]; for ($j = 0; $j < $productsArray[$i]['quantity']; $j++) { $productsRemaining[] = $product; } } // Worst case, you'll need as many boxes as products ordered. You could add before that last comment: echo '<pre>'; print_r($productsRemaining); echo '</pre><br>'; to see if all the products made it into that array and how it looks like. If that looks OK, you can put it a little further, immediately after: $productsRemaining = array_slice($productsRemaining, 1); Perhaps this will give us a clue what goes wrong. Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 29, 2004 Author Share Posted December 29, 2004 You could add before that last comment: echo '<pre>'; print_r($productsRemaining); echo '</pre><br>'; to see if all the products made it into that array and how it looks like. If that looks OK, you can put it a little further, immediately after: $productsRemaining = array_slice($productsRemaining, 1); I added that code to and here are the results that came up: Array ( [0] => Array ( [id] => 34 [name] => Plenty Hungry Combo [model] => [image] => [price] => 149.5000 [quantity] => 3 [weight] => 25.00 [length] => 16.00 [width] => 9.00 [height] => 14.00 [ready_to_ship] => 0 [final_price] => 149.5 [tax_class_id] => 0 [attributes] => ) [1] => Array ( [id] => 34 [name] => Plenty Hungry Combo [model] => [image] => [price] => 149.5000 [quantity] => 3 [weight] => 25.00 [length] => 16.00 [width] => 9.00 [height] => 14.00 [ready_to_ship] => 0 [final_price] => 149.5 [tax_class_id] => 0 [attributes] => ) [2] => Array ( [id] => 34 [name] => Plenty Hungry Combo [model] => [image] => [price] => 149.5000 [quantity] => 3 [weight] => 25.00 [length] => 16.00 [width] => 9.00 [height] => 14.00 [ready_to_ship] => 0 [final_price] => 149.5 [tax_class_id] => 0 [attributes] => ) ) it looks to be what I saw happenening earlier. As seen in the code. [/code][ready_to_ship] => 0 Is it normal that when I check the "Ready to ship" box in the products admin that it does not stay checked when I got back to edit it again? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 29, 2004 Share Posted December 29, 2004 ready_to_ship=> 0 is a problem, but it doesn't explain why the first or last package is not included in the shipping "list". You can't check the box and not come back to edit? I mean, it could be that if you "post" the form in admin the changes go into the database, but if you get back to edit it again the code doesn't check for the status of ready_to_ship in the database (a bug) but if you edit and do not check the box again the ready_to_ship is changed to "0" (as it should be because the box isn't checked). Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 29, 2004 Author Share Posted December 29, 2004 I manually changed the value of product #34 to [ready_to_ship] => 1 in the database via phpmyadmin...however, I still get the same results in the cart. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 29, 2004 Share Posted December 29, 2004 Good move, now we have to figure out where we lose the package. We know three packages go into packProducts($productsArray) but we don't know if they get out. Can you insert echo '</pre>'; print_r($boxesToShip); echo '</pre>'; in between $boxesToShip = $this->packProducts($productsArray); and // Quote for the number of boxes somewhere around line 198? Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 30, 2004 Author Share Posted December 30, 2004 (edited) Added the code, here are the results: Array ( [0] => Array ( [id] => 34 [name] => Plenty Hungry Combo [model] => [image] => [price] => 149.5000 [quantity] => 3 [weight] => 25.00 [length] => 16.00 [width] => 9.00 [height] => 14.00 [ready_to_ship] => 1 [final_price] => 149.5 [tax_class_id] => 0 [attributes] => ) [1] => Array ( [id] => 34 [name] => Plenty Hungry Combo [model] => [image] => [price] => 149.5000 [quantity] => 3 [weight] => 25.00 [length] => 16.00 [width] => 9.00 [height] => 14.00 [ready_to_ship] => 1 [final_price] => 149.5 [tax_class_id] => 0 [attributes] => ) [2] => Array ( [id] => 34 [name] => Plenty Hungry Combo [model] => [image] => [price] => 149.5000 [quantity] => 3 [weight] => 25.00 [length] => 16.00 [width] => 9.00 [height] => 14.00 [ready_to_ship] => 1 [final_price] => 149.5 [tax_class_id] => 0 [attributes] => ) ) Array ( [0] => Array ( [length] => 16.00 [width] => 9.00 [height] => 14.00 [current_weight] => 25.00 ) [1] => Array ( [length] => 16.00 [width] => 9.00 [height] => 14.00 [current_weight] => 25.00 ) ) Looks like only 2 are getting out. Edited December 30, 2004 by txcrew Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 30, 2004 Author Share Posted December 30, 2004 This was interesting, I reduced my cart to just one item and look at the results: Array ( [0] => Array ( [id] => 34 [name] => Plenty Hungry Combo [model] => [image] => [price] => 149.5000 [quantity] => 1 [weight] => 25.00 [length] => 16.00 [width] => 9.00 [height] => 14.00 [ready_to_ship] => 1 [final_price] => 149.5 [tax_class_id] => 0 [attributes] => ) ) Array ( ) Quote Link to comment Share on other sites More sharing options...
queasyprawn Posted December 30, 2004 Author Share Posted December 30, 2004 Just ran some more tests and somthing very odd just happened... I removed all of the code that you me put into upsxml.php, truncated the sessions table and now, for some reason, it works just how its supposed to. 5 food combos and 5 boxes. I checked the price against the ups site and its exactly right. However, if I want to make a package 'ready to ship' I have to do that through phpmyadmin. It still somehow does not post to the database from the admin. As a temp workaround, I set all pakcages ready to ship by default in phpmyadmin. Things are starting to work slowly and in strange ways ;) Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 30, 2004 Share Posted December 30, 2004 I removed all of the code that you me put into upsxml.php, truncated the sessions table and now, for some reason, it works just how its supposed to. 5 food combos and 5 boxes.I can't offer an explanation. The added code should only work on the things that come back from UPS after the packing and such has been done...The fact that the code appears to lose the first package, but picks up the later ones.... :'( Quote Link to comment Share on other sites More sharing options...
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.