Page 1 of 1

Images of Product list layout

Posted: 18 May 2018, 17:08
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?

Re: Images of Product list layout

Posted: 18 May 2018, 22:56
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

Re: Images of Product list layout

Posted: 21 May 2018, 15:53
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?

Re: Images of Product list layout

Posted: 25 May 2018, 00:54
by Jan
When you debug the variable $d['image'] e.g with print_r() - does the variable include values?

Jan