Jump to content

ramzzes@mail.ru

Members
  • Posts

    24
  • Joined

  • Last visited

Contact Methods

  • Skype
    romannnov

Profile Information

  • Location
    Russia
  • First Name
    Roman
  • Last Name
    S
  • Activity
    Developer

Recent Profile Visitors

1,031,461 profile views

ramzzes@mail.ru's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I was try do it on external server in web. Same problem there. Bytheway, today i dont find these modules in adminpanel...
  2. То, о чем вы пишите я догадался сразу. С английским у меня нет проблем. Читайте внимательнее, я написал "бесплатные модули", то есть у которых вендор prestashop, и которые всегда были в комплекте модулей престы, и которые всегда длступны для установки.
  3. Пытаюсь установить бесплатные модули для версии 1.7.6. Сначала все ставилось ок, но в один момент при установке модулей стало появляться такое сообщение "Error sent by Addons. You may need to be logged" . Когда я авторизуюсь, то модули вс равно не устанавливаются и появляется сообщение "Error sent by Addons. You may be not allowed to download this module". В чем может быть проблема? Пожалуйста помогите. Заранее спасибо.
  4. I trying to install free modules for version 1.7.6. At first everything was OK, but now when installing the modules began to appear a message "Error send by Addons. You may need to be logged" . When I authorize, the modules are still not installed and appear the message "Error sent by Addons. You may be not allowed to download this module". What could be the problem? Please help. Thank you in advance.
  5. Hello to all. BEFORE i made module, showing at hook displayProductListReviews (i.e. in the product list in each product) the quantity in cart, with buttons + - on js. Developed, of course with cache disabled, it works, on all pages where there is a hook, lightly tested, everything is OK. But as soon as turned on the cache, then immediately went bugs on the main page in the modules "new", "featured", and "pricedrops". WHAT I FIND 1) on main page there are not output variables to javascript, unlike the other pages, while the store itself does not suffer, but the module has nothing. 2) when the cache is ON in the modules"new", "featured", and "pricedrops" through the hook displayProductListReviews in the template product-lis.in tpl the variable $product for each product comes one same product data (first in DB response), i.e. the same ID, etc. How can it be I'll never know, because the products themselves are different, and after the hook comes out the same for everyone. If you disable the cache - all OK, each product come as expected their data. Can't understand this is a Presta bug? or I didn't consider how hooks working with cache? If I didn't check the cache, then how to do it? The issue is on default version the Presta (others as well), so all module files have a default code. Help, please. public function hookDisplayProductListReviews($params) { $cart = $this->context->cart; $in_cart_count_total = Cart::getNbProducts((int)$this->context->cart->id); $id_product = (int)$params['product']['id_product']; $product_in_cart_count = $this->productInCartCount($id_product); $send_arr = array( 'product_2' => $params['product'], 'product_in_cart' => $this->getProductFromCart($id_product), 'in_cart_count' => $product_in_cart_count, 'id_customization' => (int)Tools::getValue('id_customization'), 'priceDisplay' => 1, 'currency' => $this->context->currency ); } $this->smarty->assign($send_arr); return $this->display(__FILE__, 'incartquantity.tpl', null, null); } incartquantity.tpl code: <!-- InCartQuantity module --> <div class="in_cart_qty"> <div class="in_cart_qty_label{if $in_cart_count > 0} marked{/if}"> {l s='in cart' mod='incartquantity'}<span class="remove"{if $in_cart_count < 1} style="display:none;"{/if}><i class="icon-times-circle"></i></span> </div> <div class="cart_quantity_button clearfix"> <a id="cart_quantity_down_{$product_2.id_product}_{$product_2.id_product_attribute}_{$id_customization}_{$product_2.id_address_delivery|intval}" class="cart_quantity_down btn btn-default button-minus" rel="nofollow" title="{l s='Subtract'}"> <span><i class="icon-minus"></i></span> </a> <input type="hidden" value="{$in_cart_count}" name="quantity_{$product_2.id_product}_{$product_2.id_product_attribute}_{$id_customization}_{$product_2.id_address_delivery|intval}_hidden"/> <input type="text" value="{$in_cart_count}" class="cart_quantity_input form-control grey" name="quantity_{$product_2.id_product}_{$product_2.id_product_attribute}_{$id_customization}_{$product_2.id_address_delivery|intval}"/> <a id="cart_quantity_up_{$product_2.id_product}_{$product_2.id_product_attribute}_{$id_customization}_{$product_2.id_address_delivery|intval}" class="cart_quantity_up btn btn-default button-plus" rel="nofollow" title="{l s='Add'}"> <span><i class="icon-plus"></i></span> </a> </div> <div> {if (!$PS_CATALOG_MODE AND ((isset($product_2.show_price) && $product_2.show_price) || (isset($product_2.available_for_order) && $product_2.available_for_order)))} {if isset($product_in_cart) && isset($product_in_cart.price) && $product_in_cart} <span class="price">{l s='=' mod='incartquantity'}{convertPrice price=$product_in_cart.price|floatval*$product_in_cart.cart_quantity}</span> {else} <span class="price" style="display:none;">{l s='=' mod='incartquantity'}</span> {/if} {/if} </div> </div> <!-- /InCartQuantity module --> {strip} {addJsDef currencySign=$currencySign|html_entity_decode:2:"UTF-8"} {addJsDef currencyRate=$currencyRate|floatval} {addJsDef currencyFormat=$currencyFormat} {addJsDef currencyBlank=$currencyBlank|intval} {addJsDef deliveryAddress=$cart->id_address_delivery|intval} {addJsDefL name=txtProduct}{l s='product' js=1}{/addJsDefL} {addJsDefL name=txtProducts}{l s='products' js=1}{/addJsDefL} {addJsDefL name=txtEquals}{l s='=' js=1}{/addJsDefL} {/strip}
  6. так ведь я на сколько понимаю в хук параметры ($product) передаются через одноименную ему функцию в переменной $params, а не прямо в .tpl модуля. Я пробовал не передавать из модуля $product, и в шаблоне в итоге $product = NULL. То есть все равно через функцию hookDisplayProductListReviews($params), потом в шаблон и т.п. Разве что попробую переименовать $product в своем модуле в $product_2 на случай вдруг они конфликтуют.
  7. Я че т не подумал об этом даже. То есть я либо использую $product из product-list.tpl или свой но не с именованием product. Вы это имеете в виду?
  8. Всем здравствуйте. ПРЕДЫСТОРИЯ Сделал модуль, показывающий в хуке displayProductListReviews (то есть в списке товаров у каждого товара) количество и наличие его в корзине, с кнопками + - на js. Разрабатывал, естественно с отключенным кэшем, все работает, на всех страницах где есть хук, по-тестировал слегка, все ок. Но как только включил кэш, то сразу пошли глюки на главной странице в модулях "новые", "популярные", и "скидки", на остальных - все работает как часы, но на главной полный капут. ЧТО ВЫЯСНИЛ 1) что на главной почему то не выводятся переменные для javascript, в отличие от остальных страниц, при этом сам магазин не страдает, а модулю есть нечего, костылем то закрою, но это еще не все. 2) при включенном кэше в модулях "новые" "популярные" "хиты" через хук displayProductListReviews в шаблоне product-lis.tpl в переменную $product для каждого товара приходят данные одного и того же (первого в выборке) товара, то есть один и тот же айдишник и т.п. Как так может быть ума не приложу, ведь сами товары разные, а через хук вылезает один и тот же для всех. При отключении кэша - все ок, для каждого товара как положено приходят свои данные. Не могу понять это баг престы? или я не учел работу хуков с кэшем? Если я не учел кэш, как как это сделать. Функцию хука в модуле прикладываю. Баг проявляется на дефолтной версии престы (на других так же), поэтому все файлы кроме модуля имеют дефолтный код. Дальше пока просто не полез решил сюда написать. Помогите, люди добрые, кто чем знает. public function hookDisplayProductListReviews($params) { $cart = $this->context->cart; $in_cart_count_total = Cart::getNbProducts((int)$this->context->cart->id); $id_product = (int)$params['product']['id_product']; $product_in_cart_count = $this->productInCartCount($id_product); $this->smarty->assign(array( 'product' => $params['product'], 'product_in_cart' => $this->getProductFromCart($id_product), 'in_cart_count' => $product_in_cart_count, 'id_customization' => (int)Tools::getValue('id_customization'), 'priceDisplay' => 1, 'currency' => $this->context->currency )); return $this->display(__FILE__, 'incartquantity.tpl'); } Листинг incartquantity.tpl следующий <!-- InCartQuantity module --> <div class="in_cart_qty"> <div class="in_cart_qty_label{if $in_cart_count > 0} marked{/if}"> {l s='in cart' mod='incartquantity'}<span class="remove"{if $in_cart_count < 1} style="display:none;"{/if}><i class="icon-times-circle"></i></span> </div> <div class="cart_quantity_button clearfix"> <a id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="cart_quantity_down btn btn-default button-minus" {*href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&op=down&token={$token_cart}")|escape:'html':'UTF-8'}"*} rel="nofollow" title="{l s='Subtract'}"> <span><i class="icon-minus"></i></span> </a> <input type="hidden" value="{$in_cart_count}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}_hidden"/> <input type="text" value="{$in_cart_count}" class="cart_quantity_input form-control grey" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}"/> <a id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="cart_quantity_up btn btn-default button-plus" {*href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&token={$token_cart}")|escape:'html':'UTF-8'}"*} rel="nofollow" title="{l s='Add'}"> <span><i class="icon-plus"></i></span> </a> </div> <div> {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product_in_cart) && isset($product_in_cart.price) && $product_in_cart} <span class="price">{l s='=' mod='incartquantity'}{convertPrice price=$product_in_cart.price|floatval*$product_in_cart.cart_quantity}</span> {else} <span class="price" style="display:none;">{l s='=' mod='incartquantity'}</span> {/if} {/if} </div> </div> <!-- /InCartQuantity module --> {strip} {addJsDef currencySign=$currencySign|html_entity_decode:2:"UTF-8"} {addJsDef currencyRate=$currencyRate|floatval} {addJsDef currencyFormat=$currencyFormat|intval} {addJsDef currencyBlank=$currencyBlank|intval} {addJsDef deliveryAddress=$cart->id_address_delivery|intval} {addJsDefL name=txtProduct}{l s='product' js=1}{/addJsDefL} {addJsDefL name=txtProducts}{l s='products' js=1}{/addJsDefL} {addJsDefL name=txtEquals}{l s='=' js=1}{/addJsDefL} {/strip}
  9. Нет, я забыл про него как буд то в нем ничего и нет! с return AdminController::renderForm(); заработало. Спасибо большое. Долгострой продолжается))
  10. No i forgot about this! Now this works with return AdminController::renderForm(); instead return parent::renderForm(); thanks for response!
  11. Да вот вся то беда в том, что такое обращение работает для других методов, там во всех сплошь return parent::... и все работает, и в этой тоже самое. Я пробовал уж от печали и return AdminStoresController::renderForm(); и даже return AdminStoresControllerCore::renderForm(); первое вводит php в бесконечную рекурсию, даже ответа нету, а второе дает тот же хреновый результат. ж`опа какая то. Может правда то и рядом, но в каком рядом именно блин понять не могу.
  12. Что может её оверайдить даже не представляю. Не должно. Дело в том что я модуль продолжал ковырять на версии 1.6.011, появилась эта проблема. Я думал что загадил инсталляцию и для эксперимента взял чистую 1.6.1.1(вдруг на ней все будет ок) и поставил модуль на нее - то же самое. Как то до этого все работало. Кстати разве return AdminController::renderForm(); что нибудь вернет? Ведь renderForm() не static . Вы имеете ввиду что нужно попробовать напрямую из класса получить возврат renderForm() что бы убедиться что она вообще рабочая? Ваще это мысль. Вроде проверял это, но попробую еще. Разница в переопределенной функции в том что в форме добавляется еще селекты выбора штата и города, и всего то. То есть в массив пихнул еще примерно вот это array( 'type' => 'select', 'label' => $this->l('State'), 'name' => 'id_state', 'required' => true, 'options' => array( 'id' => 'id_state', 'name' => 'name', 'query' => $this->reg_module->getStates($this->context->language->id, $this->context->country->id) ) ), array( 'type' => 'select', 'label' => $this->l('City'), 'name' => 'id_city', 'required' => false, 'desc' => $this->l('Choose appropriate for selected state city. If such city are missing, then create it in module "'.$this->reg_module->name.'"'), 'options' => array( 'query' => $this->reg_module->getCities($this->context->language->id, null, null, false), 'id' => 'id_city', 'name' => 'name' ) ) Возвращает функция как и в родительскком классе вот это return parent::renderForm();
  13. Hello. Developing the admin panel for the module I was meet one strange problem. All child class methods works, but one dosnt. There is a controller class AdminStoresController.php. It when the module is installed there are class AdminStoresController extends AdminStoresControllerCore and there are one method, that do not working public function renderForm() There is nothing extraordinary in the child method, is "public" too and also without arguments. Who has faced similar can tell what could be wrong? Or at least in what side to dig? I would be very grateful for any help.
  14. Здравствуйте. Разрабатываю админку для модуля и стала твориться одна странная вещь, с которой ранее мне еще не доводилось встречаться. Не переопределяется только один из многих метод дочернего класса, остальные работают. Есть класс контроллера AdminStoresController.php. Он при установке модуля оверрайдится class AdminStoresController extends AdminStoresControllerCore в нем перегружаются несколько методов родителя, а один метод ПЕРЕОПРЕДЕЛЯТЬСЯ НЕ ХОЧЕТ public function renderForm() Ничего экстраординарного в дочернем методе нет, тоже публик и тоже без аргументов. Кто сталкивался с подобным можете подсказать в чем может быть дело? Или хотя бы в какую сторону копать? Буду безмерно благодарен за помощь.
  15. На сколько я догадываюсь это доступ групп пользователей к категориям
×
×
  • Create New...