Jump to content

Supertex

Members
  • Content count

    302
  • Joined

  • Last visited

  • Days Won

    2

Reputation Activity

  1. Like
    Supertex reacted to kymation in [Development] USPS Shipping Module   
    You need to make the change to admin/modules.php that is mentioned in the instructions. That change handles the arrays that the module uses to store the settings.
    Regards
    Jim
  2. Like
    Supertex got a reaction from douglaswalker in Change default country dropdown list   
    Here is an interesting fix for several of the requests in this thread, although it does require a modification to the "countries" table in your DB.
     
    Add a column named "countries_sort" that's type "int" and an appropriate length for a default within which you can fully enumerate the countries you want at the top of the list.  So if you want 3 countries at the top, your default will be set at "4".  Then go in and enumerate in order the countries you want at the top of the list, starting with 0 for the top, 1 for second, etc.
     
    Then just go into general.php and find (ctrl+f) the function "tep_get_countries."  There's an if, followed by two 'else' statements, and a query for each.  In the last query, add "countries_sort, " to the 'select' statement, and change the 'order by' to "order by countries_sort, countries_name"
     
    That will cause the countries drop down to retain the initial blank, but when the drop down button is pushed, the countries you chose to specify first will be at the top of the list.  
     
    This way, it doesn't screw with the mechanics, it just changes the order of the array that holds all the countries.
  3. Like
    Supertex got a reaction from radhavallabh in Mobile Devices - PayPal Standard - Buyer Being Returned to Shopping Cart After Purchase   
    @@radhavallabh
     
    I believe you're probably having the same issues as I am.  A customer MUST return to the store to have stock updated and send order process emails.  The problem is not affected by this fix - this only fixes mobile device purchases, which were completely broken (again, Ty Bob).
     
    Currently, if a non-mobile customer pays with PP account, they are auto-returned.  If they do NOT log into PP, and instead pay with a credit card, they are NOT auto-returned - they must 'click to return to (store)'  
     
    For click-to-return, there is no message telling them it's required, so some simply don't return.  For those orders...no emails...no stock updates.
  4. Like
    Supertex reacted to Bob Terveuren in 2.3.4BS - An Idiots Guide...   
    Senior moment - welcome to my world
  5. Like
    Supertex reacted to bruyndoncx in Sorting items in basket for invoice   
    Find this line

    $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
     
    change it to

    $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by products_name ");
    by adding
    order by products_name
    just before the last double quote and closing paranthesis, making sure to have a space inserted just before order by
  6. Like
    Supertex got a reaction from radhavallabh in order status, stock change, & returning after paypal ... soo confused   
    @@radhavallabh
     
    May help:
     
    catalog/includes/languages/(your language)/modules/payment/paypal_standard.php:
     
    define('MODULE_PAYMENT_PAYPAL_STANDARD_TEXT_PAYPAL_RETURN_BUTTON', 'Complete My Order'); // Maximum length 60 characters, otherwise it is ignored. This replaces "Return to (store name)" button text on the PayPal site with "Complete My Order" indicating more clearly the need  to return to the store.  Original text implies nothing.
  7. Like
    Supertex reacted to multimixer in osc 2.3.1 Unique Order Number   
    Best is, not to use this add-on or any other in this direction.
     
    Leave the order number in the database in peace, same with any other auto incrementing ids, sooner or later you will mess up while changing them
     
    If you want a different order number to appear on your invoices or anywhere else, then do it in php, in the file you are showing the order number. 
     
    You could create a function say "format_order_number($order_id)" that will reformat the order number by adding a date, or id, or the name of your pet and then, at each place where the order id is going to the screen, pass it through this function first
  8. Like
    Supertex reacted to Bob Terveuren in Mobile Devices - PayPal Standard - Buyer Being Returned to Shopping Cart After Purchase   
    Hi there
     
    I can tell you why maybe this is happening and I have a quick sticking plaster 'fix' that may help
     
    PayPal will send your customers to their 'new' mobile express checkout - in turn that will send your customers back to your site via an HTTP GET method. The desktop checkout at PayPal will use a HTTP POST return
     
    The PayPal Standard module file in osCommerce traps the return in the before_process() function:
    function before_process() { global $customer_id, $order, $order_totals, $sendto, $billto, $languages_id, $payment, $currencies, $cart, $cart_PayPal_Standard_ID, $payment, $HTTP_GET_VARS, $HTTP_POST_VARS, $messageStack; $result = false; if ( isset($HTTP_POST_VARS['receiver_email']) && (($HTTP_POST_VARS['receiver_email'] == MODULE_PAYMENT_PAYPAL_STANDARD_ID) || (defined('MODULE_PAYMENT_PAYPAL_STANDARD_PRIMARY_ID') && tep_not_null(MODULE_PAYMENT_PAYPAL_STANDARD_PRIMARY_ID) && ($HTTP_POST_VARS['receiver_email'] == MODULE_PAYMENT_PAYPAL_STANDARD_PRIMARY_ID))) ) { $parameters = 'cmd=_notify-validate'; foreach ($HTTP_POST_VARS as $key => $value) { $parameters .= '&' . $key . '=' . urlencode(stripslashes($value)); } $result = $this->sendTransactionToGateway($this->form_action_url, $parameters); } if ($result != 'VERIFIED') { if (defined('MODULE_PAYMENT_PAYPAL_STANDARD_TEXT_INVALID_TRANSACTION')) { $messageStack->add_session('header', MODULE_PAYMENT_PAYPAL_STANDARD_TEXT_INVALID_TRANSACTION); } $this->sendDebugEmail($result); tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } as there is no POST data to check line 512 above will always see a GET return as !='VERIFIED' so your customer gets booted back to the shopping cart despite having paid
     
    It is possible to get some data returned from PayPal by GET (you setup PDT on your account) however that does not hold the same values as a POST return (instead it sends back a token that you need to verify)
     
    Attached is some new code that replaces the stock includes/modules/payment/paypal_standard.php - you will need to go to your store admin, uninstall Paypal, then replace the file and reinstall. There is a new field in the admin that wants you to enter a PDT code - get that code by following the advice here (or Google it)
     
    When you setup the PDT you'll need to set the auto return to 'on' and enter a valid looking url at PayPal (it can be anything - the osCommerce code over rides it but PayPal will insist you pop something in there)
     
    If properly setup this will send your customers back with a PDT GET url which includes a token - there's some new code in the file that checks that for you and will update the order. It will add a comment that an order total does not match PayPal e.g. PayPal Verified [Transaction ID: 4LR5883905582730T; Completed (Verified; $1,313.37); PayPal transaction value (1313.37) does not match order value (1,313.37)]
    Just ignore that bit!
     
    This is a patch on the standard file - it is used at your own risk and the code really needs tidying up by one of the Core Team. I have tested this on the PayPal Sandbox only. Using Chrome on a desktop you can spoof a user agent for a mobile to check what happens
    paypal_standard.php
  9. Like
    Supertex got a reaction from Harald Ponce de Leon in order status, stock change, & returning after paypal ... soo confused   
    OSC 2.3.1, PayPal Standard - newest release: 3.2
     
    TLDR:  Look at the last text section.
     
    I've read quite a few posts about how this works, but I'm still very unclear about how this "should" flow.  If there's a definitive post that would clear me up, could someone point me to it?
     
    Here's how it currently does flow for me:
     
    Customer populates a cart, moves through shipping and arrives at checkout_payment.  They have 2 options - Money Order and PayPal. 
     
    A) Money Order - No order exists until they click "confirm order" on checkout_confirmation. Then the order is set to "Awaiting Money Order", stock is deducted, and emails sent.
     
    B) PayPal - Order exists immediately when they click "continue" to move to checkout_confirmation.
    - Order in admin list is set to "Preparing [PayPal Standard]"
    - Order status within the order itself shows "No Order Status History Available"
    - No stock deducted.
     
    1) They click on "Confirm Order" & are taken to PayPal site.
    - No order status change.
    - No stock deducted.
    **Here is where the order should come into existence**
     
    2) They actually submit a payment on the PayPal site.
    - Order status in admin order list changes to "Pending"
    - Order status within the order itself shows "PayPal [Transactions]" with comment PayPal IPN Verified.
    - No stock is deducted
    - Cart is not cleared
    - No emails dispatched, either to me or the customer, from my store
     
    3) After the transaction, 2 things can happen: Customer is either auto-returned, or shown a "return to store" button.
     
    4a) They're auto-returned
    - Order status in admin order list remains "Pending."
    - Order status within the order itself now shows 3 status lines:
     
        1 - PayPal [Transactions], with comment PayPal IPN Verified.
        2 - PayPal [Transactions], with comment PayPal Verified.
        3 - Pending, with no comment.
     
    - Customer & store notification emails are sent.
    - Stock is deducted.
    - Cart is cleared.
     
    4b) 
    They click "Return to Store."
    - Same as above.
     
    4c) They do not return to the store, whether they closed the browser, hit the 'back' button, fumbled the keyboard and got hung up...whatever. 
    - Order status in admin order list remains "Pending."
    - Order status within the order itself shows "PayPal [Transactions]" with comment PayPal IPN Verified.
    - No stock is deducted
    - No emails are sent.
     
    Question about "B":  I have several orders that never progress beyond this point.  Is there not a way to prevent these "stale" orders from acquiring an order id, and therefore appearing in the admin orders list before they actually click to move to PayPal? Or better yet, until payment has been submitted? 
     
    It just makes unnecessary clutter in the list, and there's no need to actually SEE them, that I can think of, except it's been an indicator that the customer has cookies disabled, and had issues with the process.  Even being able to filter these out of the order list without altering the order query would be nice, but I can't readily alter the drop-down filter to exclude only this type of order, since it just adds a status type to the url.  It's either all types or a single type.  As I understand, this is somehow necessary to the functionality of the IPN.
     
    Question about "3": Why is this different for some customers?  I've run transactions on Windows, Mac, Chrome, FF, IE, and Safari, and have had mixed outcomes.  I realize this doesn't directly have anything to do with OSC, but surely someone has some insight on, or experience with, this oddity. Is it a browser/OS combination, or is it the way my store is set up?
     
    Question about "4a": Should I be seeing both IPN Verified, AND Verified, or do I have some redundancy at work?
     
    Question about "4c":  Perhaps this is related to the previous question.  I thought the IPN had functionality built in, to "finish" the order even if the customer did not return to the site, And by "finish" I mean send notification emails to the customer and to me, and more importantly, deduct stock.  If that is in fact how it should be working, can someone suggest where I've gone wrong?
     
     
     
     
×