3 replies [Last post]
JAmatulli's picture
Offline
Joined: 02/10/2011
Juice: 17
Was this information Helpful?

Just came across GoodRelations and hProduct and found a couple of dead end threads regarding implementing them in Drupal. It seems to me that Ubercart is the place for GoodRelations integration or perhaps it would just be on the product node.

Does anyone know more about this? I've read what I could in the last hour+ about it. RDFa is in D7 core I think and this seems to be part and parcel to GoodRelations setup.

Would be sweet to have a simple automation from product creation that perhaps puts the info into sitemap. Again this is very preliminary and I'm probably just blowing out nonsense but there it is.

My understanding is that Google and Yahoo are supporting both hProduct and GoodRelations, hProduct being easier to implement from our side. I'll try to get more info. Anyone else know anything?

JAmatulli's picture
Offline
Joined: 02/10/2011
Juice: 17
GoodRelation vs hProduct

Fairly headed conversation here with the guy that started the GoodRelations project on which is more viable. GoodRelations does seem to win out. http://www.google.com/support/forum/p/Webmasters/thread?tid=7f76698658f4...

Starting to understand RDF better. The topic that seemed to die is regarding drupal commerce here: http://drupal.org/node/962666

From everything I am reading Drupal Commerce for D7 is supposedly got someone doing this. I will do my best to finish these thoughts and perhaps move this to a better location. I am most interested in a D6 usage for now. This is my next stop. http://wiki.goodrelations-vocabulary.org/Quickstart

Then to RDF module docs to see how this might be implemented. Have also seen and plan on taking a more in depth look at the hCard module. I don't believe it uses RDF but it may offer a hint toward a quick and dirty hProduct implementation.

JAmatulli's picture
Offline
Joined: 02/10/2011
Juice: 17
Moving this to a project

So I've done a little more reading and I'm creating a new project since none seems to exist. I'm adding some prelim notes below as I haven't set up the page yet and need to move on for now. Will come back and add link to project when I set it up.

My basic analysis has given me the following thoughts.
1.Joomla, Magneto, Wordpress all have modules for their shopping carts and the afore mentioned Drupal Commerce has it coming so it must be worth while.

2. It doesn't seem too daunting to create.

3. I read the implementation and spec docs and ran a quick example on the auto generator on GoodRelations website and found that basically 2 or three things need to be done. Update the XHTML/HTML page header markup to reflect the new semantic HTML specs (look at the Joomla module implementation for php code that does this) and create the code that tags the different product fields (Company name, URL, Product Name, Description, Price, etc) with the machine readable formatting like this:

<div xmlns="http://www.w3.org/1999/xhtml"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
  xmlns:gr="http://purl.org/goodrelations/v1#"
  xmlns:foaf="http://xmlns.com/foaf/0.1/">

  <div typeof="gr:Offering" about="#offering">
    <div rev="gr:offers" resource="http://www.rugauthority.com#company"></div>
    <div property="gr:name" content="Your Product Name" xml:lang="en"></div>
    <div property="gr:description" content="A description of your product goes here." xml:lang="en"></div>
    <div property="gr:hasEAN_UCC-13" content="Your_ISBN_or_UPC_or_EAN_code" datatype="xsd:string"></div>
    <div property="gr:validFrom" content="2012-01-16T00:00:00Z" datatype="xsd:dateTime"></div>
    <div property="gr:validThrough" content="2012-01-17T00:00:00Z" datatype="xsd:dateTime"></div>
    <div property="gr:eligibleRegions" content="GB" datatype="xsd:string"></div>
    <div property="gr:eligibleRegions" content="US" datatype="xsd:string"></div>
    <div rel="foaf:depiction" resource="http://www.yourwebsite.com/your_file_path/yourproductimage.jpg"></div>
    <div rel="gr:hasPriceSpecification">
      <div typeof="gr:UnitPriceSpecification">
        <div property="gr:hasCurrency" content="USD" datatype="xsd:string"></div>
        <div property="gr:hasCurrencyValue" content="1000000.00" datatype="xsd:float"></div>
        <div property="gr:hasUnitOfMeasurement" content="C62" datatype="xsd:string"></div>
      </div>
    </div>
    <div rel="gr:hasBusinessFunction" resource="http://purl.org/goodrelations/v1#Sell"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#ByBankTransferInAdvance"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#ByInvoice"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#Cash"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#CheckInAdvance"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#COD"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#DirectDebit"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#GoogleCheckOut"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#PayPal"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#PaySwarm"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#AmericanExpress"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#DinersClub"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#Discover"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#JCB"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#MasterCard"></div>
    <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#VISA"></div>
    <div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeDirectDownload"></div>
    <div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeFreight"></div>
    <div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeMail"></div>
    <div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeOwnFleet"></div>
    <div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModePickUp"></div>
    <div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DHL"></div>
    <div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#FederalExpress"></div>
    <div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#UPS"></div>
    <div rel="gr:eligibleCustomerTypes" resource="http://purl.org/goodrelations/v1#Enduser"></div>
    <div rel="gr:eligibleCustomerTypes" resource="http://purl.org/goodrelations/v1#Business"></div>
    <div rel="gr:eligibleCustomerTypes" resource="http://purl.org/goodrelations/v1#PublicInstitution"></div>
    <div rel="gr:eligibleCustomerTypes" resource="http://purl.org/goodrelations/v1#Reseller"></div>
    <div rel="foaf:page" resource="http://www.yourwebsite.com/yourproducturl/goeshere/"></div>
    <div rel="gr:includes">
      <div typeof="gr:SomeItems" about="#product">
        <div property="gr:category" content="Your Product Category" xml:lang="en"></div>
        <div property="gr:name" content="Your Product Name" xml:lang="en"></div>
        <div property="gr:description" content="A description of your product goes here." xml:lang="en"></div>
        <div property="gr:hasEAN_UCC-13" content="Your_ISBN_or_UPC_or_EAN_code" datatype="xsd:string"></div>
        <div rel="foaf:depiction" resource="http://www.yourwebsite.com/your_file_path/yourproductimage.jpg"></div>
        <div rel="foaf:page" resource="http://www.yourwebsite.com/yourproducturl/goeshere/"></div>
      </div>
    </div>
  </div>
</div>

I chose all of the possible fields for payment and delivery methods on the code generator.

The last thing that is mentioned is the XML Sitemap in a robots.txt file. I believe this is irrelevant if you use the XMLSitemap module but that is yet tbd.

longwave's picture
Offline
Joined: 09/20/2008
Juice: 630
Re: GoodRelations - RDFa, hProduct, Semantic Markup integration

I am very interested in getting semantic data into Ubercart core as I think it would be useful to provide out of the box for many sites, so if someone wants to start this discussion as a feature request over at http://drupal.org/project/issues/ubercart then please do so.

--
These forums are for general support questions about Ubercart.
Bug reports and feature requests should be posted at http://drupal.org/project/issues/ubercart
Latest API documentation can be found at http://api.ubercart.me/