Generic Ecommerce button

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
pacstar
 
 
Posts: 162
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Generic Ecommerce button

Post 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
User avatar
Pablo
 
Posts: 21720
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Generic Ecommerce button

Post 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".
pacstar
 
 
Posts: 162
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Generic Ecommerce button

Post 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
User avatar
BaconFries
 
 
Posts: 5371
Joined: Thu Aug 16, 2007 7:32 pm

Re: Generic Ecommerce button

Post 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?
User avatar
Pablo
 
Posts: 21720
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Generic Ecommerce button

Post 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.
pacstar
 
 
Posts: 162
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Generic Ecommerce button

Post 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
User avatar
Pablo
 
Posts: 21720
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Generic Ecommerce button

Post 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.
User avatar
BaconFries
 
 
Posts: 5371
Joined: Thu Aug 16, 2007 7:32 pm

Re: Generic Ecommerce button

Post 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
pacstar
 
 
Posts: 162
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Generic Ecommerce button

Post 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.
User avatar
Pablo
 
Posts: 21720
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Generic Ecommerce button

Post by Pablo »

What exactly does not work?
Is there an error?
What is the URL of the page?
pacstar
 
 
Posts: 162
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Generic Ecommerce button

Post 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
pacstar
 
 
Posts: 162
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Generic Ecommerce button

Post by pacstar »

Pablo,

I just added the one to the right using the form wizard. That one works.
User avatar
Pablo
 
Posts: 21720
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Generic Ecommerce button

Post by Pablo »

I suggest to remove all custom code.
Also, start with one form. If you wanna test something then keep it simple...
pacstar
 
 
Posts: 162
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Generic Ecommerce button

Post 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.
User avatar
Pablo
 
Posts: 21720
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Generic Ecommerce button

Post by Pablo »

You can do this with a combobox object
pacstar
 
 
Posts: 162
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Generic Ecommerce button

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