Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping cart issue with multiple entry in same product id


ksatendra2

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

Link to comment
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.  

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

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

Link to comment
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.

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...