Page 1 of 1

Generic Ecommerce button

Posted: Thu May 05, 2022 6:38 pm
by pacstar
Is there a "Generic" ecommerce button (form) that can be used with the code from my existing shopping cart where I can input the data fields? The only thing I have been able to do is use an <html> box to create the button, and the ecommerce buttons don't seem to work (or I haven't found the correct way to set them up)

Here is what the code looks like:

<form method="post" action="https://xxxx.xxxxxxxxxxxx.com/add_to_ca ... prodtype=P">
<input type="hidden" name="item" value="CO3917">
<input type="hidden" name="cart" value="yes">
<input type="hidden" name="mer#" value="xxxxxxx">
<input type="hidden" name="qnty" value="1">
<select name="attr7">
<option>option#1</option>
<option>option#2</option>
</select><input type="submit" value="Add to Cart">
</form>

I'll keep digging, or how would I set up those fields with the current button selections?

Thanks

Re: Generic Ecommerce button

Posted: Thu May 05, 2022 8:20 pm
by Pablo
There is no such a thing as 'generic eCommerce button', because each company uses different code.

If the code you have added does not work, then either the code is invalid, incomplete, or it conflicts with other code on the page.
The code will be inserted "AS IS".

Re: Generic Ecommerce button

Posted: Thu May 05, 2022 11:17 pm
by pacstar
Pablo,

What button are you suggesting to use to add the info to?

Form Controls > Button or

Form Controls > Forms (it seems this would be the "closest")

Ecommerce >

??

Thanks

Re: Generic Ecommerce button

Posted: Fri May 06, 2022 2:31 am
by BaconFries
Is there a "Generic" ecommerce button
What is it you are trying to do? Looking at the code it already has a button of sorts.
When displayed the following code

Code: Select all

<input type="submit" value="Add to Cart">
will represent a button like so...
Image

So what are you trying to do make it more aesthetically pleasing looking by using a image instead?

Re: Generic Ecommerce button

Posted: Fri May 06, 2022 5:41 am
by Pablo
Note that instead of the using the code, you can also use the built-in form and set the action to "https://xxxx.xxxxxxxxxxxx.com/add_to_ca ... prodtype=P" (and also add the hidden fields)
In that case, you have full control over the layout and style of the form and input fields.

Re: Generic Ecommerce button

Posted: Fri May 06, 2022 5:11 pm
by pacstar
Bacon,

I'm trying to find a way to add an order button that works with the WYSIWYG layout without just using a "HTML" block. It's not that critical, but if there was a way, I would use it. You are correct, if I use the HTML block it does generate a button. (here's and example where I have done it https://www.pacificcoasttriumph.com/ame ... intake.htm)

I also wish there was a way to do a global search that included the code within the html blocks. It would make doing product price changes much easier to find if I could just search for (in this case) "CO3917" and have it find which page(S) that item is on.

Pablo,

I'm trying that right now, but haven't found the proper combinations to get it to work yet.

Thanks

Re: Generic Ecommerce button

Posted: Sat May 07, 2022 12:51 pm
by Pablo
Your code is basically a form without formatting. So, it will also work with the standard WWB form tools.
There is no need to use code. Just make sure you use the same names as in the code for the action and (hidden) input fields.

Re: Generic Ecommerce button

Posted: Sat May 07, 2022 2:42 pm
by BaconFries
Question: can I ask if you are using a "third party script" from the following: https://www.sunshop.com/ would it not be best to contact them and ask how to modify the form to what you are asking. So that the <input type > is either a "button" or "image" with the needed submi for the form to work.
I am not at PC but the following is an example of your code with the <input type=""> using a image instead of just "submit".

Code: Select all

<form method="post" action="https://xxxx.xxxxxxxxxxxx.com/add_to_ca ... prodtype=P">
<input type="hidden" name="item" value="CO3917">
<input type="hidden" name="cart" value="yes">
<input type="hidden" name="mer#" value="xxxxxxx">
<input type="hidden" name="qnty" value="1">
<select name="attr7">
<option>option#1</option>
<option>option#2</option>
</select>
<input type="image" src="https://www.
yoururlhere.com/yourimage.gif" name="submit" alt="Add to Cart">
</form>
Note as Pablo this can all be done just using a form in WWB

Re: Generic Ecommerce button

Posted: Mon May 09, 2022 5:03 pm
by pacstar
Bacon,

Actually close. Its Merchant Manager code that was moved over to Sunshop. Contacting them was my next choice. I just wanted to check if there was a simple solution already in WYSIWYG.

Pablo,

Thanks. That is what I was leaning towards. But I still haven't gotten it to function. I've added the action "https:...." Method = POST and I added the 4 hidden fields. cart, item, mer#, qnty.

Ive also added the event "onclick = Form Submit" Still no luck.

Thanks again.

Re: Generic Ecommerce button

Posted: Mon May 09, 2022 5:12 pm
by Pablo
What exactly does not work?
Is there an error?
What is the URL of the page?

Re: Generic Ecommerce button

Posted: Mon May 09, 2022 6:33 pm
by pacstar
Pablo,

I haven't published the page yet, I've just been using the "preview". I can publish it and give you the URL.

Here it is,

https://www.pacificcoastboulevard.com/testbutton.htm

The html box is the second button, the form is the third one down

Re: Generic Ecommerce button

Posted: Mon May 09, 2022 6:46 pm
by pacstar
Pablo,

I just added the one to the right using the form wizard. That one works.

Re: Generic Ecommerce button

Posted: Mon May 09, 2022 7:49 pm
by Pablo
I suggest to remove all custom code.
Also, start with one form. If you wanna test something then keep it simple...

Re: Generic Ecommerce button

Posted: Mon May 09, 2022 10:28 pm
by pacstar
Thanks,

So, you have to create the field, then create the button and overlay it to the field. That is working.

So how can I add the options to that form. Or is it possible?

<select name="attr7">
<option>no O2 Port</option>
<option>with O2 Port</option></select>

Thanks again.

Re: Generic Ecommerce button

Posted: Tue May 10, 2022 6:25 am
by Pablo
You can do this with a combobox object

Re: Generic Ecommerce button

Posted: Tue May 10, 2022 5:06 pm
by pacstar
Pablo,

OK, I'll look into it. That's why I was wondering if there was a Generic Ecommerce button that had the ability to just fill in the fields as necessary and done.

I've got thousands of products, so I'm using WWB to create all of our navigation pages, but I still have not moved our product pages over to WWB yet. Trying to establish the most efficient way to do it.

By the way, you don't get enough credit for how good this platform is to use and its features. Thanks for the regular updates too.