Author Topic: I'm creating a shop module ... and more  (Read 1221 times)

youcantryreachingme

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +1/-0
    • View Profile
I'm creating a shop module ... and more
« on: July 28, 2009, 04:16:47 PM »
Just to let you know - I'm building a basic shop module, but it's actually more than that. It's just an "iterator". It will let you create any number of "items". When you configure the module you specify how many "fields" each item should have.

For example, in some shops you might have fields for "code", "description", "price", "size", "colour" and "photo".

In other shops it might be something else.

In other websites you might even use this for something that's not a shop.

Anyway - each field becomes a theme variable that you can include in your templates. The shop will give you a couple of new templates to customise: 1 for browsing through sets of items and 1 for viewing a single item in detail.

There's a little more detail involved than that, but when it's up and running I'll post a link.

Note - this does not handle online e-commerce, or linking to paypal or anything like that - but that would be a logical next step. It could also serve as a framework for creating a website dedicated to any sort of "item" - like cataloging your books or dvds.

One thing I have plans for, but won't include in the first release, is the ability to put your items into categories.

Chris.

Xander

  • Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 240
  • Karma: +5/-0
    • View Profile
    • CompactCMS.nl
Re: I'm creating a shop module ... and more
« Reply #1 on: July 28, 2009, 04:42:30 PM »
Hi Chris,

As written earlier: I'm very curious after an initial release and its functionality. I was just wondering whether I told you about the (currently not used) module column in the database. I included it once because of future ideas. My initial idea was to - e.g. add another field in the creation process and have a drop down with module options. The default is "editor", but could be anything ofcourse.

If we would change /admin/index.php (approx line 90+):

<a href="editor.php?file=<? echo $row['urlpage']; ?>&amp;action=edit&amp;

to:

<a href="<? echo $row['module']; ?>.php?file=<? echo $row['urlpage']; ?>&amp;action=edit&amp;


We could make the "Edit" link refer to any module.

Better (more neat) would be <a href="/modules/<? echo...">, but you get the idea. I'm not sure if this would be of any help (don't know your module structure), but I had to mention it to you (if I didn't already :))).

Cheers & keep me posted!
Xander.
« Last Edit: July 28, 2009, 04:57:02 PM by Xander »
Don't ever hold back your suggestions. Help me either to improve CompactCMS or spread the word about it on sites such as Twitter, Digg, StumbleUpon, etc :). Thanks!

youcantryreachingme

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +1/-0
    • View Profile
Re: I'm creating a shop module ... and more
« Reply #2 on: August 21, 2009, 08:43:30 PM »
A small update. This is still a work in progress.

See homepage here: http://katsmeow.com.au/compact

See the shop here: http://katsmeow.com.au/compact/shop

Currently the shop will list all shop items. It uses 1 template for displaying the list (called Browse), which itself uses 1 template to render each item in the list (called ListItem), then 1 more template for viewing an item in detail (called Item).

The Browse and Item templates are also associated with a page, hence the text at the top of each screen.

The number of items to display per page of browsing is controlled in a config file. The number of items to display before creating a line break is also controlled in config.

The fields associated with an item are also controlled in a config file.

Still to do:

* the admin screens for maintaining item data
* a pagination tool for browsing through the items (but you can already try this by using /shop/2 for page 2 of results, etc)

After that, there are many nice extra features I'd like to add, but this is a starting point.

youcantryreachingme

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +1/-0
    • View Profile
Re: I'm creating a shop module ... and more
« Reply #3 on: September 04, 2009, 01:32:45 PM »
Okay - here's the deal. I created a shop module, but it isn't modular at all!  >:(

If you want to see it in action, go to originalsbynada.com.au .

The style and layout isn't 100% complete, but it's close. Once that site is complete I will see what I can do about separating the code out so it doesn't hack the core as much as it does currently...

Feedback and suggestions welcome!

(Plenty more features could be coded for it. Remember, it's not an e-commerce shop, but better described as an "item inventory". Good enough for small shops, or collectors, etc, etc)

Xander

  • Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 240
  • Karma: +5/-0
    • View Profile
    • CompactCMS.nl
Re: I'm creating a shop module ... and more
« Reply #4 on: September 11, 2009, 04:04:25 PM »
Hi Chris,

Took me a while to sit down and have a look, but I'm impressed. I don't know what the code looks like, but the fact that you've been able to accomplish this by using CCMS is to me really cool. The site does exactly what it should do, and making a shopping application of it should be relatively simple, since you already have the product browsing done. You should either show me the code once or tell me you have done this. Even though you say it isn't modular, I could perhaps "learn" from this and look for other possibilities. Every experience is an educative one, right?

In the mean time I'll first focus on some broader functions, to prevent focusing in too much now and having to change too much later on a higher level.

Cheers!
Xander.

P.s.: from a designers point of view: run your site through http://developer.yahoo.com/yslow/smushit/ to see whether the images are optimized. They appear a bit bloated (heavier than they could be). But perhaps it is just because you are over there and I'm here :).
Don't ever hold back your suggestions. Help me either to improve CompactCMS or spread the word about it on sites such as Twitter, Digg, StumbleUpon, etc :). Thanks!