Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Update cart not working properly


bill110

Recommended Posts

When I check remove product from the cart and click update the page refreshes and product still shows in cart. do it again and it deletes it.

However if I do not remove it a second time and just click continue, the cart is cleared.

Have stock cart functions in application_top.php,

stock tep_image_submit function and tep_href_link function.

I am not using any rewrite rules in .htaccess

Any ideas. I have seen this in a couple of other shops also.

My local copy will not duplicate this. Could this be a server issue?

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Bill I'd install Chemos Queries debugger (Also shows variables)

 

And see what's happening with the $cart object.

Link to comment
Share on other sites

Bill I'd install Chemos Queries debugger (Also shows variables)

 

And see what's happening with the $cart object.

I will give it a try. will post solution later if I find it. Thanks

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites


OK Ive installed it but still cannot figure out why it is doing this.

here is the report of the sessions (the only part that is different from local and live copies

live site when product will not update

SESSION: 
Array
(
[cart] => shoppingcart Object
	(
		[contents] => Array
			(
				[22] => Array
					(
						[qty] => 1
					)

			)

		[total] => 16.77
		[weight] => 0
		[cartID] => 97828
		[content_type] => 
	)

[language] => english
[languages_id] => 1
[currency] => USD
[navigation] => navigationhistory Object
	(
		[path] => Array
			(
				[0] => Array
					(
						

 => index.php
						[mode] => NONSSL
						[get] => Array
							(
							)

						[post] => Array
							(
							)

					)

				[1] => Array
					(
						

 => index.php
						[mode] => NONSSL
						[get] => Array
							(
								[cPath] => 7
							)

						[post] => Array
							(
							)

					)

				[2] => Array
					(
						

 => product_info.php
						[mode] => NONSSL
						[get] => Array
							(
								[products_id] => 22
								[action] => add_product
							)

						[post] => Array
							(
								[products_id] => 22
								[x] => 59
								[y] => 12
							)

					)

				[3] => Array
					(
						

 => shopping_cart.php
						[mode] => NONSSL
						[get] => Array
							(
							)

						[post] => Array
							(
							)

					)

			)

		[snapshot] => Array
			(
			)

	)

)

from local where update works

SESSION: 
Array
(
[cart] => shoppingcart Object
	(
		[contents] => Array
			(
			)

		[total] => 16.77
		[weight] => 0
		[cartID] => 90532
		[content_type] => 
	)

[language] => english
[languages_id] => 1
[currency] => USD
[navigation] => navigationhistory Object
	(
		[path] => Array
			(
				[0] => Array
					(
						

 => index.php
						[mode] => NONSSL
						[get] => Array
							(
							)

						[post] => Array
							(
							)

					)

				[1] => Array
					(
						

 => product_info.php
						[mode] => NONSSL
						[get] => Array
							(
								[products_id] => 22
								[action] => add_product
								[osCsid] => 0bc4318ac46bc2f3c4aee0393801f4f5
							)

						[post] => Array
							(
								[products_id] => 22
								[x] => 45
								[y] => 8
							)

					)

				[2] => Array
					(
						

 => shopping_cart.php
						[mode] => NONSSL
						[get] => Array
							(
								[osCsid] => 0bc4318ac46bc2f3c4aee0393801f4f5
							)

						[post] => Array
							(
							)

					)

			)

		[snapshot] => Array
			(
			)

	)

)

Any ideas anyone?

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Well if I add to cart my $cart object looks like this ..

 

	[cart] => shoppingCart Object
	(
		[contents] => Array
			(
				[26{3}9] => Array
					(
						[qty] => 1
						[attributes] => Array
							(
								[3] => 9
							)

					)

			)

		[total] => 70.95
		[weight] => 8
		[cartID] => 65986
		[content_type] => 
	)

 

After deleting the cart the object looks like ..

 

	[cart] => shoppingCart Object
	(
		[contents] => Array
			(
			)

		[total] => 70.95
		[weight] => 8
		[cartID] => 01672
		[content_type] => 
	)

 

Yours?

Link to comment
Share on other sites

add to cart

Array
(
[cart] => shoppingcart Object
	(
		[contents] => Array
			(
				[22] => Array
					(
						[qty] => 1
					)

			)

		[total] => 16.77
		[weight] => 0
		[cartID] => 90385
		[content_type] => 
	)

remove first time (contents still there)

Array
(
[cart] => shoppingcart Object
	(
		[contents] => Array
			(
				[22] => Array
					(
						[qty] => 1
					)

			)

		[total] => 16.77
		[weight] => 0
		[cartID] => 90385
		[content_type] => 
	)

Remove 2nd time (contents empty)

Array
(
[cart] => shoppingcart Object
	(
		[contents] => Array
			(
			)

		[total] => 16.77
		[weight] => 0
		[cartID] => 08726
		[content_type] => 
	)

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

I FOUND IT

On my product_info.php I had edited a query to remove the model query but inadvertantly left a { and } from the if else statement.

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Congrats!!

 

Hope I helped a bit.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...