Option Group Price operator =

LiteCart Fan
Từ Thailand
Thành viên kể từ thg 8 2017

Hello,
in Option Group Price Operator there is +, % and ( I think is multiplier).
Is it possible to add = (equal to)?
Why?
The symbol that is very clear when set it up did generate confusion in visitors, with = I will write the same final price that already appear in the price product section once choosen the radio button so they will not contact asking why there are 2 different amount.
Example: base price is 10, if you choose blue is +5 (15) and if you choose yellow is +3 (13)
Now they see:
blue + 5
yellow + 3
Total price 15 (or 13).
I hope can be blue = 15
Yellow = 13
Thank you.
Vilaiporn

Curtain Guru
Từ Netherlands
Thành viên kể từ thg 12 2016

Hi
Why don`t you just remove the extra tekst behind the option.  (calculation in admin still works).
And add the desired tekst to the option self.
Done this myself

Remember backup product.inc.php fist!

Pages/product.inc.php

Look for checkbox line 267

Replace with:

        $values .= '<div class="checkbox">' . PHP_EOL
                    . '  <label>' . functions::form_draw_checkbox('options['.$group['name'].'][]', $value['name'], true, 'data-price-adjust="'. (float)$price_adjust .'" data-tax-adjust="'. (float)$tax_adjust .'"' . (!empty($group['required']) ? ' required="required"' : '')) .' '. $value['name'] . '</label>' . PHP_EOL
                    . '</div>';

LiteCart Fan
Từ Thailand
Thành viên kể từ thg 8 2017

Exceptional solution!
Can it be applied also to the radio button?
I did it:


                    . '  <label>' . functions::form_draw_radio_button('options['.$group['name'].'][]', $value['name'], true, 'data-price-adjust="'. (float)$price_adjust .'" data-tax-adjust="'. (float)$tax_adjust .'"' . (!empty($group['required']) ? ' required="required"' : '')) .' '. $value['name'] . '</label>' . PHP_EOL
                    . '</div>';```

And it works.
Do you think I can encounter problem with radio instead of checkbox?
Thank you, bye.
Vilaiporn
Curtain Guru
Từ Netherlands
Thành viên kể từ thg 12 2016

I did not try it on the radio button, but i do not see a reason why it should not work :)

Đã xóa
Từ không xác định

There are 3 options select | Radio | checkbox

for radio and checkbox is mentioned above but for select

its in line 319 inside Pages/product.inc.php

$options[] = array($value['name'] , $value['name'], 'data-price-adjust="'. (float)$price_adjust .'" data-tax-adjust="'. (float)$tax_adjust .'"');

Chủ đề này đã bị đóng do không hoạt động trong thời gian dài. Không thể đăng bài vào chủ đề này.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.