Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    762
    Plugin Contributions
    0

    Default Are your download products appending long string to URL?

    I'm have tested this on 1.5.5 and 1.5.7, and I'm not sure why this is happening. I just want to confirm if this is normal behavior that I've simply never noticed, or if there is something wrong on my site.

    It seems that when someone adds a download product into their shopping cart, there is a long "product_id" appended to the end of the URL.

    Steps to reproduce:

    1. Go to our website (https://www.mjmmagic.com).
    2. Add this product to your shopping cart (it's a download item): https://www.mjmmagic.com/store/the-v...d-p-31472.html
    3. Go to the shopping cart, hover your mouse over the item, and you will see that it appends another product_id string on the end.

    New URL: https://www.mjmmagic.com/store/the-v...10b1fe6e6e571f



    Is that normal for products that are downloads and I just never noticed it before? If it's not supposed to do that, then is there anything I can check in my code to prevent that from happening?
    - Jeff

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Are your download products appending long string to URL?

    That's normal for products with attributes (including downloads). That uprid (unique product_id) consists of a hash of the attribute(s) associated with the product appended to the product's id value.

  3. #3
    Join Date
    Aug 2004
    Posts
    762
    Plugin Contributions
    0

    Default Re: Are your download products appending long string to URL?

    Awesome, thanks for confirming that, Lat9. I can't believe I never really noticed that before! I only discovered it because one of my functions broke because I was grabbing the $_GET['product_id'] and assuming it was always a number. I had to type-cast it to an integer in my function to get around the possibility of it appending an attribute ID to the end of it.
    - Jeff

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Are your download products appending long string to URL?

    Quote Originally Posted by Jeff_Mash View Post
    Awesome, thanks for confirming that, Lat9. I can't believe I never really noticed that before! I only discovered it because one of my functions broke because I was grabbing the $_GET['product_id'] and assuming it was always a number. I had to type-cast it to an integer in my function to get around the possibility of it appending an attribute ID to the end of it.
    There's a function named zen_get_prid that does that for you!

 

 

Similar Threads

  1. Replies: 11
    Last Post: 10 Nov 2011, 04:27 PM
  2. Modifying the URL string
    By rubberd in forum Basic Configuration
    Replies: 5
    Last Post: 19 Jul 2008, 07:33 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