close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error when updating cart

Thread began 1/22/2010 10:14 am by fraskos393357 | Last modified 1/29/2010 12:47 pm by Eric Mittman | 1518 views | 7 replies |

fraskos393357

Error when updating cart

Hello

It seems that there is an error at my cart.php page. The issue is as following:
Lets say i have 4 products in my shopping card. If i want to delete the third product in the column, and hit "update cart", the code deletes the third and the fourth product.
I f i choose to delete the first product, and hit refresh, then all products under it are also deleted. It seems that all the products that are under the product i wish to delete are being deleted.

Any idea would be helpful.
You can check it right here:
cart.php?

The website is in greek, so the "update cart" button is the right one

Sign in to reply to this post

Jason ByrnesWebAssist

looking at the source of the page, I can see that you have changed the name of the checkbox, in power store the code to generate the checkbox is:
<input <?php if (!(strcmp($WA_Store_Cart->DisplayInfo("Quantity"),0))) {echo "checked";} ?> type="checkbox" name="WA_Store_Cart_Quantity_check_<?php echo $WA_Store_Cart->DisplayIndex; ?>" value="0" />


this will crate a checkbox like:
<input type="checkbox" value="0" name="WA_Store_Cart_Quantity_check_0"/>

yours aree being created with a different name:
<input type="checkbox" value="7" name="WA_Store_Cart_Delete_0"/>


there is also a hidden form element that should be created:
<input type="hidden" value="1" name="WA_Store_Cart_Quantity_hid_0"/>

This is missing from your cart page. It would seam you have made some significant changes to the cart display page that are causing the issue.

Sign in to reply to this post

fraskos393357

Well, i didn't figure to find a proper solution to this issue...
I will just let the user to complete delete a product from the cart by putting "0" to the quantity field.

But i am afraid that the code the "shopping cart display" is not 100% correct or compatible...

I have done the following from scratch:
1. I have edited the e cart object to fit my needs in euros and kgs.
2. I have then gone to display manager and changes the colours etc.
3. I have added a "remove" checkbox column.
I saved it and everything looked ok. But the code that it generated for the checkbox contained the name WA_Store_Cart_Delete and not WA_Store_Cart_Quantity_check as you said it shoul have. And it also did not generated any hidden form element.

I tried to chenge these settings manualy at code view by copying the code from the original powerstore cart.php file and pasting it into the new file. but it didn't work either...

One thing i noticed is that the layout generated by display manager contained the checkbox within a table and not a <div> like in the original cart file. I do not know if it plays a role.

I would like some further suggestions because i am quite unhappy for offering the e-shop visitor a poor solution to remove products.



Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

Please send a copy of the cart.php page so I can examine the code.

Sign in to reply to this post

fraskos393357

hello jason
please find attached the cart.php file
It contains the shopping cart with a delete checkbox, exactly as it was generated by e-cart.

Thanks!

Attached Files
cart.php.zip
Sign in to reply to this post

Eric Mittman

I have responded to another thread where you were having an issue with the currency formatting on the cart display page.

I created an example page with eCart 5 and do not get this functionality to occur. I'm wondering if this issue might be related to the other issue. In the other thread I posted a new cart definition file for you to try. Please test this out and let us know if it resolves this problem as well.

Sign in to reply to this post

fraskos393357

nope, it doesn't work either...
i'm wondering what big mistake i might have done...

i also noticed that when i turn the quantity of the first product in the cart to "0" it also deletes all products under it.


when i am updating my e-cart appearance, what files do i have to upload to the server?

thanx for your patience

Sign in to reply to this post

Eric Mittman

I have opened a ticket for you on the other issue, you should update it and make sure to mention about this update issue as well so that both can be looked into.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...