Jump to content

schizo

Members
  • Content count

    8
  • Joined

  • Last visited

  1. Is there a way to view what is in the registry? I use it as a wishlist and would like to view what is in the list without having to go into PHPMyAdmin and crossreferencing item numbers. If there is an admin contribution for tracking, I would love to know about it. Thanks in advance, Shawn
  2. Hi all, I posted in a different topic, but I will try here. I installed the latest full version of CCGV into my OSC M2.2 store. It doesn't show up in the checkout page though. I re-installed it twice now and I can't get it to work. All I want is a discount coupon (or promo code) that will give free shipping. Any suggestions? Thank you in advance, Shawn
  3. I installed this and I am not getting the "redeem" in my checkout page. The admin section seems to work fine, but I am not able to redeem the disount codes. All i want to do is offer free shipping with first order. It seems like a simple thing, but I can't get it to work. Any suggestions? Thanks in advance, Shawn I'm using OSC M2.2.
  4. Is there a way to set up a maximum width so if a product won't fit in the box, will go to the next size? The algorithm is set for volume, but I have some long and thin products that are being put into a small fat box. Any suggestions?
  5. This is what is included with the UPS XML contribution (which works great for the most part). What i need to do is put some constraints on it. I ship odd size packages, and it is putting some "Oversized" products into smaller boxes because it is based on volume. Can anyone let me know how to add a variable of "max_width". ex. a product that is 108x1x2 is being placed into a box 12x12x12 Any help would be great. -Shawn // A very simple box packing algorithm. Given a list of packages, returns // an array of boxes. function packProducts($productsArray) { // This algorithm is trivial. It works on the premise that you have selected // boxes that fit your products, and that their volumes are resonable multiples // of the products they store. For example, if you sell CDs and these CDs are // 5x5x0.5", your boxes should be 5x5x0.5 (1 CD mailer), 5x5x2.5 (5 CD mailer) // and 5x5x5 (10 CD mailer). No matter how many CDs a customer buys, this // routine will always find the optimal packing. // // Your milage may differ, depending on what variety of products you sell, and // how they're boxed. I just made up this algorithm in a hurry to fill a small // niche. You are encouraged to find better algorithms. Better algorithms mean // better packaging, resulting in higher quoting accuracy and less loss due to // inaccurate quoting. // // The algorithm proceeds as follows: // Get the first, smallest box, and try to put everything into it. If not all // of it fits, try fitting it all into the next largest box. Keep increasing // the size of the box until no larger box can be obtained, then spill over // into a second, smallest box. Once again, increase the box size until // everything fits, or spill over again. Repeat until everything is boxed. // // The cost of a box determines the order in which it is tried. There will definitely // be cases where it is cheaper to send two small packages rather than one larger one. // In that case, you'll need a better algorithm. // Get the available packages and "prepare" empty boxes with weight and remaining volume // counters. (Take existing box and add 'remaining_volume' and 'current_weight'; $definedPackages = $this->getPackages(); $emptyBoxesArray = array(); for ($i = 0; $i < count($definedPackages); $i++) { $definedBox = $definedPackages[$i]; $definedBox['remaining_volume'] = $definedBox['length'] * $definedBox['width'] * $definedBox['height']; $definedBox['max_width'] = $definedBox['width']; $definedBox['current_weight'] = $definedBox['empty_weight']; $emptyBoxesArray[] = $definedBox; } $packedBoxesArray = array(); $currentBox = NULL; // 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. while (count($productsRemaining)) { // Immediately set aside products that are already packed and ready. if ($productsRemaining[0]['ready_to_ship'] == '1') { $packedBoxesArray[] = array ( 'length' => $productsRemaining[0]['length'], 'width' => $productsRemaining[0]['width'], 'height' => $productsRemaining[0]['height'], 'current_weight' => $productsRemaining[0]['weight'] ); $productsRemaining = array_slice($productsRemaining, 1); continue; } //Cylcle through boxes, increasing box size if all doesn't fit. if (count($emptyBoxesArray) == 0) { print_r("ERROR: No boxes to ship unpackaged product<br>"); break; } for ($b = 0; $b < count($emptyBoxesArray); $b++) { $currentBox = $emptyBoxesArray[$b]; //Try to fit each product in box for ($p = 0; $p < count($productsRemaining); $p++) { if ($this->fitsInBox($productsRemaining[$p], $currentBox)) { //It fits. Put it in the box. $currentBox = $this->putProductInBox($productsRemaining[$p], $currentBox); if ($p == count($productsRemaining) - 1) { $packedBoxesArray[] = $currentBox; $productsRemaining = array_slice($productsRemaining, $p + 1); break 2; } } else { if ($b == count($emptyBoxesArray) - 1) { //We're at the largest box already, and it's full. //Keep what we've packed so far and get another box. $packedBoxesArray[] = $currentBox; $productsRemaining = array_slice($productsRemaining, $p + 1); break 2; } // Not all of them fit. Stop packing remaining products and try // next box. break; } } } } return $packedBoxesArray; } function fitsInBox($product, $box) { $productVolume = $product['length'] * $product['width'] * $product['height']; if ($productVolume <= $box['remaining_volume']) { if ($productWidth <= $box['max_width']) { if ($box['max_weight'] == 0 || ($box['current_weight'] + $product['weight'] <= $box['max_weight'])) { return true; } } return false; } function putProductInBox($product, $box) { $productVolume = $product['length'] * $product['width'] * $product['height']; $box['max_width'] <= $product['width'] $box['remaining_volume'] -= $productVolume; $box['products'][] = $product; $box['current_weight'] += $product['weight']; return $box; }
  6. schizo

    New UPS XML Shipping Module available

    I have installed the latest version, and I'm having trouble with the packaging part of it. I have a product that is 108x2x2. We ship it in a box 108x6x4. This way we can ship 6 in a box for OSC 2 pricing. I can't get an accurate read from UPS on the price though. It is up to $60 cheaper in the shopping cart. Does anyone have a soulution to take adaatage of the oversize package prices from UPS? Also, I'm running into the same issue as someone posted earlier. The logic states 1 package if somone orders 7. There should be 2 packages. Any help would be great, as I need to go live soon. Thanks in advance, -Shawn
  7. I am having troubles with sorting my options. I installed Attribute Sort and it was great. I then came up with the need to install Option Type Feature. It is great contribution, but I need to be able to sort my Attributes. Is this possible without having to go in and change all the ids of the atttributes?
  8. I need to install the Type Option Feature into my store for custom text, bu twhen I do , I loose the "Sort" that I had for all my attributes. Is there a way to fix this so I can use both contributions?
×