Pages:

How to display products image in basket

kalanta

No avatar

2008-10-27 22:13

How to display product's image on basket summary page? I tried to insert $aData[sImage] into place where I need that, but any changes.

» free Quick.Cart v3.x

treewood (OpenSolution)

Avatar: treewood

2008-10-28 08:28

i can give you advice but you MUST know PHP and HTML ... it is true ?

kalanta

No avatar

2008-10-28 10:02

HTML I know perfectly, but PHP only basics.

treewood (OpenSolution)

Avatar: treewood

2008-10-29 07:45

1. edit core/orders.php and find: listProducts() and after this:
$oTpl =& TplParser::getInstance( );
put this:
$oFile =& Files::getInstance( );

2. in this function before this:
$oTpl->setVariables( 'aData', $aData );
put this:

if( isset( $oFile->aImagesDefault[2][$aData['iProduct']] ) ){
  
$aDataImage $oFile->aFilesImages[2][$oFile->aImagesDefault[2][$aData['iProduct']]];
  
$oTpl->setVariables'aDataImage'$aDataImage );
  
$aData['sImage'] = $oTpl->tbHtml$sFile'PRODUCTS_IMAGE' );
}
else{
  
$aData['sImage'] = $oTpl->tbHtml$sFile'PRODUCTS_NO_IMAGE' );
}


3. edit templates/pages_default.tpl and copy block: PRODUCTS_NO_IMAGE and PRODUCTS_IMAGE and put to templates/orders_basket.tpl and templates/orders_form.tpl

4. in templates/orders_basket.tpl in block BASKET_LIST put variable somewhere:
$aData[sImage]

It should works. I used code from v3.2

vanader

Avatar: vanader

2010-02-17 14:16

It works perfect, but display only one product in order, not all products in order. But thanks for tip.

Makaron

Avatar: Makaron

2010-02-17 16:29

Should display all images. Are You made all changes well?

vanader

Avatar: vanader

2010-05-27 11:06

Excelent, work perfectly - my mistake was in 2. - insert after, but right may be before, like in topic. Excelent

cgan

Avatar: cgan

2010-05-29 09:55

I get this message for each product added to basket after sending order:
No sBlock: PRODUCTS_IMAGE in file: templates/orders_print.tpl

How can I fix this?

cgan

boboo

Avatar: boboo

2010-05-29 11:51

Try just to copy this block into orders_print.tpl
Because the function listProducts in /core/orders.php is called also by jumping to orders_print page (after clicking "send order").
And one of the parameter is:
$sFile - in the line:
$aData['sImage'] = $oTpl->tbHtml($sFile, 'PRODUCTS_IMAGE' );
and in:
$aData['sImage'] = $oTpl->tbHtml( $sFile, 'PRODUCTS_NO_IMAGE' );
It means: in case clicking on "Send order", as $sFile is given the template (orders_print.tpl) and the block: PRODUCTS_IMAGE. If the block does not exist (even empty) you will get the error message.

http://skupienie.kimla.de/?software-quickcart,106

cgan

Avatar: cgan

2010-05-29 16:32

Thank's boboo for excellent explanation. And of course it works.

cgan

diamel

Avatar: diamel

2010-05-30 11:21

Wszystko fajnie, tylko żeby się tak chciało wyświetlać przy kilku produktach w jednej linii a nie w kolumnie po lewej stronie. Próbuje wsadzić gdzieś w default.css coś takiego: display:inline ale nie bardzo mi to skutkuje. Jakieś pomysły?

#d!amel

Makaron

Avatar: Makaron

2010-05-31 16:17

Nie wiem co masz na myśli. Może zrób jakiegoś screena i dorysuj poglądowo czego oczekujesz.

Mak-Web.pl - Modyfikacje skryptów Q.Cart i Q.Cms

diamel

Avatar: diamel

2010-06-03 14:21

Oto link do obrazka z zamowieniem:
www.fitex.pl/link.jpg

#d!amel

Makaron

Avatar: Makaron

2010-06-04 15:44

Link nie działa..

diamel

Avatar: diamel

2010-06-04 20:59

Aj.. niechcący skasowałem z serwera przy reoladzie plików. Już spowrotem aktywny;) Sorka

#d!amel

Makaron

Avatar: Makaron

2010-06-07 09:14

Spróbuj może najprostszym opływaniem float:left; chyba nie powinno być większego problemu.

Putta

Avatar: Putta

2011-02-03 23:14

H b0boo
---------------------------------------
$sFile - in the line:
$aData['sImage'] = $oTpl->tbHtml($sFile, 'PRODUCTS_IMAGE' );
and in:
$aData['sImage'] = $oTpl->tbHtml( $sFile, 'PRODUCTS_NO_IMAGE' );

-----------------------------------------------------
I understand right? that mean mean copy this whole block in to file order_print.tpl?
and where should I put this code? Thanks

Putta

Avatar: Putta

2011-02-04 02:43

Thank I sort this problem out !!!!!
the code working perfect.

grzdak

Avatar: grzdak

2011-02-11 15:42

Panowie, nie chodzi mi ta funkcjonalność.

Może źle umieszczam elementy:

3. edit templates/pages_default.tpl and copy block: PRODUCTS_NO_IMAGE and PRODUCTS_IMAGE and put to templates/orders_basket.tpl and templates/orders_form.tpl

4. in templates/orders_basket.tpl in block BASKET_LIST put variable somewhere:
$aData[sImage]

Gdzie dokładnie je wstawić?
będę wdzięczna za pomoc pozdrawiam G

Makaron

Avatar: Makaron

2011-02-14 17:22

Bloki z punktu 3ciego gdziekolwiek po zakończeniu innych bloków. Mogą być na końcu pliku. Zmienną $aData[sImage] z punktu 4tego gdzieś w środku bloku BASKET_LIST.

Mak-Web.pl - Modyfikacje skryptów Q.Cart i Q.Cms

Pages:
BACK TO TOP
about us | contact
Facebook