Перейти к содержимому


Фотография
- - - - -

Adding productimage to basket items

jbasketitems.php

Лучший Ответ Kess , 13 January 2014 - 09:39

Hello,

 

This is a default functionality. Just go to the configuration of your cart and select an image element of your product item type:

 

cart_image_200x0.png

Перейти к сообщению


  • Закрытая тема Тема закрыта
Сообщений в теме: 4

#1 r.mahler

r.mahler

Отправлено 13 January 2014 - 09:14

Hi,

 

Is it very diificult to add a small productimage next to the item that's in the orderform?

I have tried to search on this forum, but can't find any similar question. Hopefully you can help me out :-)

 

Greetings!

Roy

 


  • 0

#2 Kess

Kess

Отправлено 13 January 2014 - 09:39   Лучший Ответ

Hello,

 

This is a default functionality. Just go to the configuration of your cart and select an image element of your product item type:

 

cart_image_200x0.png


  • 1

#3 r.mahler

r.mahler

Отправлено 13 January 2014 - 09:48

I'm a very happy man Kess! Thank you!!

Is there also a way to let it open on a blank page or pop-up?

And where do I control the size of the thumbnail?

 

Thnx for your already given help!

Roy


  • 0

#4 Kess

Kess

Отправлено 13 January 2014 - 10:07

There are no settings for this but you can change it here:

 

media/zoo/applications/jbuniversal/framework/helpers/jbitem.php

 

This code sets the width:

if (JString::strtolower(get_class($element)) == 'elementjbimage') {

    return $element->render(array(
        'width'    => 75,
        'height'   => 75,
        'template' => $isLink ? 'itemlink' : 'default',
        'display'  => 'first',
    ));

} else if (JString::strtolower(get_class($element)) == 'elementimage') {

    return $element->render(array(
        'width'  => 75,
        'height' => 75,
    ));
}

First part is for JBImage. It's better if you are using it, then it's easy to make a pop-up. Just change the 'template' option to 'popup':

if (JString::strtolower(get_class($element)) == 'elementjbimage') {

    return $element->render(array(
        'width'    => 150,
        'height'   => 150,
        'template' => 'popup',
        'display'  => 'first',
    ));

} else if (JString::strtolower(get_class($element)) == 'elementimage') {

    return $element->render(array(
        'width'  => 75,
        'height' => 75,
    ));
}

I've also changed the size of the preview image to 150 here.


  • 1

#5 r.mahler

r.mahler

Отправлено 13 January 2014 - 11:13

This is exactly what I needed! Thnx again Kess!

 

Have a nice day!

Tjeerio

Roy


  • 0




Click to return to top of page in style!