Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Product id appended to product name on paypal page

    Hello,

    When a user adds an item to cart and then does a paypal express checkout, they are redirected to paypal's page listing the product like this:

    SAMPLE 6 [185]
    Item number: 1616
    Item price: $10.00
    Quantity: 1

    Notice how the product id "185" is next to the name. However since there is also an item number: 1616, isn't it confusing to have both? Is there a way to remove product id there? What would be the best solution to handle this? In my opinion, if the product id wasn't there, then it would look perfect, is this possible?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Product id appended to product name on paypal page

    The product id is there to differentiate in case you've got multiple items of the same name. Many stores have the same name in multiple configurations, and this is important to help track back to which actual item was really purchased.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: Product id appended to product name on paypal page

    Ok that makes sense. I guess I'll just put the model number the same as its product id for consistency purposes. Thanks for the reply drbyte.

  4. #4
    Join Date
    Apr 2022
    Posts
    9
    Plugin Contributions
    0

    Default Re: Product id appended to product name on paypal page

    I realize this topic is nearly a decade old however it is still relevant today. I recently purchased a business and its website runs on Zen Cart v1.5.7d. I noticed that the product id is appended to the product name in PayPal.

    My website has unique names for all items and it will always have unique names for all items, so I do not want the product id appended to the product name in PayPal.

    I found some code in some payment files that I thought may be causing the product id to append the product name, however, when I edited the code and ran test transactions the id was still after the product name in PayPal.

    I am sure that I could figure this out on my own however it may take many hours to do so, so I am wondering if anyone here knows which file to edit and what to edit in the file?

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,498
    Plugin Contributions
    88

    Default Re: Product id appended to product name on paypal page

    Quote Originally Posted by AlexTheDude View Post
    I realize this topic is nearly a decade old however it is still relevant today. I recently purchased a business and its website runs on Zen Cart v1.5.7d. I noticed that the product id is appended to the product name in PayPal.

    My website has unique names for all items and it will always have unique names for all items, so I do not want the product id appended to the product name in PayPal.

    I found some code in some payment files that I thought may be causing the product id to append the product name, however, when I edited the code and ran test transactions the id was still after the product name in PayPal.

    I am sure that I could figure this out on my own however it may take many hours to do so, so I am wondering if anyone here knows which file to edit and what to edit in the file?
    Since you didn't indicate which variant of PayPal is being used, I'm guessing paypalwpp (PayPal Express Checkout). If that's the case, edit /includes/modules/payment/paypalwpp.php, finding this 'chunk':
    Code:
          $optionsLI["L_PAYMENTREQUEST_0_NUMBER$k"] = $order->products[$i]['model'];
          $optionsLI["L_PAYMENTREQUEST_0_NAME$k"]   = $order->products[$i]['name'] . ' [' . (int)$order->products[$i]['id'] . ']';
          // Append *** if out-of-stock.
          $optionsLI["L_PAYMENTREQUEST_0_NAME$k"]  .= ((zen_get_products_stock($order->products[$i]['id']) - $order->products[$i]['qty']) < 0 ? STOCK_MARK_PRODUCT_OUT_OF_STOCK : '');
          // if there are attributes, loop thru them and add to description
          if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {
            for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
              $optionsLI["L_PAYMENTREQUEST_0_NAME$k"] .= "\n " . $order->products[$i]['attributes'][$j]['option'] .
                                            ': ' . $order->products[$i]['attributes'][$j]['value'];
            } // end loop
          } // endif attribute-info
    ... and changing to
    Code:
          $optionsLI["L_PAYMENTREQUEST_0_NUMBER$k"] = $order->products[$i]['model'];
    //-bof-site-specific change: Removing products_id suffix.
    //      $optionsLI["L_PAYMENTREQUEST_0_NAME$k"]   = $order->products[$i]['name'] . ' [' . (int)$order->products[$i]['id'] . ']';
          $optionsLI["L_PAYMENTREQUEST_0_NAME$k"]   = $order->products[$i]['name'];
    //-eof-site-specific change
          // Append *** if out-of-stock.
          $optionsLI["L_PAYMENTREQUEST_0_NAME$k"]  .= ((zen_get_products_stock($order->products[$i]['id']) - $order->products[$i]['qty']) < 0 ? STOCK_MARK_PRODUCT_OUT_OF_STOCK : '');
          // if there are attributes, loop thru them and add to description
          if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {
            for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
              $optionsLI["L_PAYMENTREQUEST_0_NAME$k"] .= "\n " . $order->products[$i]['attributes'][$j]['option'] .
                                            ': ' . $order->products[$i]['attributes'][$j]['value'];
            } // end loop
          } // endif attribute-info

  6. #6
    Join Date
    Apr 2022
    Posts
    9
    Plugin Contributions
    0

    Default Re: Product id appended to product name on paypal page

    Thank you very much lat9.

    I checked and my site is using PayPal Express Checkout. I made the change that you prescribed, ran an order and paid for it with PayPal, and it works perfectly with no more product id on the PayPal payment.

    I had done the exact same coding change to the wrong file which is why it did not previously work when I tried it on my own. I previously changed the paypal.php file instead of the paypalwpp.php file.

    I did not want to keep making and refunding PayPal payments between my own PayPal accounts fearing that it would trigger some sort of security warning with PayPal and get my accounts frozen or something like that, so that is why I asked for help here instead of keep trying on my own.

    Anyways thank you so much for your help lat9, and being this is the first time that I have used the Zen Cart forum I am very impressed with it.

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,154
    Plugin Contributions
    11

    Default Re: Product id appended to product name on paypal page

    We'll treat you so many different ways, you're bound to like one of them!

 

 

Similar Threads

  1. v150 Remove Product Image and product name from product page
    By LloydR in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Sep 2012, 11:06 AM
  2. Add Log In Link to Product Page (Below the product name & price)
    By cleverpork in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Sep 2012, 04:50 AM
  3. Issues with Product info page: my product image is overlapping the product name, etc
    By wmorris in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 4 May 2011, 06:30 PM
  4. Missing product name & product price from Product Info Page
    By kpatterson in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Feb 2011, 03:11 AM
  5. Adding columns in addition to product image and name in the product listing page
    By thunderbird2004 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Mar 2008, 10:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR