I was looking for the code that appends a string at the end of the product_id when inserted into customer_basket and customers_basket_attributes.
Anyone know where I can find that?
Thanks.
I was looking for the code that appends a string at the end of the product_id when inserted into customer_basket and customers_basket_attributes.
Anyone know where I can find that?
Thanks.
When a Product is added to the customers_basket it is added as the products_id ...
The difference will be if there are attributes where a prid is created, or a reference point, for the product to the attribute(s) of the given product ...
This allow you to add Product A with products_id 27 and Attribute with Color Red ... and then add Product A with products_id 27 and Attribute with Color Blue ...
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!
Thanks for the quick response!
I'm trying to do something unique as far as I have read in the forums for the last three years, but I'll try and explain clearly.
I need to have each "product" be unique in my zencart. The snag that I have run into is the system automatically detects if a product with the same product_id-prid is in the database. I have been able to get the system to do what I want by changing the product_id's in the database, and restarting my session. I was wondering if there is an easy way to insert a unique id automatically in the code?
Are you saying if I order a Widget in Red ... and then add it a second time to the cart that you do not want it to say quantity 2 but rather have separate records?
You are kind of losing me here on what it is you are trying to do as the products_id is unique on each product and adding attributes builds a prid to keep them unique based on product/attribute combination as they are added to the cart ...
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!
I know its a little confusing.......my products and attributes can be duplicated, but I have another "attribute" that is custom to each customer. This custom attribute in combination with product and global attribute cannot be duplicated. Needless to say I have custom coded a lot for this to happen in zencart.
Your previous explanation has lead me to a possible solution
I have added a microtime() to the prid md5 id that is created when inserted into the database.
Can you foresee any major problems with this solution?
Thanks again for the quick responses!
If you use the products_id field and add on to the prid and it keeps things tracked together it should work ...
Otherwise, you will want to use a seperate field for your code so that it doesn't conflict with product tracking etc.
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!