Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2007
    Posts
    5
    Plugin Contributions
    0

    red flag attrib stock - 32 character string getting appended to each item in shopping cart

    Hello there,

    I have a very odd problem that seems to have popped up out of nowhere.

    A 32 character string is being appended to each product ID for only one category in my store. This only shows up in the shopping cart. Nowhere else. Here is an example of a URL in the shopping cart.

    http://www.some_random_URL.com/shop/index.php?main_page=product_info&products_id=180:b46420006b9a8139c243e890f2e8bed5

    See that :b46420006b9a8139c243e890f2e8bed5?

    I get a different 32 character string for each product, but it's persistent across sessions - i.e. I get the same 32 character string for products_id 180 no matter which computer I view this on.

    Where's that coming from? It's breaking queries! When I click on a link in the shopping cart, I get a message like:

    "1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':b46420006b9a8139c243e890f2e8bed5 and stock_attributes=1150' at line 1
    in:
    [select quantity from shop_products_with_attributes_stock where products_id=180:b46420006b9a8139c243e890f2e8bed5 and stock_attributes=1150]"

    I don't really know where to find what is causing this behavior and appreciate any help you can provide.

    Thank you in advance,

    Jon

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: 32 character string getting appended to each item in one category in shopping car

    That is shown when Attributes are added to the Product and inserted in the Cart ...

    If you go to the product from the shopping_cart and there are Attributes, you will see it so that the settings are set as in the shopping_cart ...

    If you go to the Product from anywhere else you will only see the =180 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

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

    Default Re: 32 character string getting appended to each item in one category in shopping car

    Your products-with-attribute-stock module appears to need to be treating your products_id value as a string with quotes around it, but isn't.
    .

    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.

  4. #4
    Join Date
    Jun 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: attrib stock - 32 character string getting appended to each item in shopping cart

    It sounds then like this is expected behavior but if that's the case then why are the links broken in the shopping cart?

    Every time I click on a link I get the error as stated in the original post. This can't be right.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: attrib stock - 32 character string getting appended to each item in shopping cart

    Have you an URL where we can see this happening, perhaps?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jun 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: attrib stock - 32 character string getting appended to each item in shopping cart

    Yes - it's password protected to keep anyone from purchasing while the shop is in development.

    url:http://www.akianestour.com/shop
    userid: tmp
    pass: tmp123

    Add any painting to your shopping cart. When you're viewing the shopping cart contents you'll see the 32 character appended products_id I'm speaking of.

    Jon

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

    Default Re: attrib stock - 32 character string getting appended to each item in shopping cart

    Quote Originally Posted by johnnybravoh View Post
    Add any painting to your shopping cart. When you're viewing the shopping cart contents you'll see the 32 character appended products_id I'm speaking of.
    Yes, that is entirely normal for products that have attributes associated with them.

    Your problem has nothing to do with those necessary characters.
    The problem is that your SQL Query should be enclosing the product id in quotes because if it's not in quotes, it treats the : character as a divider instead of part of the product id.
    .

    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.

  8. #8
    Join Date
    Jun 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: attrib stock - 32 character string getting appended to each item in shopping cart

    Quote Originally Posted by DrByte View Post
    Yes, that is entirely normal for products that have attributes associated with them.

    Your problem has nothing to do with those necessary characters.
    The problem is that your SQL Query should be enclosing the product id in quotes because if it's not in quotes, it treats the : character as a divider instead of part of the product id.
    Oh that's great news. Means an easy fix. Would you happen to know the file I need to alter to insert the quotes?

    Thanks again!

  9. #9
    Join Date
    Jun 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: attrib stock - 32 character string getting appended to each item in shopping cart

    Quote Originally Posted by johnnybravoh View Post
    Oh that's great news. Means an easy fix. Would you happen to know the file I need to alter to insert the quotes?

    Thanks again!
    Alright - I found it. It was code that I inserted in the file includes/modules/attributes.php to display attribute quantities in the attribute list so you can see that there are 500 24x30 paintings and 475 30x46 paintings for instance...

    I really appreciate your assistance in pointing me in the right direction.

 

 

Similar Threads

  1. Replies: 5
    Last Post: 3 Aug 2011, 08:15 AM
  2. Replies: 10
    Last Post: 10 Feb 2011, 01:47 PM
  3. list a price for each item on the shopping cart content page
    By hoang in forum Templates, Stylesheets, Page Layout
    Replies: 23
    Last Post: 16 Apr 2010, 08:17 PM
  4. Bullet "Amount -" under each item in shopping cart...
    By laurenelaine_21 in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 10 Apr 2009, 09:19 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