how to replace remove item tick box with a button
how to remove tick box for removing an idem to a button? instead of ticking the box and pressing update button. user simple click on image button and removes the product.
how to remove tick box for removing an idem to a button? instead of ticking the box and pressing update button. user simple click on image button and removes the product.
this is how its done if anyone else needs it.
There are two steps to getting this process to work:
1. change the form element for the checkbox to an image, setting the src= to a delete button image on your site and then adding a call to JavaScript client behavior to submit the form when the button is clicked. The code that begins like this:
<input type="checkbox" value="<?php echo $shoeCart->DisplayInfo("ID"); ?>" name="shoeCart_Delete_<?php echo $shoeCart->DisplayIndex; ?>">
Should be changed to look like this:
<input name="shoeCart_Delete_<?php echo $shoeCart->DisplayIndex; ?>" type="image" onClick="MM_callJS('document.shoeCart_Display.submits();')" value="<?php echo $shoeCart->DisplayInfo("ID"); ?>" src="WA_eCart/Images/Modular_delete.gif" border="0">
2. Next you will need to insert a hidden form element that has the exact same value settings as the Update Cart button. I copied the code for the Update Cart button:
<input type="image" name="shoeCart_Update" src="WA_eCart/Images/S3A_UpdateCart.gif" alt="Update Cart">
and pasted it just after the code for the delete button above, then I changed the code to make the element a hidden field instead of an image field:
<input type="hidden" name="shoeCart_Update" src="WA_eCart/Images/S3A_UpdateCart.gif" alt="Update Cart">
then I removed the src= and alt= from the input tag as they were no longer needed:
<input type="hidden" name="shoeCart_Update">
By making the delete button submit the value it passes to the Update Cart function in the include file, the Quantity for the selected ID gets set to 0, effectively deleting it from the cart. The hidden Update Cart element is detected and causes the Update Cart function to run.
The image Modular_delete.gif is one of the standard images that come with WA DataAssist. I've attached the sample page from the BlueSky Footwear site for you to review.
Thanks for posting back with your steps for this, I'm sure that someone else will benefit from this knowledge.
Is the attachment to this post accessible?
I followed these instruction and it works in Safari, but not FireFox.
Web Console shows this error: document.wholesaleCart_Display is undefined
there where no attachment made to any posts in this thread.
please post a link where i can see the problem to troubleshoot.
I've attached my cart page. I tried to replace the "remove" checkbox with a remove button based on the original post. I know I'm missing some javascript. It works in Safari, but not IE or Firefox. Any help would be great.
Thanks
i need a link where i can see the problem in the browser to troubleshoot please.
Can I PM you? I'd rather not have a public link here, it's also password protected.
NOt sure you to do this? Thanks
I have created a support ticket so we can look into this issue further.
To view and edit your support ticket, please log into your support history:
supporthistory.php
If anyone else is experiencing this same issue, please append to this thread.
I'm having the same problem as psychobilly1165508. The qty remove button works in Safari, but not in FireFox or IE. Can you tell me how you resolved this issue or point me to where to look.
You can view my site at www.magicboltdesign.com
The site is in test mode.
Thanks, Scott
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.