2013-04-11 12:59
Witam, Zainstalowałam w Quick.Cart 6.0 dodatek ImagesinBasket, jednak zdjęcia produktów nie wyświetlają się w koszyku tylko dopiero na następnej planszy, tj. po kliknięciu przycisku 'zamów'. Czy da się tak zrobić, żeby zdjęcia produktów były wyświetlane na liście produktów dodanych do koszyka? Z góry dziękuję za pomoc
» Quick.Cart v6.x 2013-04-11 15:06
Ale przecież po to jest ten dodatek:) A może pomyliłeś order-step-1.php z order-step-2.php ?
simlution.org 2013-04-11 18:16
Nie, nie pomyliłam. Dokładnie wykonałam wszystkie kroki z instrukcji instalacji dodatku... Obecnie mam taki kod w pliku order-step-1.php:
<?php // More about design modifications - www.opensolution.org/Quick.Cart/docs/?id=en-design if( ! defined ( 'CUSTOMER_PAGE' ) ) exit; if( isset( $aData [ 'sName' ] ) && !empty( $config [ 'basket_page' ] ) && $config [ 'basket_page' ] == $iContent ){ // basket actions // basket if( isset( $_POST [ 'aProducts' ] ) ){ if( !isset( $aUrls ) ) $aUrls = throwSiteUrls ( ); // save basket $oOrder -> saveBasket ( $_POST [ 'aProducts' ] ); if( isset( $_POST [ 'sRemember' ] ) ){ setCookie ( 'sCustomer' . LANGUAGE , md5 ( $_SESSION [ 'iCustomer' . LANGUAGE ] ), time ( ) + 259200 ); $sMessage = '<div class="message" id="ok"><h3>' . $lang [ 'Operation_completed' ]. '</h3></div>' ; } if( isset( $_POST [ 'sCheckout' ] ) && !empty( $config [ 'order_page' ] ) && isset( $oPage -> aPages [ $config [ 'order_page' ]] ) ){ header ( 'Location: ' . dirname ( $aUrls [ 'sUrl' ] ). '/' . $oPage -> aPages [ $config [ 'order_page' ]][ 'sLinkName' ] ); exit; } } if( isset( $iProductDelete ) && is_numeric ( $iProductDelete ) ){ // delete product from basket $oOrder -> deleteFromBasket ( $iProductDelete ); } if( isset( $_POST [ 'iProductAdd' ] ) && isset( $_POST [ 'iQuantity' ] ) ){ $iProductAdd = $_POST [ 'iProductAdd' ]; $iQuantity = $_POST [ 'iQuantity' ]; } if( isset( $iProductAdd ) && is_numeric ( $iProductAdd ) && isset( $iQuantity ) && is_numeric ( $iQuantity ) ){ if( !isset( $oProduct ) ) $oProduct = Products :: getInstance ( ); if( isset( $oProduct -> aProducts [ $iProductAdd ] ) && is_numeric ( $oProduct -> aProducts [ $iProductAdd ][ 'mPrice' ] ) ){ if( !isset( $aUrls ) ) $aUrls = throwSiteUrls ( ); // add product to basket $oOrder -> saveBasket ( Array( $iProductAdd => $iQuantity ), true ); header ( 'Location: ' . dirname ( $aUrls [ 'sUrl' ] ). '/' .( defined ( 'MOBILE' ) ? 'mobile.php' : null ). $aData [ 'sLinkName' ] ); exit; } } $oOrder -> generateBasket ( ); $iOrderProducts = isset( $_SESSION [ 'iOrderQuantity' . LANGUAGE ] ) ? $_SESSION [ 'iOrderQuantity' . LANGUAGE ] : 0 ; } require_once DIR_SKIN . '_header.php' ; // include design of header ?> <div id="page"><?php if( isset( $aData [ 'sName' ] ) ){ // displaying pages and subpages content echo '<h1>' . $aData [ 'sName' ]. '</h1>' ; // displaying page name if( isset( $aData [ 'sDescriptionFull' ] ) ) echo '<div class="content" id="pageDescription">' . $aData [ 'sDescriptionFull' ]. '</div>' ; // full description if( isset( $aData [ 'sPages' ] ) ) echo '<div class="pages">' . $lang [ 'Pages' ]. ': <ul>' . $aData [ 'sPages' ]. '</ul></div>' ; // full description pagination // display products in basket $sBasketList = $oOrder -> listProducts ( ); if( !empty( $sBasketList ) ){ if( isset( $sMessage ) ) echo $sMessage ; ?> <script type="text/javascript" src="<?php echo $config [ 'dir_core' ]; ?> check-form.js"></script> <div id="basket"> <form method="post" action="" onsubmit="return checkForm( this )"> <fieldset id="orderedProducts"> <table cellspacing="0"> <thead> <tr> <td class="image"> </td> <td class="name"> <?php echo $lang [ 'Name' ]; ?> </td> <td class="price"> <em><?php echo $lang [ 'Price' ]; ?> </em><span>[<?php echo $config [ 'currency_symbol' ]; ?> ]</span> </td> <td class="quantity"> <?php echo $lang [ 'Quantity' ]; ?> </td> <td class="summary"> <em><?php echo $lang [ 'Summary' ]; ?> </em><span>[<?php echo $config [ 'currency_symbol' ]; ?> ]</span> </td> <td class="options"> </td> </tr> </thead> <tfoot> <tr id="recount"> <td colspan="3"> </td> <td> <input type="submit" value="<?php echo ucfirst ( $lang [ 'save' ] ); ?> " class="submit" /> </td> <td colspan="2"> </td> </tr> <?php if( isset( $_SESSION [ 'oneDiscount' ] ) ){ ?> <tr> <th colspan="3"> <?php echo $lang [ 'Info_discount' ]; ?> </th> <td> <?php echo $config [ 'discount_percent' ]. '%' ; ?> </td> <td> </td> </tr> <?php } ?> <tr class="summaryProducts"> <th colspan="4"> <?php echo $lang [ 'Summary' ]; ?> </th> <td id="summary"> <?php echo displayPrice ( $_SESSION [ 'fOrderSummary' . LANGUAGE ] ); ?> </td> <td> </td> </tr> <tr class="buttons"> <td id="save" colspan="2"> <input type="submit" name="sRemember" value="<?php echo $lang [ 'Remember_basket' ]; ?> " class="submit" /> </td> <td colspan="4" class="nextStep"> <input type="submit" name="sCheckout" value="<?php echo $lang [ 'Checkout' ]; ?> »" class="submit" /> </td> </tr> </tfoot> <tbody> <?php echo $sBasketList ; // displaying products in basket ?> </tbody> </table> </fieldset> </form> </div> <?php } else{ echo '<div class="message" id="error"><h3>' . $lang [ 'Basket_empty' ]. '</h3></div>' ; } } else{ echo '<div class="message" id="error"><h3>' . $lang [ 'Data_not_found' ]. '</h3></div>' ; // displaying 404 error } ?> </div><?php require_once DIR_SKIN . '_footer.php' ; // include design of footer ?>
W koszyku nadal nie widać zdjęć, tylko dopiero po kliknięciu przycisku 'zamów'.... Może jakiś szczegół w instrukcji umknął..... ?
2013-04-11 18:31
Racja, istotne są tutaj zmiany w core/orders.php Musisz poprawnie wykonać punkty 1 i 2 z instrukcji. W order-step-1.php nie szukaj przyczyny.
simlution.org 2013-04-17 14:18
Bardzo dziękuję za wskazanie kierunku - brakowało pierwszego kroku z instrukcji.
2013-04-21 09:01
ik heb de plugin imagesInBasket geinstalleerd, maar nu staat de totaal prijs in het winkelmandje in het midden en niet onder totaal
2013-04-21 09:07
I have installes the imagesInBasket plugin, but now the total price stay in the middle of the page and not onder total price. How can i change that?
2014-01-05 23:41
hmm.. to dziwne, bo mi właśnie działa przy wpisaniu w tej pierwszy lepszy, czyli koło 50 linijki, a w ten drugi za to nie pasi... chyba, że to kwestia, że ja mam QC 6.3...