Board logo

Google Checkout Help
oliwb - 11/8/09 at 06:49 PM

Guys I realise this is a bit cheeky but I just posted the below on the Google checkout forum hoping for a reply. Thought it was worth putting up here too in case anyone is particularly savvy with it!
I'm getting desperate!

Thanks,
Oli.
____________________________

Hi Folks,
I've been suffering with this for a couple of weeks and have finally admitted defeat! I just can't understand why this isn't working...! The code I am using is:

<div class="product"><input type="hidden" class="product-title" value="Kush Yellow Symbol Hoody"><select class="product-attr-custom"><option value="Small" selected="selected">Small</option><option value="Medium">Medium</option><option value="Large">Large</option><option value="Extra Large">Extra Large</option></select><input type="hidden" class="product-price" value="30.00"><div class="googlecart-add-button" tabindex="0" role="button" title="Add to trolley"></div></div>

located: http://www.kushclothing.co.uk/mens_hoodyy.html

I am trying to do a couple of things with checkout and its not having it. Firstly I want people to be able to choose the size of garment they want from the drop down list and for this to show in the shopping cart. At the moment it just adds it to the cart but doesn't tell me what size people have ordered.
I also want to add a simple product-shipping-first class value= £3.50, but I want the cost/value to be hidden. I have tried various ways of getting this in but dreamweaver (CS3) spits it's dummy out at each of my attempts! Also where should I be inserting this shipping code into the code above and how. I have tried <span> classes but it doesn't work for me.
Lastly why can I not align the add to cart button? Is this a known problem?? For some reason where ever I seem to put it in the code it makes no difference to where it is displayed. I am assuming the code is calling for a JAVA widget as it were and cannot control where it is placed, is this correct?
I'd be soooooo grateful if anyone could have a look for me and let me know what I am doing wrong! I have a lot of other products to do too so an example code that I could then go in and edit to show the different attributes would be amazing - but advise would be good too!

Thanks,
Oli.

[Edited on 11/8/09 by oliwb]


m8kwr - 11/8/09 at 07:05 PM

I have implement google checkout and paypal into 2 websites (www.shin-digs.co.uk), but i have used aspx pages, so i can validate the price before it gets to the checkout point, as people can alter the html and pay a cheaper price for an item, or at least try and get away with it...

I will have a look and see it i can see the issue, not time at the moment, but i will have a look.....

Might be worth as well looking at adding the items into Google base, you can do this via an rss feed, then it comes up in the google shopping


m8kwr - 11/8/09 at 08:52 PM

I have worked it out, but you will need to alter ever page's html....

Firstly add this java script

<script type="text/javascript">

function changeHiddenInput (objDropDown)
{
var objHidden = document.getElementById("hiddenInput";
objHidden.value = objDropDown.value;
}

</script>

2nd - in your drop down, change this to - notice i have added a "Please select" option, the reason for this, as if is left as Small as the default it will not show when they add it to the checkout, only when a drop down is select.

<select id="dropdown" name="dropdown" onchange="changeHiddenInput(this)">
<option>Please Select</option>
<option>Small</option>
<option>Medium</option>
<option>Large</option>
<option>X-Large</option>
</select>

Lastly add

<input type="hidden" name="hiddenInput" class="product-attr-size" id="hiddenInput" value="" />

into your hidden input variables so it looks something like

<input type="hidden" class="product-title" value="Kush Scribble Tee - Bamboo">
<input type="hidden" class="product-price" value="17.50">
<input type="hidden" class="product-shipping-first" value="3.50">
<input type="hidden" name="hiddenInput" class="product-attr-size" id="hiddenInput" value="" />

Hope that helps.

I would recommend learning some simple aspx, php and mysql or sql (if you don't know them already), then you can dynamically create the page, so you in theory only have the 1 page to ever alter.

If you want anymore information then please let me know. Or help setting up a google base feed, or pointing you in the right direction to learn some new stuff.


oliwb - 12/8/09 at 08:38 AM

Wow, thank you so much! Had been totally pulling my hair out! This forum never ceases to amaze me!

If you were willing to point me in the right direction with Google base that would be great. I am going to try and input the below into the site later today - hopefully it will go smoothly. I hadn't realised people could go in and change price with google checkout like that. Might have to look into that. Although as we are selling physical goods I just wouldn't ship anything to them!

Thanks for your help...I might be back with a couple more questions if it doesn't insert right.....

Cheers,
Oli.


m8kwr - 12/8/09 at 08:48 AM

In reference to the google button not aligning, the issue with this is your div tags.

Your left image floats over the other div where your information is stored. The google cart button is central, and i believe uses its own css class to position itself!!!

If you want i can create you a template so it all aligns etc.

Send me a U2U with your email address, it would not take me long to sort out.

You asked about the shipping, for each item added to the cart, do you want it to charge £3.50 per item, or does it depend on how many items are added (and weights etc???)

How many more items are you going to be adding (now and in the future)

If you can send me an excel file with the information for your products (a header file would do), i then can sort out google base for you, that shouldn't take long either.

I can just give you the instructions how to sort this - very easy!!!!