Jump to content

rich89

Members
  • Content count

    21
  • Joined

  • Last visited

  1. rich89

    Quantity Price Breaks

    I had the old Tim Cartwright version of QPB installed and working fine, but then I added the Discount Coupons contribution, and quantity price breaks were no longer being applied. Has anyone gotten these two contribs to play nicely together? I have no problem updating to the newest version of QPB if it is known to work with Discount Coupons. Just wanted to see if anyone has run across this and can offer some advice. Thanks!
  2. I think that line is supposed to be: $products_ordered_attributes .= "\n\t" . $attr_name . ' ' . tep_decode_specialchars($order->products[$i]['attributes'][$j]['value']);
  3. There are two comments in classes/shopping_cart.php that read // insert into database, so we can use those as markers. Between those to comments, I have the following working: // insert into database // BOF Product Type Option //if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$qty . "', '" . date('Ymd') . "')"); if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "')"); // EOF Product Type Option if (is_array($attributes)) { reset($attributes); while (list($option, $value) = each($attributes)) { // BOF Product Type Option //$this->contents[$products_id]['attributes'][$option] = $value; $attr_value = NULL; $blank_value = FALSE; if (strstr($option, TEXT_PREFIX)) { if (trim($value) == NULL) { $blank_value = TRUE; } else { $option = substr($option, strlen(TEXT_PREFIX)); $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES); $value = PRODUCTS_OPTIONS_VALUE_TEXT_ID; $this->contents[$products_id]['attributes_values'][$option] = $attr_value; } } if (!$blank_value) { $this->contents[$products_id]['attributes'][$option] = $value; // EOF Product Type Option // insert into database Hope that helps! Cheers, RC
  4. I figured it out. Recent editions of OTF don't include a line in includes/classes/shopping_cart.php that was present in earlier versions of OTF (I found it in 1.71). The absence of this line makes it impossible for customers to delete items from their cart if one of the OTF text fields is populated by a value that includes either an apostrophe or quote marks. I haven't checked all versions, but I know this fix applies to 2.02, 2.01, and several of the manual installs. Hope this helps. Open includes/classes/shopping_cart.php // FIND function get_quantity($products_id) { if (isset($this->contents[$products_id])) { return $this->contents[$products_id]['qty']; } else { return 0; } } function in_cart($products_id) { if (isset($this->contents[$products_id])) { return true; } else { return false; } } function remove($products_id) { global $customer_id; unset($this->contents[$products_id]); ------------------------------------------------ // REPLACE WITH function get_quantity($products_id) { if (isset($this->contents[$products_id])) { return $this->contents[$products_id]['qty']; } else { return 0; } } function in_cart($products_id) { if (isset($this->contents[$products_id])) { return true; } else { return false; } } function remove($products_id) { global $customer_id; //CLR 030228 add call tep_get_uprid to correctly format product ids containing quotes $products_id = tep_get_uprid($products_id, $attributes); unset($this->contents[$products_id]);
  5. Would that be added to the .htacces file located in the root of the catalog? I tried it, but am still having the same problem. Would the htaccess fix have need to've been applied before the item was added to the basket, or doesn't it matter.
  6. Would that be in classes shopping_cart... application_top? My products have a ton of attributes, which were being cut off at 255 in the customer's basket & customer's basket attributes product_id field. Not sure if that could be a contributing factor. Weird thing is (and I did this several times). I try to delete the product initially and can't. I go and browse around for about twenty minutes, revisit the page, and I can delete the product. That's a bit much to ask, and I have zero idea what makes my later attempt to delete the product work. I did increase the length of text input fields (set products_options_values to varchar(255) ). Not sure if there is somewhere that checks the product_id field against the actual array of attribute form values. If there is, that could be an issue, as the products_id is truncated and therefore shorter than the actual values output. Any ideas are appreciated. And I'm not sure why I can delete immediately if there aren't single or double quotes in any of the text field values. BTW, am I right in assuming that once a customer moves beyond the page where they define attributes for their order, that there is no way to go back and edit those attributes? The best they can do is delete the product, and enter all their info again. When I click on the item in the cart, I get a blank attribute entry form. The url to the form includes the attributes, but they aren't repopulating the form (i.e. http://mysite.com/catalog/product_info.php...CH{txt_29}Field 29 Text{26}104{25}105{90}104{txt_30}Jim{txt_31}Croft{txt_33}Marketing%20Director{32}120{txt_34}Bill{txt_35}Bobson{txt_36}Sales%20Manager{37}120{txt_38}Tom{txt_39}Thompson{txt_40}Editor{41}120{txt_42}Carlos{t xt_43}Senterilla{txt_44}Managing%20Director{45}120{txt_46}Joseph{txt_47}Schmosef{txt_48}Product%20Manager{49}120{txt_50}{txt_51}{txt_52}{53}31{txt_54}{txt_55}{txt_56}{57}31{txt _58}{txt_59}{txt_60}{61}31{txt_62}{txt_63}{txt_64}{65}31{txt_66}{txt_67}{txt_68}{ 69}31{txt_70}{txt_71}{txt_72}{73}31{txt_74}{txt_75}{txt_76}{77}31{txt_78}{txt_79} {txt_80}{81}31{txt_82}{txt_83}{txt_84}{85}31{txt_86}{txt_87}{txt_88}{89}31). Again, any help would be appreciated. I'm at something of a loss. RC
  7. I have a problem in that if the OTF text field filled out by the customer contains either single or double quotes, the customer will not be able to delete the item from the cart. Not sure why this is happening or if there is a documented fix (I'm guessing the field contents have to be escaped), but my cart's live and pretty busy, so if someone's fixed this already, I'd love to know how. Thanks in advance to anyone who might be able to help me out. I've spent many an hour over the last couple of days deleting items from customers' baskets in phpMyAdmin--be sweet not to have to do that anymore.
  8. Ive noticed that if one of the OTF text fields filled out by the customer contains either a single or double quote, it is no longer possible for them to delete the item from their cart. Has anybody had this problem before, and is there a documented fix. My cart is live, and we're busy now, or I'd be more inclined to experiment. If someone else has experienced this problem and solved it, I'd love to know how. Thanks. RC
  9. I have no idea what I did to fix the problem, but it seems to be fixed. Phew. Thanks for the great contrib.
  10. Anybody have an idea where I could have screwed up? All the attributes and their respective values show up fine in the shopping cart. I'm using PWA too, if that matters, but when I go to checkout_confirmation.php, my attribute names aren't showing up correctly, though all the values are showing up in their proper order. Does checkout_confirmation.php need to be edited in some way to properly display OTF? - Membership Type: Test Membership (select) - Do You Speak A Foreign Language?: Yes (radio) - Do You Speak A Foreign Language?: Spanish (text area) - Do You Speak A Foreign Language?: 1922 (text) - Do You Speak A Foreign Language?: Sky Web Designs (text) - Do You Speak A Foreign Language?: 1 Lake Avenue (text) - Do You Speak A Foreign Language?: Lake River (text) - Business State: OH (select) - Business State: 44100 (text) - Business State: 216xxx1665 (text) - Business State: rich@xyz.com (text) - Want to Serve on a Committee?: No (radio) Any hints as to where I may have gone wrong would be greatly appreciated. In the mean time, I'll keep scouring my code and the forums. Thanks. --Rich
  11. rich89

    PayPal WPP Direct Payments & Express Checkout Support

    I've had 7.3 running for about a year with few problems. Occassionally I would have a double billing issue, but instances were rare. Of late, I've had 3 double submits out of the last 15 or so orders, one of which was a COD order. Other contribs I have running are Featured Product, a calendar script to set a time and date of delivery, VVC, and PriceFormatter (which applies quantity discounts). When double ordering happens, I receive two emails instead of one. The orders each have distinct order numbers & paypal codes. They show up in admin, as well as in my Paypal acct. Checking the time of the orders indicates that the second order is usually placed 25-45 seconds after the first, which makes me think that the order is declined, then placed again, but despite the decline, both orders are going through. That's just a guess at this point. It could also be that server load is causing a long lag and that people are clicking submit multiple times during the lag. Not sure. I searched the forum thoroughly, but it seems everyone else's problems went away once they switched to 7.3, but I've been running 7.3 from the start, so that can't be it. I'm on Godaddy, if that helps, and applied the code modifications in re ports in general.php (I think that was Steve Dallas' fix). Any ideas on tests I can run to determine the cause of this, or a script I can insert to prevent this from happening would be much appreciated. Thanks Rich
  12. rich89

    double orders, double billing

    I've had 7.3 running for about a year with few problems. Occassionally I would have a double billing issue, but instances were rare. Of late, I've had 3 double submits out of the last 15 or so orders, one of which was a COD order. Other contribs I have running are Featured Product, a calendar script to set a time and date of delivery, VVC, and PriceFormatter (which applies quantity discounts). When double ordering happens, I receive two emails instead of one. The orders each have distinct order numbers & paypal codes. They show up in admin, as well as in my Paypal acct. Checking the time of the orders indicates that the second order is usually placed 25-45 seconds after the first, which makes me think that the order is declined, then placed again, but despite the decline, both orders are going through. That's just a guess at this point. It could also be that server load is causing a long lag and that people are clicking submit multiple times during the lag. Not sure. I searched the forum thoroughly, but it seems everyone else's problems went away once they switched to 7.3, but I've been running 7.3 from the start, so that can't be it. I'm on Godaddy, if that helps, and applied the code modifications in re ports in general.php (I think that was Steve Dallas' fix). Any ideas on tests I can run to determine the cause of this, or a script I can insert to prevent this from happening would be much appreciated. Thanks Rich
  13. rich89

    PayPal WPP Direct Payments & Express Checkout Support

    I was a little premature annoucing the demise of my problem. I am still getting the error (this is not the standard pink background error message, but rather white text on a red background), "Please select a payment method for your order," after selecting a shipping method during EC. If anyone knows what might be causing this, I'd appreciate a little help, as debug mode isn't generating any emails for this one. The odd thing is that if I click Continue on checkout_payment.php--which is the page showing the error--I go to the confirmation and then success pages without a hitch, and the order registers with Paypal.
  14. rich89

    PayPal WPP Direct Payments & Express Checkout Support

    I had a different problem which seemed to be solved by commenting out the code you suggested. Non logged in users who chose Express Checkout were routed to Paypal, then back to checkout_shipping where they'd select a shipping method, but when they clicked Continue on checkout_shipping.php, they were routed to checkout_payment with the error messave "Please select a payment method for your order." For some reason, commenting out that code prevents this error, and also results in the correct amounts being sent to Paypal, so thanks for the tip. If anyone can think of any downsides to commenting out this code, please let me know. Thanks again. -Rich
  15. Add the code below before the closing ?> php tag in your includes/modules/functions/general.php file, and you should be fine. Other bugs are listed on the Feature Products contrib page. For some reason, earlier bug fixes were not included in the latest release. function tep_array_values_to_string($array, $separator = ',') { $get_string = ''; if (sizeof($array) > 0) { while (list($key, $value) = each($array)) { $get_string .= $value . $separator; } $remove_chars = strlen($separator); $get_string = substr($get_string, 0, -$remove_chars); } return $get_string; }
×