Jump to content
Sign in to follow this  
ksatendra2

Shopping cart issue with multiple entry in same product id

Recommended Posts

Hi , 

I have a problem with shopping cart total qty calculation. I have added products in shopping cart with same product_id and different values. when I trying to update my cart its calculating only one product not other which have same product_id, that's why its not calculating correct qty and price of total cart.

I have attached screenshot of my page

Could anybody please help me about this.

 

Thanks & Regards

Satendra Kumar

issue in shopping cart.png

Share this post


Link to post
Share on other sites
14 hours ago, burt said:

They are different products, look at their text...

they are different product by text but in all 4 products have same products id. means if dimension will be 24-1/4" to 30" then they are uses same product id.  their dimension are 25-1/2", 26-1/2", 28-1/2" and 29-1/2" but there are using 1 product if for all these 4. I have make text string on shopping cart page according to its dimension.  

Share this post


Link to post
Share on other sites

What is the part of the product URL after the domain?  I.e. something like product_info.php?products_id=blah{blah}

I looked at your site, but I don't see how to generate that cart.  Perhaps this is something from a test store? 


Always back up before making changes.

Share this post


Link to post
Share on other sites
2 hours ago, ecartz said:

What is the part of the product URL after the domain?  I.e. something like product_info.php?products_id=blah{blah}

I looked at your site, but I don't see how to generate that cart.  Perhaps this is something from a test store? 

product_info1.php?products_id=666&osCsid=gjbvllhg8gr8ftsnudlbuj3dl4

also you can access by folowing link

/product_info.php?id=72&type=2BAY&add_more_bay=0&osCsid=gjbvllhg8gr8ftsnudlbuj3dl4

Share this post


Link to post
Share on other sites

It looks like you are doing something custom to differentiate your products.  The osC way would be for you to create attributes for the sizes.  Then there would be multiple product IDs.  E.g. product_info1.php?products_id=666{1} and product_info1.php?products_id=666{2}

They would have the same base product ID, but the cart would show different extended ones.  The tep_get_prid function takes the long form and trims off the attributes to get the base ID.  The tep_get_uprid function adds the attributes to the base product ID to produce the long form. 

Your shop is customized enough that I can't say concretely how you would have to do things differently.  But that's how things are intended to work in this situation.  Hopefully that at least gives you an idea of where to look in your modifications. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, ecartz said:

It looks like you are doing something custom to differentiate your products.  The osC way would be for you to create attributes for the sizes.  Then there would be multiple product IDs.  E.g. product_info1.php?products_id=666{1} and product_info1.php?products_id=666{2}

They would have the same base product ID, but the cart would show different extended ones.  The tep_get_prid function takes the long form and trims off the attributes to get the base ID.  The tep_get_uprid function adds the attributes to the base product ID to produce the long form. 

Your shop is customized enough that I can't say concretely how you would have to do things differently.  But that's how things are intended to work in this situation.  Hopefully that at least gives you an idea of where to look in your modifications. 

Hello Matt, I have tried this but when I am trying to update qty its getting empty $this->contents.  Actually i am trying to add 2 or more product of same products id. I have attached customer basket table customer basket have different total no of product and in cart its showing less than table. there should 14 in cart but its showing only 11 items in cart

 

issue in shopping cart2.png

Edited by ksatendra2

Share this post


Link to post
Share on other sites

I'm not sure what you did, but if you were using some variation of the osCommerce form, the products_id would show like 666{1}.  But in your image, it is showing as just 666. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
Posted (edited)

they are different product by text but in all products have same products id.

Edited by burt
remove spam - give user benefit of doubt. Next time...nuke.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×