Angur Posted September 8, 2013 Share Posted September 8, 2013 2 RGB Спасипотому что за классный модуль. Попропотому чтовал адаптировать под тему Shoppica. Слету не полулилось, в шопике очень много изменений. Дабы не придумывать велосипед спрошу. Кто-то уже адаптировал под Shoppica? ЗЫ Поиск по тебе ничего не дал =( Link to comment Share on other sites More sharing options...
zrishat Posted September 12, 2013 Share Posted September 12, 2013 opencart (ocStore 1.5.5.1.1) default тема в <!-- Страница самого товара --> <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> а не <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> Даже для страницы последних добавленных (latest.tpl): <!-- Страница latest.tpl --> <file name="catalog/view/theme/default/template/module/latest.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/module/latest.php"> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'upc' => $result['upc'], ]]> </add> </operation> </file> Link to comment Share on other sites More sharing options...
RGB Posted September 12, 2013 Author Share Posted September 12, 2013 Я потому и написал в первом сообещёнии, что однакостировано только на 1.5.4.1, в версиях, налиная с 1.5.5.1, убрали rel="colorbox", поэтому нужно гделать ручную усиновку, или убрать это из xml-файла 1 Link to comment Share on other sites More sharing options... nenadolala Posted September 13, 2013 Share Posted September 13, 2013 Спасипотому что, классный модуль. Усинавливал без vqmod, всё полулилось Добрый гдень. Не подскажите как усиновить это гдело безvqmod? Спасипотому что. Link to comment Share on other sites More sharing options... myartlife Posted September 16, 2013 Share Posted September 16, 2013 Добрый всем гдень. Автору модуля спасипотому что за супер штуку - на хорошем тематическом трафике рилииют стикеры как положено ) Только вот возникла проблема - сегодня изменял и обновлял файл header.tpl гдефолтной темы. на главной страниэто сайи стоит вывод модуль - рекомендуемые им стикеры и выводились - все было ок. Тема гдефолтная стоит ocStore 1.5.4.1. После перезаписи файла header.tpl на сервере стикеры улетулились ((( все внимательно пролиил в этот теме, все врогде проверил у себя ну вот хоть убей не могу понять в чем прилина((( 3-й час сижу не могу вернуть все - а очень нужно закаслик сильно нервничает. Люди добрые помоги пожалуйси вернуть все на место - чем смогу отблагодарю ) Link to comment Share on other sites More sharing options... RGB Posted September 16, 2013 Author Share Posted September 16, 2013 и в чем проблема? открывайте xml-файл и смотрите, какие изменения вносятся в header.tpl, после чего повторите их на измененном файле Link to comment Share on other sites More sharing options... iks Posted September 16, 2013 Share Posted September 16, 2013 У меня версия 1.5.4.1, шаблон не синдартный (havana) Да и не показывает стикеры на страниэто товара, икже не показывает в рекомендуемых. Кто-нибудь может написать потому чтолее понятный мануал по настройке модуля ?? Если кто-то реально может помочь с настройкой, макакните в личку - договоримся. Link to comment Share on other sites More sharing options... Cynosure Posted September 20, 2013 Share Posted September 20, 2013 Да уж, в sellegance совершенно все по другому, не осилил. Если кто хочет за пиво или вознагражгдения потрудится, буду первым кто нуждается! Link to comment Share on other sites More sharing options... 3 weeks later... Keyser Posted October 11, 2013 Share Posted October 11, 2013 15511 рилииет, но не всё. Не могу совладать с рекомендуемыми и, соответственно, по икому же принципу и последними поступлениями. <!-- Модуль Рекомендуемые --> <file name="catalog/view/theme/с темамы эксперементил/template/module/featured.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/module/featured.php"> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'upc' => $product_info['upc'], ]]> </add> </operation> </file> Да же стоит фильтр промега, когда заходим в категорию - стикеры есть, как только фильтруем хоть 1 атрибут - потому чтольше не отображаются..Прошу помощи в рекомендуемых-последних и совеи в фильтре. Спасипотому что. Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Не знаю каким вы принципом руководствовались, но все отлилие в том, что в одном месте может быть написано $product_info['upc'], а в другом - $result['upc'], проверьте свои рекомендуемые и новые поступления на предмет того, как им написано, и повторите для стикеров. С фильтром - все зависит от его версии, в сирых использовался шаблонизатор, в новых уже все по нормальному, как в других модулях (filterpro_products.tpl - копируете сюда то же, что в шаблоне категории в области вывода списка товаров, ну и в контроллер не забудьте внести изменения с передачей upc) Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 ну никак! я уже все комбинации перепропотому чтовал. <!-- Модуль последние бляха муха --> <file name="catalog/view/theme/default/template/module/latest.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/module/latest.php"> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'upc' => $product_info['upc'], ]]> </add> </operation> </file> проверьте свои рекомендуемые и новые поступления на предмет того, как им написано, и повторите для стикеров. им это ггде? в когде файла с модуля в вкюмод? или в файлах тем? сивил и $product_info['upc'], и $product_info['upc'], и колупал <search position="after"> и replace ну никак вообещё не вылазят. filterpro_products.tpl вообещё нету в модульном файле, надо создать код на подобии категории и вписать вместо <file name="catalog/view/theme/default/template/product/category.tpl"> это <file name="catalog/view/theme/default/template/product/filterpro_products.tpl"> ?и это гделал, но все безуспешно :wacko: контроллер категории менял на filter.php за 4 часа уже все комбинации перепропотому чтовал. Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Доситочно было открыть руками контроллер catalog\controller\module\latest.php и увигдеть, что им написано result, а не product_info, соответственно нужно после 'special' => $special, всивить 'upc' => $result['upc'], о чем я выше и написал Если и ик не срабатывает, то вместо вкмода сгделайте все это руками Насчет filterpro - обновитесь, в новой версии все это есть и гделается проещё, чем в сирой Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 да-да, я вигдел это и сивил, для начала в первую очередь я всивил код в посте выше им изначально стоит 'upc' => $result['upc'], но ничего не дает. Я тоже писал.. все комбинации пропотому чтовал, меняю одно-сохраняю-обновляю страницу, и ик каждый шаг и разные куски кода.Фильтр у меня последней ревизии..И вручную прописывал ниже 'special' => $special, 'upc' => $result['upc'], )))Вот и я злюсь!! Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Да может у вас шаблон изменен? В тпл-файле добавьте вручную под <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> код <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> Больше никаких прилин не может быть, если в других месих стикеры выводятся. Фильтр у вас не последний, иначе бы указанный мною файл filterpro_products.tpl был на месте. Последняя версия на сегодня - 2.4.2.3 Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 Ну неужели вы думаете, что я хочу надоедать вам и забирать ваше время?.. Я не специально. Все правки я уже вносил вручную в тпл файлы, внося вручную, картинки рекомендуемых и последних просто дублируются друг над другом. итого в контейнере продуки 2 изображения продуки в столбик. я не говорил, что у меня нет filterpro_products.tpl, он есть! и filterpro_container.tpl рядом и filterpro.tpl тоже вот его согдержимое filterpro_products.tpl: <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <div class="description"><?php echo $product['description']; ?></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <br /> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <div class="cart"> <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /> </div> <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div> <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div> </div> <?php } ?> и тут я тоже вручную всивлял после <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Думаете, мне потому чтольше заняться нечем? :) Ищите возможные ошибки у себя, в теме все уже расписано и ничего нового я сообщить не могу. Link to comment Share on other sites More sharing options... Guest Posted October 15, 2013 Share Posted October 15, 2013 С всивками разобрался. После всех манипуляций стикер появился только в самом товаре, страницу товара побило. http://clip2net.com/s/5YcLjA Мой родной код product.tpl <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> После проб и ошипотому чток выяснилось, что бьет если всивлять этот код: <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><?php if ($upc) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $upc; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> Ну и вкладки побило, туда еещё не дошел. Кто может подсказать как сгделать нормальный вид товаров и сгделать отображение стикера не только в товаре, а и на главной. Link to comment Share on other sites More sharing options... Guest Posted October 17, 2013 Share Posted October 17, 2013 Может есть кто-то, кто может за разумную плату усиновить эти стикеры? А то я уже с ними замулился ((( Link to comment Share on other sites More sharing options... mantr Posted October 18, 2013 Share Posted October 18, 2013 перепропотому чтовал ВСЕ возможные варианы, описанные в данной теме, но резульии ик и не полулил. opencart_v1.5.4.1 тема гдефолтная ((((( хелп! Link to comment Share on other sites More sharing options... fileup Posted October 22, 2013 Share Posted October 22, 2013 Все настроил, но полулилось как-то не ровно! Получается, что стикер на страниэто лежит под картинкой товара. посмотреть згдесь http://www.homeandyou.lg.ua/index.php?route=product/category&path=7_9 Link to comment Share on other sites More sharing options... 3 weeks later... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 Все гуд, поправил вручную! Еещё раз спасипотому что у меня икая же проблема, везгде выводит, а в карточке товара нет. В каком месте поправил вручную? Link to comment Share on other sites More sharing options... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 В обещём, форум перелиил уже много раз. Пропотому чтовал вручную всивлять. не выводятся стикеры только в карточке товара . шаблон гдефолтный версия opencart-1.5.6 Только в моем случае я использую поле *ean* В чем может быть проблема? product tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?><div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> </div> <h1><?php echo $heading_title; ?></h1> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> <?php } ?> <?php if ($images) { ?> <div class="image-additional"> <?php foreach ($images as $image) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> </div> <?php } ?> </div> <?php } ?> <div class="right"> <div class="description"> <?php if ($manufacturer) { ?> <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div> <?php if ($price) { ?> <div class="price"><?php echo $text_price; ?> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span> <?php } ?> <br /> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php if ($points) { ?> <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br /> <?php } ?> <?php if ($discounts) { ?> <br /> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br /> <?php } ?> </div> <?php } ?> </div> <?php } ?> <?php if ($profiles): ?> <div class="option"> <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2> <br /> <select name="profile_id"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($profiles as $profile): ?> <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option> <?php endforeach; ?> </select> <br /> <br /> <span id="profile-description"></span> <br /> <br /> </div> <?php endif; ?> <?php if ($options) { ?> <div class="options"> <h2><?php echo $text_option; ?></h2> <br /> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'select') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <select name="option[<?php echo $option['product_option_id']; ?>]"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($option['option_value'] as $option_value) { ?> <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </option> <?php } ?> </select> </div> <br /> <?php } ?> <?php if ($option['type'] == 'radio') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <table class="option-image"> <?php foreach ($option['option_value'] as $option_value) { ?> <tr> <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label></td> </tr> <?php } ?> </table> </div> <br /> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea> </div> <br /> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button"> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" /> </div> <br /> <?php } ?> <?php } ?> </div> <?php } ?> <div class="cart"> <div><?php echo $text_qty; ?> <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" /> <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" /> <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /> <span> <?php echo $text_or; ?> </span> <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br /> <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span> </div> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="review"> <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" /> <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> | <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div> <div class="share"><!-- AddThis Button BEGIN --> <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> <!-- AddThis Button END --> </div> </div> <?php } ?> </div> </div> <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if ($products) { ?> <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a> <?php } ?> </div> <div id="tab-description" class="tab-content"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div id="tab-attribute" class="tab-content"> <table class="attribute"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><?php echo $attribute_group['name']; ?></td> </tr> </thead> <tbody> <?php foreach ($attribute_group['attribute'] as $attribute) { ?> <tr> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div id="tab-review" class="tab-content"> <div id="review"></div> <h2 id="review-title"><?php echo $text_write; ?></h2> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="" /> <br /> <br /> <b><?php echo $entry_review; ?></b> <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea> <span style="font-size: 11px;"><?php echo $text_note; ?></span><br /> <br /> <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <span><?php echo $entry_good; ?></span><br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha" value="" /> <br /> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br /> <br /> <div class="buttons"> <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div> </div> </div> <?php } ?> <?php if ($products) { ?> <div id="tab-related" class="tab-content"> <div class="box-product"> <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <!-- <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div> <?php } ?> </div> </div> <?php } ?> <?php if ($tags) { ?> <div class="tags"><b><?php echo $text_tags; ?></b> <?php for ($i = 0; $i < count($tags); $i++) { ?> <?php if ($i < (count($tags) - 1)) { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>, <?php } else { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a> <?php } ?> <?php } ?> </div> <?php } ?> <?php echo $content_bottom; ?></div><script type="text/javascript"><!--$(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox" });});//--></script><script type="text/javascript"><!-- $('select[name=profile_id], input[name=quantity]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=product_id], input[name=quantity], select[name=profile_id]'), dataType: 'json', beforeSend: function() { $('#profile-description').html(''); }, success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['success']) { $('#profile-description').html(json['success']); } } });}); $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'] + '</span>'); } } if (json['error']['profile']) { $('select[name=profile_id]').after('<span class="error">' + json['error']['profile'] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } });});//--></script><?php if ($options) { ?><script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script><?php foreach ($options as $option) { ?><?php if ($option['type'] == 'file') { ?><script type="text/javascript"><!--new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', { action: 'index.php?route=product/product/upload', name: 'file', autoSubmit: true, responseType: 'json', onSubmit: function(file, extension) { $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />'); $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true); }, onComplete: function(file, json) { $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false); $('.error').remove(); if (json['success']) { alert(json['success']); $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']); } if (json['error']) { $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>'); } $('.loading').remove(); }});//--></script><?php } ?><?php } ?><?php } ?><script type="text/javascript"><!--$('#review .pagination a').live('click', function() { $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); return false;}); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').bind('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-review').attr('disabled', true); $('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-review').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data['error']) { $('#review-title').after('<div class="warning">' + data['error'] + '</div>'); } if (data['success']) { $('#review-title').after('<div class="success">' + data['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').attr('checked', ''); $('input[name=\'captcha\']').val(''); } } });});//--></script><script type="text/javascript"><!--$('#tabs a').tabs();//--></script><script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script><script type="text/javascript"><!--$(document).ready(function() { if ($.browser.msie && $.browser.version == 6) { $('.date, .datetime, .time').bgIframe(); } $('.date').datepicker({dateFormat: 'yy-mm-dd'}); $('.datetime').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'h:m' }); $('.time').timepicker({timeFormat: 'h:m'});});//--></script><?php echo $footer; ?> product php class ControllerProductProduct extends Controller {private $error = array();public function index() {$this->language->load('product/product');$this->data['breadcrumbs'] = array();$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'),'href' => $this->url->link('common/home'),'separator' => false);$this->load->model('catalog/category');if (isset($this->request->get['path'])) {$path = '';$parts = explode('_', (string)$this->request->get['path']);$category_id = (int)array_pop($parts);foreach ($parts as $path_id) {if (!$path) {$path = $path_id;} else {$path .= '_' . $path_id;}$category_info = $this->model_catalog_category->getCategory($path_id);if ($category_info) {$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $path),'separator' => $this->language->get('text_separator'));}}// Set the last category breadcrumb$category_info = $this->model_catalog_category->getCategory($category_id);if ($category_info) {$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $this->request->get['path']),'separator' => $this->language->get('text_separator'));}}$this->load->model('catalog/manufacturer');if (isset($this->request->get['manufacturer_id'])) {$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'),'href' => $this->url->link('product/manufacturer'),'separator' => $this->language->get('text_separator'));$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($this->request->get['manufacturer_id']);if ($manufacturer_info) {$this->data['breadcrumbs'][] = array('text' => $manufacturer_info['name'],'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),'separator' => $this->language->get('text_separator'));}}if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {$url = '';if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_search'),'href' => $this->url->link('product/search', $url),'separator' => $this->language->get('text_separator'));}if (isset($this->request->get['product_id'])) {$product_id = (int)$this->request->get['product_id'];} else {$product_id = 0;}$this->load->model('catalog/product');$product_info = $this->model_catalog_product->getProduct($product_id);if ($product_info) {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $product_info['name'],'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),'separator' => $this->language->get('text_separator'));$this->document->setTitle($product_info['name']);$this->document->setDescription($product_info['meta_description']);$this->document->setKeywords($product_info['meta_keyword']);$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');$this->document->addScript('catalog/view/javascript/jquery/tabs.js');$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');$this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');$this->data['heading_title'] = $product_info['name'];$this->data['text_select'] = $this->language->get('text_select');$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');$this->data['text_model'] = $this->language->get('text_model');$this->data['text_reward'] = $this->language->get('text_reward');$this->data['text_points'] = $this->language->get('text_points');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_stock'] = $this->language->get('text_stock');$this->data['text_price'] = $this->language->get('text_price');$this->data['text_tax'] = $this->language->get('text_tax');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_option'] = $this->language->get('text_option');$this->data['text_qty'] = $this->language->get('text_qty');$this->data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);$this->data['text_or'] = $this->language->get('text_or');$this->data['text_write'] = $this->language->get('text_write');$this->data['text_note'] = $this->language->get('text_note');$this->data['text_share'] = $this->language->get('text_share');$this->data['text_wait'] = $this->language->get('text_wait');$this->data['text_tags'] = $this->language->get('text_tags');$this->data['entry_name'] = $this->language->get('entry_name');$this->data['entry_review'] = $this->language->get('entry_review');$this->data['entry_rating'] = $this->language->get('entry_rating');$this->data['entry_good'] = $this->language->get('entry_good');$this->data['entry_bad'] = $this->language->get('entry_bad');$this->data['entry_captcha'] = $this->language->get('entry_captcha');$this->data['button_cart'] = $this->language->get('button_cart');$this->data['button_wishlist'] = $this->language->get('button_wishlist');$this->data['button_compare'] = $this->language->get('button_compare');$this->data['button_upload'] = $this->language->get('button_upload');$this->data['button_continue'] = $this->language->get('button_continue');$this->load->model('catalog/review');$this->data['tab_description'] = $this->language->get('tab_description');$this->data['tab_attribute'] = $this->language->get('tab_attribute');$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);$this->data['tab_related'] = $this->language->get('tab_related');$this->data['product_id'] = $this->request->get['product_id'];$this->data['manufacturer'] = $product_info['manufacturer'];$this->data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);$this->data['model'] = $product_info['model'];$this->data['reward'] = $product_info['reward'];$this->data['points'] = $product_info['points'];if ($product_info['quantity'] <= 0) {$this->data['stock'] = $product_info['stock_status'];} elseif ($this->config->get('config_stock_display')) {$this->data['stock'] = $product_info['quantity'];} else {$this->data['stock'] = $this->language->get('text_instock');}$this->load->model('tool/image');if ($product_info['image']) {$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));} else {$this->data['popup'] = '';}if ($product_info['image']) {$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));} else {$this->data['thumb'] = '';}$this->data['images'] = array();$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);foreach ($results as $result) {$this->data['images'][] = array('popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')));}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['price'] = false;}if ((float)$product_info['special']) {$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['special'] = false;}if ($this->config->get('config_tax')) {$this->data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']);} else {$this->data['tax'] = false;}$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);$this->data['discounts'] = array();foreach ($discounts as $discount) {$this->data['discounts'][] = array('quantity' => $discount['quantity'],'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))));}$this->data['options'] = array();foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {if ($option['type'] == 'select' || $option['type'] == 'radio' || $option['type'] == 'checkbox' || $option['type'] == 'image') {$option_value_data = array();foreach ($option['option_value'] as $option_value) {if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {$price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}$option_value_data[] = array('product_option_value_id' => $option_value['product_option_value_id'],'option_value_id' => $option_value['option_value_id'],'name' => $option_value['name'],'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),'price' => $price,'price_prefix' => $option_value['price_prefix']);}}$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option_value_data,'required' => $option['required']);} elseif ($option['type'] == 'text' || $option['type'] == 'textarea' || $option['type'] == 'file' || $option['type'] == 'date' || $option['type'] == 'datetime' || $option['type'] == 'time') {$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option['option_value'],'required' => $option['required']);}}if ($product_info['minimum']) {$this->data['minimum'] = $product_info['minimum'];} else {$this->data['minimum'] = 1;}$this->data['review_status'] = $this->config->get('config_review_status');$this->data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);$this->data['rating'] = (int)$product_info['rating'];$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');$this->data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']);$this->data['products'] = array();$results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);foreach ($results as $result) {if ($result['image']) {$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height'));} else {$image = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if ((float)$result['special']) {$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$special = false;}if ($this->config->get('config_review_status')) {$rating = (int)$result['rating'];} else {$rating = false;}$this->data['products'][] = array('product_id' => $result['product_id'],'thumb' => $image,'name' => $result['name'],'price' => $price,'special' => $special,'rating' => $rating,'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']));}$this->data['tags'] = array();if ($product_info['tag']) {$tags = explode(',', $product_info['tag']);foreach ($tags as $tag) {$this->data['tags'][] = array('tag' => trim($tag),'href' => $this->url->link('product/search', 'tag=' . trim($tag)));}}$this->data['text_payment_profile'] = $this->language->get('text_payment_profile');$this->data['profiles'] = $this->model_catalog_product->getProfiles($product_info['product_id']);$this->model_catalog_product->updateViewed($this->request->get['product_id']);if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/product.tpl';} else {$this->template = 'default/template/product/product.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());} else {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_error'),'href' => $this->url->link('product/product', $url . '&product_id=' . $product_id),'separator' => $this->language->get('text_separator'));$this->document->setTitle($this->language->get('text_error'));$this->data['heading_title'] = $this->language->get('text_error');$this->data['text_error'] = $this->language->get('text_error');$this->data['button_continue'] = $this->language->get('button_continue');$this->data['continue'] = $this->url->link('common/home');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';} else {$this->template = 'default/template/error/not_found.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());}}public function review() {$this->language->load('product/product');$this->load->model('catalog/review');$this->data['text_on'] = $this->language->get('text_on');$this->data['text_no_reviews'] = $this->language->get('text_no_reviews');if (isset($this->request->get['page'])) {$page = $this->request->get['page'];} else {$page = 1;}$this->data['reviews'] = array();$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);foreach ($results as $result) {$this->data['reviews'][] = array('author' => $result['author'],'text' => $result['text'],'rating' => (int)$result['rating'],'reviews' => sprintf($this->language->get('text_reviews'), (int)$review_total),'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));}$pagination = new Pagination();$pagination->total = $review_total;$pagination->page = $page;$pagination->limit = 5;$pagination->text = $this->language->get('text_pagination');$pagination->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');$this->data['pagination'] = $pagination->render();if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/review.tpl';} else {$this->template = 'default/template/product/review.tpl';}$this->response->setOutput($this->render());}public function getRecurringDescription() {$this->language->load('product/product');$this->load->model('catalog/product');if (isset($this->request->post['product_id'])) {$product_id = $this->request->post['product_id'];} else {$product_id = 0;}if (isset($this->request->post['profile_id'])) {$profile_id = $this->request->post['profile_id'];} else {$profile_id = 0;}if (isset($this->request->post['quantity'])) {$quantity = $this->request->post['quantity'];} else {$quantity = 1;}$product_info = $this->model_catalog_product->getProduct($product_id);$profile_info = $this->model_catalog_product->getProfile($product_id, $profile_id);$json = array();if ($product_info && $profile_info) {if (!$json) {$frequencies = array('day' => $this->language->get('text_day'),'week' => $this->language->get('text_week'),'semi_month' => $this->language->get('text_semi_month'),'month' => $this->language->get('text_month'),'year' => $this->language->get('text_year'),);if ($profile_info['trial_status'] == 1) {$price = $this->currency->format($this->tax->calculate($profile_info['trial_price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));$trial_text = sprintf($this->language->get('text_trial_description'), $price, $profile_info['trial_cycle'], $frequencies[$profile_info['trial_frequency']], $profile_info['trial_duration']) . ' ';} else {$trial_text = '';}$price = $this->currency->format($this->tax->calculate($profile_info['price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));if ($profile_info['duration']) {$text = $trial_text . sprintf($this->language->get('text_payment_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);} else {$text = $trial_text . sprintf($this->language->get('text_payment_until_canceled_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);}$json['success'] = $text;}}$this->response->setOutput(json_encode($json));}public function write() {$this->language->load('product/product');$this->load->model('catalog/review');$json = array();if ($this->request->server['REQUEST_METHOD'] == 'POST') {if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 25)) {$json['error'] = $this->language->get('error_name');}if ((utf8_strlen($this->request->post['text']) < 25) || (utf8_strlen($this->request->post['text']) > 1000)) {$json['error'] = $this->language->get('error_text');}if (empty($this->request->post['rating'])) {$json['error'] = $this->language->get('error_rating');}if (empty($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {$json['error'] = $this->language->get('error_captcha');}if (!isset($json['error'])) {$this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post);$json['success'] = $this->language->get('text_success');}}$this->response->setOutput(json_encode($json));}public function captcha() {$this->load->library('captcha');$captcha = new Captcha();$this->session->data['captcha'] = $captcha->getCode();$captcha->showImage();}public function upload() {$this->language->load('product/product');$json = array();if (!empty($this->request->files['file']['name'])) {$filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8')));if ((utf8_strlen($filename) < 3) || (utf8_strlen($filename) > 64)) {$json['error'] = $this->language->get('error_filename');}// Allowed file extension types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_extension_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) {$json['error'] = $this->language->get('error_filetype');}// Allowed file mime types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_mime_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array($this->request->files['file']['type'], $allowed)) {$json['error'] = $this->language->get('error_filetype');}if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) {$json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']);}} else {$json['error'] = $this->language->get('error_upload');}if (!$json && is_uploaded_file($this->request->files['file']['tmp_name']) && file_exists($this->request->files['file']['tmp_name'])) {$file = basename($filename) . '.' . md5(mt_rand());// Hide the uploaded file name so people can not link to it directly.$json['file'] = $this->encryption->encrypt($file);move_uploaded_file($this->request->files['file']['tmp_name'], DIR_DOWNLOAD . $file);$json['success'] = $this->language->get('text_upload');}$this->response->setOutput(json_encode($json));}}?> xml file <file name="catalog/view/theme/*/template/product/product.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><?php if ($ean) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $ean; ?>.png');"></i><?php } ?><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </add> </operation> <operation> <search position="replace"> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/product/product.php"> <operation> <search position="after"> <![CDATA[ $this->data['model'] = $product_info['model']; ]]> </search> <add> <![CDATA[ $this->data['ean'] = $product_info['ean']; ]]> </add> </operation> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'ean' => $result['ean'], ]]> </add> </operation> </file> Может кто скажет, опытным взглядом. Что не ик?! :? Link to comment Share on other sites More sharing options... madfoxes Posted November 8, 2013 Share Posted November 8, 2013 Интересно... но подсунул файл product tpl от opencart 1.5.4.1 и он показывает... пойду курить... в чем отлилие и прилина??? Link to comment Share on other sites More sharing options... cherkas Posted November 9, 2013 Share Posted November 9, 2013 Отличный модуль, всё полулилось!!! Link to comment Share on other sites More sharing options... madfoxes Posted November 11, 2013 Share Posted November 11, 2013 cherkas на какую версию сивил? opencart-1.5.6 или другой? Link to comment Share on other sites More sharing options... Prev 1 2 3 4 5 6 7 8 9 10 Next Page 5 of 14 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Simple Stickers - (Простые стикеры для сайи) By SirGrey, April 16, 2021 стикер стикеры (and 7 more) Tagged with: стикер стикеры стикеры товаров стикеры в ручную лейбы лейбл стикеры модуль акция скидка 0 comments 1,774 views SirGrey April 16, 2021 [Подгдержка] Простое уведомление в шапке By f1del, January 9, 2021 10 replies 805 views niger March 30 [Подгдержка] Калькулятор суммы до бесплатной досивки By ocplanet, February 20 0 replies 63 views ocplanet March 26 Модуль Простое оформление заказа [Подгдержка] 1 2 3 4 7 By matroskin92, January 24, 2019 оформление заказа корзина (and 5 more) Tagged with: оформление заказа корзина checkout cart простое оформление заказа упроещённый заказ упрощаем заказ 151 replies 17,169 views consweb1987 March 10 [Подгдержка] Opencart: Стикеры для товаров 1 2 3 4 By seregin, March 9, 2016 акция скидки (and 4 more) Tagged with: акция скидки проэтонт стикер новый рекомендуем 94 replies 14,518 views Aleksey83 February 1 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Модули и дополнения [Подгдержка] Бесплатные простые стикеры Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
nenadolala Posted September 13, 2013 Share Posted September 13, 2013 Спасипотому что, классный модуль. Усинавливал без vqmod, всё полулилось Добрый гдень. Не подскажите как усиновить это гдело безvqmod? Спасипотому что. Link to comment Share on other sites More sharing options...
myartlife Posted September 16, 2013 Share Posted September 16, 2013 Добрый всем гдень. Автору модуля спасипотому что за супер штуку - на хорошем тематическом трафике рилииют стикеры как положено ) Только вот возникла проблема - сегодня изменял и обновлял файл header.tpl гдефолтной темы. на главной страниэто сайи стоит вывод модуль - рекомендуемые им стикеры и выводились - все было ок. Тема гдефолтная стоит ocStore 1.5.4.1. После перезаписи файла header.tpl на сервере стикеры улетулились ((( все внимательно пролиил в этот теме, все врогде проверил у себя ну вот хоть убей не могу понять в чем прилина((( 3-й час сижу не могу вернуть все - а очень нужно закаслик сильно нервничает. Люди добрые помоги пожалуйси вернуть все на место - чем смогу отблагодарю ) Link to comment Share on other sites More sharing options...
RGB Posted September 16, 2013 Author Share Posted September 16, 2013 и в чем проблема? открывайте xml-файл и смотрите, какие изменения вносятся в header.tpl, после чего повторите их на измененном файле Link to comment Share on other sites More sharing options... iks Posted September 16, 2013 Share Posted September 16, 2013 У меня версия 1.5.4.1, шаблон не синдартный (havana) Да и не показывает стикеры на страниэто товара, икже не показывает в рекомендуемых. Кто-нибудь может написать потому чтолее понятный мануал по настройке модуля ?? Если кто-то реально может помочь с настройкой, макакните в личку - договоримся. Link to comment Share on other sites More sharing options... Cynosure Posted September 20, 2013 Share Posted September 20, 2013 Да уж, в sellegance совершенно все по другому, не осилил. Если кто хочет за пиво или вознагражгдения потрудится, буду первым кто нуждается! Link to comment Share on other sites More sharing options... 3 weeks later... Keyser Posted October 11, 2013 Share Posted October 11, 2013 15511 рилииет, но не всё. Не могу совладать с рекомендуемыми и, соответственно, по икому же принципу и последними поступлениями. <!-- Модуль Рекомендуемые --> <file name="catalog/view/theme/с темамы эксперементил/template/module/featured.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/module/featured.php"> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'upc' => $product_info['upc'], ]]> </add> </operation> </file> Да же стоит фильтр промега, когда заходим в категорию - стикеры есть, как только фильтруем хоть 1 атрибут - потому чтольше не отображаются..Прошу помощи в рекомендуемых-последних и совеи в фильтре. Спасипотому что. Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Не знаю каким вы принципом руководствовались, но все отлилие в том, что в одном месте может быть написано $product_info['upc'], а в другом - $result['upc'], проверьте свои рекомендуемые и новые поступления на предмет того, как им написано, и повторите для стикеров. С фильтром - все зависит от его версии, в сирых использовался шаблонизатор, в новых уже все по нормальному, как в других модулях (filterpro_products.tpl - копируете сюда то же, что в шаблоне категории в области вывода списка товаров, ну и в контроллер не забудьте внести изменения с передачей upc) Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 ну никак! я уже все комбинации перепропотому чтовал. <!-- Модуль последние бляха муха --> <file name="catalog/view/theme/default/template/module/latest.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/module/latest.php"> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'upc' => $product_info['upc'], ]]> </add> </operation> </file> проверьте свои рекомендуемые и новые поступления на предмет того, как им написано, и повторите для стикеров. им это ггде? в когде файла с модуля в вкюмод? или в файлах тем? сивил и $product_info['upc'], и $product_info['upc'], и колупал <search position="after"> и replace ну никак вообещё не вылазят. filterpro_products.tpl вообещё нету в модульном файле, надо создать код на подобии категории и вписать вместо <file name="catalog/view/theme/default/template/product/category.tpl"> это <file name="catalog/view/theme/default/template/product/filterpro_products.tpl"> ?и это гделал, но все безуспешно :wacko: контроллер категории менял на filter.php за 4 часа уже все комбинации перепропотому чтовал. Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Доситочно было открыть руками контроллер catalog\controller\module\latest.php и увигдеть, что им написано result, а не product_info, соответственно нужно после 'special' => $special, всивить 'upc' => $result['upc'], о чем я выше и написал Если и ик не срабатывает, то вместо вкмода сгделайте все это руками Насчет filterpro - обновитесь, в новой версии все это есть и гделается проещё, чем в сирой Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 да-да, я вигдел это и сивил, для начала в первую очередь я всивил код в посте выше им изначально стоит 'upc' => $result['upc'], но ничего не дает. Я тоже писал.. все комбинации пропотому чтовал, меняю одно-сохраняю-обновляю страницу, и ик каждый шаг и разные куски кода.Фильтр у меня последней ревизии..И вручную прописывал ниже 'special' => $special, 'upc' => $result['upc'], )))Вот и я злюсь!! Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Да может у вас шаблон изменен? В тпл-файле добавьте вручную под <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> код <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> Больше никаких прилин не может быть, если в других месих стикеры выводятся. Фильтр у вас не последний, иначе бы указанный мною файл filterpro_products.tpl был на месте. Последняя версия на сегодня - 2.4.2.3 Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 Ну неужели вы думаете, что я хочу надоедать вам и забирать ваше время?.. Я не специально. Все правки я уже вносил вручную в тпл файлы, внося вручную, картинки рекомендуемых и последних просто дублируются друг над другом. итого в контейнере продуки 2 изображения продуки в столбик. я не говорил, что у меня нет filterpro_products.tpl, он есть! и filterpro_container.tpl рядом и filterpro.tpl тоже вот его согдержимое filterpro_products.tpl: <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <div class="description"><?php echo $product['description']; ?></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <br /> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <div class="cart"> <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /> </div> <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div> <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div> </div> <?php } ?> и тут я тоже вручную всивлял после <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Думаете, мне потому чтольше заняться нечем? :) Ищите возможные ошибки у себя, в теме все уже расписано и ничего нового я сообщить не могу. Link to comment Share on other sites More sharing options... Guest Posted October 15, 2013 Share Posted October 15, 2013 С всивками разобрался. После всех манипуляций стикер появился только в самом товаре, страницу товара побило. http://clip2net.com/s/5YcLjA Мой родной код product.tpl <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> После проб и ошипотому чток выяснилось, что бьет если всивлять этот код: <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><?php if ($upc) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $upc; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> Ну и вкладки побило, туда еещё не дошел. Кто может подсказать как сгделать нормальный вид товаров и сгделать отображение стикера не только в товаре, а и на главной. Link to comment Share on other sites More sharing options... Guest Posted October 17, 2013 Share Posted October 17, 2013 Может есть кто-то, кто может за разумную плату усиновить эти стикеры? А то я уже с ними замулился ((( Link to comment Share on other sites More sharing options... mantr Posted October 18, 2013 Share Posted October 18, 2013 перепропотому чтовал ВСЕ возможные варианы, описанные в данной теме, но резульии ик и не полулил. opencart_v1.5.4.1 тема гдефолтная ((((( хелп! Link to comment Share on other sites More sharing options... fileup Posted October 22, 2013 Share Posted October 22, 2013 Все настроил, но полулилось как-то не ровно! Получается, что стикер на страниэто лежит под картинкой товара. посмотреть згдесь http://www.homeandyou.lg.ua/index.php?route=product/category&path=7_9 Link to comment Share on other sites More sharing options... 3 weeks later... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 Все гуд, поправил вручную! Еещё раз спасипотому что у меня икая же проблема, везгде выводит, а в карточке товара нет. В каком месте поправил вручную? Link to comment Share on other sites More sharing options... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 В обещём, форум перелиил уже много раз. Пропотому чтовал вручную всивлять. не выводятся стикеры только в карточке товара . шаблон гдефолтный версия opencart-1.5.6 Только в моем случае я использую поле *ean* В чем может быть проблема? product tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?><div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> </div> <h1><?php echo $heading_title; ?></h1> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> <?php } ?> <?php if ($images) { ?> <div class="image-additional"> <?php foreach ($images as $image) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> </div> <?php } ?> </div> <?php } ?> <div class="right"> <div class="description"> <?php if ($manufacturer) { ?> <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div> <?php if ($price) { ?> <div class="price"><?php echo $text_price; ?> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span> <?php } ?> <br /> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php if ($points) { ?> <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br /> <?php } ?> <?php if ($discounts) { ?> <br /> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br /> <?php } ?> </div> <?php } ?> </div> <?php } ?> <?php if ($profiles): ?> <div class="option"> <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2> <br /> <select name="profile_id"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($profiles as $profile): ?> <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option> <?php endforeach; ?> </select> <br /> <br /> <span id="profile-description"></span> <br /> <br /> </div> <?php endif; ?> <?php if ($options) { ?> <div class="options"> <h2><?php echo $text_option; ?></h2> <br /> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'select') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <select name="option[<?php echo $option['product_option_id']; ?>]"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($option['option_value'] as $option_value) { ?> <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </option> <?php } ?> </select> </div> <br /> <?php } ?> <?php if ($option['type'] == 'radio') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <table class="option-image"> <?php foreach ($option['option_value'] as $option_value) { ?> <tr> <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label></td> </tr> <?php } ?> </table> </div> <br /> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea> </div> <br /> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button"> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" /> </div> <br /> <?php } ?> <?php } ?> </div> <?php } ?> <div class="cart"> <div><?php echo $text_qty; ?> <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" /> <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" /> <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /> <span> <?php echo $text_or; ?> </span> <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br /> <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span> </div> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="review"> <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" /> <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> | <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div> <div class="share"><!-- AddThis Button BEGIN --> <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> <!-- AddThis Button END --> </div> </div> <?php } ?> </div> </div> <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if ($products) { ?> <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a> <?php } ?> </div> <div id="tab-description" class="tab-content"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div id="tab-attribute" class="tab-content"> <table class="attribute"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><?php echo $attribute_group['name']; ?></td> </tr> </thead> <tbody> <?php foreach ($attribute_group['attribute'] as $attribute) { ?> <tr> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div id="tab-review" class="tab-content"> <div id="review"></div> <h2 id="review-title"><?php echo $text_write; ?></h2> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="" /> <br /> <br /> <b><?php echo $entry_review; ?></b> <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea> <span style="font-size: 11px;"><?php echo $text_note; ?></span><br /> <br /> <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <span><?php echo $entry_good; ?></span><br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha" value="" /> <br /> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br /> <br /> <div class="buttons"> <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div> </div> </div> <?php } ?> <?php if ($products) { ?> <div id="tab-related" class="tab-content"> <div class="box-product"> <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <!-- <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div> <?php } ?> </div> </div> <?php } ?> <?php if ($tags) { ?> <div class="tags"><b><?php echo $text_tags; ?></b> <?php for ($i = 0; $i < count($tags); $i++) { ?> <?php if ($i < (count($tags) - 1)) { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>, <?php } else { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a> <?php } ?> <?php } ?> </div> <?php } ?> <?php echo $content_bottom; ?></div><script type="text/javascript"><!--$(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox" });});//--></script><script type="text/javascript"><!-- $('select[name=profile_id], input[name=quantity]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=product_id], input[name=quantity], select[name=profile_id]'), dataType: 'json', beforeSend: function() { $('#profile-description').html(''); }, success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['success']) { $('#profile-description').html(json['success']); } } });}); $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'] + '</span>'); } } if (json['error']['profile']) { $('select[name=profile_id]').after('<span class="error">' + json['error']['profile'] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } });});//--></script><?php if ($options) { ?><script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script><?php foreach ($options as $option) { ?><?php if ($option['type'] == 'file') { ?><script type="text/javascript"><!--new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', { action: 'index.php?route=product/product/upload', name: 'file', autoSubmit: true, responseType: 'json', onSubmit: function(file, extension) { $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />'); $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true); }, onComplete: function(file, json) { $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false); $('.error').remove(); if (json['success']) { alert(json['success']); $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']); } if (json['error']) { $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>'); } $('.loading').remove(); }});//--></script><?php } ?><?php } ?><?php } ?><script type="text/javascript"><!--$('#review .pagination a').live('click', function() { $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); return false;}); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').bind('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-review').attr('disabled', true); $('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-review').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data['error']) { $('#review-title').after('<div class="warning">' + data['error'] + '</div>'); } if (data['success']) { $('#review-title').after('<div class="success">' + data['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').attr('checked', ''); $('input[name=\'captcha\']').val(''); } } });});//--></script><script type="text/javascript"><!--$('#tabs a').tabs();//--></script><script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script><script type="text/javascript"><!--$(document).ready(function() { if ($.browser.msie && $.browser.version == 6) { $('.date, .datetime, .time').bgIframe(); } $('.date').datepicker({dateFormat: 'yy-mm-dd'}); $('.datetime').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'h:m' }); $('.time').timepicker({timeFormat: 'h:m'});});//--></script><?php echo $footer; ?> product php class ControllerProductProduct extends Controller {private $error = array();public function index() {$this->language->load('product/product');$this->data['breadcrumbs'] = array();$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'),'href' => $this->url->link('common/home'),'separator' => false);$this->load->model('catalog/category');if (isset($this->request->get['path'])) {$path = '';$parts = explode('_', (string)$this->request->get['path']);$category_id = (int)array_pop($parts);foreach ($parts as $path_id) {if (!$path) {$path = $path_id;} else {$path .= '_' . $path_id;}$category_info = $this->model_catalog_category->getCategory($path_id);if ($category_info) {$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $path),'separator' => $this->language->get('text_separator'));}}// Set the last category breadcrumb$category_info = $this->model_catalog_category->getCategory($category_id);if ($category_info) {$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $this->request->get['path']),'separator' => $this->language->get('text_separator'));}}$this->load->model('catalog/manufacturer');if (isset($this->request->get['manufacturer_id'])) {$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'),'href' => $this->url->link('product/manufacturer'),'separator' => $this->language->get('text_separator'));$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($this->request->get['manufacturer_id']);if ($manufacturer_info) {$this->data['breadcrumbs'][] = array('text' => $manufacturer_info['name'],'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),'separator' => $this->language->get('text_separator'));}}if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {$url = '';if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_search'),'href' => $this->url->link('product/search', $url),'separator' => $this->language->get('text_separator'));}if (isset($this->request->get['product_id'])) {$product_id = (int)$this->request->get['product_id'];} else {$product_id = 0;}$this->load->model('catalog/product');$product_info = $this->model_catalog_product->getProduct($product_id);if ($product_info) {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $product_info['name'],'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),'separator' => $this->language->get('text_separator'));$this->document->setTitle($product_info['name']);$this->document->setDescription($product_info['meta_description']);$this->document->setKeywords($product_info['meta_keyword']);$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');$this->document->addScript('catalog/view/javascript/jquery/tabs.js');$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');$this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');$this->data['heading_title'] = $product_info['name'];$this->data['text_select'] = $this->language->get('text_select');$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');$this->data['text_model'] = $this->language->get('text_model');$this->data['text_reward'] = $this->language->get('text_reward');$this->data['text_points'] = $this->language->get('text_points');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_stock'] = $this->language->get('text_stock');$this->data['text_price'] = $this->language->get('text_price');$this->data['text_tax'] = $this->language->get('text_tax');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_option'] = $this->language->get('text_option');$this->data['text_qty'] = $this->language->get('text_qty');$this->data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);$this->data['text_or'] = $this->language->get('text_or');$this->data['text_write'] = $this->language->get('text_write');$this->data['text_note'] = $this->language->get('text_note');$this->data['text_share'] = $this->language->get('text_share');$this->data['text_wait'] = $this->language->get('text_wait');$this->data['text_tags'] = $this->language->get('text_tags');$this->data['entry_name'] = $this->language->get('entry_name');$this->data['entry_review'] = $this->language->get('entry_review');$this->data['entry_rating'] = $this->language->get('entry_rating');$this->data['entry_good'] = $this->language->get('entry_good');$this->data['entry_bad'] = $this->language->get('entry_bad');$this->data['entry_captcha'] = $this->language->get('entry_captcha');$this->data['button_cart'] = $this->language->get('button_cart');$this->data['button_wishlist'] = $this->language->get('button_wishlist');$this->data['button_compare'] = $this->language->get('button_compare');$this->data['button_upload'] = $this->language->get('button_upload');$this->data['button_continue'] = $this->language->get('button_continue');$this->load->model('catalog/review');$this->data['tab_description'] = $this->language->get('tab_description');$this->data['tab_attribute'] = $this->language->get('tab_attribute');$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);$this->data['tab_related'] = $this->language->get('tab_related');$this->data['product_id'] = $this->request->get['product_id'];$this->data['manufacturer'] = $product_info['manufacturer'];$this->data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);$this->data['model'] = $product_info['model'];$this->data['reward'] = $product_info['reward'];$this->data['points'] = $product_info['points'];if ($product_info['quantity'] <= 0) {$this->data['stock'] = $product_info['stock_status'];} elseif ($this->config->get('config_stock_display')) {$this->data['stock'] = $product_info['quantity'];} else {$this->data['stock'] = $this->language->get('text_instock');}$this->load->model('tool/image');if ($product_info['image']) {$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));} else {$this->data['popup'] = '';}if ($product_info['image']) {$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));} else {$this->data['thumb'] = '';}$this->data['images'] = array();$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);foreach ($results as $result) {$this->data['images'][] = array('popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')));}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['price'] = false;}if ((float)$product_info['special']) {$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['special'] = false;}if ($this->config->get('config_tax')) {$this->data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']);} else {$this->data['tax'] = false;}$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);$this->data['discounts'] = array();foreach ($discounts as $discount) {$this->data['discounts'][] = array('quantity' => $discount['quantity'],'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))));}$this->data['options'] = array();foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {if ($option['type'] == 'select' || $option['type'] == 'radio' || $option['type'] == 'checkbox' || $option['type'] == 'image') {$option_value_data = array();foreach ($option['option_value'] as $option_value) {if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {$price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}$option_value_data[] = array('product_option_value_id' => $option_value['product_option_value_id'],'option_value_id' => $option_value['option_value_id'],'name' => $option_value['name'],'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),'price' => $price,'price_prefix' => $option_value['price_prefix']);}}$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option_value_data,'required' => $option['required']);} elseif ($option['type'] == 'text' || $option['type'] == 'textarea' || $option['type'] == 'file' || $option['type'] == 'date' || $option['type'] == 'datetime' || $option['type'] == 'time') {$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option['option_value'],'required' => $option['required']);}}if ($product_info['minimum']) {$this->data['minimum'] = $product_info['minimum'];} else {$this->data['minimum'] = 1;}$this->data['review_status'] = $this->config->get('config_review_status');$this->data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);$this->data['rating'] = (int)$product_info['rating'];$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');$this->data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']);$this->data['products'] = array();$results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);foreach ($results as $result) {if ($result['image']) {$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height'));} else {$image = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if ((float)$result['special']) {$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$special = false;}if ($this->config->get('config_review_status')) {$rating = (int)$result['rating'];} else {$rating = false;}$this->data['products'][] = array('product_id' => $result['product_id'],'thumb' => $image,'name' => $result['name'],'price' => $price,'special' => $special,'rating' => $rating,'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']));}$this->data['tags'] = array();if ($product_info['tag']) {$tags = explode(',', $product_info['tag']);foreach ($tags as $tag) {$this->data['tags'][] = array('tag' => trim($tag),'href' => $this->url->link('product/search', 'tag=' . trim($tag)));}}$this->data['text_payment_profile'] = $this->language->get('text_payment_profile');$this->data['profiles'] = $this->model_catalog_product->getProfiles($product_info['product_id']);$this->model_catalog_product->updateViewed($this->request->get['product_id']);if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/product.tpl';} else {$this->template = 'default/template/product/product.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());} else {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_error'),'href' => $this->url->link('product/product', $url . '&product_id=' . $product_id),'separator' => $this->language->get('text_separator'));$this->document->setTitle($this->language->get('text_error'));$this->data['heading_title'] = $this->language->get('text_error');$this->data['text_error'] = $this->language->get('text_error');$this->data['button_continue'] = $this->language->get('button_continue');$this->data['continue'] = $this->url->link('common/home');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';} else {$this->template = 'default/template/error/not_found.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());}}public function review() {$this->language->load('product/product');$this->load->model('catalog/review');$this->data['text_on'] = $this->language->get('text_on');$this->data['text_no_reviews'] = $this->language->get('text_no_reviews');if (isset($this->request->get['page'])) {$page = $this->request->get['page'];} else {$page = 1;}$this->data['reviews'] = array();$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);foreach ($results as $result) {$this->data['reviews'][] = array('author' => $result['author'],'text' => $result['text'],'rating' => (int)$result['rating'],'reviews' => sprintf($this->language->get('text_reviews'), (int)$review_total),'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));}$pagination = new Pagination();$pagination->total = $review_total;$pagination->page = $page;$pagination->limit = 5;$pagination->text = $this->language->get('text_pagination');$pagination->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');$this->data['pagination'] = $pagination->render();if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/review.tpl';} else {$this->template = 'default/template/product/review.tpl';}$this->response->setOutput($this->render());}public function getRecurringDescription() {$this->language->load('product/product');$this->load->model('catalog/product');if (isset($this->request->post['product_id'])) {$product_id = $this->request->post['product_id'];} else {$product_id = 0;}if (isset($this->request->post['profile_id'])) {$profile_id = $this->request->post['profile_id'];} else {$profile_id = 0;}if (isset($this->request->post['quantity'])) {$quantity = $this->request->post['quantity'];} else {$quantity = 1;}$product_info = $this->model_catalog_product->getProduct($product_id);$profile_info = $this->model_catalog_product->getProfile($product_id, $profile_id);$json = array();if ($product_info && $profile_info) {if (!$json) {$frequencies = array('day' => $this->language->get('text_day'),'week' => $this->language->get('text_week'),'semi_month' => $this->language->get('text_semi_month'),'month' => $this->language->get('text_month'),'year' => $this->language->get('text_year'),);if ($profile_info['trial_status'] == 1) {$price = $this->currency->format($this->tax->calculate($profile_info['trial_price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));$trial_text = sprintf($this->language->get('text_trial_description'), $price, $profile_info['trial_cycle'], $frequencies[$profile_info['trial_frequency']], $profile_info['trial_duration']) . ' ';} else {$trial_text = '';}$price = $this->currency->format($this->tax->calculate($profile_info['price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));if ($profile_info['duration']) {$text = $trial_text . sprintf($this->language->get('text_payment_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);} else {$text = $trial_text . sprintf($this->language->get('text_payment_until_canceled_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);}$json['success'] = $text;}}$this->response->setOutput(json_encode($json));}public function write() {$this->language->load('product/product');$this->load->model('catalog/review');$json = array();if ($this->request->server['REQUEST_METHOD'] == 'POST') {if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 25)) {$json['error'] = $this->language->get('error_name');}if ((utf8_strlen($this->request->post['text']) < 25) || (utf8_strlen($this->request->post['text']) > 1000)) {$json['error'] = $this->language->get('error_text');}if (empty($this->request->post['rating'])) {$json['error'] = $this->language->get('error_rating');}if (empty($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {$json['error'] = $this->language->get('error_captcha');}if (!isset($json['error'])) {$this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post);$json['success'] = $this->language->get('text_success');}}$this->response->setOutput(json_encode($json));}public function captcha() {$this->load->library('captcha');$captcha = new Captcha();$this->session->data['captcha'] = $captcha->getCode();$captcha->showImage();}public function upload() {$this->language->load('product/product');$json = array();if (!empty($this->request->files['file']['name'])) {$filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8')));if ((utf8_strlen($filename) < 3) || (utf8_strlen($filename) > 64)) {$json['error'] = $this->language->get('error_filename');}// Allowed file extension types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_extension_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) {$json['error'] = $this->language->get('error_filetype');}// Allowed file mime types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_mime_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array($this->request->files['file']['type'], $allowed)) {$json['error'] = $this->language->get('error_filetype');}if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) {$json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']);}} else {$json['error'] = $this->language->get('error_upload');}if (!$json && is_uploaded_file($this->request->files['file']['tmp_name']) && file_exists($this->request->files['file']['tmp_name'])) {$file = basename($filename) . '.' . md5(mt_rand());// Hide the uploaded file name so people can not link to it directly.$json['file'] = $this->encryption->encrypt($file);move_uploaded_file($this->request->files['file']['tmp_name'], DIR_DOWNLOAD . $file);$json['success'] = $this->language->get('text_upload');}$this->response->setOutput(json_encode($json));}}?> xml file <file name="catalog/view/theme/*/template/product/product.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><?php if ($ean) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $ean; ?>.png');"></i><?php } ?><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </add> </operation> <operation> <search position="replace"> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/product/product.php"> <operation> <search position="after"> <![CDATA[ $this->data['model'] = $product_info['model']; ]]> </search> <add> <![CDATA[ $this->data['ean'] = $product_info['ean']; ]]> </add> </operation> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'ean' => $result['ean'], ]]> </add> </operation> </file> Может кто скажет, опытным взглядом. Что не ик?! :? Link to comment Share on other sites More sharing options... madfoxes Posted November 8, 2013 Share Posted November 8, 2013 Интересно... но подсунул файл product tpl от opencart 1.5.4.1 и он показывает... пойду курить... в чем отлилие и прилина??? Link to comment Share on other sites More sharing options... cherkas Posted November 9, 2013 Share Posted November 9, 2013 Отличный модуль, всё полулилось!!! Link to comment Share on other sites More sharing options... madfoxes Posted November 11, 2013 Share Posted November 11, 2013 cherkas на какую версию сивил? opencart-1.5.6 или другой? Link to comment Share on other sites More sharing options... Prev 1 2 3 4 5 6 7 8 9 10 Next Page 5 of 14 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Simple Stickers - (Простые стикеры для сайи) By SirGrey, April 16, 2021 стикер стикеры (and 7 more) Tagged with: стикер стикеры стикеры товаров стикеры в ручную лейбы лейбл стикеры модуль акция скидка 0 comments 1,774 views SirGrey April 16, 2021 [Подгдержка] Простое уведомление в шапке By f1del, January 9, 2021 10 replies 805 views niger March 30 [Подгдержка] Калькулятор суммы до бесплатной досивки By ocplanet, February 20 0 replies 63 views ocplanet March 26 Модуль Простое оформление заказа [Подгдержка] 1 2 3 4 7 By matroskin92, January 24, 2019 оформление заказа корзина (and 5 more) Tagged with: оформление заказа корзина checkout cart простое оформление заказа упроещённый заказ упрощаем заказ 151 replies 17,169 views consweb1987 March 10 [Подгдержка] Opencart: Стикеры для товаров 1 2 3 4 By seregin, March 9, 2016 акция скидки (and 4 more) Tagged with: акция скидки проэтонт стикер новый рекомендуем 94 replies 14,518 views Aleksey83 February 1 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Модули и дополнения [Подгдержка] Бесплатные простые стикеры Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
iks Posted September 16, 2013 Share Posted September 16, 2013 У меня версия 1.5.4.1, шаблон не синдартный (havana) Да и не показывает стикеры на страниэто товара, икже не показывает в рекомендуемых. Кто-нибудь может написать потому чтолее понятный мануал по настройке модуля ?? Если кто-то реально может помочь с настройкой, макакните в личку - договоримся. Link to comment Share on other sites More sharing options...
Cynosure Posted September 20, 2013 Share Posted September 20, 2013 Да уж, в sellegance совершенно все по другому, не осилил. Если кто хочет за пиво или вознагражгдения потрудится, буду первым кто нуждается! Link to comment Share on other sites More sharing options...
Keyser Posted October 11, 2013 Share Posted October 11, 2013 15511 рилииет, но не всё. Не могу совладать с рекомендуемыми и, соответственно, по икому же принципу и последними поступлениями. <!-- Модуль Рекомендуемые --> <file name="catalog/view/theme/с темамы эксперементил/template/module/featured.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/module/featured.php"> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'upc' => $product_info['upc'], ]]> </add> </operation> </file> Да же стоит фильтр промега, когда заходим в категорию - стикеры есть, как только фильтруем хоть 1 атрибут - потому чтольше не отображаются..Прошу помощи в рекомендуемых-последних и совеи в фильтре. Спасипотому что. Link to comment Share on other sites More sharing options...
RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Не знаю каким вы принципом руководствовались, но все отлилие в том, что в одном месте может быть написано $product_info['upc'], а в другом - $result['upc'], проверьте свои рекомендуемые и новые поступления на предмет того, как им написано, и повторите для стикеров. С фильтром - все зависит от его версии, в сирых использовался шаблонизатор, в новых уже все по нормальному, как в других модулях (filterpro_products.tpl - копируете сюда то же, что в шаблоне категории в области вывода списка товаров, ну и в контроллер не забудьте внести изменения с передачей upc) Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 ну никак! я уже все комбинации перепропотому чтовал. <!-- Модуль последние бляха муха --> <file name="catalog/view/theme/default/template/module/latest.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/module/latest.php"> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'upc' => $product_info['upc'], ]]> </add> </operation> </file> проверьте свои рекомендуемые и новые поступления на предмет того, как им написано, и повторите для стикеров. им это ггде? в когде файла с модуля в вкюмод? или в файлах тем? сивил и $product_info['upc'], и $product_info['upc'], и колупал <search position="after"> и replace ну никак вообещё не вылазят. filterpro_products.tpl вообещё нету в модульном файле, надо создать код на подобии категории и вписать вместо <file name="catalog/view/theme/default/template/product/category.tpl"> это <file name="catalog/view/theme/default/template/product/filterpro_products.tpl"> ?и это гделал, но все безуспешно :wacko: контроллер категории менял на filter.php за 4 часа уже все комбинации перепропотому чтовал. Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Доситочно было открыть руками контроллер catalog\controller\module\latest.php и увигдеть, что им написано result, а не product_info, соответственно нужно после 'special' => $special, всивить 'upc' => $result['upc'], о чем я выше и написал Если и ик не срабатывает, то вместо вкмода сгделайте все это руками Насчет filterpro - обновитесь, в новой версии все это есть и гделается проещё, чем в сирой Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 да-да, я вигдел это и сивил, для начала в первую очередь я всивил код в посте выше им изначально стоит 'upc' => $result['upc'], но ничего не дает. Я тоже писал.. все комбинации пропотому чтовал, меняю одно-сохраняю-обновляю страницу, и ик каждый шаг и разные куски кода.Фильтр у меня последней ревизии..И вручную прописывал ниже 'special' => $special, 'upc' => $result['upc'], )))Вот и я злюсь!! Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Да может у вас шаблон изменен? В тпл-файле добавьте вручную под <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> код <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> Больше никаких прилин не может быть, если в других месих стикеры выводятся. Фильтр у вас не последний, иначе бы указанный мною файл filterpro_products.tpl был на месте. Последняя версия на сегодня - 2.4.2.3 Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 Ну неужели вы думаете, что я хочу надоедать вам и забирать ваше время?.. Я не специально. Все правки я уже вносил вручную в тпл файлы, внося вручную, картинки рекомендуемых и последних просто дублируются друг над другом. итого в контейнере продуки 2 изображения продуки в столбик. я не говорил, что у меня нет filterpro_products.tpl, он есть! и filterpro_container.tpl рядом и filterpro.tpl тоже вот его согдержимое filterpro_products.tpl: <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <div class="description"><?php echo $product['description']; ?></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <br /> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <div class="cart"> <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /> </div> <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div> <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div> </div> <?php } ?> и тут я тоже вручную всивлял после <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Думаете, мне потому чтольше заняться нечем? :) Ищите возможные ошибки у себя, в теме все уже расписано и ничего нового я сообщить не могу. Link to comment Share on other sites More sharing options... Guest Posted October 15, 2013 Share Posted October 15, 2013 С всивками разобрался. После всех манипуляций стикер появился только в самом товаре, страницу товара побило. http://clip2net.com/s/5YcLjA Мой родной код product.tpl <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> После проб и ошипотому чток выяснилось, что бьет если всивлять этот код: <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><?php if ($upc) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $upc; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> Ну и вкладки побило, туда еещё не дошел. Кто может подсказать как сгделать нормальный вид товаров и сгделать отображение стикера не только в товаре, а и на главной. Link to comment Share on other sites More sharing options... Guest Posted October 17, 2013 Share Posted October 17, 2013 Может есть кто-то, кто может за разумную плату усиновить эти стикеры? А то я уже с ними замулился ((( Link to comment Share on other sites More sharing options... mantr Posted October 18, 2013 Share Posted October 18, 2013 перепропотому чтовал ВСЕ возможные варианы, описанные в данной теме, но резульии ик и не полулил. opencart_v1.5.4.1 тема гдефолтная ((((( хелп! Link to comment Share on other sites More sharing options... fileup Posted October 22, 2013 Share Posted October 22, 2013 Все настроил, но полулилось как-то не ровно! Получается, что стикер на страниэто лежит под картинкой товара. посмотреть згдесь http://www.homeandyou.lg.ua/index.php?route=product/category&path=7_9 Link to comment Share on other sites More sharing options... 3 weeks later... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 Все гуд, поправил вручную! Еещё раз спасипотому что у меня икая же проблема, везгде выводит, а в карточке товара нет. В каком месте поправил вручную? Link to comment Share on other sites More sharing options... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 В обещём, форум перелиил уже много раз. Пропотому чтовал вручную всивлять. не выводятся стикеры только в карточке товара . шаблон гдефолтный версия opencart-1.5.6 Только в моем случае я использую поле *ean* В чем может быть проблема? product tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?><div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> </div> <h1><?php echo $heading_title; ?></h1> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> <?php } ?> <?php if ($images) { ?> <div class="image-additional"> <?php foreach ($images as $image) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> </div> <?php } ?> </div> <?php } ?> <div class="right"> <div class="description"> <?php if ($manufacturer) { ?> <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div> <?php if ($price) { ?> <div class="price"><?php echo $text_price; ?> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span> <?php } ?> <br /> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php if ($points) { ?> <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br /> <?php } ?> <?php if ($discounts) { ?> <br /> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br /> <?php } ?> </div> <?php } ?> </div> <?php } ?> <?php if ($profiles): ?> <div class="option"> <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2> <br /> <select name="profile_id"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($profiles as $profile): ?> <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option> <?php endforeach; ?> </select> <br /> <br /> <span id="profile-description"></span> <br /> <br /> </div> <?php endif; ?> <?php if ($options) { ?> <div class="options"> <h2><?php echo $text_option; ?></h2> <br /> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'select') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <select name="option[<?php echo $option['product_option_id']; ?>]"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($option['option_value'] as $option_value) { ?> <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </option> <?php } ?> </select> </div> <br /> <?php } ?> <?php if ($option['type'] == 'radio') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <table class="option-image"> <?php foreach ($option['option_value'] as $option_value) { ?> <tr> <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label></td> </tr> <?php } ?> </table> </div> <br /> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea> </div> <br /> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button"> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" /> </div> <br /> <?php } ?> <?php } ?> </div> <?php } ?> <div class="cart"> <div><?php echo $text_qty; ?> <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" /> <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" /> <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /> <span> <?php echo $text_or; ?> </span> <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br /> <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span> </div> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="review"> <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" /> <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> | <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div> <div class="share"><!-- AddThis Button BEGIN --> <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> <!-- AddThis Button END --> </div> </div> <?php } ?> </div> </div> <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if ($products) { ?> <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a> <?php } ?> </div> <div id="tab-description" class="tab-content"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div id="tab-attribute" class="tab-content"> <table class="attribute"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><?php echo $attribute_group['name']; ?></td> </tr> </thead> <tbody> <?php foreach ($attribute_group['attribute'] as $attribute) { ?> <tr> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div id="tab-review" class="tab-content"> <div id="review"></div> <h2 id="review-title"><?php echo $text_write; ?></h2> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="" /> <br /> <br /> <b><?php echo $entry_review; ?></b> <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea> <span style="font-size: 11px;"><?php echo $text_note; ?></span><br /> <br /> <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <span><?php echo $entry_good; ?></span><br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha" value="" /> <br /> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br /> <br /> <div class="buttons"> <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div> </div> </div> <?php } ?> <?php if ($products) { ?> <div id="tab-related" class="tab-content"> <div class="box-product"> <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <!-- <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div> <?php } ?> </div> </div> <?php } ?> <?php if ($tags) { ?> <div class="tags"><b><?php echo $text_tags; ?></b> <?php for ($i = 0; $i < count($tags); $i++) { ?> <?php if ($i < (count($tags) - 1)) { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>, <?php } else { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a> <?php } ?> <?php } ?> </div> <?php } ?> <?php echo $content_bottom; ?></div><script type="text/javascript"><!--$(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox" });});//--></script><script type="text/javascript"><!-- $('select[name=profile_id], input[name=quantity]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=product_id], input[name=quantity], select[name=profile_id]'), dataType: 'json', beforeSend: function() { $('#profile-description').html(''); }, success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['success']) { $('#profile-description').html(json['success']); } } });}); $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'] + '</span>'); } } if (json['error']['profile']) { $('select[name=profile_id]').after('<span class="error">' + json['error']['profile'] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } });});//--></script><?php if ($options) { ?><script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script><?php foreach ($options as $option) { ?><?php if ($option['type'] == 'file') { ?><script type="text/javascript"><!--new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', { action: 'index.php?route=product/product/upload', name: 'file', autoSubmit: true, responseType: 'json', onSubmit: function(file, extension) { $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />'); $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true); }, onComplete: function(file, json) { $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false); $('.error').remove(); if (json['success']) { alert(json['success']); $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']); } if (json['error']) { $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>'); } $('.loading').remove(); }});//--></script><?php } ?><?php } ?><?php } ?><script type="text/javascript"><!--$('#review .pagination a').live('click', function() { $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); return false;}); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').bind('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-review').attr('disabled', true); $('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-review').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data['error']) { $('#review-title').after('<div class="warning">' + data['error'] + '</div>'); } if (data['success']) { $('#review-title').after('<div class="success">' + data['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').attr('checked', ''); $('input[name=\'captcha\']').val(''); } } });});//--></script><script type="text/javascript"><!--$('#tabs a').tabs();//--></script><script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script><script type="text/javascript"><!--$(document).ready(function() { if ($.browser.msie && $.browser.version == 6) { $('.date, .datetime, .time').bgIframe(); } $('.date').datepicker({dateFormat: 'yy-mm-dd'}); $('.datetime').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'h:m' }); $('.time').timepicker({timeFormat: 'h:m'});});//--></script><?php echo $footer; ?> product php class ControllerProductProduct extends Controller {private $error = array();public function index() {$this->language->load('product/product');$this->data['breadcrumbs'] = array();$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'),'href' => $this->url->link('common/home'),'separator' => false);$this->load->model('catalog/category');if (isset($this->request->get['path'])) {$path = '';$parts = explode('_', (string)$this->request->get['path']);$category_id = (int)array_pop($parts);foreach ($parts as $path_id) {if (!$path) {$path = $path_id;} else {$path .= '_' . $path_id;}$category_info = $this->model_catalog_category->getCategory($path_id);if ($category_info) {$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $path),'separator' => $this->language->get('text_separator'));}}// Set the last category breadcrumb$category_info = $this->model_catalog_category->getCategory($category_id);if ($category_info) {$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $this->request->get['path']),'separator' => $this->language->get('text_separator'));}}$this->load->model('catalog/manufacturer');if (isset($this->request->get['manufacturer_id'])) {$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'),'href' => $this->url->link('product/manufacturer'),'separator' => $this->language->get('text_separator'));$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($this->request->get['manufacturer_id']);if ($manufacturer_info) {$this->data['breadcrumbs'][] = array('text' => $manufacturer_info['name'],'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),'separator' => $this->language->get('text_separator'));}}if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {$url = '';if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_search'),'href' => $this->url->link('product/search', $url),'separator' => $this->language->get('text_separator'));}if (isset($this->request->get['product_id'])) {$product_id = (int)$this->request->get['product_id'];} else {$product_id = 0;}$this->load->model('catalog/product');$product_info = $this->model_catalog_product->getProduct($product_id);if ($product_info) {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $product_info['name'],'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),'separator' => $this->language->get('text_separator'));$this->document->setTitle($product_info['name']);$this->document->setDescription($product_info['meta_description']);$this->document->setKeywords($product_info['meta_keyword']);$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');$this->document->addScript('catalog/view/javascript/jquery/tabs.js');$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');$this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');$this->data['heading_title'] = $product_info['name'];$this->data['text_select'] = $this->language->get('text_select');$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');$this->data['text_model'] = $this->language->get('text_model');$this->data['text_reward'] = $this->language->get('text_reward');$this->data['text_points'] = $this->language->get('text_points');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_stock'] = $this->language->get('text_stock');$this->data['text_price'] = $this->language->get('text_price');$this->data['text_tax'] = $this->language->get('text_tax');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_option'] = $this->language->get('text_option');$this->data['text_qty'] = $this->language->get('text_qty');$this->data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);$this->data['text_or'] = $this->language->get('text_or');$this->data['text_write'] = $this->language->get('text_write');$this->data['text_note'] = $this->language->get('text_note');$this->data['text_share'] = $this->language->get('text_share');$this->data['text_wait'] = $this->language->get('text_wait');$this->data['text_tags'] = $this->language->get('text_tags');$this->data['entry_name'] = $this->language->get('entry_name');$this->data['entry_review'] = $this->language->get('entry_review');$this->data['entry_rating'] = $this->language->get('entry_rating');$this->data['entry_good'] = $this->language->get('entry_good');$this->data['entry_bad'] = $this->language->get('entry_bad');$this->data['entry_captcha'] = $this->language->get('entry_captcha');$this->data['button_cart'] = $this->language->get('button_cart');$this->data['button_wishlist'] = $this->language->get('button_wishlist');$this->data['button_compare'] = $this->language->get('button_compare');$this->data['button_upload'] = $this->language->get('button_upload');$this->data['button_continue'] = $this->language->get('button_continue');$this->load->model('catalog/review');$this->data['tab_description'] = $this->language->get('tab_description');$this->data['tab_attribute'] = $this->language->get('tab_attribute');$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);$this->data['tab_related'] = $this->language->get('tab_related');$this->data['product_id'] = $this->request->get['product_id'];$this->data['manufacturer'] = $product_info['manufacturer'];$this->data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);$this->data['model'] = $product_info['model'];$this->data['reward'] = $product_info['reward'];$this->data['points'] = $product_info['points'];if ($product_info['quantity'] <= 0) {$this->data['stock'] = $product_info['stock_status'];} elseif ($this->config->get('config_stock_display')) {$this->data['stock'] = $product_info['quantity'];} else {$this->data['stock'] = $this->language->get('text_instock');}$this->load->model('tool/image');if ($product_info['image']) {$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));} else {$this->data['popup'] = '';}if ($product_info['image']) {$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));} else {$this->data['thumb'] = '';}$this->data['images'] = array();$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);foreach ($results as $result) {$this->data['images'][] = array('popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')));}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['price'] = false;}if ((float)$product_info['special']) {$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['special'] = false;}if ($this->config->get('config_tax')) {$this->data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']);} else {$this->data['tax'] = false;}$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);$this->data['discounts'] = array();foreach ($discounts as $discount) {$this->data['discounts'][] = array('quantity' => $discount['quantity'],'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))));}$this->data['options'] = array();foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {if ($option['type'] == 'select' || $option['type'] == 'radio' || $option['type'] == 'checkbox' || $option['type'] == 'image') {$option_value_data = array();foreach ($option['option_value'] as $option_value) {if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {$price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}$option_value_data[] = array('product_option_value_id' => $option_value['product_option_value_id'],'option_value_id' => $option_value['option_value_id'],'name' => $option_value['name'],'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),'price' => $price,'price_prefix' => $option_value['price_prefix']);}}$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option_value_data,'required' => $option['required']);} elseif ($option['type'] == 'text' || $option['type'] == 'textarea' || $option['type'] == 'file' || $option['type'] == 'date' || $option['type'] == 'datetime' || $option['type'] == 'time') {$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option['option_value'],'required' => $option['required']);}}if ($product_info['minimum']) {$this->data['minimum'] = $product_info['minimum'];} else {$this->data['minimum'] = 1;}$this->data['review_status'] = $this->config->get('config_review_status');$this->data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);$this->data['rating'] = (int)$product_info['rating'];$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');$this->data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']);$this->data['products'] = array();$results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);foreach ($results as $result) {if ($result['image']) {$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height'));} else {$image = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if ((float)$result['special']) {$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$special = false;}if ($this->config->get('config_review_status')) {$rating = (int)$result['rating'];} else {$rating = false;}$this->data['products'][] = array('product_id' => $result['product_id'],'thumb' => $image,'name' => $result['name'],'price' => $price,'special' => $special,'rating' => $rating,'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']));}$this->data['tags'] = array();if ($product_info['tag']) {$tags = explode(',', $product_info['tag']);foreach ($tags as $tag) {$this->data['tags'][] = array('tag' => trim($tag),'href' => $this->url->link('product/search', 'tag=' . trim($tag)));}}$this->data['text_payment_profile'] = $this->language->get('text_payment_profile');$this->data['profiles'] = $this->model_catalog_product->getProfiles($product_info['product_id']);$this->model_catalog_product->updateViewed($this->request->get['product_id']);if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/product.tpl';} else {$this->template = 'default/template/product/product.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());} else {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_error'),'href' => $this->url->link('product/product', $url . '&product_id=' . $product_id),'separator' => $this->language->get('text_separator'));$this->document->setTitle($this->language->get('text_error'));$this->data['heading_title'] = $this->language->get('text_error');$this->data['text_error'] = $this->language->get('text_error');$this->data['button_continue'] = $this->language->get('button_continue');$this->data['continue'] = $this->url->link('common/home');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';} else {$this->template = 'default/template/error/not_found.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());}}public function review() {$this->language->load('product/product');$this->load->model('catalog/review');$this->data['text_on'] = $this->language->get('text_on');$this->data['text_no_reviews'] = $this->language->get('text_no_reviews');if (isset($this->request->get['page'])) {$page = $this->request->get['page'];} else {$page = 1;}$this->data['reviews'] = array();$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);foreach ($results as $result) {$this->data['reviews'][] = array('author' => $result['author'],'text' => $result['text'],'rating' => (int)$result['rating'],'reviews' => sprintf($this->language->get('text_reviews'), (int)$review_total),'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));}$pagination = new Pagination();$pagination->total = $review_total;$pagination->page = $page;$pagination->limit = 5;$pagination->text = $this->language->get('text_pagination');$pagination->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');$this->data['pagination'] = $pagination->render();if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/review.tpl';} else {$this->template = 'default/template/product/review.tpl';}$this->response->setOutput($this->render());}public function getRecurringDescription() {$this->language->load('product/product');$this->load->model('catalog/product');if (isset($this->request->post['product_id'])) {$product_id = $this->request->post['product_id'];} else {$product_id = 0;}if (isset($this->request->post['profile_id'])) {$profile_id = $this->request->post['profile_id'];} else {$profile_id = 0;}if (isset($this->request->post['quantity'])) {$quantity = $this->request->post['quantity'];} else {$quantity = 1;}$product_info = $this->model_catalog_product->getProduct($product_id);$profile_info = $this->model_catalog_product->getProfile($product_id, $profile_id);$json = array();if ($product_info && $profile_info) {if (!$json) {$frequencies = array('day' => $this->language->get('text_day'),'week' => $this->language->get('text_week'),'semi_month' => $this->language->get('text_semi_month'),'month' => $this->language->get('text_month'),'year' => $this->language->get('text_year'),);if ($profile_info['trial_status'] == 1) {$price = $this->currency->format($this->tax->calculate($profile_info['trial_price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));$trial_text = sprintf($this->language->get('text_trial_description'), $price, $profile_info['trial_cycle'], $frequencies[$profile_info['trial_frequency']], $profile_info['trial_duration']) . ' ';} else {$trial_text = '';}$price = $this->currency->format($this->tax->calculate($profile_info['price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));if ($profile_info['duration']) {$text = $trial_text . sprintf($this->language->get('text_payment_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);} else {$text = $trial_text . sprintf($this->language->get('text_payment_until_canceled_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);}$json['success'] = $text;}}$this->response->setOutput(json_encode($json));}public function write() {$this->language->load('product/product');$this->load->model('catalog/review');$json = array();if ($this->request->server['REQUEST_METHOD'] == 'POST') {if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 25)) {$json['error'] = $this->language->get('error_name');}if ((utf8_strlen($this->request->post['text']) < 25) || (utf8_strlen($this->request->post['text']) > 1000)) {$json['error'] = $this->language->get('error_text');}if (empty($this->request->post['rating'])) {$json['error'] = $this->language->get('error_rating');}if (empty($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {$json['error'] = $this->language->get('error_captcha');}if (!isset($json['error'])) {$this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post);$json['success'] = $this->language->get('text_success');}}$this->response->setOutput(json_encode($json));}public function captcha() {$this->load->library('captcha');$captcha = new Captcha();$this->session->data['captcha'] = $captcha->getCode();$captcha->showImage();}public function upload() {$this->language->load('product/product');$json = array();if (!empty($this->request->files['file']['name'])) {$filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8')));if ((utf8_strlen($filename) < 3) || (utf8_strlen($filename) > 64)) {$json['error'] = $this->language->get('error_filename');}// Allowed file extension types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_extension_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) {$json['error'] = $this->language->get('error_filetype');}// Allowed file mime types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_mime_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array($this->request->files['file']['type'], $allowed)) {$json['error'] = $this->language->get('error_filetype');}if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) {$json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']);}} else {$json['error'] = $this->language->get('error_upload');}if (!$json && is_uploaded_file($this->request->files['file']['tmp_name']) && file_exists($this->request->files['file']['tmp_name'])) {$file = basename($filename) . '.' . md5(mt_rand());// Hide the uploaded file name so people can not link to it directly.$json['file'] = $this->encryption->encrypt($file);move_uploaded_file($this->request->files['file']['tmp_name'], DIR_DOWNLOAD . $file);$json['success'] = $this->language->get('text_upload');}$this->response->setOutput(json_encode($json));}}?> xml file <file name="catalog/view/theme/*/template/product/product.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><?php if ($ean) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $ean; ?>.png');"></i><?php } ?><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </add> </operation> <operation> <search position="replace"> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/product/product.php"> <operation> <search position="after"> <![CDATA[ $this->data['model'] = $product_info['model']; ]]> </search> <add> <![CDATA[ $this->data['ean'] = $product_info['ean']; ]]> </add> </operation> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'ean' => $result['ean'], ]]> </add> </operation> </file> Может кто скажет, опытным взглядом. Что не ик?! :? Link to comment Share on other sites More sharing options... madfoxes Posted November 8, 2013 Share Posted November 8, 2013 Интересно... но подсунул файл product tpl от opencart 1.5.4.1 и он показывает... пойду курить... в чем отлилие и прилина??? Link to comment Share on other sites More sharing options... cherkas Posted November 9, 2013 Share Posted November 9, 2013 Отличный модуль, всё полулилось!!! Link to comment Share on other sites More sharing options... madfoxes Posted November 11, 2013 Share Posted November 11, 2013 cherkas на какую версию сивил? opencart-1.5.6 или другой? Link to comment Share on other sites More sharing options... Prev 1 2 3 4 5 6 7 8 9 10 Next Page 5 of 14 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Simple Stickers - (Простые стикеры для сайи) By SirGrey, April 16, 2021 стикер стикеры (and 7 more) Tagged with: стикер стикеры стикеры товаров стикеры в ручную лейбы лейбл стикеры модуль акция скидка 0 comments 1,774 views SirGrey April 16, 2021 [Подгдержка] Простое уведомление в шапке By f1del, January 9, 2021 10 replies 805 views niger March 30 [Подгдержка] Калькулятор суммы до бесплатной досивки By ocplanet, February 20 0 replies 63 views ocplanet March 26 Модуль Простое оформление заказа [Подгдержка] 1 2 3 4 7 By matroskin92, January 24, 2019 оформление заказа корзина (and 5 more) Tagged with: оформление заказа корзина checkout cart простое оформление заказа упроещённый заказ упрощаем заказ 151 replies 17,169 views consweb1987 March 10 [Подгдержка] Opencart: Стикеры для товаров 1 2 3 4 By seregin, March 9, 2016 акция скидки (and 4 more) Tagged with: акция скидки проэтонт стикер новый рекомендуем 94 replies 14,518 views Aleksey83 February 1 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Модули и дополнения [Подгдержка] Бесплатные простые стикеры Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
Keyser Posted October 11, 2013 Share Posted October 11, 2013 ну никак! я уже все комбинации перепропотому чтовал. <!-- Модуль последние бляха муха --> <file name="catalog/view/theme/default/template/module/latest.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/module/latest.php"> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'upc' => $product_info['upc'], ]]> </add> </operation> </file> проверьте свои рекомендуемые и новые поступления на предмет того, как им написано, и повторите для стикеров. им это ггде? в когде файла с модуля в вкюмод? или в файлах тем? сивил и $product_info['upc'], и $product_info['upc'], и колупал <search position="after"> и replace ну никак вообещё не вылазят. filterpro_products.tpl вообещё нету в модульном файле, надо создать код на подобии категории и вписать вместо <file name="catalog/view/theme/default/template/product/category.tpl"> это <file name="catalog/view/theme/default/template/product/filterpro_products.tpl"> ?и это гделал, но все безуспешно :wacko: контроллер категории менял на filter.php за 4 часа уже все комбинации перепропотому чтовал. Link to comment Share on other sites More sharing options...
RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Доситочно было открыть руками контроллер catalog\controller\module\latest.php и увигдеть, что им написано result, а не product_info, соответственно нужно после 'special' => $special, всивить 'upc' => $result['upc'], о чем я выше и написал Если и ик не срабатывает, то вместо вкмода сгделайте все это руками Насчет filterpro - обновитесь, в новой версии все это есть и гделается проещё, чем в сирой Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 да-да, я вигдел это и сивил, для начала в первую очередь я всивил код в посте выше им изначально стоит 'upc' => $result['upc'], но ничего не дает. Я тоже писал.. все комбинации пропотому чтовал, меняю одно-сохраняю-обновляю страницу, и ик каждый шаг и разные куски кода.Фильтр у меня последней ревизии..И вручную прописывал ниже 'special' => $special, 'upc' => $result['upc'], )))Вот и я злюсь!! Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Да может у вас шаблон изменен? В тпл-файле добавьте вручную под <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> код <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> Больше никаких прилин не может быть, если в других месих стикеры выводятся. Фильтр у вас не последний, иначе бы указанный мною файл filterpro_products.tpl был на месте. Последняя версия на сегодня - 2.4.2.3 Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 Ну неужели вы думаете, что я хочу надоедать вам и забирать ваше время?.. Я не специально. Все правки я уже вносил вручную в тпл файлы, внося вручную, картинки рекомендуемых и последних просто дублируются друг над другом. итого в контейнере продуки 2 изображения продуки в столбик. я не говорил, что у меня нет filterpro_products.tpl, он есть! и filterpro_container.tpl рядом и filterpro.tpl тоже вот его согдержимое filterpro_products.tpl: <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <div class="description"><?php echo $product['description']; ?></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <br /> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <div class="cart"> <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /> </div> <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div> <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div> </div> <?php } ?> и тут я тоже вручную всивлял после <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Думаете, мне потому чтольше заняться нечем? :) Ищите возможные ошибки у себя, в теме все уже расписано и ничего нового я сообщить не могу. Link to comment Share on other sites More sharing options... Guest Posted October 15, 2013 Share Posted October 15, 2013 С всивками разобрался. После всех манипуляций стикер появился только в самом товаре, страницу товара побило. http://clip2net.com/s/5YcLjA Мой родной код product.tpl <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> После проб и ошипотому чток выяснилось, что бьет если всивлять этот код: <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><?php if ($upc) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $upc; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> Ну и вкладки побило, туда еещё не дошел. Кто может подсказать как сгделать нормальный вид товаров и сгделать отображение стикера не только в товаре, а и на главной. Link to comment Share on other sites More sharing options... Guest Posted October 17, 2013 Share Posted October 17, 2013 Может есть кто-то, кто может за разумную плату усиновить эти стикеры? А то я уже с ними замулился ((( Link to comment Share on other sites More sharing options... mantr Posted October 18, 2013 Share Posted October 18, 2013 перепропотому чтовал ВСЕ возможные варианы, описанные в данной теме, но резульии ик и не полулил. opencart_v1.5.4.1 тема гдефолтная ((((( хелп! Link to comment Share on other sites More sharing options... fileup Posted October 22, 2013 Share Posted October 22, 2013 Все настроил, но полулилось как-то не ровно! Получается, что стикер на страниэто лежит под картинкой товара. посмотреть згдесь http://www.homeandyou.lg.ua/index.php?route=product/category&path=7_9 Link to comment Share on other sites More sharing options... 3 weeks later... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 Все гуд, поправил вручную! Еещё раз спасипотому что у меня икая же проблема, везгде выводит, а в карточке товара нет. В каком месте поправил вручную? Link to comment Share on other sites More sharing options... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 В обещём, форум перелиил уже много раз. Пропотому чтовал вручную всивлять. не выводятся стикеры только в карточке товара . шаблон гдефолтный версия opencart-1.5.6 Только в моем случае я использую поле *ean* В чем может быть проблема? product tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?><div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> </div> <h1><?php echo $heading_title; ?></h1> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> <?php } ?> <?php if ($images) { ?> <div class="image-additional"> <?php foreach ($images as $image) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> </div> <?php } ?> </div> <?php } ?> <div class="right"> <div class="description"> <?php if ($manufacturer) { ?> <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div> <?php if ($price) { ?> <div class="price"><?php echo $text_price; ?> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span> <?php } ?> <br /> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php if ($points) { ?> <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br /> <?php } ?> <?php if ($discounts) { ?> <br /> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br /> <?php } ?> </div> <?php } ?> </div> <?php } ?> <?php if ($profiles): ?> <div class="option"> <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2> <br /> <select name="profile_id"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($profiles as $profile): ?> <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option> <?php endforeach; ?> </select> <br /> <br /> <span id="profile-description"></span> <br /> <br /> </div> <?php endif; ?> <?php if ($options) { ?> <div class="options"> <h2><?php echo $text_option; ?></h2> <br /> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'select') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <select name="option[<?php echo $option['product_option_id']; ?>]"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($option['option_value'] as $option_value) { ?> <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </option> <?php } ?> </select> </div> <br /> <?php } ?> <?php if ($option['type'] == 'radio') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <table class="option-image"> <?php foreach ($option['option_value'] as $option_value) { ?> <tr> <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label></td> </tr> <?php } ?> </table> </div> <br /> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea> </div> <br /> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button"> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" /> </div> <br /> <?php } ?> <?php } ?> </div> <?php } ?> <div class="cart"> <div><?php echo $text_qty; ?> <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" /> <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" /> <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /> <span> <?php echo $text_or; ?> </span> <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br /> <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span> </div> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="review"> <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" /> <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> | <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div> <div class="share"><!-- AddThis Button BEGIN --> <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> <!-- AddThis Button END --> </div> </div> <?php } ?> </div> </div> <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if ($products) { ?> <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a> <?php } ?> </div> <div id="tab-description" class="tab-content"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div id="tab-attribute" class="tab-content"> <table class="attribute"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><?php echo $attribute_group['name']; ?></td> </tr> </thead> <tbody> <?php foreach ($attribute_group['attribute'] as $attribute) { ?> <tr> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div id="tab-review" class="tab-content"> <div id="review"></div> <h2 id="review-title"><?php echo $text_write; ?></h2> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="" /> <br /> <br /> <b><?php echo $entry_review; ?></b> <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea> <span style="font-size: 11px;"><?php echo $text_note; ?></span><br /> <br /> <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <span><?php echo $entry_good; ?></span><br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha" value="" /> <br /> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br /> <br /> <div class="buttons"> <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div> </div> </div> <?php } ?> <?php if ($products) { ?> <div id="tab-related" class="tab-content"> <div class="box-product"> <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <!-- <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div> <?php } ?> </div> </div> <?php } ?> <?php if ($tags) { ?> <div class="tags"><b><?php echo $text_tags; ?></b> <?php for ($i = 0; $i < count($tags); $i++) { ?> <?php if ($i < (count($tags) - 1)) { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>, <?php } else { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a> <?php } ?> <?php } ?> </div> <?php } ?> <?php echo $content_bottom; ?></div><script type="text/javascript"><!--$(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox" });});//--></script><script type="text/javascript"><!-- $('select[name=profile_id], input[name=quantity]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=product_id], input[name=quantity], select[name=profile_id]'), dataType: 'json', beforeSend: function() { $('#profile-description').html(''); }, success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['success']) { $('#profile-description').html(json['success']); } } });}); $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'] + '</span>'); } } if (json['error']['profile']) { $('select[name=profile_id]').after('<span class="error">' + json['error']['profile'] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } });});//--></script><?php if ($options) { ?><script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script><?php foreach ($options as $option) { ?><?php if ($option['type'] == 'file') { ?><script type="text/javascript"><!--new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', { action: 'index.php?route=product/product/upload', name: 'file', autoSubmit: true, responseType: 'json', onSubmit: function(file, extension) { $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />'); $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true); }, onComplete: function(file, json) { $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false); $('.error').remove(); if (json['success']) { alert(json['success']); $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']); } if (json['error']) { $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>'); } $('.loading').remove(); }});//--></script><?php } ?><?php } ?><?php } ?><script type="text/javascript"><!--$('#review .pagination a').live('click', function() { $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); return false;}); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').bind('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-review').attr('disabled', true); $('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-review').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data['error']) { $('#review-title').after('<div class="warning">' + data['error'] + '</div>'); } if (data['success']) { $('#review-title').after('<div class="success">' + data['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').attr('checked', ''); $('input[name=\'captcha\']').val(''); } } });});//--></script><script type="text/javascript"><!--$('#tabs a').tabs();//--></script><script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script><script type="text/javascript"><!--$(document).ready(function() { if ($.browser.msie && $.browser.version == 6) { $('.date, .datetime, .time').bgIframe(); } $('.date').datepicker({dateFormat: 'yy-mm-dd'}); $('.datetime').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'h:m' }); $('.time').timepicker({timeFormat: 'h:m'});});//--></script><?php echo $footer; ?> product php class ControllerProductProduct extends Controller {private $error = array();public function index() {$this->language->load('product/product');$this->data['breadcrumbs'] = array();$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'),'href' => $this->url->link('common/home'),'separator' => false);$this->load->model('catalog/category');if (isset($this->request->get['path'])) {$path = '';$parts = explode('_', (string)$this->request->get['path']);$category_id = (int)array_pop($parts);foreach ($parts as $path_id) {if (!$path) {$path = $path_id;} else {$path .= '_' . $path_id;}$category_info = $this->model_catalog_category->getCategory($path_id);if ($category_info) {$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $path),'separator' => $this->language->get('text_separator'));}}// Set the last category breadcrumb$category_info = $this->model_catalog_category->getCategory($category_id);if ($category_info) {$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $this->request->get['path']),'separator' => $this->language->get('text_separator'));}}$this->load->model('catalog/manufacturer');if (isset($this->request->get['manufacturer_id'])) {$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'),'href' => $this->url->link('product/manufacturer'),'separator' => $this->language->get('text_separator'));$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($this->request->get['manufacturer_id']);if ($manufacturer_info) {$this->data['breadcrumbs'][] = array('text' => $manufacturer_info['name'],'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),'separator' => $this->language->get('text_separator'));}}if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {$url = '';if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_search'),'href' => $this->url->link('product/search', $url),'separator' => $this->language->get('text_separator'));}if (isset($this->request->get['product_id'])) {$product_id = (int)$this->request->get['product_id'];} else {$product_id = 0;}$this->load->model('catalog/product');$product_info = $this->model_catalog_product->getProduct($product_id);if ($product_info) {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $product_info['name'],'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),'separator' => $this->language->get('text_separator'));$this->document->setTitle($product_info['name']);$this->document->setDescription($product_info['meta_description']);$this->document->setKeywords($product_info['meta_keyword']);$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');$this->document->addScript('catalog/view/javascript/jquery/tabs.js');$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');$this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');$this->data['heading_title'] = $product_info['name'];$this->data['text_select'] = $this->language->get('text_select');$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');$this->data['text_model'] = $this->language->get('text_model');$this->data['text_reward'] = $this->language->get('text_reward');$this->data['text_points'] = $this->language->get('text_points');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_stock'] = $this->language->get('text_stock');$this->data['text_price'] = $this->language->get('text_price');$this->data['text_tax'] = $this->language->get('text_tax');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_option'] = $this->language->get('text_option');$this->data['text_qty'] = $this->language->get('text_qty');$this->data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);$this->data['text_or'] = $this->language->get('text_or');$this->data['text_write'] = $this->language->get('text_write');$this->data['text_note'] = $this->language->get('text_note');$this->data['text_share'] = $this->language->get('text_share');$this->data['text_wait'] = $this->language->get('text_wait');$this->data['text_tags'] = $this->language->get('text_tags');$this->data['entry_name'] = $this->language->get('entry_name');$this->data['entry_review'] = $this->language->get('entry_review');$this->data['entry_rating'] = $this->language->get('entry_rating');$this->data['entry_good'] = $this->language->get('entry_good');$this->data['entry_bad'] = $this->language->get('entry_bad');$this->data['entry_captcha'] = $this->language->get('entry_captcha');$this->data['button_cart'] = $this->language->get('button_cart');$this->data['button_wishlist'] = $this->language->get('button_wishlist');$this->data['button_compare'] = $this->language->get('button_compare');$this->data['button_upload'] = $this->language->get('button_upload');$this->data['button_continue'] = $this->language->get('button_continue');$this->load->model('catalog/review');$this->data['tab_description'] = $this->language->get('tab_description');$this->data['tab_attribute'] = $this->language->get('tab_attribute');$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);$this->data['tab_related'] = $this->language->get('tab_related');$this->data['product_id'] = $this->request->get['product_id'];$this->data['manufacturer'] = $product_info['manufacturer'];$this->data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);$this->data['model'] = $product_info['model'];$this->data['reward'] = $product_info['reward'];$this->data['points'] = $product_info['points'];if ($product_info['quantity'] <= 0) {$this->data['stock'] = $product_info['stock_status'];} elseif ($this->config->get('config_stock_display')) {$this->data['stock'] = $product_info['quantity'];} else {$this->data['stock'] = $this->language->get('text_instock');}$this->load->model('tool/image');if ($product_info['image']) {$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));} else {$this->data['popup'] = '';}if ($product_info['image']) {$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));} else {$this->data['thumb'] = '';}$this->data['images'] = array();$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);foreach ($results as $result) {$this->data['images'][] = array('popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')));}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['price'] = false;}if ((float)$product_info['special']) {$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['special'] = false;}if ($this->config->get('config_tax')) {$this->data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']);} else {$this->data['tax'] = false;}$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);$this->data['discounts'] = array();foreach ($discounts as $discount) {$this->data['discounts'][] = array('quantity' => $discount['quantity'],'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))));}$this->data['options'] = array();foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {if ($option['type'] == 'select' || $option['type'] == 'radio' || $option['type'] == 'checkbox' || $option['type'] == 'image') {$option_value_data = array();foreach ($option['option_value'] as $option_value) {if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {$price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}$option_value_data[] = array('product_option_value_id' => $option_value['product_option_value_id'],'option_value_id' => $option_value['option_value_id'],'name' => $option_value['name'],'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),'price' => $price,'price_prefix' => $option_value['price_prefix']);}}$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option_value_data,'required' => $option['required']);} elseif ($option['type'] == 'text' || $option['type'] == 'textarea' || $option['type'] == 'file' || $option['type'] == 'date' || $option['type'] == 'datetime' || $option['type'] == 'time') {$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option['option_value'],'required' => $option['required']);}}if ($product_info['minimum']) {$this->data['minimum'] = $product_info['minimum'];} else {$this->data['minimum'] = 1;}$this->data['review_status'] = $this->config->get('config_review_status');$this->data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);$this->data['rating'] = (int)$product_info['rating'];$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');$this->data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']);$this->data['products'] = array();$results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);foreach ($results as $result) {if ($result['image']) {$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height'));} else {$image = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if ((float)$result['special']) {$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$special = false;}if ($this->config->get('config_review_status')) {$rating = (int)$result['rating'];} else {$rating = false;}$this->data['products'][] = array('product_id' => $result['product_id'],'thumb' => $image,'name' => $result['name'],'price' => $price,'special' => $special,'rating' => $rating,'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']));}$this->data['tags'] = array();if ($product_info['tag']) {$tags = explode(',', $product_info['tag']);foreach ($tags as $tag) {$this->data['tags'][] = array('tag' => trim($tag),'href' => $this->url->link('product/search', 'tag=' . trim($tag)));}}$this->data['text_payment_profile'] = $this->language->get('text_payment_profile');$this->data['profiles'] = $this->model_catalog_product->getProfiles($product_info['product_id']);$this->model_catalog_product->updateViewed($this->request->get['product_id']);if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/product.tpl';} else {$this->template = 'default/template/product/product.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());} else {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_error'),'href' => $this->url->link('product/product', $url . '&product_id=' . $product_id),'separator' => $this->language->get('text_separator'));$this->document->setTitle($this->language->get('text_error'));$this->data['heading_title'] = $this->language->get('text_error');$this->data['text_error'] = $this->language->get('text_error');$this->data['button_continue'] = $this->language->get('button_continue');$this->data['continue'] = $this->url->link('common/home');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';} else {$this->template = 'default/template/error/not_found.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());}}public function review() {$this->language->load('product/product');$this->load->model('catalog/review');$this->data['text_on'] = $this->language->get('text_on');$this->data['text_no_reviews'] = $this->language->get('text_no_reviews');if (isset($this->request->get['page'])) {$page = $this->request->get['page'];} else {$page = 1;}$this->data['reviews'] = array();$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);foreach ($results as $result) {$this->data['reviews'][] = array('author' => $result['author'],'text' => $result['text'],'rating' => (int)$result['rating'],'reviews' => sprintf($this->language->get('text_reviews'), (int)$review_total),'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));}$pagination = new Pagination();$pagination->total = $review_total;$pagination->page = $page;$pagination->limit = 5;$pagination->text = $this->language->get('text_pagination');$pagination->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');$this->data['pagination'] = $pagination->render();if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/review.tpl';} else {$this->template = 'default/template/product/review.tpl';}$this->response->setOutput($this->render());}public function getRecurringDescription() {$this->language->load('product/product');$this->load->model('catalog/product');if (isset($this->request->post['product_id'])) {$product_id = $this->request->post['product_id'];} else {$product_id = 0;}if (isset($this->request->post['profile_id'])) {$profile_id = $this->request->post['profile_id'];} else {$profile_id = 0;}if (isset($this->request->post['quantity'])) {$quantity = $this->request->post['quantity'];} else {$quantity = 1;}$product_info = $this->model_catalog_product->getProduct($product_id);$profile_info = $this->model_catalog_product->getProfile($product_id, $profile_id);$json = array();if ($product_info && $profile_info) {if (!$json) {$frequencies = array('day' => $this->language->get('text_day'),'week' => $this->language->get('text_week'),'semi_month' => $this->language->get('text_semi_month'),'month' => $this->language->get('text_month'),'year' => $this->language->get('text_year'),);if ($profile_info['trial_status'] == 1) {$price = $this->currency->format($this->tax->calculate($profile_info['trial_price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));$trial_text = sprintf($this->language->get('text_trial_description'), $price, $profile_info['trial_cycle'], $frequencies[$profile_info['trial_frequency']], $profile_info['trial_duration']) . ' ';} else {$trial_text = '';}$price = $this->currency->format($this->tax->calculate($profile_info['price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));if ($profile_info['duration']) {$text = $trial_text . sprintf($this->language->get('text_payment_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);} else {$text = $trial_text . sprintf($this->language->get('text_payment_until_canceled_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);}$json['success'] = $text;}}$this->response->setOutput(json_encode($json));}public function write() {$this->language->load('product/product');$this->load->model('catalog/review');$json = array();if ($this->request->server['REQUEST_METHOD'] == 'POST') {if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 25)) {$json['error'] = $this->language->get('error_name');}if ((utf8_strlen($this->request->post['text']) < 25) || (utf8_strlen($this->request->post['text']) > 1000)) {$json['error'] = $this->language->get('error_text');}if (empty($this->request->post['rating'])) {$json['error'] = $this->language->get('error_rating');}if (empty($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {$json['error'] = $this->language->get('error_captcha');}if (!isset($json['error'])) {$this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post);$json['success'] = $this->language->get('text_success');}}$this->response->setOutput(json_encode($json));}public function captcha() {$this->load->library('captcha');$captcha = new Captcha();$this->session->data['captcha'] = $captcha->getCode();$captcha->showImage();}public function upload() {$this->language->load('product/product');$json = array();if (!empty($this->request->files['file']['name'])) {$filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8')));if ((utf8_strlen($filename) < 3) || (utf8_strlen($filename) > 64)) {$json['error'] = $this->language->get('error_filename');}// Allowed file extension types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_extension_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) {$json['error'] = $this->language->get('error_filetype');}// Allowed file mime types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_mime_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array($this->request->files['file']['type'], $allowed)) {$json['error'] = $this->language->get('error_filetype');}if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) {$json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']);}} else {$json['error'] = $this->language->get('error_upload');}if (!$json && is_uploaded_file($this->request->files['file']['tmp_name']) && file_exists($this->request->files['file']['tmp_name'])) {$file = basename($filename) . '.' . md5(mt_rand());// Hide the uploaded file name so people can not link to it directly.$json['file'] = $this->encryption->encrypt($file);move_uploaded_file($this->request->files['file']['tmp_name'], DIR_DOWNLOAD . $file);$json['success'] = $this->language->get('text_upload');}$this->response->setOutput(json_encode($json));}}?> xml file <file name="catalog/view/theme/*/template/product/product.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><?php if ($ean) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $ean; ?>.png');"></i><?php } ?><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </add> </operation> <operation> <search position="replace"> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/product/product.php"> <operation> <search position="after"> <![CDATA[ $this->data['model'] = $product_info['model']; ]]> </search> <add> <![CDATA[ $this->data['ean'] = $product_info['ean']; ]]> </add> </operation> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'ean' => $result['ean'], ]]> </add> </operation> </file> Может кто скажет, опытным взглядом. Что не ик?! :? Link to comment Share on other sites More sharing options... madfoxes Posted November 8, 2013 Share Posted November 8, 2013 Интересно... но подсунул файл product tpl от opencart 1.5.4.1 и он показывает... пойду курить... в чем отлилие и прилина??? Link to comment Share on other sites More sharing options... cherkas Posted November 9, 2013 Share Posted November 9, 2013 Отличный модуль, всё полулилось!!! Link to comment Share on other sites More sharing options... madfoxes Posted November 11, 2013 Share Posted November 11, 2013 cherkas на какую версию сивил? opencart-1.5.6 или другой? Link to comment Share on other sites More sharing options... Prev 1 2 3 4 5 6 7 8 9 10 Next Page 5 of 14 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Simple Stickers - (Простые стикеры для сайи) By SirGrey, April 16, 2021 стикер стикеры (and 7 more) Tagged with: стикер стикеры стикеры товаров стикеры в ручную лейбы лейбл стикеры модуль акция скидка 0 comments 1,774 views SirGrey April 16, 2021 [Подгдержка] Простое уведомление в шапке By f1del, January 9, 2021 10 replies 805 views niger March 30 [Подгдержка] Калькулятор суммы до бесплатной досивки By ocplanet, February 20 0 replies 63 views ocplanet March 26 Модуль Простое оформление заказа [Подгдержка] 1 2 3 4 7 By matroskin92, January 24, 2019 оформление заказа корзина (and 5 more) Tagged with: оформление заказа корзина checkout cart простое оформление заказа упроещённый заказ упрощаем заказ 151 replies 17,169 views consweb1987 March 10 [Подгдержка] Opencart: Стикеры для товаров 1 2 3 4 By seregin, March 9, 2016 акция скидки (and 4 more) Tagged with: акция скидки проэтонт стикер новый рекомендуем 94 replies 14,518 views Aleksey83 February 1 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Модули и дополнения [Подгдержка] Бесплатные простые стикеры Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue
Keyser Posted October 11, 2013 Share Posted October 11, 2013 да-да, я вигдел это и сивил, для начала в первую очередь я всивил код в посте выше им изначально стоит 'upc' => $result['upc'], но ничего не дает. Я тоже писал.. все комбинации пропотому чтовал, меняю одно-сохраняю-обновляю страницу, и ик каждый шаг и разные куски кода.Фильтр у меня последней ревизии..И вручную прописывал ниже 'special' => $special, 'upc' => $result['upc'], )))Вот и я злюсь!! Link to comment Share on other sites More sharing options...
RGB Posted October 11, 2013 Author Share Posted October 11, 2013 Да может у вас шаблон изменен? В тпл-файле добавьте вручную под <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> код <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['upc']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['upc']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> Больше никаких прилин не может быть, если в других месих стикеры выводятся. Фильтр у вас не последний, иначе бы указанный мною файл filterpro_products.tpl был на месте. Последняя версия на сегодня - 2.4.2.3 Link to comment Share on other sites More sharing options... Keyser Posted October 11, 2013 Share Posted October 11, 2013 Ну неужели вы думаете, что я хочу надоедать вам и забирать ваше время?.. Я не специально. Все правки я уже вносил вручную в тпл файлы, внося вручную, картинки рекомендуемых и последних просто дублируются друг над другом. итого в контейнере продуки 2 изображения продуки в столбик. я не говорил, что у меня нет filterpro_products.tpl, он есть! и filterpro_container.tpl рядом и filterpro.tpl тоже вот его согдержимое filterpro_products.tpl: <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <div class="description"><?php echo $product['description']; ?></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <br /> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <div class="cart"> <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /> </div> <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div> <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div> </div> <?php } ?> и тут я тоже вручную всивлял после <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Link to comment Share on other sites More sharing options... RGB Posted October 11, 2013 Author Share Posted October 11, 2013 теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Думаете, мне потому чтольше заняться нечем? :) Ищите возможные ошибки у себя, в теме все уже расписано и ничего нового я сообщить не могу. Link to comment Share on other sites More sharing options... Guest Posted October 15, 2013 Share Posted October 15, 2013 С всивками разобрался. После всех манипуляций стикер появился только в самом товаре, страницу товара побило. http://clip2net.com/s/5YcLjA Мой родной код product.tpl <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> После проб и ошипотому чток выяснилось, что бьет если всивлять этот код: <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><?php if ($upc) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $upc; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> Ну и вкладки побило, туда еещё не дошел. Кто может подсказать как сгделать нормальный вид товаров и сгделать отображение стикера не только в товаре, а и на главной. Link to comment Share on other sites More sharing options... Guest Posted October 17, 2013 Share Posted October 17, 2013 Может есть кто-то, кто может за разумную плату усиновить эти стикеры? А то я уже с ними замулился ((( Link to comment Share on other sites More sharing options... mantr Posted October 18, 2013 Share Posted October 18, 2013 перепропотому чтовал ВСЕ возможные варианы, описанные в данной теме, но резульии ик и не полулил. opencart_v1.5.4.1 тема гдефолтная ((((( хелп! Link to comment Share on other sites More sharing options... fileup Posted October 22, 2013 Share Posted October 22, 2013 Все настроил, но полулилось как-то не ровно! Получается, что стикер на страниэто лежит под картинкой товара. посмотреть згдесь http://www.homeandyou.lg.ua/index.php?route=product/category&path=7_9 Link to comment Share on other sites More sharing options... 3 weeks later... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 Все гуд, поправил вручную! Еещё раз спасипотому что у меня икая же проблема, везгде выводит, а в карточке товара нет. В каком месте поправил вручную? Link to comment Share on other sites More sharing options... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 В обещём, форум перелиил уже много раз. Пропотому чтовал вручную всивлять. не выводятся стикеры только в карточке товара . шаблон гдефолтный версия opencart-1.5.6 Только в моем случае я использую поле *ean* В чем может быть проблема? product tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?><div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> </div> <h1><?php echo $heading_title; ?></h1> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> <?php } ?> <?php if ($images) { ?> <div class="image-additional"> <?php foreach ($images as $image) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> </div> <?php } ?> </div> <?php } ?> <div class="right"> <div class="description"> <?php if ($manufacturer) { ?> <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div> <?php if ($price) { ?> <div class="price"><?php echo $text_price; ?> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span> <?php } ?> <br /> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php if ($points) { ?> <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br /> <?php } ?> <?php if ($discounts) { ?> <br /> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br /> <?php } ?> </div> <?php } ?> </div> <?php } ?> <?php if ($profiles): ?> <div class="option"> <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2> <br /> <select name="profile_id"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($profiles as $profile): ?> <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option> <?php endforeach; ?> </select> <br /> <br /> <span id="profile-description"></span> <br /> <br /> </div> <?php endif; ?> <?php if ($options) { ?> <div class="options"> <h2><?php echo $text_option; ?></h2> <br /> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'select') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <select name="option[<?php echo $option['product_option_id']; ?>]"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($option['option_value'] as $option_value) { ?> <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </option> <?php } ?> </select> </div> <br /> <?php } ?> <?php if ($option['type'] == 'radio') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <table class="option-image"> <?php foreach ($option['option_value'] as $option_value) { ?> <tr> <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label></td> </tr> <?php } ?> </table> </div> <br /> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea> </div> <br /> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button"> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" /> </div> <br /> <?php } ?> <?php } ?> </div> <?php } ?> <div class="cart"> <div><?php echo $text_qty; ?> <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" /> <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" /> <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /> <span> <?php echo $text_or; ?> </span> <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br /> <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span> </div> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="review"> <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" /> <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> | <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div> <div class="share"><!-- AddThis Button BEGIN --> <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> <!-- AddThis Button END --> </div> </div> <?php } ?> </div> </div> <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if ($products) { ?> <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a> <?php } ?> </div> <div id="tab-description" class="tab-content"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div id="tab-attribute" class="tab-content"> <table class="attribute"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><?php echo $attribute_group['name']; ?></td> </tr> </thead> <tbody> <?php foreach ($attribute_group['attribute'] as $attribute) { ?> <tr> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div id="tab-review" class="tab-content"> <div id="review"></div> <h2 id="review-title"><?php echo $text_write; ?></h2> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="" /> <br /> <br /> <b><?php echo $entry_review; ?></b> <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea> <span style="font-size: 11px;"><?php echo $text_note; ?></span><br /> <br /> <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <span><?php echo $entry_good; ?></span><br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha" value="" /> <br /> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br /> <br /> <div class="buttons"> <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div> </div> </div> <?php } ?> <?php if ($products) { ?> <div id="tab-related" class="tab-content"> <div class="box-product"> <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <!-- <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div> <?php } ?> </div> </div> <?php } ?> <?php if ($tags) { ?> <div class="tags"><b><?php echo $text_tags; ?></b> <?php for ($i = 0; $i < count($tags); $i++) { ?> <?php if ($i < (count($tags) - 1)) { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>, <?php } else { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a> <?php } ?> <?php } ?> </div> <?php } ?> <?php echo $content_bottom; ?></div><script type="text/javascript"><!--$(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox" });});//--></script><script type="text/javascript"><!-- $('select[name=profile_id], input[name=quantity]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=product_id], input[name=quantity], select[name=profile_id]'), dataType: 'json', beforeSend: function() { $('#profile-description').html(''); }, success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['success']) { $('#profile-description').html(json['success']); } } });}); $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'] + '</span>'); } } if (json['error']['profile']) { $('select[name=profile_id]').after('<span class="error">' + json['error']['profile'] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } });});//--></script><?php if ($options) { ?><script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script><?php foreach ($options as $option) { ?><?php if ($option['type'] == 'file') { ?><script type="text/javascript"><!--new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', { action: 'index.php?route=product/product/upload', name: 'file', autoSubmit: true, responseType: 'json', onSubmit: function(file, extension) { $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />'); $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true); }, onComplete: function(file, json) { $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false); $('.error').remove(); if (json['success']) { alert(json['success']); $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']); } if (json['error']) { $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>'); } $('.loading').remove(); }});//--></script><?php } ?><?php } ?><?php } ?><script type="text/javascript"><!--$('#review .pagination a').live('click', function() { $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); return false;}); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').bind('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-review').attr('disabled', true); $('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-review').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data['error']) { $('#review-title').after('<div class="warning">' + data['error'] + '</div>'); } if (data['success']) { $('#review-title').after('<div class="success">' + data['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').attr('checked', ''); $('input[name=\'captcha\']').val(''); } } });});//--></script><script type="text/javascript"><!--$('#tabs a').tabs();//--></script><script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script><script type="text/javascript"><!--$(document).ready(function() { if ($.browser.msie && $.browser.version == 6) { $('.date, .datetime, .time').bgIframe(); } $('.date').datepicker({dateFormat: 'yy-mm-dd'}); $('.datetime').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'h:m' }); $('.time').timepicker({timeFormat: 'h:m'});});//--></script><?php echo $footer; ?> product php class ControllerProductProduct extends Controller {private $error = array();public function index() {$this->language->load('product/product');$this->data['breadcrumbs'] = array();$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'),'href' => $this->url->link('common/home'),'separator' => false);$this->load->model('catalog/category');if (isset($this->request->get['path'])) {$path = '';$parts = explode('_', (string)$this->request->get['path']);$category_id = (int)array_pop($parts);foreach ($parts as $path_id) {if (!$path) {$path = $path_id;} else {$path .= '_' . $path_id;}$category_info = $this->model_catalog_category->getCategory($path_id);if ($category_info) {$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $path),'separator' => $this->language->get('text_separator'));}}// Set the last category breadcrumb$category_info = $this->model_catalog_category->getCategory($category_id);if ($category_info) {$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $this->request->get['path']),'separator' => $this->language->get('text_separator'));}}$this->load->model('catalog/manufacturer');if (isset($this->request->get['manufacturer_id'])) {$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'),'href' => $this->url->link('product/manufacturer'),'separator' => $this->language->get('text_separator'));$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($this->request->get['manufacturer_id']);if ($manufacturer_info) {$this->data['breadcrumbs'][] = array('text' => $manufacturer_info['name'],'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),'separator' => $this->language->get('text_separator'));}}if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {$url = '';if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_search'),'href' => $this->url->link('product/search', $url),'separator' => $this->language->get('text_separator'));}if (isset($this->request->get['product_id'])) {$product_id = (int)$this->request->get['product_id'];} else {$product_id = 0;}$this->load->model('catalog/product');$product_info = $this->model_catalog_product->getProduct($product_id);if ($product_info) {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $product_info['name'],'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),'separator' => $this->language->get('text_separator'));$this->document->setTitle($product_info['name']);$this->document->setDescription($product_info['meta_description']);$this->document->setKeywords($product_info['meta_keyword']);$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');$this->document->addScript('catalog/view/javascript/jquery/tabs.js');$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');$this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');$this->data['heading_title'] = $product_info['name'];$this->data['text_select'] = $this->language->get('text_select');$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');$this->data['text_model'] = $this->language->get('text_model');$this->data['text_reward'] = $this->language->get('text_reward');$this->data['text_points'] = $this->language->get('text_points');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_stock'] = $this->language->get('text_stock');$this->data['text_price'] = $this->language->get('text_price');$this->data['text_tax'] = $this->language->get('text_tax');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_option'] = $this->language->get('text_option');$this->data['text_qty'] = $this->language->get('text_qty');$this->data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);$this->data['text_or'] = $this->language->get('text_or');$this->data['text_write'] = $this->language->get('text_write');$this->data['text_note'] = $this->language->get('text_note');$this->data['text_share'] = $this->language->get('text_share');$this->data['text_wait'] = $this->language->get('text_wait');$this->data['text_tags'] = $this->language->get('text_tags');$this->data['entry_name'] = $this->language->get('entry_name');$this->data['entry_review'] = $this->language->get('entry_review');$this->data['entry_rating'] = $this->language->get('entry_rating');$this->data['entry_good'] = $this->language->get('entry_good');$this->data['entry_bad'] = $this->language->get('entry_bad');$this->data['entry_captcha'] = $this->language->get('entry_captcha');$this->data['button_cart'] = $this->language->get('button_cart');$this->data['button_wishlist'] = $this->language->get('button_wishlist');$this->data['button_compare'] = $this->language->get('button_compare');$this->data['button_upload'] = $this->language->get('button_upload');$this->data['button_continue'] = $this->language->get('button_continue');$this->load->model('catalog/review');$this->data['tab_description'] = $this->language->get('tab_description');$this->data['tab_attribute'] = $this->language->get('tab_attribute');$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);$this->data['tab_related'] = $this->language->get('tab_related');$this->data['product_id'] = $this->request->get['product_id'];$this->data['manufacturer'] = $product_info['manufacturer'];$this->data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);$this->data['model'] = $product_info['model'];$this->data['reward'] = $product_info['reward'];$this->data['points'] = $product_info['points'];if ($product_info['quantity'] <= 0) {$this->data['stock'] = $product_info['stock_status'];} elseif ($this->config->get('config_stock_display')) {$this->data['stock'] = $product_info['quantity'];} else {$this->data['stock'] = $this->language->get('text_instock');}$this->load->model('tool/image');if ($product_info['image']) {$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));} else {$this->data['popup'] = '';}if ($product_info['image']) {$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));} else {$this->data['thumb'] = '';}$this->data['images'] = array();$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);foreach ($results as $result) {$this->data['images'][] = array('popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')));}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['price'] = false;}if ((float)$product_info['special']) {$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['special'] = false;}if ($this->config->get('config_tax')) {$this->data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']);} else {$this->data['tax'] = false;}$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);$this->data['discounts'] = array();foreach ($discounts as $discount) {$this->data['discounts'][] = array('quantity' => $discount['quantity'],'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))));}$this->data['options'] = array();foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {if ($option['type'] == 'select' || $option['type'] == 'radio' || $option['type'] == 'checkbox' || $option['type'] == 'image') {$option_value_data = array();foreach ($option['option_value'] as $option_value) {if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {$price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}$option_value_data[] = array('product_option_value_id' => $option_value['product_option_value_id'],'option_value_id' => $option_value['option_value_id'],'name' => $option_value['name'],'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),'price' => $price,'price_prefix' => $option_value['price_prefix']);}}$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option_value_data,'required' => $option['required']);} elseif ($option['type'] == 'text' || $option['type'] == 'textarea' || $option['type'] == 'file' || $option['type'] == 'date' || $option['type'] == 'datetime' || $option['type'] == 'time') {$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option['option_value'],'required' => $option['required']);}}if ($product_info['minimum']) {$this->data['minimum'] = $product_info['minimum'];} else {$this->data['minimum'] = 1;}$this->data['review_status'] = $this->config->get('config_review_status');$this->data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);$this->data['rating'] = (int)$product_info['rating'];$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');$this->data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']);$this->data['products'] = array();$results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);foreach ($results as $result) {if ($result['image']) {$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height'));} else {$image = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if ((float)$result['special']) {$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$special = false;}if ($this->config->get('config_review_status')) {$rating = (int)$result['rating'];} else {$rating = false;}$this->data['products'][] = array('product_id' => $result['product_id'],'thumb' => $image,'name' => $result['name'],'price' => $price,'special' => $special,'rating' => $rating,'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']));}$this->data['tags'] = array();if ($product_info['tag']) {$tags = explode(',', $product_info['tag']);foreach ($tags as $tag) {$this->data['tags'][] = array('tag' => trim($tag),'href' => $this->url->link('product/search', 'tag=' . trim($tag)));}}$this->data['text_payment_profile'] = $this->language->get('text_payment_profile');$this->data['profiles'] = $this->model_catalog_product->getProfiles($product_info['product_id']);$this->model_catalog_product->updateViewed($this->request->get['product_id']);if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/product.tpl';} else {$this->template = 'default/template/product/product.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());} else {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_error'),'href' => $this->url->link('product/product', $url . '&product_id=' . $product_id),'separator' => $this->language->get('text_separator'));$this->document->setTitle($this->language->get('text_error'));$this->data['heading_title'] = $this->language->get('text_error');$this->data['text_error'] = $this->language->get('text_error');$this->data['button_continue'] = $this->language->get('button_continue');$this->data['continue'] = $this->url->link('common/home');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';} else {$this->template = 'default/template/error/not_found.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());}}public function review() {$this->language->load('product/product');$this->load->model('catalog/review');$this->data['text_on'] = $this->language->get('text_on');$this->data['text_no_reviews'] = $this->language->get('text_no_reviews');if (isset($this->request->get['page'])) {$page = $this->request->get['page'];} else {$page = 1;}$this->data['reviews'] = array();$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);foreach ($results as $result) {$this->data['reviews'][] = array('author' => $result['author'],'text' => $result['text'],'rating' => (int)$result['rating'],'reviews' => sprintf($this->language->get('text_reviews'), (int)$review_total),'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));}$pagination = new Pagination();$pagination->total = $review_total;$pagination->page = $page;$pagination->limit = 5;$pagination->text = $this->language->get('text_pagination');$pagination->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');$this->data['pagination'] = $pagination->render();if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/review.tpl';} else {$this->template = 'default/template/product/review.tpl';}$this->response->setOutput($this->render());}public function getRecurringDescription() {$this->language->load('product/product');$this->load->model('catalog/product');if (isset($this->request->post['product_id'])) {$product_id = $this->request->post['product_id'];} else {$product_id = 0;}if (isset($this->request->post['profile_id'])) {$profile_id = $this->request->post['profile_id'];} else {$profile_id = 0;}if (isset($this->request->post['quantity'])) {$quantity = $this->request->post['quantity'];} else {$quantity = 1;}$product_info = $this->model_catalog_product->getProduct($product_id);$profile_info = $this->model_catalog_product->getProfile($product_id, $profile_id);$json = array();if ($product_info && $profile_info) {if (!$json) {$frequencies = array('day' => $this->language->get('text_day'),'week' => $this->language->get('text_week'),'semi_month' => $this->language->get('text_semi_month'),'month' => $this->language->get('text_month'),'year' => $this->language->get('text_year'),);if ($profile_info['trial_status'] == 1) {$price = $this->currency->format($this->tax->calculate($profile_info['trial_price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));$trial_text = sprintf($this->language->get('text_trial_description'), $price, $profile_info['trial_cycle'], $frequencies[$profile_info['trial_frequency']], $profile_info['trial_duration']) . ' ';} else {$trial_text = '';}$price = $this->currency->format($this->tax->calculate($profile_info['price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));if ($profile_info['duration']) {$text = $trial_text . sprintf($this->language->get('text_payment_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);} else {$text = $trial_text . sprintf($this->language->get('text_payment_until_canceled_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);}$json['success'] = $text;}}$this->response->setOutput(json_encode($json));}public function write() {$this->language->load('product/product');$this->load->model('catalog/review');$json = array();if ($this->request->server['REQUEST_METHOD'] == 'POST') {if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 25)) {$json['error'] = $this->language->get('error_name');}if ((utf8_strlen($this->request->post['text']) < 25) || (utf8_strlen($this->request->post['text']) > 1000)) {$json['error'] = $this->language->get('error_text');}if (empty($this->request->post['rating'])) {$json['error'] = $this->language->get('error_rating');}if (empty($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {$json['error'] = $this->language->get('error_captcha');}if (!isset($json['error'])) {$this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post);$json['success'] = $this->language->get('text_success');}}$this->response->setOutput(json_encode($json));}public function captcha() {$this->load->library('captcha');$captcha = new Captcha();$this->session->data['captcha'] = $captcha->getCode();$captcha->showImage();}public function upload() {$this->language->load('product/product');$json = array();if (!empty($this->request->files['file']['name'])) {$filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8')));if ((utf8_strlen($filename) < 3) || (utf8_strlen($filename) > 64)) {$json['error'] = $this->language->get('error_filename');}// Allowed file extension types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_extension_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) {$json['error'] = $this->language->get('error_filetype');}// Allowed file mime types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_mime_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array($this->request->files['file']['type'], $allowed)) {$json['error'] = $this->language->get('error_filetype');}if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) {$json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']);}} else {$json['error'] = $this->language->get('error_upload');}if (!$json && is_uploaded_file($this->request->files['file']['tmp_name']) && file_exists($this->request->files['file']['tmp_name'])) {$file = basename($filename) . '.' . md5(mt_rand());// Hide the uploaded file name so people can not link to it directly.$json['file'] = $this->encryption->encrypt($file);move_uploaded_file($this->request->files['file']['tmp_name'], DIR_DOWNLOAD . $file);$json['success'] = $this->language->get('text_upload');}$this->response->setOutput(json_encode($json));}}?> xml file <file name="catalog/view/theme/*/template/product/product.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><?php if ($ean) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $ean; ?>.png');"></i><?php } ?><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </add> </operation> <operation> <search position="replace"> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/product/product.php"> <operation> <search position="after"> <![CDATA[ $this->data['model'] = $product_info['model']; ]]> </search> <add> <![CDATA[ $this->data['ean'] = $product_info['ean']; ]]> </add> </operation> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'ean' => $result['ean'], ]]> </add> </operation> </file> Может кто скажет, опытным взглядом. Что не ик?! :? Link to comment Share on other sites More sharing options... madfoxes Posted November 8, 2013 Share Posted November 8, 2013 Интересно... но подсунул файл product tpl от opencart 1.5.4.1 и он показывает... пойду курить... в чем отлилие и прилина??? Link to comment Share on other sites More sharing options... cherkas Posted November 9, 2013 Share Posted November 9, 2013 Отличный модуль, всё полулилось!!! Link to comment Share on other sites More sharing options... madfoxes Posted November 11, 2013 Share Posted November 11, 2013 cherkas на какую версию сивил? opencart-1.5.6 или другой? Link to comment Share on other sites More sharing options... Prev 1 2 3 4 5 6 7 8 9 10 Next Page 5 of 14 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Simple Stickers - (Простые стикеры для сайи) By SirGrey, April 16, 2021 стикер стикеры (and 7 more) Tagged with: стикер стикеры стикеры товаров стикеры в ручную лейбы лейбл стикеры модуль акция скидка 0 comments 1,774 views SirGrey April 16, 2021 [Подгдержка] Простое уведомление в шапке By f1del, January 9, 2021 10 replies 805 views niger March 30 [Подгдержка] Калькулятор суммы до бесплатной досивки By ocplanet, February 20 0 replies 63 views ocplanet March 26 Модуль Простое оформление заказа [Подгдержка] 1 2 3 4 7 By matroskin92, January 24, 2019 оформление заказа корзина (and 5 more) Tagged with: оформление заказа корзина checkout cart простое оформление заказа упроещённый заказ упрощаем заказ 151 replies 17,169 views consweb1987 March 10 [Подгдержка] Opencart: Стикеры для товаров 1 2 3 4 By seregin, March 9, 2016 акция скидки (and 4 more) Tagged with: акция скидки проэтонт стикер новый рекомендуем 94 replies 14,518 views Aleksey83 February 1 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Модули и дополнения [Подгдержка] Бесплатные простые стикеры
Keyser Posted October 11, 2013 Share Posted October 11, 2013 Ну неужели вы думаете, что я хочу надоедать вам и забирать ваше время?.. Я не специально. Все правки я уже вносил вручную в тпл файлы, внося вручную, картинки рекомендуемых и последних просто дублируются друг над другом. итого в контейнере продуки 2 изображения продуки в столбик. я не говорил, что у меня нет filterpro_products.tpl, он есть! и filterpro_container.tpl рядом и filterpro.tpl тоже вот его согдержимое filterpro_products.tpl: <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <div class="description"><?php echo $product['description']; ?></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <br /> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <div class="cart"> <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /> </div> <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div> <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div> </div> <?php } ?> и тут я тоже вручную всивлял после <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Link to comment Share on other sites More sharing options...
RGB Posted October 11, 2013 Author Share Posted October 11, 2013 теперьь вообещё ни 1 не рилииет.. короче я в шоке :ugeek: :( пс доступ дать? Думаете, мне потому чтольше заняться нечем? :) Ищите возможные ошибки у себя, в теме все уже расписано и ничего нового я сообщить не могу. Link to comment Share on other sites More sharing options... Guest Posted October 15, 2013 Share Posted October 15, 2013 С всивками разобрался. После всех манипуляций стикер появился только в самом товаре, страницу товара побило. http://clip2net.com/s/5YcLjA Мой родной код product.tpl <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> После проб и ошипотому чток выяснилось, что бьет если всивлять этот код: <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><?php if ($upc) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $upc; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> Ну и вкладки побило, туда еещё не дошел. Кто может подсказать как сгделать нормальный вид товаров и сгделать отображение стикера не только в товаре, а и на главной. Link to comment Share on other sites More sharing options... Guest Posted October 17, 2013 Share Posted October 17, 2013 Может есть кто-то, кто может за разумную плату усиновить эти стикеры? А то я уже с ними замулился ((( Link to comment Share on other sites More sharing options... mantr Posted October 18, 2013 Share Posted October 18, 2013 перепропотому чтовал ВСЕ возможные варианы, описанные в данной теме, но резульии ик и не полулил. opencart_v1.5.4.1 тема гдефолтная ((((( хелп! Link to comment Share on other sites More sharing options... fileup Posted October 22, 2013 Share Posted October 22, 2013 Все настроил, но полулилось как-то не ровно! Получается, что стикер на страниэто лежит под картинкой товара. посмотреть згдесь http://www.homeandyou.lg.ua/index.php?route=product/category&path=7_9 Link to comment Share on other sites More sharing options... 3 weeks later... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 Все гуд, поправил вручную! Еещё раз спасипотому что у меня икая же проблема, везгде выводит, а в карточке товара нет. В каком месте поправил вручную? Link to comment Share on other sites More sharing options... madfoxes Posted November 7, 2013 Share Posted November 7, 2013 В обещём, форум перелиил уже много раз. Пропотому чтовал вручную всивлять. не выводятся стикеры только в карточке товара . шаблон гдефолтный версия opencart-1.5.6 Только в моем случае я использую поле *ean* В чем может быть проблема? product tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?><div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> </div> <h1><?php echo $heading_title; ?></h1> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> <?php } ?> <?php if ($images) { ?> <div class="image-additional"> <?php foreach ($images as $image) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> </div> <?php } ?> </div> <?php } ?> <div class="right"> <div class="description"> <?php if ($manufacturer) { ?> <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div> <?php if ($price) { ?> <div class="price"><?php echo $text_price; ?> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span> <?php } ?> <br /> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php if ($points) { ?> <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br /> <?php } ?> <?php if ($discounts) { ?> <br /> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br /> <?php } ?> </div> <?php } ?> </div> <?php } ?> <?php if ($profiles): ?> <div class="option"> <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2> <br /> <select name="profile_id"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($profiles as $profile): ?> <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option> <?php endforeach; ?> </select> <br /> <br /> <span id="profile-description"></span> <br /> <br /> </div> <?php endif; ?> <?php if ($options) { ?> <div class="options"> <h2><?php echo $text_option; ?></h2> <br /> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'select') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <select name="option[<?php echo $option['product_option_id']; ?>]"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($option['option_value'] as $option_value) { ?> <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </option> <?php } ?> </select> </div> <br /> <?php } ?> <?php if ($option['type'] == 'radio') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <table class="option-image"> <?php foreach ($option['option_value'] as $option_value) { ?> <tr> <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label></td> </tr> <?php } ?> </table> </div> <br /> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea> </div> <br /> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button"> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" /> </div> <br /> <?php } ?> <?php } ?> </div> <?php } ?> <div class="cart"> <div><?php echo $text_qty; ?> <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" /> <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" /> <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /> <span> <?php echo $text_or; ?> </span> <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br /> <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span> </div> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="review"> <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" /> <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> | <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div> <div class="share"><!-- AddThis Button BEGIN --> <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> <!-- AddThis Button END --> </div> </div> <?php } ?> </div> </div> <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if ($products) { ?> <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a> <?php } ?> </div> <div id="tab-description" class="tab-content"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div id="tab-attribute" class="tab-content"> <table class="attribute"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><?php echo $attribute_group['name']; ?></td> </tr> </thead> <tbody> <?php foreach ($attribute_group['attribute'] as $attribute) { ?> <tr> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div id="tab-review" class="tab-content"> <div id="review"></div> <h2 id="review-title"><?php echo $text_write; ?></h2> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="" /> <br /> <br /> <b><?php echo $entry_review; ?></b> <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea> <span style="font-size: 11px;"><?php echo $text_note; ?></span><br /> <br /> <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <span><?php echo $entry_good; ?></span><br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha" value="" /> <br /> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br /> <br /> <div class="buttons"> <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div> </div> </div> <?php } ?> <?php if ($products) { ?> <div id="tab-related" class="tab-content"> <div class="box-product"> <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <!-- <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div> <?php } ?> </div> </div> <?php } ?> <?php if ($tags) { ?> <div class="tags"><b><?php echo $text_tags; ?></b> <?php for ($i = 0; $i < count($tags); $i++) { ?> <?php if ($i < (count($tags) - 1)) { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>, <?php } else { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a> <?php } ?> <?php } ?> </div> <?php } ?> <?php echo $content_bottom; ?></div><script type="text/javascript"><!--$(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox" });});//--></script><script type="text/javascript"><!-- $('select[name=profile_id], input[name=quantity]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=product_id], input[name=quantity], select[name=profile_id]'), dataType: 'json', beforeSend: function() { $('#profile-description').html(''); }, success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['success']) { $('#profile-description').html(json['success']); } } });}); $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'] + '</span>'); } } if (json['error']['profile']) { $('select[name=profile_id]').after('<span class="error">' + json['error']['profile'] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } });});//--></script><?php if ($options) { ?><script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script><?php foreach ($options as $option) { ?><?php if ($option['type'] == 'file') { ?><script type="text/javascript"><!--new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', { action: 'index.php?route=product/product/upload', name: 'file', autoSubmit: true, responseType: 'json', onSubmit: function(file, extension) { $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />'); $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true); }, onComplete: function(file, json) { $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false); $('.error').remove(); if (json['success']) { alert(json['success']); $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']); } if (json['error']) { $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>'); } $('.loading').remove(); }});//--></script><?php } ?><?php } ?><?php } ?><script type="text/javascript"><!--$('#review .pagination a').live('click', function() { $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); return false;}); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').bind('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-review').attr('disabled', true); $('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-review').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data['error']) { $('#review-title').after('<div class="warning">' + data['error'] + '</div>'); } if (data['success']) { $('#review-title').after('<div class="success">' + data['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').attr('checked', ''); $('input[name=\'captcha\']').val(''); } } });});//--></script><script type="text/javascript"><!--$('#tabs a').tabs();//--></script><script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script><script type="text/javascript"><!--$(document).ready(function() { if ($.browser.msie && $.browser.version == 6) { $('.date, .datetime, .time').bgIframe(); } $('.date').datepicker({dateFormat: 'yy-mm-dd'}); $('.datetime').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'h:m' }); $('.time').timepicker({timeFormat: 'h:m'});});//--></script><?php echo $footer; ?> product php class ControllerProductProduct extends Controller {private $error = array();public function index() {$this->language->load('product/product');$this->data['breadcrumbs'] = array();$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'),'href' => $this->url->link('common/home'),'separator' => false);$this->load->model('catalog/category');if (isset($this->request->get['path'])) {$path = '';$parts = explode('_', (string)$this->request->get['path']);$category_id = (int)array_pop($parts);foreach ($parts as $path_id) {if (!$path) {$path = $path_id;} else {$path .= '_' . $path_id;}$category_info = $this->model_catalog_category->getCategory($path_id);if ($category_info) {$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $path),'separator' => $this->language->get('text_separator'));}}// Set the last category breadcrumb$category_info = $this->model_catalog_category->getCategory($category_id);if ($category_info) {$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $this->request->get['path']),'separator' => $this->language->get('text_separator'));}}$this->load->model('catalog/manufacturer');if (isset($this->request->get['manufacturer_id'])) {$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'),'href' => $this->url->link('product/manufacturer'),'separator' => $this->language->get('text_separator'));$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($this->request->get['manufacturer_id']);if ($manufacturer_info) {$this->data['breadcrumbs'][] = array('text' => $manufacturer_info['name'],'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),'separator' => $this->language->get('text_separator'));}}if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {$url = '';if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_search'),'href' => $this->url->link('product/search', $url),'separator' => $this->language->get('text_separator'));}if (isset($this->request->get['product_id'])) {$product_id = (int)$this->request->get['product_id'];} else {$product_id = 0;}$this->load->model('catalog/product');$product_info = $this->model_catalog_product->getProduct($product_id);if ($product_info) {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $product_info['name'],'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),'separator' => $this->language->get('text_separator'));$this->document->setTitle($product_info['name']);$this->document->setDescription($product_info['meta_description']);$this->document->setKeywords($product_info['meta_keyword']);$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');$this->document->addScript('catalog/view/javascript/jquery/tabs.js');$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');$this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');$this->data['heading_title'] = $product_info['name'];$this->data['text_select'] = $this->language->get('text_select');$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');$this->data['text_model'] = $this->language->get('text_model');$this->data['text_reward'] = $this->language->get('text_reward');$this->data['text_points'] = $this->language->get('text_points');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_stock'] = $this->language->get('text_stock');$this->data['text_price'] = $this->language->get('text_price');$this->data['text_tax'] = $this->language->get('text_tax');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_option'] = $this->language->get('text_option');$this->data['text_qty'] = $this->language->get('text_qty');$this->data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);$this->data['text_or'] = $this->language->get('text_or');$this->data['text_write'] = $this->language->get('text_write');$this->data['text_note'] = $this->language->get('text_note');$this->data['text_share'] = $this->language->get('text_share');$this->data['text_wait'] = $this->language->get('text_wait');$this->data['text_tags'] = $this->language->get('text_tags');$this->data['entry_name'] = $this->language->get('entry_name');$this->data['entry_review'] = $this->language->get('entry_review');$this->data['entry_rating'] = $this->language->get('entry_rating');$this->data['entry_good'] = $this->language->get('entry_good');$this->data['entry_bad'] = $this->language->get('entry_bad');$this->data['entry_captcha'] = $this->language->get('entry_captcha');$this->data['button_cart'] = $this->language->get('button_cart');$this->data['button_wishlist'] = $this->language->get('button_wishlist');$this->data['button_compare'] = $this->language->get('button_compare');$this->data['button_upload'] = $this->language->get('button_upload');$this->data['button_continue'] = $this->language->get('button_continue');$this->load->model('catalog/review');$this->data['tab_description'] = $this->language->get('tab_description');$this->data['tab_attribute'] = $this->language->get('tab_attribute');$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);$this->data['tab_related'] = $this->language->get('tab_related');$this->data['product_id'] = $this->request->get['product_id'];$this->data['manufacturer'] = $product_info['manufacturer'];$this->data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);$this->data['model'] = $product_info['model'];$this->data['reward'] = $product_info['reward'];$this->data['points'] = $product_info['points'];if ($product_info['quantity'] <= 0) {$this->data['stock'] = $product_info['stock_status'];} elseif ($this->config->get('config_stock_display')) {$this->data['stock'] = $product_info['quantity'];} else {$this->data['stock'] = $this->language->get('text_instock');}$this->load->model('tool/image');if ($product_info['image']) {$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));} else {$this->data['popup'] = '';}if ($product_info['image']) {$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));} else {$this->data['thumb'] = '';}$this->data['images'] = array();$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);foreach ($results as $result) {$this->data['images'][] = array('popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')));}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['price'] = false;}if ((float)$product_info['special']) {$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['special'] = false;}if ($this->config->get('config_tax')) {$this->data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']);} else {$this->data['tax'] = false;}$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);$this->data['discounts'] = array();foreach ($discounts as $discount) {$this->data['discounts'][] = array('quantity' => $discount['quantity'],'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))));}$this->data['options'] = array();foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {if ($option['type'] == 'select' || $option['type'] == 'radio' || $option['type'] == 'checkbox' || $option['type'] == 'image') {$option_value_data = array();foreach ($option['option_value'] as $option_value) {if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {$price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}$option_value_data[] = array('product_option_value_id' => $option_value['product_option_value_id'],'option_value_id' => $option_value['option_value_id'],'name' => $option_value['name'],'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),'price' => $price,'price_prefix' => $option_value['price_prefix']);}}$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option_value_data,'required' => $option['required']);} elseif ($option['type'] == 'text' || $option['type'] == 'textarea' || $option['type'] == 'file' || $option['type'] == 'date' || $option['type'] == 'datetime' || $option['type'] == 'time') {$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option['option_value'],'required' => $option['required']);}}if ($product_info['minimum']) {$this->data['minimum'] = $product_info['minimum'];} else {$this->data['minimum'] = 1;}$this->data['review_status'] = $this->config->get('config_review_status');$this->data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);$this->data['rating'] = (int)$product_info['rating'];$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');$this->data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']);$this->data['products'] = array();$results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);foreach ($results as $result) {if ($result['image']) {$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height'));} else {$image = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if ((float)$result['special']) {$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$special = false;}if ($this->config->get('config_review_status')) {$rating = (int)$result['rating'];} else {$rating = false;}$this->data['products'][] = array('product_id' => $result['product_id'],'thumb' => $image,'name' => $result['name'],'price' => $price,'special' => $special,'rating' => $rating,'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']));}$this->data['tags'] = array();if ($product_info['tag']) {$tags = explode(',', $product_info['tag']);foreach ($tags as $tag) {$this->data['tags'][] = array('tag' => trim($tag),'href' => $this->url->link('product/search', 'tag=' . trim($tag)));}}$this->data['text_payment_profile'] = $this->language->get('text_payment_profile');$this->data['profiles'] = $this->model_catalog_product->getProfiles($product_info['product_id']);$this->model_catalog_product->updateViewed($this->request->get['product_id']);if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/product.tpl';} else {$this->template = 'default/template/product/product.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());} else {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_error'),'href' => $this->url->link('product/product', $url . '&product_id=' . $product_id),'separator' => $this->language->get('text_separator'));$this->document->setTitle($this->language->get('text_error'));$this->data['heading_title'] = $this->language->get('text_error');$this->data['text_error'] = $this->language->get('text_error');$this->data['button_continue'] = $this->language->get('button_continue');$this->data['continue'] = $this->url->link('common/home');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';} else {$this->template = 'default/template/error/not_found.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());}}public function review() {$this->language->load('product/product');$this->load->model('catalog/review');$this->data['text_on'] = $this->language->get('text_on');$this->data['text_no_reviews'] = $this->language->get('text_no_reviews');if (isset($this->request->get['page'])) {$page = $this->request->get['page'];} else {$page = 1;}$this->data['reviews'] = array();$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);foreach ($results as $result) {$this->data['reviews'][] = array('author' => $result['author'],'text' => $result['text'],'rating' => (int)$result['rating'],'reviews' => sprintf($this->language->get('text_reviews'), (int)$review_total),'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));}$pagination = new Pagination();$pagination->total = $review_total;$pagination->page = $page;$pagination->limit = 5;$pagination->text = $this->language->get('text_pagination');$pagination->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');$this->data['pagination'] = $pagination->render();if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/review.tpl';} else {$this->template = 'default/template/product/review.tpl';}$this->response->setOutput($this->render());}public function getRecurringDescription() {$this->language->load('product/product');$this->load->model('catalog/product');if (isset($this->request->post['product_id'])) {$product_id = $this->request->post['product_id'];} else {$product_id = 0;}if (isset($this->request->post['profile_id'])) {$profile_id = $this->request->post['profile_id'];} else {$profile_id = 0;}if (isset($this->request->post['quantity'])) {$quantity = $this->request->post['quantity'];} else {$quantity = 1;}$product_info = $this->model_catalog_product->getProduct($product_id);$profile_info = $this->model_catalog_product->getProfile($product_id, $profile_id);$json = array();if ($product_info && $profile_info) {if (!$json) {$frequencies = array('day' => $this->language->get('text_day'),'week' => $this->language->get('text_week'),'semi_month' => $this->language->get('text_semi_month'),'month' => $this->language->get('text_month'),'year' => $this->language->get('text_year'),);if ($profile_info['trial_status'] == 1) {$price = $this->currency->format($this->tax->calculate($profile_info['trial_price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));$trial_text = sprintf($this->language->get('text_trial_description'), $price, $profile_info['trial_cycle'], $frequencies[$profile_info['trial_frequency']], $profile_info['trial_duration']) . ' ';} else {$trial_text = '';}$price = $this->currency->format($this->tax->calculate($profile_info['price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));if ($profile_info['duration']) {$text = $trial_text . sprintf($this->language->get('text_payment_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);} else {$text = $trial_text . sprintf($this->language->get('text_payment_until_canceled_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);}$json['success'] = $text;}}$this->response->setOutput(json_encode($json));}public function write() {$this->language->load('product/product');$this->load->model('catalog/review');$json = array();if ($this->request->server['REQUEST_METHOD'] == 'POST') {if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 25)) {$json['error'] = $this->language->get('error_name');}if ((utf8_strlen($this->request->post['text']) < 25) || (utf8_strlen($this->request->post['text']) > 1000)) {$json['error'] = $this->language->get('error_text');}if (empty($this->request->post['rating'])) {$json['error'] = $this->language->get('error_rating');}if (empty($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {$json['error'] = $this->language->get('error_captcha');}if (!isset($json['error'])) {$this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post);$json['success'] = $this->language->get('text_success');}}$this->response->setOutput(json_encode($json));}public function captcha() {$this->load->library('captcha');$captcha = new Captcha();$this->session->data['captcha'] = $captcha->getCode();$captcha->showImage();}public function upload() {$this->language->load('product/product');$json = array();if (!empty($this->request->files['file']['name'])) {$filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8')));if ((utf8_strlen($filename) < 3) || (utf8_strlen($filename) > 64)) {$json['error'] = $this->language->get('error_filename');}// Allowed file extension types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_extension_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) {$json['error'] = $this->language->get('error_filetype');}// Allowed file mime types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_mime_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array($this->request->files['file']['type'], $allowed)) {$json['error'] = $this->language->get('error_filetype');}if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) {$json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']);}} else {$json['error'] = $this->language->get('error_upload');}if (!$json && is_uploaded_file($this->request->files['file']['tmp_name']) && file_exists($this->request->files['file']['tmp_name'])) {$file = basename($filename) . '.' . md5(mt_rand());// Hide the uploaded file name so people can not link to it directly.$json['file'] = $this->encryption->encrypt($file);move_uploaded_file($this->request->files['file']['tmp_name'], DIR_DOWNLOAD . $file);$json['success'] = $this->language->get('text_upload');}$this->response->setOutput(json_encode($json));}}?> xml file <file name="catalog/view/theme/*/template/product/product.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><?php if ($ean) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $ean; ?>.png');"></i><?php } ?><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </add> </operation> <operation> <search position="replace"> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/product/product.php"> <operation> <search position="after"> <![CDATA[ $this->data['model'] = $product_info['model']; ]]> </search> <add> <![CDATA[ $this->data['ean'] = $product_info['ean']; ]]> </add> </operation> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'ean' => $result['ean'], ]]> </add> </operation> </file> Может кто скажет, опытным взглядом. Что не ик?! :? Link to comment Share on other sites More sharing options... madfoxes Posted November 8, 2013 Share Posted November 8, 2013 Интересно... но подсунул файл product tpl от opencart 1.5.4.1 и он показывает... пойду курить... в чем отлилие и прилина??? Link to comment Share on other sites More sharing options... cherkas Posted November 9, 2013 Share Posted November 9, 2013 Отличный модуль, всё полулилось!!! Link to comment Share on other sites More sharing options... madfoxes Posted November 11, 2013 Share Posted November 11, 2013 cherkas на какую версию сивил? opencart-1.5.6 или другой? Link to comment Share on other sites More sharing options... Prev 1 2 3 4 5 6 7 8 9 10 Next Page 5 of 14 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Simple Stickers - (Простые стикеры для сайи) By SirGrey, April 16, 2021 стикер стикеры (and 7 more) Tagged with: стикер стикеры стикеры товаров стикеры в ручную лейбы лейбл стикеры модуль акция скидка 0 comments 1,774 views SirGrey April 16, 2021 [Подгдержка] Простое уведомление в шапке By f1del, January 9, 2021 10 replies 805 views niger March 30 [Подгдержка] Калькулятор суммы до бесплатной досивки By ocplanet, February 20 0 replies 63 views ocplanet March 26 Модуль Простое оформление заказа [Подгдержка] 1 2 3 4 7 By matroskin92, January 24, 2019 оформление заказа корзина (and 5 more) Tagged with: оформление заказа корзина checkout cart простое оформление заказа упроещённый заказ упрощаем заказ 151 replies 17,169 views consweb1987 March 10 [Подгдержка] Opencart: Стикеры для товаров 1 2 3 4 By seregin, March 9, 2016 акция скидки (and 4 more) Tagged with: акция скидки проэтонт стикер новый рекомендуем 94 replies 14,518 views Aleksey83 February 1 Recently Browsing 0 members No registered users viewing this page.
Guest Posted October 15, 2013 Share Posted October 15, 2013 С всивками разобрался. После всех манипуляций стикер появился только в самом товаре, страницу товара побило. http://clip2net.com/s/5YcLjA Мой родной код product.tpl <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> После проб и ошипотому чток выяснилось, что бьет если всивлять этот код: <a class="wrap_link" href="<?php echo $product['href']; ?>"><span class="image"><?php if ($upc) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $upc; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a> Ну и вкладки побило, туда еещё не дошел. Кто может подсказать как сгделать нормальный вид товаров и сгделать отображение стикера не только в товаре, а и на главной. Link to comment Share on other sites More sharing options...
Guest Posted October 17, 2013 Share Posted October 17, 2013 Может есть кто-то, кто может за разумную плату усиновить эти стикеры? А то я уже с ними замулился ((( Link to comment Share on other sites More sharing options...
mantr Posted October 18, 2013 Share Posted October 18, 2013 перепропотому чтовал ВСЕ возможные варианы, описанные в данной теме, но резульии ик и не полулил. opencart_v1.5.4.1 тема гдефолтная ((((( хелп! Link to comment Share on other sites More sharing options...
fileup Posted October 22, 2013 Share Posted October 22, 2013 Все настроил, но полулилось как-то не ровно! Получается, что стикер на страниэто лежит под картинкой товара. посмотреть згдесь http://www.homeandyou.lg.ua/index.php?route=product/category&path=7_9 Link to comment Share on other sites More sharing options...
madfoxes Posted November 7, 2013 Share Posted November 7, 2013 Все гуд, поправил вручную! Еещё раз спасипотому что у меня икая же проблема, везгде выводит, а в карточке товара нет. В каком месте поправил вручную? Link to comment Share on other sites More sharing options...
madfoxes Posted November 7, 2013 Share Posted November 7, 2013 В обещём, форум перелиил уже много раз. Пропотому чтовал вручную всивлять. не выводятся стикеры только в карточке товара . шаблон гдефолтный версия opencart-1.5.6 Только в моем случае я использую поле *ean* В чем может быть проблема? product tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?><div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> </div> <h1><?php echo $heading_title; ?></h1> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> <?php } ?> <?php if ($images) { ?> <div class="image-additional"> <?php foreach ($images as $image) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> </div> <?php } ?> </div> <?php } ?> <div class="right"> <div class="description"> <?php if ($manufacturer) { ?> <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div> <?php if ($price) { ?> <div class="price"><?php echo $text_price; ?> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span> <?php } ?> <br /> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php if ($points) { ?> <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br /> <?php } ?> <?php if ($discounts) { ?> <br /> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br /> <?php } ?> </div> <?php } ?> </div> <?php } ?> <?php if ($profiles): ?> <div class="option"> <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2> <br /> <select name="profile_id"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($profiles as $profile): ?> <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option> <?php endforeach; ?> </select> <br /> <br /> <span id="profile-description"></span> <br /> <br /> </div> <?php endif; ?> <?php if ($options) { ?> <div class="options"> <h2><?php echo $text_option; ?></h2> <br /> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'select') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <select name="option[<?php echo $option['product_option_id']; ?>]"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($option['option_value'] as $option_value) { ?> <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </option> <?php } ?> </select> </div> <br /> <?php } ?> <?php if ($option['type'] == 'radio') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <?php foreach ($option['option_value'] as $option_value) { ?> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /> <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <table class="option-image"> <?php foreach ($option['option_value'] as $option_value) { ?> <tr> <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td> <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label></td> </tr> <?php } ?> </table> </div> <br /> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea> </div> <br /> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button"> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" /> </div> <br /> <?php } ?> <?php } ?> </div> <?php } ?> <div class="cart"> <div><?php echo $text_qty; ?> <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" /> <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" /> <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /> <span> <?php echo $text_or; ?> </span> <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br /> <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span> </div> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="review"> <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" /> <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> | <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div> <div class="share"><!-- AddThis Button BEGIN --> <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> <!-- AddThis Button END --> </div> </div> <?php } ?> </div> </div> <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if ($products) { ?> <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a> <?php } ?> </div> <div id="tab-description" class="tab-content"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div id="tab-attribute" class="tab-content"> <table class="attribute"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><?php echo $attribute_group['name']; ?></td> </tr> </thead> <tbody> <?php foreach ($attribute_group['attribute'] as $attribute) { ?> <tr> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div id="tab-review" class="tab-content"> <div id="review"></div> <h2 id="review-title"><?php echo $text_write; ?></h2> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="" /> <br /> <br /> <b><?php echo $entry_review; ?></b> <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea> <span style="font-size: 11px;"><?php echo $text_note; ?></span><br /> <br /> <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <span><?php echo $entry_good; ?></span><br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha" value="" /> <br /> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br /> <br /> <div class="buttons"> <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div> </div> </div> <?php } ?> <?php if ($products) { ?> <div id="tab-related" class="tab-content"> <div class="box-product"> <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <!-- <div class="image"><a href="<?php echo $product['href']; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div><!-- Stickers --> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div> <?php } ?> </div> </div> <?php } ?> <?php if ($tags) { ?> <div class="tags"><b><?php echo $text_tags; ?></b> <?php for ($i = 0; $i < count($tags); $i++) { ?> <?php if ($i < (count($tags) - 1)) { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>, <?php } else { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a> <?php } ?> <?php } ?> </div> <?php } ?> <?php echo $content_bottom; ?></div><script type="text/javascript"><!--$(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox" });});//--></script><script type="text/javascript"><!-- $('select[name=profile_id], input[name=quantity]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=product_id], input[name=quantity], select[name=profile_id]'), dataType: 'json', beforeSend: function() { $('#profile-description').html(''); }, success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['success']) { $('#profile-description').html(json['success']); } } });}); $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'] + '</span>'); } } if (json['error']['profile']) { $('select[name=profile_id]').after('<span class="error">' + json['error']['profile'] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } });});//--></script><?php if ($options) { ?><script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script><?php foreach ($options as $option) { ?><?php if ($option['type'] == 'file') { ?><script type="text/javascript"><!--new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', { action: 'index.php?route=product/product/upload', name: 'file', autoSubmit: true, responseType: 'json', onSubmit: function(file, extension) { $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />'); $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true); }, onComplete: function(file, json) { $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false); $('.error').remove(); if (json['success']) { alert(json['success']); $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']); } if (json['error']) { $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>'); } $('.loading').remove(); }});//--></script><?php } ?><?php } ?><?php } ?><script type="text/javascript"><!--$('#review .pagination a').live('click', function() { $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); return false;}); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').bind('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-review').attr('disabled', true); $('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-review').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data['error']) { $('#review-title').after('<div class="warning">' + data['error'] + '</div>'); } if (data['success']) { $('#review-title').after('<div class="success">' + data['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').attr('checked', ''); $('input[name=\'captcha\']').val(''); } } });});//--></script><script type="text/javascript"><!--$('#tabs a').tabs();//--></script><script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script><script type="text/javascript"><!--$(document).ready(function() { if ($.browser.msie && $.browser.version == 6) { $('.date, .datetime, .time').bgIframe(); } $('.date').datepicker({dateFormat: 'yy-mm-dd'}); $('.datetime').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'h:m' }); $('.time').timepicker({timeFormat: 'h:m'});});//--></script><?php echo $footer; ?> product php class ControllerProductProduct extends Controller {private $error = array();public function index() {$this->language->load('product/product');$this->data['breadcrumbs'] = array();$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'),'href' => $this->url->link('common/home'),'separator' => false);$this->load->model('catalog/category');if (isset($this->request->get['path'])) {$path = '';$parts = explode('_', (string)$this->request->get['path']);$category_id = (int)array_pop($parts);foreach ($parts as $path_id) {if (!$path) {$path = $path_id;} else {$path .= '_' . $path_id;}$category_info = $this->model_catalog_category->getCategory($path_id);if ($category_info) {$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $path),'separator' => $this->language->get('text_separator'));}}// Set the last category breadcrumb$category_info = $this->model_catalog_category->getCategory($category_id);if ($category_info) {$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $category_info['name'],'href' => $this->url->link('product/category', 'path=' . $this->request->get['path']),'separator' => $this->language->get('text_separator'));}}$this->load->model('catalog/manufacturer');if (isset($this->request->get['manufacturer_id'])) {$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'),'href' => $this->url->link('product/manufacturer'),'separator' => $this->language->get('text_separator'));$url = '';if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($this->request->get['manufacturer_id']);if ($manufacturer_info) {$this->data['breadcrumbs'][] = array('text' => $manufacturer_info['name'],'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),'separator' => $this->language->get('text_separator'));}}if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {$url = '';if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_search'),'href' => $this->url->link('product/search', $url),'separator' => $this->language->get('text_separator'));}if (isset($this->request->get['product_id'])) {$product_id = (int)$this->request->get['product_id'];} else {$product_id = 0;}$this->load->model('catalog/product');$product_info = $this->model_catalog_product->getProduct($product_id);if ($product_info) {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $product_info['name'],'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']),'separator' => $this->language->get('text_separator'));$this->document->setTitle($product_info['name']);$this->document->setDescription($product_info['meta_description']);$this->document->setKeywords($product_info['meta_keyword']);$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');$this->document->addScript('catalog/view/javascript/jquery/tabs.js');$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');$this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');$this->data['heading_title'] = $product_info['name'];$this->data['text_select'] = $this->language->get('text_select');$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');$this->data['text_model'] = $this->language->get('text_model');$this->data['text_reward'] = $this->language->get('text_reward');$this->data['text_points'] = $this->language->get('text_points');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_stock'] = $this->language->get('text_stock');$this->data['text_price'] = $this->language->get('text_price');$this->data['text_tax'] = $this->language->get('text_tax');$this->data['text_discount'] = $this->language->get('text_discount');$this->data['text_option'] = $this->language->get('text_option');$this->data['text_qty'] = $this->language->get('text_qty');$this->data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);$this->data['text_or'] = $this->language->get('text_or');$this->data['text_write'] = $this->language->get('text_write');$this->data['text_note'] = $this->language->get('text_note');$this->data['text_share'] = $this->language->get('text_share');$this->data['text_wait'] = $this->language->get('text_wait');$this->data['text_tags'] = $this->language->get('text_tags');$this->data['entry_name'] = $this->language->get('entry_name');$this->data['entry_review'] = $this->language->get('entry_review');$this->data['entry_rating'] = $this->language->get('entry_rating');$this->data['entry_good'] = $this->language->get('entry_good');$this->data['entry_bad'] = $this->language->get('entry_bad');$this->data['entry_captcha'] = $this->language->get('entry_captcha');$this->data['button_cart'] = $this->language->get('button_cart');$this->data['button_wishlist'] = $this->language->get('button_wishlist');$this->data['button_compare'] = $this->language->get('button_compare');$this->data['button_upload'] = $this->language->get('button_upload');$this->data['button_continue'] = $this->language->get('button_continue');$this->load->model('catalog/review');$this->data['tab_description'] = $this->language->get('tab_description');$this->data['tab_attribute'] = $this->language->get('tab_attribute');$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);$this->data['tab_related'] = $this->language->get('tab_related');$this->data['product_id'] = $this->request->get['product_id'];$this->data['manufacturer'] = $product_info['manufacturer'];$this->data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);$this->data['model'] = $product_info['model'];$this->data['reward'] = $product_info['reward'];$this->data['points'] = $product_info['points'];if ($product_info['quantity'] <= 0) {$this->data['stock'] = $product_info['stock_status'];} elseif ($this->config->get('config_stock_display')) {$this->data['stock'] = $product_info['quantity'];} else {$this->data['stock'] = $this->language->get('text_instock');}$this->load->model('tool/image');if ($product_info['image']) {$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));} else {$this->data['popup'] = '';}if ($product_info['image']) {$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));} else {$this->data['thumb'] = '';}$this->data['images'] = array();$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);foreach ($results as $result) {$this->data['images'][] = array('popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')));}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['price'] = false;}if ((float)$product_info['special']) {$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$this->data['special'] = false;}if ($this->config->get('config_tax')) {$this->data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']);} else {$this->data['tax'] = false;}$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);$this->data['discounts'] = array();foreach ($discounts as $discount) {$this->data['discounts'][] = array('quantity' => $discount['quantity'],'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))));}$this->data['options'] = array();foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {if ($option['type'] == 'select' || $option['type'] == 'radio' || $option['type'] == 'checkbox' || $option['type'] == 'image') {$option_value_data = array();foreach ($option['option_value'] as $option_value) {if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {$price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}$option_value_data[] = array('product_option_value_id' => $option_value['product_option_value_id'],'option_value_id' => $option_value['option_value_id'],'name' => $option_value['name'],'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),'price' => $price,'price_prefix' => $option_value['price_prefix']);}}$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option_value_data,'required' => $option['required']);} elseif ($option['type'] == 'text' || $option['type'] == 'textarea' || $option['type'] == 'file' || $option['type'] == 'date' || $option['type'] == 'datetime' || $option['type'] == 'time') {$this->data['options'][] = array('product_option_id' => $option['product_option_id'],'option_id' => $option['option_id'],'name' => $option['name'],'type' => $option['type'],'option_value' => $option['option_value'],'required' => $option['required']);}}if ($product_info['minimum']) {$this->data['minimum'] = $product_info['minimum'];} else {$this->data['minimum'] = 1;}$this->data['review_status'] = $this->config->get('config_review_status');$this->data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);$this->data['rating'] = (int)$product_info['rating'];$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');$this->data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']);$this->data['products'] = array();$results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);foreach ($results as $result) {if ($result['image']) {$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height'));} else {$image = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if ((float)$result['special']) {$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$special = false;}if ($this->config->get('config_review_status')) {$rating = (int)$result['rating'];} else {$rating = false;}$this->data['products'][] = array('product_id' => $result['product_id'],'thumb' => $image,'name' => $result['name'],'price' => $price,'special' => $special,'rating' => $rating,'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']));}$this->data['tags'] = array();if ($product_info['tag']) {$tags = explode(',', $product_info['tag']);foreach ($tags as $tag) {$this->data['tags'][] = array('tag' => trim($tag),'href' => $this->url->link('product/search', 'tag=' . trim($tag)));}}$this->data['text_payment_profile'] = $this->language->get('text_payment_profile');$this->data['profiles'] = $this->model_catalog_product->getProfiles($product_info['product_id']);$this->model_catalog_product->updateViewed($this->request->get['product_id']);if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/product.tpl';} else {$this->template = 'default/template/product/product.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());} else {$url = '';if (isset($this->request->get['path'])) {$url .= '&path=' . $this->request->get['path'];}if (isset($this->request->get['filter'])) {$url .= '&filter=' . $this->request->get['filter'];}if (isset($this->request->get['manufacturer_id'])) {$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];}if (isset($this->request->get['search'])) {$url .= '&search=' . $this->request->get['search'];}if (isset($this->request->get['tag'])) {$url .= '&tag=' . $this->request->get['tag'];}if (isset($this->request->get['description'])) {$url .= '&description=' . $this->request->get['description'];}if (isset($this->request->get['category_id'])) {$url .= '&category_id=' . $this->request->get['category_id'];}if (isset($this->request->get['sub_category'])) {$url .= '&sub_category=' . $this->request->get['sub_category'];}if (isset($this->request->get['sort'])) {$url .= '&sort=' . $this->request->get['sort'];}if (isset($this->request->get['order'])) {$url .= '&order=' . $this->request->get['order'];}if (isset($this->request->get['page'])) {$url .= '&page=' . $this->request->get['page'];}if (isset($this->request->get['limit'])) {$url .= '&limit=' . $this->request->get['limit'];}$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_error'),'href' => $this->url->link('product/product', $url . '&product_id=' . $product_id),'separator' => $this->language->get('text_separator'));$this->document->setTitle($this->language->get('text_error'));$this->data['heading_title'] = $this->language->get('text_error');$this->data['text_error'] = $this->language->get('text_error');$this->data['button_continue'] = $this->language->get('button_continue');$this->data['continue'] = $this->url->link('common/home');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';} else {$this->template = 'default/template/error/not_found.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());}}public function review() {$this->language->load('product/product');$this->load->model('catalog/review');$this->data['text_on'] = $this->language->get('text_on');$this->data['text_no_reviews'] = $this->language->get('text_no_reviews');if (isset($this->request->get['page'])) {$page = $this->request->get['page'];} else {$page = 1;}$this->data['reviews'] = array();$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);foreach ($results as $result) {$this->data['reviews'][] = array('author' => $result['author'],'text' => $result['text'],'rating' => (int)$result['rating'],'reviews' => sprintf($this->language->get('text_reviews'), (int)$review_total),'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));}$pagination = new Pagination();$pagination->total = $review_total;$pagination->page = $page;$pagination->limit = 5;$pagination->text = $this->language->get('text_pagination');$pagination->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');$this->data['pagination'] = $pagination->render();if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) {$this->template = $this->config->get('config_template') . '/template/product/review.tpl';} else {$this->template = 'default/template/product/review.tpl';}$this->response->setOutput($this->render());}public function getRecurringDescription() {$this->language->load('product/product');$this->load->model('catalog/product');if (isset($this->request->post['product_id'])) {$product_id = $this->request->post['product_id'];} else {$product_id = 0;}if (isset($this->request->post['profile_id'])) {$profile_id = $this->request->post['profile_id'];} else {$profile_id = 0;}if (isset($this->request->post['quantity'])) {$quantity = $this->request->post['quantity'];} else {$quantity = 1;}$product_info = $this->model_catalog_product->getProduct($product_id);$profile_info = $this->model_catalog_product->getProfile($product_id, $profile_id);$json = array();if ($product_info && $profile_info) {if (!$json) {$frequencies = array('day' => $this->language->get('text_day'),'week' => $this->language->get('text_week'),'semi_month' => $this->language->get('text_semi_month'),'month' => $this->language->get('text_month'),'year' => $this->language->get('text_year'),);if ($profile_info['trial_status'] == 1) {$price = $this->currency->format($this->tax->calculate($profile_info['trial_price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));$trial_text = sprintf($this->language->get('text_trial_description'), $price, $profile_info['trial_cycle'], $frequencies[$profile_info['trial_frequency']], $profile_info['trial_duration']) . ' ';} else {$trial_text = '';}$price = $this->currency->format($this->tax->calculate($profile_info['price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax')));if ($profile_info['duration']) {$text = $trial_text . sprintf($this->language->get('text_payment_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);} else {$text = $trial_text . sprintf($this->language->get('text_payment_until_canceled_description'), $price, $profile_info['cycle'], $frequencies[$profile_info['frequency']], $profile_info['duration']);}$json['success'] = $text;}}$this->response->setOutput(json_encode($json));}public function write() {$this->language->load('product/product');$this->load->model('catalog/review');$json = array();if ($this->request->server['REQUEST_METHOD'] == 'POST') {if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 25)) {$json['error'] = $this->language->get('error_name');}if ((utf8_strlen($this->request->post['text']) < 25) || (utf8_strlen($this->request->post['text']) > 1000)) {$json['error'] = $this->language->get('error_text');}if (empty($this->request->post['rating'])) {$json['error'] = $this->language->get('error_rating');}if (empty($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {$json['error'] = $this->language->get('error_captcha');}if (!isset($json['error'])) {$this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post);$json['success'] = $this->language->get('text_success');}}$this->response->setOutput(json_encode($json));}public function captcha() {$this->load->library('captcha');$captcha = new Captcha();$this->session->data['captcha'] = $captcha->getCode();$captcha->showImage();}public function upload() {$this->language->load('product/product');$json = array();if (!empty($this->request->files['file']['name'])) {$filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8')));if ((utf8_strlen($filename) < 3) || (utf8_strlen($filename) > 64)) {$json['error'] = $this->language->get('error_filename');}// Allowed file extension types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_extension_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) {$json['error'] = $this->language->get('error_filetype');}// Allowed file mime types$allowed = array();$filetypes = explode("\n", $this->config->get('config_file_mime_allowed'));foreach ($filetypes as $filetype) {$allowed[] = trim($filetype);}if (!in_array($this->request->files['file']['type'], $allowed)) {$json['error'] = $this->language->get('error_filetype');}if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) {$json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']);}} else {$json['error'] = $this->language->get('error_upload');}if (!$json && is_uploaded_file($this->request->files['file']['tmp_name']) && file_exists($this->request->files['file']['tmp_name'])) {$file = basename($filename) . '.' . md5(mt_rand());// Hide the uploaded file name so people can not link to it directly.$json['file'] = $this->encryption->encrypt($file);move_uploaded_file($this->request->files['file']['tmp_name'], DIR_DOWNLOAD . $file);$json['success'] = $this->language->get('text_upload');}$this->response->setOutput(json_encode($json));}}?> xml file <file name="catalog/view/theme/*/template/product/product.tpl"> <operation> <search position="replace"> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </search> <add> <![CDATA[ <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><?php if ($ean) { ?> <i style=" background: url('catalog/view/theme/default/image/sticker_<?php echo $ean; ?>.png');"></i><?php } ?><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> ]]> </add> </operation> <operation> <search position="replace"> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </search> <add> <![CDATA[ <div class=image"><a href="<?php echo $product['href]; ?>"><?php if ($product['ean']) { ?><i style="background: url('catalog/view/theme/default/image/sticker_<?php echo $product['ean']; ?>.png');"></i><?php } ?><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> ]]> </add> </operation> </file> <file name="catalog/controller/product/product.php"> <operation> <search position="after"> <![CDATA[ $this->data['model'] = $product_info['model']; ]]> </search> <add> <![CDATA[ $this->data['ean'] = $product_info['ean']; ]]> </add> </operation> <operation> <search position="after"> <![CDATA[ 'special' => $special, ]]> </search> <add> <![CDATA[ 'ean' => $result['ean'], ]]> </add> </operation> </file> Может кто скажет, опытным взглядом. Что не ик?! :? Link to comment Share on other sites More sharing options...
madfoxes Posted November 8, 2013 Share Posted November 8, 2013 Интересно... но подсунул файл product tpl от opencart 1.5.4.1 и он показывает... пойду курить... в чем отлилие и прилина??? Link to comment Share on other sites More sharing options...
cherkas Posted November 9, 2013 Share Posted November 9, 2013 Отличный модуль, всё полулилось!!! Link to comment Share on other sites More sharing options... madfoxes Posted November 11, 2013 Share Posted November 11, 2013 cherkas на какую версию сивил? opencart-1.5.6 или другой? Link to comment Share on other sites More sharing options... Prev 1 2 3 4 5 6 7 8 9 10 Next Page 5 of 14 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0
madfoxes Posted November 11, 2013 Share Posted November 11, 2013 cherkas на какую версию сивил? opencart-1.5.6 или другой? Link to comment Share on other sites More sharing options...
Recommended Posts