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.

  • Leo Harker 5 posts 25 karma points
    Feb 20, 2013 @ 12:52
    Leo Harker
    0

    Integrating products into existing website content section.

    Hi Everyone,

    I'm working on an uCommerce integration into a client's website. They currently have a product section on the site but it doesn't have any purchasing functionality. http://www.cosworth.com/products

    I wanted to know whether I could match these products with uCommerce products named the same and thus bring through the price on the page and the option to purchase the product. I don't want to have to start from scratch again. Is this possible?

    Initially I'm only setting up one product to act like this (it's also going to be a downloadable item) but in the future a lot of the products will have the functionality (downloadable or physical).

    I'm a complete novice with Razor so any code samples would be much appreciated!

    Thanks for your help,
    Leo

  • Nickolaj Lundgreen 233 posts 1132 karma points
    Feb 20, 2013 @ 14:02
    Nickolaj Lundgreen
    0

    My approach would be to move the existing product catalog to the uCommerce database using the API

    (loop the products in the content section of umbraco and creating a matching product in uCommerce).

    That way you will be able to use uCommerce function with price, shipping, payment etc.

  • Adam Jenkin 71 posts 226 karma points
    Feb 20, 2013 @ 17:31
    Adam Jenkin
    0

    I would too favour Nickolaj's approach but it would also be possible to just add/associate the SKU of the uCommerce product to your page.

    You could then update your template to add an "add to basket" button which adds the correct SKU for the product to the basket from the existing page.

    Using this approach, your not really taking advantage or the store/catalog/category functionality in uCommerce and you will have to workaround a few items like getting the correct URL for the product.

     

     

  • Leo Harker 5 posts 25 karma points
    Feb 20, 2013 @ 18:13
    Leo Harker
    0

    Thanks for the input guys!

    I'd like to look at the store/catalogue functionality more for future projects but for this client they only require 'add to basket' on the products pages and the standard basket, delivery and payment pages.

    Your suggested approach would probably be what I'm looking for Adam. I'm a bit hesitant to do anything major such as moving the products because the site is live. If I could just mirror a handful of the current products in uCommerce and then in the front-end do some kind of check to see if there's a match, if so show the add to basket button, I think that would be all that would be required.

    I'm only experienced in XSLT (and vb.NET), could you give me any suggestions for a simple way to do a check for a matching product within uCommerce using Razor C#? E.g if currentPage productcode =  an uCommerce product SKU then generate and show button code?

    Thanks,
    Leo

  • Nickolaj Lundgreen 233 posts 1132 karma points
    Feb 20, 2013 @ 19:22
    Nickolaj Lundgreen
    0

    Something like this:

    var sku = "SKU";
    var uCommerceProduct = Product.FirstOrDefault(x => x.Sku == sku);
    if(uCommerceProduct != null)
      {
        //Add to cart function here
      }
    else
    {
        //for alternative action
     }

    This way you know if there is a matching product for the SKU, and if there is, then you have the product (to pull prices etc.)

     

Please Sign in or register to post replies

Write your reply to:

Draft