close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

ecart replacing input submit with a a different html tag

Thread begun 2/10/2015 6:10 pm by Christopher West | Last modified 2/12/2015 10:26 am by Jason Byrnes | 2260 views | 7 replies |

Christopher WestCommunity Expert

ecart replacing input submit with a a different html tag

Hey there, I am coding a new ecommerce website and I wondered if there is an obvious/easy solution to replacing some of the trigger events that are by default based on form input submit tags. For example of the ecart cart page, replacing the continue shopping/update/clear/checkout input submit buttons that rely on the below code by default:

php:
<?php

// WA eCart Update
if (isset($_POST["eCart_Update_100"]) || isset($_POST["eCart_Update_100_x"]))     {
  
$eCart->CartUpdate();
  
$Redirect_redirStr="";
  if (
$Redirect_redirStr != "")     {
    
$eCart->redirStr $Redirect_redirStr;
  }
  
$eCart->cartAction "Update";
}
?>



Some tags that I may want to use is an SVG tag code that forms a button. or even an <i></i> that uses a glyphicons font to display a clickable icon. or simply text?

Regards

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

you could set the button or glyphic to use a link and pass a URL variable:

<a href="cart.php?eCart_Update_100=1><i>Update</i></a>


then change the trigger from POST to GET:
if (isset($_GET["eCart_Update_100"])) {

Sign in to reply to this post

Christopher WestCommunity Expert

I tried that Jason and it didnt work. I wonder if its because in the a href its waiting for a condition eCart_Update_100 to be equal to 1 and in te isset($_GET trigger it will never see the condition equaling to 1.

Sign in to reply to this post

Jason ByrnesWebAssist

isset is just checking that the variable has a value, it doesn't matter what the value is.

send a link and ftp information where i can see what you have tried to troubleshoot.

Sign in to reply to this post

Christopher WestCommunity Expert

See PM

Sign in to reply to this post

Jason ByrnesWebAssist

Yeah, in actual fact this is going to be trickier than i though..

the default buttons preform a form submit. it's not just the trigger that is needed, it is all the other post information from the form.

I think the only way to do this would be to create a form submit javascript on-click event.

However, that will be a little tricky with the cart display page since each of the buttons tigers a different section of code, so it's not a generic submit but a submit triggered from a specific button.

I think you would be better of using the standard submit buttons or image form elements. you can use CSS to style them if you like.

Sign in to reply to this post

Christopher WestCommunity Expert

Hi Jason. yeah totally understand. initially I was thinking a javascript onclick event but I want to make sure if there was a more simple approach that im overlooking :) Actually I learnt today (Didnt know much about it before) the SVG can be created in Illustrator to create a scalable image and then I could use that as a CSS background...then styling the submit button with that. :)

Sign in to reply to this post

Jason ByrnesWebAssist

Cool, that sounds good.

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