This project is read-only.

Cannot create new product with the SimpleCommerce tutorial

Topics: Troubleshooting, Writing modules
Dec 26, 2011 at 5:12 PM

I'm trying so hard to understand how to use the built in ways of Orchard to create modules but am still having problems. I decided to try one of the simple demoes shown in the documentation and decided to go ahead and use the latest Orchard source. I am hopeful that all of my painstaking work will pay off in the end as I can do all of what I want in 5 minutes with a standard MVC 3 application, but I really want to understand how to use the Orchard CMS way. But so far I have to say it is very frustrating - hopefully there's light at the end of the tunnel soon. 

I just downloaded the new orchard 1.3.10 source and then tried to create the SimpleCommerce module using the documentation at When I then tried to add a new product I get an error saying that the Sku field is required.

I have done everything in the tutorial and my classes are all created and it built without errors.

When I go to the Manage Content Types I see my Product in the list. It has "List Items | Edit" on the right and "Create New Product" underneath the name Product - exactly as shown in the documentation above.

When I click on the "Create New Product" it takes me to a new page which consists of the following sections:

Section named  - Title
(a textbox is underneath this where I typed in "myproduct100")

Section named - Permalink
http://localhost:30320/OrchardLocal/   and to the right a checkbox (unchecked) and the text "Set as home page"

Section named - Body
(a tinyMCE editbox is underneath this title)

the following text appears underneath the tinyMCE edit box

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SimpleCommerce.Views.EditorTemplates.Parts { class Product { } }

Section named - Tags
(A textbox is underneath the Tags but I didn't put anything into it.)

Section named - Comments
A checkbox (checked) with text "Allow new comments"
text here - "Enable to show the comment form. Disabling still allows the existing comments to be shown but does not allow the conversation to continue"

Section named - Owner
(A textbox is underneath the Owner with my current login name)

QUESTION: When it gives the error (red background on top of page with white letters says "The Sku field is required." - what is it wanting?

I tried to download the source from the specified link in the article (Orchard.Module.SimpleCommerce.0.5.0.nupkg) but it gave a page not found error.

Dec 27, 2011 at 7:53 AM
Edited Dec 27, 2011 at 7:56 AM

You forgot to create a file. That "using..." text that ends up on the view also makes me think you messed up something else and copied the files wrong.

Dec 27, 2011 at 4:50 PM

Thanks. Well, I did happen to have the but I sure messed up the cshtml files. I was trying to be so careful and not miss a step, yet what I did was to add a new item under the Parts and EditorTemplates/Parts folders,  but somehow what I added was a file with an empty c# class and not the proper template code. My blunder.