Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

StanislavSB

Newbie
  
  • Posts

    4
  • Joined

  • Last visited

StanislavSB's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Спасибо товарищи за поддержку всё заработало!
  2. Согласен в твиге, можно было сделать аккуратнее, но ведь всё равно не показывает статус
  3. в файле: catalog/controller/product/category.php прописал строку $stock_status = $result['stock_status']; до строки: $data['products'][] = array( и строку: 'stock_status' => $stock_status после: $data['products'][] = array( получил вот такой кусок кода: $stock_status = $result['stock_status']; $data['products'][] = array( 'stock_status' => $stock_status, 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'stock' => $result['quantity'], 'description' => utf8_substr(trim(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..', 'price' => $price, 'special' => $special, 'tax' => $tax, 'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1, 'rating' => $result['rating'], 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url) ); } в файле category.twig вставил отображение: <?php echo $product['stock_status']; ?> получил вот такой кусок: <div class="caption"> <h4><a href="{{ product.href }}">{{ product.name }}</a></h4> <p>{{ product.description }}</p> {% if product.price %} <p class="price"> {% if not product.special %} {{ product.price }} {% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %} {% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p> {% endif %} <?php echo $product['stock_status']; ?> {% if product.rating %} <div class="rating"> {% for i in 1..5 %} {% if product.rating < i %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>{% endif %} {% endfor %} </div> {% endif %} </div> Заранее спасибо за ответ!
  4. Как вывести статус наличия в каталоге Opencart 3.0.2.0 (rs.2)? Делал как описано тут по opencart 2, но ничего не получилось..
×
×
  • 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.