Tapi Posted June 19, 2024 Share Posted June 19, 2024 Добрый день, на форуме нашла статью как вывести в карточке товара список складов и остатками. Собственно само решение - Find and copy ProductController.php from "controllers/front/" - Paste it to "override/controllers/front" - Open the new file FIND public function initContent() { parent::initContent(); if (!$this->errors) { AFTER, INSERT $id_product = (int)Tools::getValue('id_product'); $sql = 'SELECT name,physical_quantity FROM ps_warehouse,ps_stock WHERE id_product ='.$id_product.' AND ps_warehouse.id_warehouse = ps_stock.id_warehouse'; if ($results = Db::getInstance()->ExecuteS($sql)) foreach ($results as $row) $warehouses[] = array($row['name'],$row['physical_quantity']); $this->context->smarty->assign(array( 'warehouse' => $warehouses)); - Open product.tpl from "themes/default-bootstrap" (or whatever your theme is) - Where you want to display the warehouses names and available stocks : PASTE <p>Warehouse(s) :</p> {foreach from=$warehouse item=w} {if $w[1]>0} <p>{$w[0]} ({$w[1]})</p> {/if} {/foreach} Это решение на моей версии 1.6.1.24 заработало. Подскажите пожалуйста как вывести рядом с остатком цену с каждого склада, так как в зависимости от закупок у товаров бывают разные цены по скаладам Link to comment Share on other sites More sharing options...
bergerons Posted July 7 Share Posted July 7 (edited) У каждого предложения есть свои условия — обычно требуется отыгрыш ×40, минимальный депозит и прохождение верификации, которая может занять до 15 рабочих дней, поэтому важно внимательно изучать правила перед началом игры coins game. Edited July 21 by bergerons (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now