Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Turv

Members
  • Content count

    17
  • Joined

  • Last visited

About Turv

  • Birthday 03/27/1989

Profile Information

  1. Turv

    PayPal WPP Direct Payments & Express Checkout Support

    Thanks for the reply Glen, My post was not meant at all as a moan about the module itself, and i do appreciate the amount of time and effort put into the module. I know its something i have done wrong on my end, so i was just looking for advice on where i may have gone wrong as i followed the instructions again to make sure i had all the required code and had the module installed completley but i still experience the error where by it tells me "You're currently checking out with PayPal Express Checkout! Click Here to choose another payment method." Just hoping someone may know the cause to the problems i am experiencing. Regards,
  2. Turv

    PayPal WPP Direct Payments & Express Checkout Support

    Okay, I'm hoping someone here has come accross this before or has an answer.. I don't have any Paypal buttons on the Shopping cart, or the Shipping page - I only want the paypal button on the Payment page at the same place where they have the option to enter their credit card details. All this is fine. The customer clicks the Express Checkout button goes to paypal, Goes to the review page, but they then go BACK to the Payment Page, the exact same page they just left which is very confusing o a customer, It then gets worse. If they click continue they get an error about not entering their credit card details, so instead they click the Paypal Express button which takes them to a page that says "You're currently checking out with PayPal Express Checkout! Click Here to choose another payment method." Now when we click 'Click here to choose another payment method' it goes back to the payment page with the browser pointing to checkout_payment.php?ec_cancel=1 With this i can then click continue and finish the process. Why is the payment process so messed up? I don't want to return to an identical page after paypal, but the problem is i have to click the paypal express button twice, to receive an error just so i can continue! Anyone have any ideas?
  3. Just thought i would post on here, for those that are having problems getting this to work with QPBPP or if you have a problem where one of each product (slave) is added to the cart, even if the value is set to 0, Then this is the cause, and the fix below. If you follow the process of adding an item to the shopping cart. case 'add_slave' : // reset($HTTP_POST_VARS); while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { if (substr($key,0,11) == "Qty_ProdId_") { $prodId = substr($key,11); $qty = $val; if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) { // We have attributes $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]); } else { // No attributes $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty); } } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; If you read the code you can see, Even if the Quantity is Zero, It still makes a call to add_cart - Which is where it all goes wrong and one of each product is added to the cart. The reason for this is (If you look at the add_cart function function add_cart($products_id, $qty = '', $attributes = '', $notify = true) { global $new_products_id_in_cart, $customer_id; // BOF qpbpp $pf = new PriceFormatter; $pf->loadProduct($products_id); $qty = $pf->adjustQty($qty); $discount_category = $pf->get_discount_category(); // EOF qpbpp .... Remembering that even if the Quantity is 0, a call is made to this function, and the very line where it goes wrong is this line here $qty = $pf->adjustQty($qty); The Quantity is set to whatever is returned by adjustQty. The adjustQty function is used for when you want to force someone to buy blocks of a product (Such as if you sell a product in packs of 12). If we dig deeper and go to this adjustQty function, function adjustQty($qty, $qtyBlocks = NULL) { ... if ($qty < 1) $qty = 1; ... Remember once again, even if the quantity is 0, the function is called, and because the Quantiy is 0 (<1) the quantity value is set to 1. As such this results in one of every product being added to the cart. Now, the quick and easy fix for this is to simply not make the call to this function if the Quantity is 0 (As if were not adding anything to the cart, theres no need to make the call!). Fix In Application Top, Around line 395 find case 'add_slave' : // reset($HTTP_POST_VARS); while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { if (substr($key,0,11) == "Qty_ProdId_") { $prodId = substr($key,11); $qty = $val; if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) { // We have attributes $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]); } else { // No attributes $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty); } } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; Replace this with the below case 'add_slave' : // reset($HTTP_POST_VARS); while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { if (substr($key,0,11) == "Qty_ProdId_") { $prodId = substr($key,11); $qty = $val; if($qty > 0) { if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) { // We have attributes $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]); } else { // No attributes $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty); } } } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; All this fix does is, If the quantity is 0, Don't make the call to add_cart, which will fix the problems with adding one of everything to the cart.
×