close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Web development tutorial

Add delete button to your eCart shopping cart

Tutorial created by Antonino Stancampiano, Webmaster Freelance

Categories: eCart, Dreamweaver, Javascript


eCart does not put a delete button for every product in the cart by default. This tutorial explains how to create a delete button for every product on the cart.

arrow downSoftware Requirements


arrow downPreparation

This tutorial assumes that you have an e-commerce site build with Ecart

Step 1: Insert a submit button

Insert a submit button from dreamweaver forms tab near delete checkbox on cart and name it delete

<input type="submit" name="delete" id="delete" value="delete"/>

Step 2: Insert javascript code

Insert this javascript code onclick event :

"javascript:document.getElementsByName('your_cart_name_Quantity_<?php echo $your_cart_name->DisplayIndex; ?>')[0].value=0

Note :

if you want an add button: use this code :

"javascript:document.getElementsByName('your_cart_name_Quantity_<?php echo $your_cart_name->DisplayIndex; ?>')[0].value++

if you want a decrease button : use this code :

"javascript:document.getElementsByName('your_cart_name_Quantity_<?php echo $your_cart_name->DisplayIndex; ?>')[0].value--

Step 3: Add Ecart Update Cart Behaviour to delete button

Select Delete Button that you have created. Go to Server Behaviour Tab on Dreamweaver and select Ecart->Cart Display->Update Cart. You've done !!!

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments

jamie424562: 10 Years, 2 Months, 1 Day, 15 Hours, 10 Minutes ago

thats vague man, where does the onclick event go too????

Antonino Stancampiano: 9 Years, 8 Months, 3 Weeks, 6 Days, 12 Hours, 35 Minutes ago

Watch the video for step by step... 4 Years, 1 Month, 3 Days, 18 Hours, 29 Minutes ago

Thanks for taking the time of doing a video and a written tutorial on this subject. It was exactly what I was looking for. For some reason, I still cannot make it work but I know it is something on my side. I will probably start from scratch and see what happens. Mercy!

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





Ease of use


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.