Best Answer sc , 23 June 2013 - 13:27
Тоже такая проблема. Сделал все как описал Денис и получилось. Выкладываю итоговое содержимое файлов и небольшую инструкцию для последователей (все делается для JBZoo 1.6.1 !!!):
- Открываем файл media\zoo\applications\jbuniversal\config\basket.xml
и заменяем его содержимое на:
<?xml version="1.0" encoding="utf-8"?> <!-- JBZoo is universal CCK based Joomla! CMS and YooTheme Zoo component category JBZoo author smet.denis <admin@joomla-book.ru> copyright Copyright (c) 2009-2013, Joomla-book.ru license http://joomla-book.ru/info/disclaimer link http://joomla-book.ru/projects/jbzoo JBZoo project page --> <config> <name>JBZOO_CART_CONFIG</name> <params> <param name="enable" type="jbbool" default="" label="JBZOO_CART_ENABLE" description="JBZOO_CART_ENABLE_DESC"/> <param name="auth" type="jbbool" default="0" label="JBZOO_CART_AUTH_ONLY" description="JBZOO_CART_AUTH_ONLY_DESC"/> <param name="submission-id" type="jbsubmissionlist" default="order:item.order.order-email" label="JBZOO_CART_SUBMISSION" description="JBZOO_CART_SUBMISSION_DESC"/> <param name="type-layout" type="jbformlayoutlist" default="order:item.order.order" label="JBZOO_CART_FORM_LAYOUT" description="JBZOO_CART_FORM_LAYOUT_DESC"/> <param name="currency" type="jbcurrency" default="RUR" label="JBZOO_CURRENCY" description="JBZOO_CURRENCY_DESC"/> <param name="admin-email" type="text" default="" label="JBZOO_CART_ADMIN_EMAIL" description="JBZOO_CART_ADMIN_EMAIL_DESC"/> <param name="email-admin-layout" type="jbemaillayoutlist" default="item.order.orderemail" label="JBZOO_CART_ADMIN_EMAIL_LAYOUT" description="JBZOO_CART_ADMIN_EMAIL_LAYOUT_DESC"/> <param name="email-user-layout" type="jbemaillayoutlist" default="item.order.orderemail" label="JBZOO_CART_USER_EMAIL_LAYOUT" description="JBZOO_CART_USER_EMAIL_LAYOUT_DESC"/> <param name="element-image" type="jbelementlist" default="" label="JBZOO_CART_IMAGE_ELEMENT" description="JBZOO_CART_IMAGE_ELEMENT_DESC" types="jbimage,image"/> <param name="element-image-2" type="jbelementlist" default="" label="JBZOO_CART_IMAGE_ELEMENT" description="JBZOO_CART_IMAGE_ELEMENT_DESC" types="jbimage,image"/> <param name="minimal-summa" type="text" default="" label="JBZOO_CART_MINIMAL_SUMMA" description="JBZOO_CART_MINIMAL_SUMMA_DESC"/> <!-- Payment system --> <param name="@spacer" type="spacer" default="JBZOO_PAYMENT_CONFIG"/> <param name="nopaid-order" type="jbbool" default="0" label="JBZOO_CART_NOPAID" description="JBZOO_CART_NOPAID_DESC"/> <param name="jbpaymentlinks" type="jbpaymentlinks" default="" label="JBZOO_PAYMENT_LINK" description="JBZOO_PAYMENT_LINK_DESC"/> <param name="payment-enabled" type="jbbool" default="0" label="JBZOO_PAYMENT_ENABLED" description="JBZOO_PAYMENT_ENABLED_DESC"/> <!-- Robox --> <param name="@spacer" type="spacer" default="JBZOO_ROBOX_CONFIG_TITLE"/> <param name="robox-enabled" type="jbbool" default="0" label="JBZOO_ROBOX_ENABLED" description="JBZOO_ROBOX_ENABLED_DESC"/> <param name="robox-debug" type="jbbool" default="0" label="JBZOO_ROBOX_DEBUG" description="JBZOO_ROBOX_DEBUG_DESC"/> <param name="robox-login" type="text" default="" label="JBZOO_ROBOX_LOGIN" description="JBZOO_ROBOX_LOGIN_DESC"/> <param name="robox-password1" type="text" default="" label="JBZOO_ROBOX_PASSWORD_1" description="JBZOO_ROBOX_PASSWORD_1_DESC"/> <param name="robox-password2" type="text" default="" label="JBZOO_ROBOX_PASSWORD_2" description="JBZOO_ROBOX_PASSWORD_2_DESC"/> <!-- IKassa --> <param name="@spacer" type="spacer" default="JBZOO_IKASSA_CONFIG_TITLE"/> <param name="ikassa-enabled" type="jbbool" default="0" label="JBZOO_IKASSA_ENABLED" description="JBZOO_IKASSA_ENABLED_DESC"/> <param name="ikassa-shopid" type="text" default="" label="JBZOO_IKASSA_SHOPID" description="JBZOO_IKASSA_SHOPID_DESC"/> <param name="ikassa-key" type="text" default="" label="JBZOO_IKASSA_KEY" description="JBZOO_IKASSA_KEY_DESC"/> </params> </config>
-
Открываем файл media\zoo\applications\jbuniversal\templates\catalog\renderer\basket\_default.php
и заменяем его содержимое на:
<?php /** * JBZoo is universal CCK based Joomla! CMS and YooTheme Zoo component * @category JBZoo * @author smet.denis <admin@joomla-book.ru> * @copyright Copyright (c) 2009-2012, Joomla-book.ru * @license http://joomla-book.ru/info/disclaimer * @link http://joomla-book.ru/projects/jbzoo JBZoo project page */ defined('_JEXEC') or die('Restricted access'); $view = $this->getView(); $this->app->jbassets->basket(); $this->app->jbassets->initJBPrice(); ?> <table class="jbbasket-table jsJBZooBasket"> <thead> <tr> <th>#</th> <th><?php echo JText::_('JBZOO_CART_ITEM_SKU');?></th> <th></th> <th><?php echo JText::_('JBZOO_CART_ITEM_NAME');?></th> <th style="min-width: 70px;"><?php echo JText::_('JBZOO_CART_ITEM_PRICE');?></th> <th><?php echo JText::_('JBZOO_CART_ITEM_QUANTITY');?></th> <th><?php echo JText::_('JBZOO_CART_ITEM_SUBTOTAL');?></th> <th></th> </tr> </thead> <tbody> <?php $i = 0; $summa = 0; $count = 0; $currencyConvert = $view->appParams->get('global.jbzoo_cart_config.currency'); $imageElementId = $view->appParams->get('global.jbzoo_cart_config.element-image'); $imageElementId2 = $view->appParams->get('global.jbzoo_cart_config.element-image-2'); foreach ($view->items as $item) { $basketInfo = $view->basketItems[$item->id]; $basketInfo['price'] = $this->app->jbmoney->convert($basketInfo['currency'], $currencyConvert, $basketInfo['price']); $count += $basketInfo['quantity']; $subtotal = $basketInfo['quantity'] * $basketInfo['price']; $summa += $subtotal; $image = $this->app->jbitem->renderImageFromItem($item, $imageElementId, true); $image2 = $this->app->jbitem->renderImageFromItem($item, $imageElementId2, true); echo '<tr class="row-' . $item->id . '" itemId="' . $item->id . '">'; echo '<td>' . ++$i . '</td>'; echo '<td>' . $basketInfo['sku'] . '</td>'; echo '<td>' . $image . $image2 . '</td>'; echo '<td>' . '<a href="' . $this->app->route->item($item) . '" title="' . $item->name . '">' . $item->name . '</a><br/> <span class="price-description">' . $basketInfo['priceDesc'] . '</span></td>'; if ($basketInfo['price']) { echo '<td class="jsPricevalue" price="' . $basketInfo['price'] . '">' . $this->app->jbformat->number($basketInfo['price']) . ' </td>'; } else { echo '<td> - </td>'; } echo '<td><input type="text" class="jsQuantity input-quantity" value="' . $basketInfo['quantity'] . '" /></td>'; if ($basketInfo['price']) { echo '<td class="jsSubtotal">' . $this->app->jbmoney->toFormat($subtotal, $currencyConvert) . '</td>'; } else { echo '<td> - </td>'; } echo '<td><input type="button" class="jbbuttom jsDelete" itemid="' . $item->id . '" value="' . JText::_('JBZOO_CART_DELETE') . '" /></td>'; echo "</tr>\n"; } ?> </tbody> <tfoot> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong><?php echo JText::_('JBZOO_CART_TOTAL');?>:</strong></td> <td class="jsTotalCount"><?php echo $count;?></td> <td class="jsTotalPrice"><?php echo $this->app->jbmoney->toFormat($summa, $currencyConvert);?></td> <td> <input type="button" class="jbbuttom jsDeleteAll" value="<?php echo JText::_('JBZOO_CART_REMOVE_ALL');?>"/> </td> </tr> </tfoot> </table> <script type="text/javascript"> jQuery(function ($) { $('.jbzoo .jsJBZooBasket').JBZooBasket({ 'clearConfirm':"<?php echo JText::_('JBZOO_CART_CLEAR_CONFIRM');?>", 'quantityUrl':"<?php echo $this->app->jbrouter->basketQuantity($view->appId);?>", 'deleteUrl':"<?php echo $this->app->jbrouter->basketDelete($view->appId);?>", 'clearUrl':"<?php echo $this->app->jbrouter->basketClear($view->appId);?>" }); }); </script>
-
Заходим в Заказы -> Настройки -> Корзина и выбираем для второго появившегося Элемента картинки нужный из соответствующего типа. Сохраняем.
-
Очищаем кэш Joomla и кэш браузера.
И все должно заработать. У меня заработало. Надеюсь у Вас тоже получилось. Вот таком мини-урок получился (или полу-патч)
Очень ждем новой версии и надеемся, что он превзойдет все ожидания.
Go to the full post