close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
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

rating

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

Dreamweaver
eCart

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
rating
rating

jamie424562: 4 Years, 4 Months, 2 Weeks, 7 Hours, 44 Minutes ago

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

Antonino Stancampiano: 3 Years, 11 Months, 1 Week, 2 Days, 5 Hours, 10 Minutes ago

Watch the video for step by step...

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.