Button for each option instead of drop-down

khodr
Contributor
Contributor

Hi

 

I have a font with 4 weights. Until now I was using a drop down menu for each weight and the whole family of weights.

I am changing the design of the page and I need to know if I can use an "add to cart" button for each weight to put next to the weigth and one for the family pack. Or am I stuck with a drop down menu.

 

Thanks in advance

 

Khodr

Login to Me Too
8 REPLIES 8

snowshoe
Frequent Advisor
Frequent Advisor

It's totally up to you as to how you want things.  Either way would work.

Login to Me Too

khodr
Contributor
Contributor

Thank you for the reply, but how do I find the code and the button id for each of the options. The font has now only one button id for all the weights.

 

Thank again

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

Just a guess here as I don't have any examples as to what you have in mind.   We may be confusing a few terms.  There is something called a button ID, if you use the online button creator to generate your code, a button ID is assigned to that item, each one is unique but, only one ID per item regardless if the item has multiple options or choices.

 

If you need an item number for each weight for example, that's a totally different subject.  One method would be to custom code the item using a script to manage the selections.  Doing so would pass all the info you need to the PayPal Checkout Screens.

Login to Me Too

khodr
Contributor
Contributor

Here is the page I am talking about:

http://www.boutrosfonts.com/Tanseek-Modern

 

There is a unique id for the font Tanseek modern and there is a drop down menu to choose either the whole family or for a particular weight. What I need is to add a button for each weight in the samples at the bottom of the page. I thought about creating a different product for each weight but it is not very elegant. If there is a possibilty of creating a script to acheive this where can I find some documentation about it?

 

Thanks again

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

There's no one place to go learn about creating custom scripts but, you may want to check out this site for some ideas:

http://ccaples.com/index.php/basic-scripts

Login to Me Too

khodr
Contributor
Contributor

Thanks very much

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

khodr
Contributor
Contributor

Hi

 

Actually I found a simpler way to do it. The code previoulsly was:

 

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
        <input type="hidden" name="cmd" value="_s-xclick" />
        <input type="hidden" name="hosted_button_id" value="XXXXXXX" />
        <input type="hidden" name="on0" value="Weights" />Weights
            <select name="os0">
                <option value="Medium">Medium &pound;90.00</option>
                <option value="Bold">Bold &pound;90.00</option>
                <option value="Light">Light &pound;70.00</option>
                <option value="Extra bold">Extra bold &pound;70.00</option>
                <option value="All four fonts">All four fonts &pound;320.00</option>
            </select>
        <input type="hidden" name="currency_code" value="GBP" />
        <input type="submit" value="Add to basket"  style="color: #f00;" />
        <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" /

</form>

 I changed for each weight as follow:

<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
	<input type="hidden" name="cmd" value="_s-xclick">
	<input type="hidden" name="hosted_button_id" value="XXXXXXX">
	<input type="hidden" name="on0" value="Weights">
	<input type="hidden" name="os0" value="Medium" />
	<input type="hidden" name="currency_code" value="GBP">
	<input type="image" src="http://www.boutrosfonts.com/IMG/add_basket.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
	<img alt="" border="0" src="https://www.sandbox.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>

 For the medium weight and so on. It seems to work but am I doing the right thing?

 

Thank you

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.