Hi.
Thank you very much.
I used this code to get what I want: and for replacing "Add to chart" text and link I'll edit all the files where it apears.
catalog/controller/product/product.php
Code: Select all
if($product_info['price'] == 0){
$data['price'] = '';
}
if ((float)$product_info['special']) {
And for replacing "Add to chart" text and link I'll edit all the files where it appears, for example in
/catalog/view/theme/mytheme/template/product/product.tpl
Code: Select all
<input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />
<br />
<?php if($price!="") { ?>
<button type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary btn-lg btn-block"><?php echo $button_cart; ?></button>
<?php } else { ?>
<button type="button" onclick="window.open('index.php?route=information/contact');" class="btn btn-primary btn-lg btn-block"><?php echo "Contact"; ?></button>
<?php } ?>
</div>
<?php if ($minimum > 1) { ?>
Instead of
Code: Select all
<input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />
<br />
<button type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary btn-lg btn-block"><?php echo $button_cart; ?></button>
</div>
<?php if ($minimum > 1) { ?>
DigitCart wrote: ↑Sat Aug 05, 2017 11:54 pm
OR
Edit the controller file
Code: Select all
catalog/controller/product/product.php
Find
Code: Select all
if ((float)$product_info['special']) {
before it add
Code: Select all
if($product_info['price'] == 0){
$data['price'] = '<a href="index.php?route=information/contact">Contact us</a>';
}
And then clear your vqmod and ocmod cache.