Post by kineticworks » Wed Mar 06, 2013 2:10 am

My OC version: 1.5.5.1 with Vmod

Any kind soul here can teach me how hide the Price value under "Option"?
Image
Image

I feel that it is more user friendly, to have the package price list directly rather than displaying "additional cost".
Is there a quick method or it has to be done on the product.tpl?

Code: Select all

       <?php if ($option['type'] == 'checkbox') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
I new to OC and my programming skill is limited.

Thanks in advance!!! ;D

Newbie

Posts

Joined
Wed Mar 06, 2013 1:47 am

Post by grgr » Wed Mar 06, 2013 4:18 pm

Delete this bit:

Code: Select all

<?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by kineticworks » Wed Mar 06, 2013 8:50 pm

grgr wrote:Delete this bit:

Code: Select all

<?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
Just as I expected. Really wish there is an alternate way to disable it.
Thank You Grgr.

Newbie

Posts

Joined
Wed Mar 06, 2013 1:47 am

Post by Satya - Safiramedia » Tue Jun 21, 2022 8:49 pm

grgr wrote:
Wed Mar 06, 2013 4:18 pm
Delete this bit:

Code: Select all

<?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
pleeasee convert this scriptt opencart v1.5++ to opencart v3.0 i needd thisss case solve for don't show additional option price

User avatar
New member

Posts

Joined
Tue Jun 15, 2021 10:56 am
Location - Indonesia
Who is online

Users browsing this forum: No registered users and 14 guests