SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1
Topic Getting my head around adding products 9428 Views

Getting my head around adding products

27 November 2013 at 3:39pm Last edited: 27 November 2013 3:42pm

Hi there,

Im really interested in getting this ecommerce solution up and running as i am a big fan of Silverstripe.

At present i am running Silvercart on localhost, once i am happy with configuring it and have found my way around i will begin theming prior to running it on a live site.

However i am hitting a stumbling block regarding adding products, i am using Silvercart docs for reference (namely this page http://doc.silvercart.org/SilverCart/en/Userbase/The-SilverCart-Handbook/02-Product-Management ).

Heres what i am doing, maybe you can clarify what i am doing wrong.

1) Creating products in Admin and setting them to active.

2) In sitetree i click onto "Product Groups" i am then creating a child group below product groups with SilverCartProductGroupPage (its the only option i can use from the dropdown, other than SilvercartSearchResultsPage which does not seem right.

3) This then gives me an option similar to the docs page i am referencing where i can then add products beneath the "products" tab, however this is where im getting lost as it shows no products, there is a link to "manage products" which i follow and it does then list the products that i have added, however there is no checkbox to add products as is shown in the Silvercart docs image on the page i have linked to.

Thats as far as i get when trying to add products.

Also when viewing the source files i do see a .ss file called SilvercartProductPage.ss am i right in thinking that when a product is created in Silvercart Admin SilvercartProductPage.ss will then be rendered at the frontend so there is no need for it to be in sitetree dropdown.

Hope you do not mind what to some maybe a silly question but like i say im trying to get my head around it and to be honest the rest seems pretty straight forward, i have had a three year break from all coding and Silverstripe so really need to jar a few memory cells around to get back on track.
Regards and thanks in advance
Martin

Re: Getting my head around adding products

27 November 2013 at 3:51pm

Hi Martin,

you are right, the products will be rendered automatically in the frontend using the template. Thus, there will be no products visible in the site tree.

Once you have created a product, you can also assign the desired product group using the "Product groups" tab when editing the product.

There is also an option to create test data, maybe you want to run this via "Configuration -> General Configuration -> Tab "Test Data" -> "Add example data".

Not sure why there are no products displayed when in ProductGroup context. If you think this is an error, could you please send me your database dump so I can have a closer look at it?

Cheers
Ramon

Re: Getting my head around adding products

29 November 2013 at 10:27am Last edited: 29 November 2013 10:28am

Hi Martin,

indeed, assigning a product in edit context of a product group is deprecated.
The documentation was out dated, just added the current one.

In SilverCart 1.3.10 a products group and mirrored groups will be assigned in a products admin panel.

See Assigning a Product Group and Assigning a Mirrored Product Group for details.

Best Regards
Sebastian

Re: Getting my head around adding products

29 November 2013 at 3:12pm

Thanks to both of you for your contributions to solving / explaining the issue (and for Silvercart).

Ramon advised using the test data, which i have done, i see the test data at frontend (my own test data which i have added does not show and is set to active) when i use the generic widgets that come with the Silvercart install, but again i am confused as to why when i activate the test data that the 3 (payment, marketing and other) modules become visible in sitetree on the same level as product groups, i would have thought that they would be assigned as sub folders to product groups folder, is this correct as i have assigned my own "brand" group as a child of product groups?

Regards
Martin

Re: Getting my head around adding products

29 November 2013 at 3:37pm Last edited: 29 November 2013 3:38pm

Hi Martin,

a product group won't be displayed in navigation when there are no active products assigned (or sub groups in it).
So, if there are no valid products assigned yet, try to assign one.

You are absolutely right to place your own product groups (SilvercartProductGroupPage) as children of the (by default generated) "Productgroups" page (SilvercartProductGroupHolder) in SiteTree.

If your own product groups do not appear although there are active products with title and prices assigned, this could be a caching issue. The product group navigation is temporarily cached for a few hours. The cache key is dependent on the current i18n locale, the current visited page ID and the maximum value of "LastEdited" of all SilvercartProductGroupPage objects.
Your groups should appear when saving and publishing any of the existing product groups.

I hope this solves your problem!

Best Regards
Sebastian