Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 8 of 8

Thread: Google Base Brand/Manufacturer Support

  1. #1
    Upscale_Automotive is offline Senior Member
    Join Date
    Apr 2008
    Posts
    201

    Question Google Base Brand/Manufacturer Support

    Can someone advise on how to properly add support for the brand attribute in the Google Base feed? Pulling the product manufacturer name is not the easiest of tasks!

    C#/VB.NET Code:
    <g:brand>m.Manufacturer?</g:brand

    I am guessing something like this goes somewhere in the feed file... but I need a little extra push to get it working please :-)
    C#/VB.NET Code:
    from ProductVariant pv
    inner join Product p on pv
    .ProductID p.ProductId
    inner join ProductManufacturer pm on pm
    .ProductId p.ProductId
    inner join Manufacturer m on m
    .ManufacturerId pm.ManufacturerId 
    Last edited by Upscale_Automotive; 04-11-2010 at 06:03 AM.

  2. #2
    John Reasons is offline Senior Member
    Join Date
    Oct 2009
    Posts
    119

    Default

    First you need to make sure you are getting the manufacturer in the query

    Then you need to add a line like this one

    Code:
    <xsl:param name="ProductManufacturer" select="aspdnsf:GetMLValue(manufacturer)"></xsl:param>
    Then at the need to add a line like this

    Code:
    <g:brand>
                <xsl:value-of select="$ProductManufacturer" />
    </g:brand>

  3. #3
    Upscale_Automotive is offline Senior Member
    Join Date
    Apr 2008
    Posts
    201

    Default

    Thank you, that helps but my main issue is actually getting the manufacturer in the query. I think I have a good start with the code below, but I am not sure how to tweak it to work correctly. Can you provide some input on this?

    C#/VB.NET Code:
    from ProductVariant pv
    inner join Product p on pv
    .ProductID p.ProductId
    inner join ProductManufacturer pm on pm
    .ProductId p.ProductId
    inner join Manufacturer m on m
    .ManufacturerId pm.ManufacturerId 

  4. #4
    Upscale_Automotive is offline Senior Member
    Join Date
    Apr 2008
    Posts
    201

    Default

    Can anyone help, for the sake of the greater good of the community?

  5. #5
    Upscale_Automotive is offline Senior Member
    Join Date
    Apr 2008
    Posts
    201

    Default

    Anyone? This could be a valuable little mod for most stores out there!

  6. #6
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Hi,

    When Webopius created an updated GoogleBase feed, the query was modified along these lines...

    Change the select to:
    Code:
    select p.productid, p.name, m.name brandname, ....and keep all the other select items...
    Add this to the from clause:

    Code:
    left join dbo.productmanufacturer pm with (NOLOCK) on p.productid = pm.productid
    join dbo.manufacturer m with (NOLOCK) on pm.manufacturerid = m.manufacturerid

    Then in the Product template, retrieve the brand name:
    Code:
    <xsl:param name="BrandName" select="aspdnsf:GetMLValue(brandname)"></xsl:param>
    ..and use it:

    Code:
    <g:brand>
                <xsl:value-of select="$BrandName" />
    </g:brand>

    Hope this helps,
    Adam. Webopius.com

  7. #7
    Upscale_Automotive is offline Senior Member
    Join Date
    Apr 2008
    Posts
    201

    Default

    Wow, you sure did solve this one... thoroughly too!! Thank you!

  8. #8
    walkinwillie is offline Member
    Join Date
    Mar 2007
    Location
    Swannanoa, NC
    Posts
    32

    Thumbs up

    Adam of Webopius.com - THANK YOU SO MUCH!!!!

    I now have my www.wwillie.com feed in perfect Google compliance!