Jump to content
Latest News: (loading..)

clemptor

Members
  • Content count

    18
  • Joined

  • Last visited

Profile Information

  • Real Name
    Steve Marino
  1. Tapuahk, Something like this would be extremely useful for me. Did you get this to work with multiple coupons? Thanks in advance...
  2. clemptor

    Quantity Price Breaks

    Jan, I think I figured it out. It has to do with the replaced code in application_top, and the fact that I didn't change my index and product_info pages. This is the piece of code in question: //BOF qpbpp //$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']); //EOF qpbpp I changed it back to the original code, since I am not using the product_info/index page quantity box feature from this contrib. It seems to work just fine. Does this seem to make sense to you? Thank you so much for all your hard work.
  3. clemptor

    Quantity Price Breaks

    Jan, I made your changes, and they worked well. However, I am still having the problem with updating cart quantity. When trying to "Add to Cart" a product that is already there, the Cart Quantity does still not seem to update. Here is the URL to my test site, if you'd like. You have to enter into the "catalog level" of the site, accessing by the domain name alone will eventually redirect you to a "live" site. www.londerwine.com/catalog Thanks in advance. The NL is a lovely country.
  4. clemptor

    Quantity Price Breaks

    Jan, Your advice was incredibly helpful, thank you. I followed it successfully, and am having one last, minor issue. When an item is in the cart, and the customer clicks "add to cart" from the product info page, the quantity in the shopping cart does not increase by 1. I should note that I did not use much of the code that came with this contrib, the shopping cart class changes, that's it - didn't use the quantity box or anything. Maybe that's where the problem lies - not using any of the code alterations for index.php or product_info.php, etc... Here are my alterations based on your advice above, to make this contrib work with the maximum order quantity. In PriceFormatter, we pass the maximum order quantity along with the other relevant variables: /* Change support special prices If any price level has a price greater than the special price lower it to the special price If product is in the shopping_cart $this->price_breaks can be empty */ if (true == $this->hasSpecialPrice && is_array($this->price_breaks)) { foreach($this->price_breaks as $key => $price_break) { $this->price_breaks[$key]['products_price'] = min($price_break['products_price'], $this->specialPrice); } } //end changes to support special prices // BEGIN Case Discount $max_order_query = tep_db_query("select p.maxorder FROM " . TABLE_PRODUCTS . " p where p.products_id = '" . (int)$product_id . "'"); while ($max_order = tep_db_fetch_array($max_order_query)) { $this->maxorder = $max_order['maxorder']; } // END Case Discount } function computePrice($qty, $nof_other_items_in_cart_same_cat = 0) Then, in the AdjustQty function, we get the maximum order amount variable set above. If that value is not null (not null = maximum order quantity set), we readjust the $qty variable: function adjustQty($qty, $qtyBlocks = NULL) { // Force QTY_BLOCKS granularity if(!tep_not_null($qtyBlocks)) { $qtyBlocks = $this->getQtyBlocks(); } // BEGIN Case Discount $maxorder = $this->getmaxorder(); // END Case Discount if ($qty < 1) $qty = 1; // BEGIN Case Discount if (tep_not_null($maxorder)) { if ($qty >= $maxorder) { $qty = $maxorder; } } // END Case Discount if ($qtyBlocks >= 1) { if ($qty < $qtyBlocks) $qty = $qtyBlocks; if (($qty % $qtyBlocks) != 0) $qty += ($qtyBlocks - ($qty % $qtyBlocks)); } return $qty; } function getQtyBlocks() { return $this->qtyBlocks; } function get_discount_category() { return $this->discount_categories_id; } // BEGIN Case Discount function getmaxorder() { return $this->maxorder; } // END Case Discount In shopping cart.php, we query the maximum order amount. It is important to note that the quantity has already been adjusted to the maximum amount by the AdjustQty function: $products_name .= ' </td>' . ' </tr>' . '</table>'; $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => $products_name); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>'); // BEGIN Case Discount $maximum_order_query = tep_db_query("select p.maxorder as max_quant FROM " . TABLE_PRODUCTS . " p where p.products_id = '".$products[$i]['id']."'"); while ($maximum_order = tep_db_fetch_array($maximum_order_query)) { $maxquant=$maximum_order['max_quant']; } if (($products[$i]['quantity']) == $maxquant) { $quant = $maxquant; $prodname = ($products[$i]['name']); } // END Case Discount } new productListingBox($info_box_contents); Then, we flash a "maximum order limit" warning, if conditions are met: <td class="stockWarning" align="center"><br><B><?php // BEGIN Case Discount if ($quant > 0) { echo 'The Order Limit for the ' . $prodname . ' is ' . $quant . ' Bottles. Your cart has been updated to reflect this amount.'; } // BEGIN Case Discount ?></B></td> I'm so close! Thank you so much in advance for your help.
  5. clemptor

    Quantity Price Breaks

    Hi there, this is a really handy contribution, my installation went well. However, I am having a problem with the interaction with a Maximum Order amount contribution (Max Order with Admin). In this example, Product X has a maximum order amount of 6 units. It is also a member of a discount category which discounts a 12 unit cart. The problem happens when, on the shopping cart page, the customer updates his cart amount of Product X to the discount amount (12 units), despite the fact that it is above the maximum amount. The corrected maximum cart quantity is displayed correctly. The incorrect, discounted Total is displayed. The sub-total is displayed correctly. Here is a screen shot: I am assuming that the problem is with the order of events in the shopping cart class. The Max Order with Admin contribution only changes the catalog level .php files. Here is an example of my shopping_cart.php page relevant to the Max Order with Admin code changes: <?php if ($cart->count_contents() > 0) { ?> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_REMOVE); $info_box_contents[0][] = array('params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_PRODUCTS); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_QUANTITY); $info_box_contents[0][] = array('align' => 'right', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_TOTAL); $any_out_of_stock = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { //MAXIMUM quantity code if(MAXIMUM_ORDERS == 'true'){ $max_order_query = tep_db_query("select p.maxorder as max_quant FROM " . TABLE_PRODUCTS . " p where p.products_id = '".$products[$i]['id']."'"); while ($max_order = tep_db_fetch_array($max_order_query)) { $products[$i]['max_quant']=$max_order['max_quant']; // set the cart item max var if (!empty($products[$i]['max_quant'])) {//add check account for if max_quant is null or '', if it is you can skip all this stuff can it's umlimited // okay if this product already is in basket irregardless of it's attributes selected... keep the old one for ($ic = 0; $ic < $i;$ic++) { if (tep_get_prid($products[$i]['id']) == tep_get_prid($products[$ic]['id'])) { $cart_notice .= sprintf(MAXIMUM_ORDER_DUPLICATE, $products[$i]["name"], $products[$i]["max_quant"]) . '<BR>'; // notify them they can not do that $cart_skip_prod = true; $cart->remove($products[$i]['id']); // remove this new item from the cart session $cart_skip_prod = true; // set a flag so we can bypass output of the item that was already stuck into the products array before we removed it just now } else { //$cart_notice .= ' - okay no match '; } $cart_notice .= '<BR>'; } // okay now for products that have no attributes or have identical attributes if ($products[$i]['quantity'] > $max_order['max_quant'] ) { //add check account for if max_quant is null or '', if so let it go through. $products[$i]['quantity']=$products[$i]['max_quant']; $cart->add_cart($products[$i]['id'],$products[$i]['quantity'],$products[$i]['attributes']); // update the qty $cart_notice .= sprintf(MAXIMUM_ORDER_NOTICE, $products[$i]["name"], $products[$i]["max_quant"]); // notify them they can not do that } } } } if ($cart_skip_prod) { // still need to skip displaying the item still stuck in $products array even though we removed it from $cart break; } //End MAXIMUM quantity code // Push all attributes information in an array Of course, no obligation to respond, but any help or a nudge in the right direction would be greatly apprecitated. Thanks in advance.
  6. Sorry, I posted in the wrong place. This is in regards to the SEF URL 1.13 contribution. I am trying to migrate a store to a new server. All the files in both stores compare favorably. The databases are also identical. However, when I click "add to cart" in the new store, I am redirected to the product_info product not found page. I believe the issue is how the new server handles .htaccess files. I am prompted to overwrite when I try to upload the .htaccess file for this contrib. I was not prompted to overwrite the .htaccess file when I performed the same action on the other server. the site is londerwine.com/catalog, it is a test site and will not take payments. Thanks in advance.
  7. clemptor

    State Based Region Shipping Rates

    Great contribution. However, I'm having a small problem, sure it's easily solved. I am using this contrib in conjunction with the free of charge payment module. The shipping quotes, for a mixed cart of free and cost shipping items, on checkout_shipping.php are perfect. However, the quotes change and become incorrect upon advancing to the checkout_confirmation page. Any ideas? Many thanks in advance.
  8. clemptor

    free shipping by categories Problem

    This is addressed in the free shipping by cats v1.4 contribution
  9. I have installed free shipping by cats v1.4 and it works great. However, when a customer checks out with only products from the free shipping category in their cart, all installed shipping methods are displayed. Any way to only display the free shipping method in this circumstance? Thanks in advance.
  10. I didn't see this in a previous forum. When you run the test card info through the plugnpay API, you have to create the account used for testing the module in OSC with the same first and last name as the test card, i.e. "card test". Hope this helps somebody.
  11. clemptor

    Seach Engine Friendly URL Support

    can anyone think of a reason why the SEO URL titles work correctly in all facets but with product_info? I updated to the newer SEO contrib. but would love to roll back the installation, as all the search engines have the old links. Back Door Guitars Back Door Guitars Site Map
  12. clemptor

    Seach Engine Friendly URL Support

    Hey there all, Installation was successful. Unfortunately, for the individual products, it is only pulling the meta descriptions and keywords specified for the manufacturers, not the product-specific ones. The site is http://www.backdoorguitars.com. Thanks in advance
×