eCommerce and Page List Teasers

Permalink Browser Info Environment
Love the addon and am sure it will be perfect when I can get it to do what I want to do. I am trying to use this in conjunction with the product detail page from eCommerce. Instead of the "Main" area, I want it to display content from the "Product" area. I have tried adding
define('PAGE_LIST_TEASERS_AREA', 'Product');
to the config/site.php and have also tried changing the 'Main' to 'Product' in the php files in the packages folder to no avail. Am I missing something?

Type: Discussion
Status: New
yunotakemymoney
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
The lastest version of Page List Teasers (the one that's compatible with Concrete5.5) no longer uses the PAGE_LIST_TEASERS_AREA config setting. Instead, you want to edit the packages/page_list_teasers/blocks/page_list/templates/teasers.php, find this line of code:
$teaser = $plth->getPageTeaser($page, 'Main', $teaserBlockCount, $teaserTruncateChars);

...and change it to this:
$teaser = $plth->getPageTeaser($page, 'Product', $teaserBlockCount, $teaserTruncateChars);


Then clear your site cache via the dashboard.

If that doesn't work, double-check that the name of the area on your product pages is in fact "Product". And make sure the "Truncate descriptions" option is UN-checked when you edit the Page List block.

Let me know if none of that works for you.

-Jordan
yunotakemymoney replied on at Permalink Reply
yunotakemymoney
It is funny, because that totally works, I can see my title and text description, but for some reason it just doesn't want to show the images. You aren't alone, I can't get RSS Feed Creator to do it either. It must be how I have the pictures displayed.
jordanlev replied on at Permalink Reply
jordanlev
That is strange. I wish I could look into this in more detail, but unfortunately I don't have time to do so in the near future. It's probably some weird issue with how the ecommerce product block works (that thing is a gnarly beast of spaghetti code -- I have a lot of trouble figuring out how it works).

You might want to try posting a request to the ecommerce support forum. Don't mention Page List Teasers specifically in the title of your post, instead just say that you're trying to display the Product block from one page onto another page, using the following code:
$cobj = Page::getByID(1234); //product page id
$blocks = $cobj->getBlocks('Product');
foreach ($blocks as $b) {
   if ($b->getBlockTypeHandle() == 'product') {
      $b->display();
   }
}

...and mention that the title and description are showing up, but not the images. Also be sure to specify exactly how you're showing images (like which image attributes you added the images to -- e.g. "large thumbnail", "main image", etc.) and the exact settings you have on the product block on the product page.

Good luck,
Jordan

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.