Images of Product list layout

Phoca Cart - complex e-commerce extension
MM0233
Phoca Member
Phoca Member
Posts: 22
Joined: 02 Feb 2018, 18:18

Images of Product list layout

Post by MM0233 »

Hello,
I need to nest the img tag with some classes and id of mine,
i have this method of render $layoutI->render($dI)
but i have to get by this only the src=""

( i'm workin only in grid render. don't care of others methods )

I need to do this:
echo '<div id="Slider-button'.$num.'" class="Slider-button"><img id="magnify" src="'.JURI::base(true).'/'.$layoutI->render($dI).'" alt="" class="ph-image'.$num.'" /></div>' ;

where $layoutI->render($dI) could be only the url and not all the tag <img ecc.ecc. />

what can i do?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Images of Product list layout

Post by Jan »

Hi, so in this case you need to customize the default view output and create one new layout for the link only :idea:

Jan
If you find Phoca extensions useful, please support the project
MM0233
Phoca Member
Phoca Member
Posts: 22
Joined: 02 Feb 2018, 18:18

Re: Images of Product list layout

Post by MM0233 »

yes i'm doing this, but i don't know how to extract only the scr from $layoutI->render($dI)

In components/com_phocacart/layouts/product_image.php i see this:
echo '<img src="'. JURI::base(true).'/'.$d['image']->rel.'" alt="" class="img-responsive ph-image '. $d['phil'].' phjProductImage'.$productIdName.'" '.$d['imagestyle'].' data-image="'. JURI::base(true).'/'.$d['default_image']->rel.'" />';

I need to extract only the JURI::base(true).'/'.$d['image']->rel.

but if i try to call (on the override) JURI::base(true).'/'.$d['image']->rel i got nothing, why? what's wrong?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Images of Product list layout

Post by Jan »

When you debug the variable $d['image'] e.g with print_r() - does the variable include values?

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