Jump to:

2088 Posts in 1007 Topics by 455 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Item ID and Product Code

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 928 Views
  • Sunnybex
    Avatar
    Community Member
    39 Posts

    Item ID and Product Code Link to this post

    I wonder how to fix this one:

    whatever "Product Code" I put in the field in the bottom part of a "product"-page, in the frontend it is always the number of the item I uploaded.

    Example: The number of my article should be: 233h45
    I upload a picture 233h45.jpg in it; ".../silverstripe/admin/show/14" (that is shown when hovering over the article in the cms)

    save, dev/build, flush done....

    and on the frontend it shows: "Item No. 14" instead of "Item No. 233h45"

    Any ideas would be much appreciated.

    best regards
    Bex

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Item ID and Product Code Link to this post

    I think Item No.14 is the product ID. The Product code (I think) is used like an SKU (http://en.wikipedia.org/wiki/Stock-keeping_unit).
    From a few weeks ago when I was testing it, this gets used in the emails sent to the admin and in the receipt to the customer.

    If you want it to be displayed on the front end you'll need to edit the .ss template file. The easiest way is to copy paste the product.ss (or which ever file contains the code) and paste it into you theme Layout folder. This way you can upgrade the ecommerce module without worrying about overwriting your customisations.

    So on the version I'm looking at I see
    <p><% _t("ItemID","Item #") %>{$ID}</p>
    If you're not worried about translating the site to multiple languages you can do away with <% _t("ItemID","Item #") %>
    and just type
    Item No. {$ProductCode}
    inside the <p> HTML

  • Sunnybex
    Avatar
    Community Member
    39 Posts

    Re: Item ID and Product Code Link to this post

    Hi Bambii,

    now, I don't get any number at all.... I think that does not solve it. Thank you anyway, the link is good, too 8o)

    "No. 14" is the number the cms gave the page I put in. As far as I know, it does not differentiate between pagetypes and gives the number consecutively.
    So why is it shown in the backend as an item number and how can I show the product code which is asked for on the main tab in the ecommerce-cms?

    Any other ideas?

  • Sunnybex
    Avatar
    Community Member
    39 Posts

    Re: Item ID and Product Code Link to this post

    after a lot of trial-and-error I skipped the whole part in ecommerce/template/layout/product.ss

    <p><% _t("ItemID","Item #") %>{$ID}</p>

    and left the rest as it was.

    BR

    Bex

    928 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.