Jump to content

Newbie question


videokid
 Share

Recommended Posts

I hope this is the right topic, if not, I apologize upfront :-)

I'd like to set-up a products website with different categories [or sublevels, as you want] where people can comment on the actual product. I'd like the comment to be stored in the database and also be shared on the users facebook wall [of course if he/she's logged in into facebook].

Some of the products are eligible to be sold, so some kind 'add-to-cart' should be possible. I noticed some kind of system here, but if I understand correctly, it's not ready for public use.

A contact page with forms, automatically saved in the database, which can be followed up, altered by a third person. Also, some, if approved, to be published on the website.

A kind of group/permission system where users can be divided, and a payable option, after payment db-update where the person who has payed has access to some content of:

a- pieces of the producs

b- a whole part of the website

this in an automatic way, not manually change the user's permission level.

Multilangual is a must.... the same product in different available languages [one 'add new', or one edit] and the url should look like something similar to this:

www.domain.com/en/products/producttitle

www.domain.com/fr/produits/produit

and

www.domain.com/en/products/brand/producttitle

and/or

www.domain.com/en/products/brand/category/producttitle

I think I have most things covered here... maybe more will come....

At first this would run on a shared hosting [$price :-)], at least for a year, depending on how successful this would become. Is ProcessWire not too heavy?

Any input would be appreciated and I'll carefully read everything to come.

Kind regards

Link to comment
Share on other sites

Hello Igor, you have lots of questions there.

All that is doable with ProcessWire, and answered already to the most simple question: PW is not to heavy for shared hosting, it's even much lighter than most known CMSs. Because you have so many questions, I will answer with links. After reading those, you will be able to to narrow down your questions a bit so you can get some really useful answers:

categories:

http://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/

comments:

There is a built in comment system (same as in PW site pages), you just have to activate t in modules: http://processwire.com/api/fieldtypes/comments/

eCommerce

http://processwire.com/talk/topic/1732-shop-for-processwire-apeisa/ (lots of suggestions besides Apeisa's module)

http://processwire.com/talk/topic/3756-shopify-integration/ (most recent discussion)

Contact form:

http://modules.processwire.com/modules/form-template-processor/

http://processwire.com/talk/topic/59-module-want-form-builder/#entry343

or

http://store.di.net/products/processwire-form-builder

group/permission

http://processwire.com/api/user-access/roles/

multilanguage URLs

http://processwire.com/talk/topic/2979-multi-language-page-names-urls/

  • Like 4
Link to comment
Share on other sites

Hi Diogo,

most of the links you provided, I've seen already, and I know my question was a bit long... but I like to cover enough, and it's always nice to have a second opinion here and there...

E-Commerce solution... shopify or any other online application is not an option [that was by request... :-/]

Maybe I should contact the author of the module...

The other thing I couldn't find so far is an automated newsletter... with interval options, e.g. every two weeks, every month. I'm using something similar now, and it sends out the last posts of the last month [if there are any]... 

I'm still digging and reading a lot... So far I'm used to the smarty template system and Twig... so I'll have to adapt and figure out things, but of course a learning curve is normal... 

Anyway, so far I really appreciate your input and my thanks for that.

... back to reading...

Kind regards

Link to comment
Share on other sites

I'm still digging and reading a lot... So far I'm used to the smarty template system and Twig... so I'll have to adapt and figure out things, but of course a learning curve is normal... 

There are valid use cases for template engines, but generally speaking templating with PHP is at least as simple and fast and at the same time imposes absolutely no limits on your creativity (especially with PW's fantastic API in your toolbox.) You'll love it once you get used to it :)

That said, we also have modules for both Twig and Smarty template engines available, if you really want to use one of those:

http://modules.processwire.com/modules/template-twig/

http://modules.processwire.com/modules/smarty-templating/

I haven't personally tried these (and most likely won't, if not purely out of curiosity) so I can't really vouch for either one, but as far as I can tell they both seem to be relatively stable.

  • Like 1
Link to comment
Share on other sites

Thx Teppo for your answer, but a template engine is not really required... It's been a [long] while, but I think I can handle php-templating. However, thx for mentioning the links... who knows... habbits die hard sometimes... :-)

I've been searching the modules section, but I can't find a 'newsletter'-system of any kind... correct?

The more I've been reading up on these fora, the more and more interesting ProcessWire looks... :-)

Regards

Link to comment
Share on other sites

I've been searching the modules section, but I can't find a 'newsletter'-system of any kind... correct?

I think this is one of those things that philosophically we don't think belongs in the CMS. You are better off using a service (MailChimp, etc.). Doing large email distributions from your CMS/webserver there is always a danger of your server ending up on an email blacklist. Though I can't argue with the convenience factor (I'm guilty of sending out my small distribution newsletters directly from the server). But if I built this to work right in the CMS, I'd probably feel like I was encouraging some bad practices. :) Now I've heard of others working on things like MailChimp integration with ProcessWire, and that actually sounds pretty interesting. 

  • Like 2
Link to comment
Share on other sites

Hello Ryan,

You are absolutely right, ... although I'm not looking for a large E-Mail solution... more like a convenient automatic 'send out' system for [very] small businesses. Latest news/blog items/products last month etc... Nothing too fancy and well thought out on a small base... I'm using something now and the system sends out 300 mails per hour in bachtes of 5 to about 1500 subscribers.

No doubt for large distributions I'm number one to offer a third party solution, especially as you say... not getting black-listed.

I've been digging out the forum also and found this one too http://processwire.com/talk/topic/659-newsletter-system-with-pw/  :-)

I'll try it out on a later stadium, I'm trying out my first PW installation and using the Basic Website Tutorial.

Link to comment
Share on other sites

If you don't need anything in a hurry I will be building a newsletter system along the lines of your requirements but it will be a few months off. It's a module someone is paying me to build, but I'm working on another one first :)

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Well, I think I have the basic hang of it and I've started :-)

Just for 'best practice'... I have a site_desc and site_keywords and pretty obvious I'd like to see them appear...

However I'd like to use different keywords, and meta description on different pages [ex article short description].

So, should I use 'Autojoin' or should I use the 'init.php'?

On top of that, if let's say $page desc is empty --> use $site_desc as default...

The language thing is also puzzeling me... default can't be changed. However I'd like to have a standard $lang [ex en, fr, de etc...] in my header when changing the site to mulitlangual.

if the Languages Support module is not installed, could it' be that $lang = $user->language; is not working?

Thx so far!

Link to comment
Share on other sites

However I'd like to use different keywords, and meta description on different pages [ex article short description].

So, should I use 'Autojoin' or should I use the 'init.php'?

I dont think either 'autojoin' or 'init.php' would be applicable to the question, so not sure I understand the mention. :) All that you need to do is add your keywords and description fields to the page templates where you want them... perhaps that means all of them. Then when you output your page:

<meta name='description' content='<?=$page->meta_desc?>' />

Make sure you have the "HTML entities" encoder as the textformatter for your meta_description field. Also I would not bother with keywords if the intention is to use them as meta keywords, that's a waste of effort. 

On top of that, if let's say $page desc is empty --> use $site_desc as default...

I usually keep my "site" description on the homepage. Though I think it's better to have a blank meta description than a duplicate one. But if you wanted to pull a site description when the page description was blank, you could do this: 

<meta name='description' content='<?php echo $page->meta_desc ? $page->meta_desc : $pages->get('/')->meta_desc; ?>' />

The logic is: if this page has a meta_description use it, otherwise pull the meta description from the homepage.

The language thing is also puzzeling me... default can't be changed. However I'd like to have a standard $lang [ex en, fr, de etc...] in my header when changing the site to mulitlangual.

The "default" is whatever you want it to be. Meaning, the only place you have to change it is in your mind. 

You may be interested in the new LanguageSupportPageNames module on the PW dev branch. Be sure to follow the thread in the multi-language board if interested.

if the Languages Support module is not installed, could it' be that $lang = $user->language; is not working?

There is no $user->language if Language Support is not installed. 

Link to comment
Share on other sites

Hi Ryan,

Thank you for your time posting back.

I understand the confusion, I think it was due the fact I was still thinking in my old way...

Using the basic tutorial I've set up a page 'page-settings' which has a default Meta Description, so what I was trying to achieve was:

if an "article" or anything else for that matter has no meta description, use default 'site-setting' description. In my case

$sitedesc = $pages->get(1014)->site_meta_description;

So actually, it's not the homepage MetaDescription. That's why I was thinking, instead of using that, just load 'site_meta_description' with "autojoin" or _init.php, unless I misunderstand the purpose... It's in my nature to over complicate easy things...

That said, I also found this thread, maybe that's a better/alternate solution:

http://processwire.com/talk/topic/4004-meta-descriptions-and-selecting-the-first-n-characters/

In the end I might up using your example, much appreciated.

Oh I've already found the multi-language board and I've been reading a lot.

I've already tried out the LanguageSupportPageNames. By reading the idea and purpose, that was the reason I've installed PW in the first place.

In the end I might up using something like:

if ($modules->isInstalled('LanguageSupport'))
	{$lang = $user->language;}
else
	{$lang = 'nl';}

I've been reading a zillion forum posts by now, and somewhere I saw something like 'this must be the friendliest forum ever' and I second that!

Greetings!

Link to comment
Share on other sites

While it's a great idea to have a 'settings' type page to provide content for other pages, you can also use config.php. Just add a line or lines there.

$config->this_value = "Foo";
$config->that_value = "Bar";

And these variables are available to any template.

<?php

echo $config->this_value;

?>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...