Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    296
    Plugin Contributions
    2

    Default altering basket contents

    i noticed the products_id in the customers_basket tables can either be stored as the real products_id say 123 or as 123:a2345erttetcetera.
    What i make from it, probably zen_id's get stored along with the products_id into this products_id field when someone is logged in as opposed to someone not being logged in?

    Is there a reason for that behaviour, is it expected?
    I would prefer just the products_id would be listed and not the extended string so i can do normal searches on this column based on the products_id.

    Thanks,
    Jeroen

  2. #2
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Is there a way to purge all pending cart sales?

    The "long string" is the product's attributes in a hash code. So you can't just "not have it":
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Nov 2006
    Posts
    296
    Plugin Contributions
    2

    Default Re: Is there a way to purge all pending cart sales?

    Quote Originally Posted by Kim View Post
    The "long string" is the product's attributes in a hash code. So you can't just "not have it":
    Ah, i see, thanks

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

    Default Re: altering basket contents

    This is just a trick to convert the products_id from a products_id with a prid to just the products_id ...

    Try this in phpMyAdmin ... there are better ways but this is a quick method I have used when I forget other ways ...
    SELECT customers_basket_id, customers_id, products_id, customers_basket_quantity, final_price, customers_basket_date_added, products_id*1 as prod_id FROM customers_basket WHERE 1The prod_id will be created with the products_id without the prid attached ...

    To do a search on a products_id without the prid, you could search using the Like %...% with 133: to find products_id 133 ...
    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!]
    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!

  5. #5
    Join Date
    Nov 2006
    Posts
    296
    Plugin Contributions
    2

    Default Re: altering basket contents

    Quote Originally Posted by Ajeh View Post
    This is just a trick to convert the products_id from a products_id with a prid to just the products_id ...

    Try this in phpMyAdmin ... there are better ways but this is a quick method I have used when I forget other ways ...
    SELECT customers_basket_id, customers_id, products_id, customers_basket_quantity, final_price, customers_basket_date_added, products_id*1 as prod_id FROM customers_basket WHERE 1
    Hello Linda,
    I really like it, works great, although i can't get my head around the logic behind it The column is tiny text field so if you multiply it by 1 it will disregard anything behind the : because it thinks this is some sort of decimal value...

    Mmm, probably not, but i never understand how those magicians out there get the rabbits out of their hat either

    Nice trick, cheers,
    Jeroen

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

    Default Re: altering basket contents

    One note on the use of the LIKE and the prid in the SQL statement ... you really want LIKE command with just the trailing %, example:
    Code:
    SELECT * FROM customers_basket WHERE products_id LIKE '133:%';
    to avoid the issue of getting things like:
    133
    1133
    2133
    etc. etc. etc.

    from being included in the match ...
    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!]
    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!

 

 

Similar Threads

  1. v150 Customers sharing contents in shopping basket
    By mtncycling in forum General Questions
    Replies: 12
    Last Post: 15 Feb 2014, 09:19 AM
  2. Sell a "basket" where the customer choose contents?
    By francoza in forum General Questions
    Replies: 4
    Last Post: 5 Jun 2012, 02:21 AM
  3. Adding VAT in shopping basket/ cart contents page
    By Peace74 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 11 May 2012, 10:56 AM
  4. Replies: 3
    Last Post: 24 Sep 2011, 07:38 AM
  5. Email contents of basket to user?
    By wicked01 in forum General Questions
    Replies: 0
    Last Post: 15 Feb 2009, 01:56 AM

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