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

(Вопрос)Доработка атрибутов


Recommended Posts

во всех стандартных инет магазинах атрибуты ужасно реализованы

там допустим вот в демо магазине iPod Classic атрибут 8 Гб +50 р

пользователи не очень любят высчитывать сколько это

и было бы не плохо если бы вместо +50р писалась уже конечная цена

или же что б цена основная менялась ajax в зависимости от выбранных параметров

кто-то думал над реализацией или мб видел?

так как я ничего внятного не нашел

Link to comment
Share on other sites


0_0

и будет автоматом менять основную цену на ajax в зависимости от выбранных параметров?

не ткнешь носом где эта волшебная строка?

Link to comment
Share on other sites


Там нет никакого AJAX.

В файле

catalog\controller\product\product.php

Замените

'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : FALSE,

на

'price'           => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate((($option_value['prefix'] == '+') ? ($product_info['price'] + $option_value['price']) : ($product_info['price'] - $option_value['price'])), $product_info['tax_class_id'], $this->config->get('config_tax'))) : FALSE,

Это и есть одна строка.

Только теперь надо с шаблона убрать вывод префикса

catalog\view\theme\default\template\product\product.tpl

<?php echo $option_value['prefix']; ?>
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 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.