Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Zac 223 posts 575 karma points
    Mar 24, 2011 @ 18:21
    Zac
    0

    XSLT GetProduct by Id not SKU

    Hi guys,

    I'm using uCommerce 1.3.0.3

    I'm using

    public static XPathNodeIterator GetProduct(
        string catalogName,
        string sku
    )

    in my XSLT. However, it's now apparent that due to integration issues with 3rd party warehouses, we can't neccesarily control the sku, and therefore we can't really use them in the URLs. I'd like to use something like

    /shop/p-[product id]/[seo-friendly-name]

    e.g.

    /shop/p-235/cuddly-giraffe

    But I can't seem to find a way of pulling the product information based on product id, only SKU.

    Any ideas?

    Thanks

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 24, 2011 @ 19:50
    Søren Spelling Lund
    0

    With uCommerce 1.5 you can use sku and productids interchangeably in the API. Same thing goes for catalog and category names.

  • Zac 223 posts 575 karma points
    Mar 25, 2011 @ 09:24
    Zac
    0

    Thanks Søren

    What exactly is the upgrade path from 1.3.0.3 to 1.5?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 28, 2011 @ 09:34
    Søren Spelling Lund
    0

    If you haven't done any custom pipelines and changed the default configuration you should be able to install the newer package on top of the old one. If you did do some of that please see Checklist for Updating uCommerce for details on what to be aware of.

  • Zac 223 posts 575 karma points
    Mar 28, 2011 @ 18:22
    Zac
    0

    Ok, so I upgraded to 1.5 without issue.

    However, when using CommerceLibrary:GetCategory, I can't access the ID attribute of a product in order to put it in a link to the product.

    In other words, from the category page, I can't seem to find the ID of the product to use in the URL. I want to avoid using GetNiceUrlForProduct because I'm not using quite the same URL structure.


    Any thoughts?

    Thanks

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 29, 2011 @ 09:30
    Søren Spelling Lund
    0

    I didn't think of that. I'll get a release out which exposes the actual id of the product..

  • Zac 223 posts 575 karma points
    Mar 29, 2011 @ 15:36
    Zac
    0

    Many thanks Søren.

    What kind of time frame do you think we'd be looking at? Are talking hours, days, weeks?

    We're temporarily using the sku again but this won't fly when the site launches as the sku's need to match with third-party stock control etc. and we can't control them.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 29, 2011 @ 15:43
    Søren Spelling Lund
    0

    It'll be ready for you tomorrow first thing.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 30, 2011 @ 14:38
    Søren Spelling Lund
    0

    It's taking a little longer getting to this than expected. In the meantime I was wondering whether it might be a better solution to add your own internal identifier as part of the product definition. If you set the field's "Render in Editor" to off, you'll effectively have your internal id that users can't mess with.

  • Zac 223 posts 575 karma points
    Mar 30, 2011 @ 15:05
    Zac
    0

    Hmm. The shop will have something like 100+ products, and the client is adding a lot of them, so wouldn't I have to go through all the products and add this identifier manually, tying up the identifier with uCommerce's product ids?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 30, 2011 @ 15:29
    Søren Spelling Lund
    0

    Fair enough. I figured you were dealing with some sort of integration since you didn't control the SKUs. I'll get the fix to you shortly.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 30, 2011 @ 15:35
    Søren Spelling Lund
    0

    You can grab uCommerce 1.5.0.2 from our site. Product ids are renderer as part of the outputted XML.

  • Zac 223 posts 575 karma points
    Mar 30, 2011 @ 16:18
    Zac
    3

    Thanks once again Søren, updated and working :)

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 31, 2011 @ 10:11
    Søren Spelling Lund
    0

    Thanks for that lovely image :)

Please Sign in or register to post replies

Write your reply to:

Draft