Adding html links to symbols

(CW) #1

Hi guys,

I’m trying to set up a shopping cart with an “add to cart” button. I’m stuck at the stage where I’m not sure how to add the html code to symbols (using the Hype 3 Pro version).

Here’s my site:

(Trying to get the code from the top “add to cart” button to the fancy green “add to cart” button).

This is the html code i’m using:
< form action=“” method=“post”>
< input name=“userid” type=“hidden” value=“A2349035”>
< input name=“product” type=“hidden” value=“Oceanmaster jacket”>
< input name=“price” type=“hidden” value=“159”>
< input type=“hidden” name=“nocart”>
< input name=“return” type=“hidden” value=“”>
< input type=“submit” value=“Add to Cart”
< /form>

Anyone have any suggestions? (added my hype file for your reference).

Many thanks,
CW (1.4 MB)

(Andrew) #2

You can use HTML forms, but I would suggest using hyperlinks instead.

So I would ask, how many products are you looking to sell, and are the products static, or dynamic ?

(CW) #3

Hi Andrew,

Thanks for the feedback. I’ve tried adding the hyperlink and it works, but the “clicking/active” area is only limited to the “add to cart” word itself. Is there a method where I can have the entire grey bar as a viable click button? (and thats why i want to see if i could make the whole symbol an html widget).

There will be over 20 products, they will all be static, there will not be any online payment involved.

Many thanks,

(Andrew) #4

I have not tried this because I do not use the API, but could you not highlight the symbol, and on click, add the url, making sure the callback url is correct:

Or you can do the whole thing using Ajax with JQuery, which will probably be a better idea thinking about it.

(CW) #5

Can you link me to a site how I can apply Ajax with JQuery? (it does look a bit complicated).

I’ve tried your url method and it works great! But whenever I clicked on it, it will always open up the cart. I’ve tried adding either nocart=hidden or nocart=0 but nothing works.

Here’s the hyperlink url, maybe you know what i can do next.

many thanks,

(Andrew) #6

You can do it one of two ways, but I think this would be probably be the best for you:

I have not read much doc from the mals-e site, but I would think there is a callback feature that determines where the customer is sent, once added to the cart.

(CW) #7

I might switch to this because it looks easier to implement.

Can anyone confirm whether this (with the use of bootstrap 3) is compatible with Hype?

Many thanks,

(CW) #8

hi guys,

So, I’ve purchased this as it weren’t too expensive. I’ve tried loading this to hype but I guess it’s not compatible…

Is it possible to edit those html files in a html file editor (hyperedit) and save all the elements and javascript, then rebuild it in hype?

Much appreciated!

split this topic #9

A post was split to a new topic: Website Built in Hype?