Page 1 of 1

Show phoca gallery images in phoca product view

Posted: 25 Jan 2024, 14:44
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

Re: Show phoca gallery images in phoca product view

Posted: 25 Jan 2024, 15:04
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.

Re: Show phoca gallery images in phoca product view

Posted: 25 Jan 2024, 16:58
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)

Re: Show phoca gallery images in phoca product view

Posted: 26 Jan 2024, 16:40
by Jan
Hi, Ok, thank you for the info.

Jan