Доброго дня.
Хочу вивести на сайт ще одну ціну. Розумію, що можна через знижки чи акції... але хочу саме так.
В oc_product добавив 'price_m_opt'
Далі зробив:
<file path="admin/view/template/catalog/product_form.twig">
<operation>
<search><![CDATA[<label class="col-sm-2 control-label" for="input-price">{{ entry_price }}</label>]]></search>
<add position="before" offset="1"><![CDATA[<div class="form-group">
<label class="col-sm-2 control-label" for="input-price">{{ entry_price }}</label>
<div class="col-sm-10">
<input type="text" name="price" value="{{ price_m_opt }}" placeholder="{{ entry_price_m_opt }}" id="input-price" class="form-control"/>
</div>
</div>
]]></add>
</operation>
</file>
<file path="admin/controller/catalog/product.php">
<operation>
<search><![CDATA[$this->currency->format($result['price'], $this->config->get('config_currency')),]]></search>
<add position="after"><![CDATA['price_m_opt' => $this->currency->format($result['price_m_opt'], $this->config->get('config_currency')),
]]></add>
</operation>
<operation>
<search><![CDATA[if (isset($this->request->post['price'])) {]]></search>
<add position="before"><![CDATA[if (isset($this->request->post['price_m_opt'])) {
$data['price_m_opt'] = $this->request->post['price_m_opt'];
} elseif (!empty($product_info)) {
$data['price_m_opt'] = $product_info['price_m_opt'];
} else {
$data['price_m_opt'] = '';
}
]]></add>
</operation>
</file>
<file path="catalog/controller/product/category.php">
<operation>
<search><![CDATA[if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {]]></search>
<add position="before"><![CDATA[
if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
$price_m_opt = $this->currency->format($this->tax->calculate($result['price_m_opt'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
} else {
$price_m_opt = false;
}]]></add>
</operation>
<operation>
<search><![CDATA[=> $price,]]></search>
<add position="before"><![CDATA['price_m_opt' => $price_m_opt,]]></add>
</operation>
</file>
<file path="catalog/view/theme/oct_remarket/template/product/category.twig">
<operation>
<search><![CDATA[<span class="rm-module-price">{{ product.price }}</span>]]></search>
<add position="before"><![CDATA[<span class="rm-module-price">{{ product.price_m_opt }}</span>]]></add>
</operation>
</file>
В адмінці працює
Отримую Notice: Undefined index: price_m_opt in /storage/modification/catalog/controller/product/category.php
Я розумію, що багато не розумію...
Стукніть мене, будь ласка... тільки не сильно
Спасибі.