Google - Structured Data Update

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Google - Structured Data Update

Post by sfeher » Fri Feb 03, 2017 5:36 am

Our SEO team is asking for us to make a change in the structured data code used on our store.
Specifically, they want the BuyProduct interface to change the formatting of currency.

For example, presently, the code uses LSCurrencyFormat("ulc") to format the product price to display as $100.00.
They want to remove the comma and currency symbol in favor of this code:

Code: Select all

<span itemprop="price">100.00</span>
<span itemprop="priceCurrency" syle="visibility: hidden;">USD</span>


I have some general concerns about 'how' this could even be sufficient for the customer, because this would essentially show the product Price as listed as "100.00" and not "$100.00" or even "100.00 USD"

As well, I'm not sure that we can even perform this change (easily) since we'd have to eliminate the formatting of the currency (LSCurrencyFormat("ulc")) from the /conlib/utility/ProductPrice.ascx.cs code.... which I believe would have a global effect (which I'm sure we DO NOT want).

Thoughts? Anyone else dealing with this issue?

Steve

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Google - Structured Data Update

Post by jmestep » Sun Feb 05, 2017 11:54 pm

I don't remember exactly what I did, but I do know that I put some of the tags on the page as <meta itemprop instead of spans so that they didn't change the display because they weren't visible in the browser.
You could also look into using jSon for the structured data so that you can do whatever you want with the display. You would have to take the existing tags off so they wouldn't be duplicated.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Re: Google - Structured Data Update

Post by sfeher » Thu Feb 09, 2017 9:43 am

Hi Judy --

Yes, the USD -- the Currency indicator tag -- belongs in the meta tag formatted this way:

Code: Select all

<meta itemprop="priceCurrency" content="USD" />

Now, the next task is to eliminate the $ symbol from the display of the actual price number. So that $1,400.00 appears as

Code: Select all

<span itemprop="price" content="1000.00">1,000.00</span>


Has anyone modified their copy of the ProductPrice.aspx page in the /conlib/Utility/ folder to avoid the currency designation in the numerical field?

Just concerned that editing the conlib has repercussions throughout other sections of the site. Probably just going to make a new Conlib page (Yeah -- another customization!) for this instance.

Thanks!
Steve

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Google - Structured Data Update

Post by jmestep » Thu Feb 09, 2017 11:49 pm

What I was suggesting was to take the itemprop="price" out of the span tag and add a meta tag with the correct info.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Re: Google - Structured Data Update

Post by sfeher » Fri Feb 10, 2017 3:56 am

Judy --

I don't think that's my problem -- "where" to place the data is easy to resolve.
My problem is that no matter what I do, I cannot seem to call the price field to be included without the "$" character.
The error I get from Google is this:

$1,995.00 (The property $1,995.00 is not a valid price specification. Learn more about http://schema.org/price.)
The structured data testing tool wants the price field to be submitted in the format of 1995.00 and not $1,995.00. This is really a question of formatting, I believe.

Mazhar, Katie -- how can we eliminate the currency formatting for Google's requirements?

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Google - Structured Data Update

Post by Shopping Cart Admin » Fri Feb 10, 2017 8:18 am

Hi All,

Have you tried removing the formatting in currencies?

/Admin/Store/Currencies/Default.aspx
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Re: Google - Structured Data Update

Post by sfeher » Fri Feb 10, 2017 8:33 am

I have no interest in removing formatting of currencies -- there are many places where we WANT the currency symbol to appear.

The point here, is that Google's Structured Data tool requires the 'price' field to be submitted in a standard Schema.org compliant way.
Right now, by default this is not happening.

I need a way for the BuyProductDialog conlib to allow me to display the price as $1,995.00 and then include the meta field as:
<meta itemprop="price" content="1000.00">1000.00</meta>
or perhaps
<meta itemprop="price" content="1000.00"></meta>

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Google - Structured Data Update

Post by jmestep » Mon Feb 13, 2017 12:34 am

I might have done it in the past by putting the $ in front of the price in the html and replacing the LSCurrencyFormat with {0:F2} but I don't remember where or if that is exactly what I did.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Re: Google - Structured Data Update

Post by sfeher » Mon Feb 13, 2017 10:03 am

I ultimately found a way to manage this, thanks to some ideas from Judy (she is the "AbleCommerce Angel", for sure!), some sleuthing around, and good old-fashioned trial and error.

1.) I built a custom CONLIB for this because I didn't know how many other places the "price utility" would have been used throughout the site. Didn't want to effect every instance of the pricing field.

2.) In the custom conlib, I enabled the price to be called as

Code: Select all

 Price2.Text= string.Format("{0:F2}" ,_Product.Price); 
3.) in the .ascx file, I then simply displayed the Price2 field and set a static currency symbol ($) in front.


Might be another way to do this, but it works, and now, the Google Structured Data feed is accurate and working. Which was the goal.

Thanks!
Steve

Post Reply