E-Commerce: Hardcoding Product List Block in Page Type Buggyness


I'd like to have a page type that outputs all products below the current page without the user having to create the page and add the Product List block manually.

I first tried using a Stack, but there I ran into the known problem/bug of the Product List controller not being able to add header items so the javascript is broken on the page.

Then I tried hardcoding a block, but I get the error:

Fatal error: Call to a member function getBlockID() on a non-object in /var/www/(..)/packages/core_commerce/blocks/product_list/controller.php on line 352

Another user has reported this here:


But got no answer - what's the dealio? Any way to hardocde this block in a page type?? This seems like an awfully common use-case scenario ...

View Replies: View Best Answer
Ekko replied on at Permalink Best Answer Reply 1 Attachment
Yes go to your dashboard, under pages, and themes click page types. Find the page type you are going to use or have created for your e-com purpose, click defaults. Anything you edit, or add in the default, will be included in all future creations of that page type.

If you can't edit areas there click permissions for that page, and ensure that admins have edit rights.

Screengrab attached
Korvin replied on at Permalink Reply
Ekko is giving the correct answer for this, let me know if you have any trouble.

Best wishes,
Hammertime replied on at Permalink Reply

Yeah that totally worked :)

However, there is one slightly annoying problem remaining. If I have an existing page in another page type, and then switch to my Product List pagetype, the defaults are not loaded. Which.. Kinda sucks :( - I have to delete and recreate the page with the correct page type whenever this issue crops up.

Where is the C5 bugtracker BTW? I would really like to bump the dev. team for a bugfix with regards to the problem of Block Controllers not triggering the on_start event when added via. a stack. Ive encountered this problem 3 seperate times in the last couple of months now, so it's not a trivial issue.

Hammertime replied on at Permalink Reply
Oh, and another thing... Using this technique, then sorting options are totally broken. I had to do some nasty hacks to bring sorting of products to a workable state again.

All in all, the e-commerce plugin is relatively well written under the hood, but the views are... Absolutely atrocious. What's up with all those tables and <br> tags? This is 2012 gentlemen, not 1999!
collinssolutions replied on at Permalink Reply
This really isn't helpful. I think the ecommerce package is good but it is extremely hard to make a custom catalog. There are no examples of code to output product categories or products. Does anyone have any examples of this? In my theme i cant but areas in to add the blocks because the styling overrides and i cant see them to click on them.
Hammertime replied on at Permalink Reply
Hi Collinsolutions,

If I were you I would save my money and look at alternate e-commerce systems which you can run side-by-side with your C5 install. I absolutely love Concrete5 and have built quite a few platforms on it through the last 2 years - but the E-Commerce plugin is - overall - quite terrible.

Sooo many hacks are required for the simplest alterations - and as mentioned the views seem to be designed by somebody who forgot what MVC is all about.

So I urge you to look at alternatives... Lemonstand and Opencart come to mind as excellent choices.

Good luck

PS: You can hire me on an hourly basis if you want to keep hacking away at the official C5 option.