Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

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, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Item ID and Product Code


Go to End


4 Posts   1967 Views

Avatar
Sunnybex

Community Member, 39 Posts

18 August 2010 at 1:04am

Edited: 18/08/2010 1:05am

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

Avatar
Bambii7

Community Member, 254 Posts

18 August 2010 at 2:08pm

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

Avatar
Sunnybex

Community Member, 39 Posts

18 August 2010 at 9:26pm

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?

Avatar
Sunnybex

Community Member, 39 Posts

20 August 2010 at 8:34pm

Edited: 20/08/2010 8:35pm

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