Topic: How to display products image in basket
|
|
|
kalanta
2008-10-27 22:13:05
Votes: 0
|
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.
» Quick.Cart v3.x
|
treewood
OpenSolution
2008-10-28 08:28:41
Votes: 0
|
i can give you advice but you MUST know PHP and HTML ... it is true ?
|
|
kalanta
2008-10-28 10:02:08
Votes: 0
|
HTML I know perfectly, but PHP only basics.
|
treewood
OpenSolution
2008-10-29 07:45:03
Votes: 0
|
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
2010-02-17 14:16:19
Votes: 0
|
It works perfect, but display only one product in order, not all products in order. But thanks for tip.
|
Makaron
OpenSolution
2010-02-17 16:29:55
Votes: 0
|
Should display all images. Are You made all changes well?
|
|
vanader
2010-05-27 11:06:57
Votes: 0
|
Excelent, work perfectly - my mistake was in 2. - insert after, but right may be before, like in topic. Excelent
|
|
cgan
2010-05-29 09:55:56
Votes: 0
|
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
2010-05-29 11:51:20
Votes: 0
|
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
2010-05-29 16:32:56
Votes: 0
|
Thank's boboo for excellent explanation. And of course it works.
-------------------------------------------------------
cgan
|
|
diamel
2010-05-30 11:21:18
Votes: 0
|
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
OpenSolution
2010-05-31 16:17:11
Votes: 0
|
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
2010-06-03 14:21:38
Votes: 0
|
Oto link do obrazka z zamowieniem: www.fitex.pl/link.jpg
-------------------------------------------------------
#d!amel
|
Makaron
OpenSolution
2010-06-04 15:44:06
Votes: 0
|
Link nie działa..
|
|
diamel
2010-06-04 20:59:33
Votes: 0
|
Aj.. niechcący skasowałem z serwera przy reoladzie plików. Już spowrotem aktywny;) Sorka
-------------------------------------------------------
#d!amel
|
Makaron
OpenSolution
2010-06-07 09:14:48
Votes: 0
|
Spróbuj może najprostszym opływaniem float:left; chyba nie powinno być większego problemu.
|
|
Putta
2011-02-03 23:14:30
Votes: 0
|
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
2011-02-04 02:43:42
Votes: 0
|
Thank I sort this problem out !!!!! the code working perfect.
|
|
grzdak
2011-02-11 15:42:21
Votes: 0
|
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
OpenSolution
2011-02-14 17:22:48
Votes: 0
|
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
|
|
|
|
|