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.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Simple shopping cart with CRM


Go to End


4 Posts   3259 Views

Avatar
pingu

Community Member, 75 Posts

26 May 2010 at 6:59pm

Hi all,

I have to implement a fairly simple sessions-based shopping cart system which has already been developed with vanilla PHP into a Silverstripe website. I have a few questions surrounding this:

1. What is the best way to develop the CRM tool for customers? Is it to extend the Members class (as shown in the CRM video tutorial and the Silverstripe book), or to decorate the Member class as with the forums module?

Customers require, along with the usual member fields, an address, phone number and customer type (different customer types will display different prices when logged in). Website administrators need to be able to change the customer type. Member registration is a 1-page process.

2. What is the best way to integrate the shopping cart page with Silverstripe? Ideally it should be a standalone template with some custom PHP code utilizing Sapphire where necessary, and not appearing as a page within the CMS.

Avatar
biapar

Forum Moderator, 435 Posts

26 May 2010 at 9:11pm

Hi,

1) Where is that video? If you use Member Class you can use Sapphire for other functions like send mail and so

2) I think PHP+Sapphire thus you can use tag inti your template.

Avatar
pingu

Community Member, 75 Posts

26 May 2010 at 9:20pm

Hi Biapar,

Video is here:
http://www.silverstripe.org/making-a-crm-with-modeladmin-in-silverstripe-230/

I am planning on using the member class, but am asking about what the best way to extend it is for my purposes, and also, how to create standalone pages that don't require a page in the CMS to display a template and generate a URL.

Avatar
Willr

Forum Moderator, 5523 Posts

27 May 2010 at 6:57pm

Well its kind of a toss up between the 2 options. I personally would go for decorating the member just for the simple fact is that its more transparent than subclassing.

how to create standalone pages that don't require a page in the CMS to display a template and generate a URL.

You can setup controllers and templates without pages. Normally you have a dataobject behind that (such as this forum page isn't a page in the cms - its simply a controller and a template). See http://ssbits.com/display-dataobjects-in-an-seo-friendly-way/ for a explaination on how to use controllers and objects to create pages. Also the generic views module might be of some reference for you.