Show phoca gallery images in phoca product view

Phoca Cart - complex e-commerce extension
zucha.imz
Phoca Member
Phoca Member
Posts: 34
Joined: 03 Aug 2018, 13:53

Show phoca gallery images in phoca product view

Post by zucha.imz »

Hi,

is some easy way to integrate phoca gallery in phoca cart product view.

I can do this by add syntax from gallery plugin ( {phocagallery view=category|categoryid=6} ) in cart item description.
But I need doing this dynamicly for few hundreds of products, and changing categoryid=6 by product item category.

My idea is editing phocacart item template ( html overiding ) and add some code to inserting images from gallery to product item page.

Any suggestions for easy way ?

Thx
zucha.imz
Phoca Member
Phoca Member
Posts: 34
Joined: 03 Aug 2018, 13:53

Re: Show phoca gallery images in phoca product view

Post by zucha.imz »

I found most simpliest way for now.

Simple script for adding text {phocagallery view=category|categoryid=((id_by_item_category))} to every product column features.
And add to override template this code

<code>
// FEATURES
if (isset($x->features) && $x->features != '') {
$tabXO = '<h3>Usage inspiration</h3>';
$tabXO .= HTMLHelper::_('content.prepare', $x->features);

}

echo $tabXO;
</code>

And Gallery plugin show images from gallery category to cart product item view.

Feel free to share if there are other better, simpler and clearer solutions.

Thx.
zucha.imz
Phoca Member
Phoca Member
Posts: 34
Joined: 03 Aug 2018, 13:53

Re: Show phoca gallery images in phoca product view

Post by zucha.imz »

This is the right code for doing what I want.
Simply and clear code added to HTML override layout.

Code: Select all

$inspi = '{phocagallery view=category|categoryid='.$this->category[0]->id.'}';
$load_inspi = HTMLHelper::_('content.prepare', $inspi);
echo $load_inspi;
8)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Show phoca gallery images in phoca product view

Post by Jan »

Hi, Ok, thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply