I added into the product description input by clicking the source button the following code to remove the add to cart buttons on opencart-extras.com
to disable the price and the buttons just add
Hope this helps
-Dave
Code: Select all
<style type="text/css">
.buttons { display: none; }
</style>
Code: Select all
<style type="text/css">
.buttons { display: none; }
.right { display: none; }
</style>
Hope this helps
-Dave
Professional Website Services - http://www.davidmgilbert.com/
Active Member
This fix is done per listing. When you add or edit the product, the WYSIWYG editor for the description has a button that says source. If you click that button ad add the code I've posted above at the very top of all that writing and then click the source button again and edit your listings description as normal, it will hide the buttons.
-Dave
-Dave
Professional Website Services - http://www.davidmgilbert.com/
Active Member
At the bottom of catalog\template\default\content\product.tpl make the following change. I have shown some surrounding code to make it easier to see where.
Code: Select all
<div class="buttons">
<table>
<tr>
<td align="left"><input type="button" value="<?php echo $button_reviews; ?>" onclick="location='<?php echo $review; ?>'" /></td>
<?php if ($price > 0 ) { ?>
<td align="right"><input type="submit" value="<?php echo $button_add_to_cart; ?>" /></td>
<?php }?>
</tr>
</table>
</div>

add the following line of code that sets 'price_amount' to catalog\controller\product.php ( extra code shown for location reference )
Code: Select all
$view->set('price', $currency->format($tax->calculate($product_info['price'], $product_info['tax_class_id'], $config->get('config_tax'))));
$view->set('price_amount', $tax->calculate($product_info['price'], $product_info['tax_class_id'], $config->get('config_tax')));
Code: Select all
<div class="buttons">
<table>
<tr>
<td align="left"><input type="button" value="<?php echo $button_reviews; ?>" onclick="location='<?php echo $review; ?>'" /></td>
<?php if ($price_amount > 0.0 ) { ?>
<td align="right"><input type="submit" value="<?php echo $button_add_to_cart; ?>" /></td>
<?php }?>
</tr>
</table>
</div>
Who is online
Users browsing this forum: No registered users and 3 guests