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

Как поставить простую кнопку просмотр товара? [РЕШЕНО]


Recommended Posts

Всем доброго времени суток!

Я делаю простой каталог товаров и прошу подсказок.

Я удалил корзину,закладки,в сравнении и кнопку купить из всех категорий и модулей.

Теперь возник вопрос: КАК ПОСТАВИТЬ КНОПКУ ПРОСМОТР с переходом на сторонницу товара?

Подскажите кто знает!

Модуль Быстрый просмотр не рассматриваю как вариант.Вот именно нужно как прописал выше: с переходом на сторонницу товара?

Link to comment
Share on other sites


[=== catalog/controller/product/category.php ===]

где-то в районе ~ 190-ой строки

$this->data['products'][] = array(
'product_id'  => $result['product_id'],
'thumb'	   => $image,
'name'		=> $result['name'],
'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',
'price'	   => $price,
'special'	 => $special,
'tax'		 => $tax,
'rating'	  => $result['rating'],
'reviews'	 => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
'href'		=> $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'])
);

вот это ссылка на страницу товара

'href'		=> $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'])

в шаблоне можно выводить так:

<a href="<?php echo $product['href']; ?>"><input type="button" value="<?php echo $button_details; ?>" class="button"></a>

не забывая добавить соответствующие переменные в контроллер [=== catalog/controller/product/category.php ===]

$this->data['button_details'] = $this->language->get('button_details');

и языковой файл [=== catalog/language/ваш_язык/product/category.php ===]

$_['button_details']		 = 'Подробнее';

Edited by afwollis
Link to comment
Share on other sites

В языковой файл я добавил.

это:

<a href="<?php echo $product['href']; ?>"><input type="button" value="<?php echo $button_details; ?>" class="button"></a>

я добавил для котегорий в: catalog/view/theme/тема/template/product/category

А вот это:

$this->data['button_details'] = $this->language->get('button_details');

куда точно вписать в в контроллер?

Link to comment
Share on other sites


рядом с

$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_continue'] = $this->language->get('button_continue');

Link to comment
Share on other sites

Всё получилось!Благодарю.

В модули также всё прописывать?

И скажите.Как отключить просмотр товара в категориях список? Совсем.

Link to comment
Share on other sites


В модулях я установил,всё получилось.

Не могу в поиске сделать. Удалил кнопку купит в поиске и в место неё появилась надпись: null. Как её убрать? И поставить "Подробнее".

Кто поможет решить этот вопрос?

Link to comment
Share on other sites


Guest
This topic is now closed to further replies.
 Share

×
×
  • 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.