The options are displayed it their own foreach statement. The price is actually displayed OUTSIDE of that loop so if you wanted to set up a check you would simply need to apply some jQuery in that loop. The jQuery would hide the price element if return TRUE for checkbox type.
Code: Select all
<?php if ($option['type'] == 'checkbox') { ?>
<script type="text/javascript"><!--
DO JQUERY/ HIDE PRICE ELEMENT//--></script>
<?php }?>
The element you want to hide is <div class="price">
Open: catalog/view/theme/your_theme/template/product/prodcut.tpl and find this code:
Right below it add this:
This will certainly work for you.
Open: catalog/view/theme/your_theme/template/product/prodcut.tpl and find this code:
Code: Select all
<?php if ($option['type'] == 'checkbox') { ?>
Code: Select all
<script type="text/javascript"><!--
$('.price').hide();
//--></script>
I tried this method, but it didn't work for me. On my check selection it still shows + $ price.Avvici wrote: ↑Wed Sep 12, 2012 1:51 amThe element you want to hide is <div class="price">
Open: catalog/view/theme/your_theme/template/product/prodcut.tpl and find this code:Right below it add this:Code: Select all
<?php if ($option['type'] == 'checkbox') { ?>
This will certainly work for you.Code: Select all
<script type="text/javascript"><!-- $('.price').hide(); //--></script>
pleeasee convert this scriptt opencart v1.5++ to opencart v3.0 i needd thisss case solvejhuang5555 wrote: ↑Fri Apr 06, 2018 9:56 pmI tried this method, but it didn't work for me. On my check selection it still shows + $ price.Avvici wrote: ↑Wed Sep 12, 2012 1:51 amThe element you want to hide is <div class="price">
Open: catalog/view/theme/your_theme/template/product/prodcut.tpl and find this code:Right below it add this:Code: Select all
<?php if ($option['type'] == 'checkbox') { ?>
This will certainly work for you.Code: Select all
<script type="text/javascript"><!-- $('.price').hide(); //--></script>
Who is online
Users browsing this forum: Majestic-12 [Bot] and 26 guests