Hi,
Is it possible to remove the product price and "add to basket" button from the homepage (featured items) and category pages?
I only want to show the price and 'add to basket' button on the individual product page itself.
Thanks,
Ryan
Is it possible to remove the product price and "add to basket" button from the homepage (featured items) and category pages?
I only want to show the price and 'add to basket' button on the individual product page itself.
Thanks,
Ryan
You will do that in their respective tpl's
catalog/view/theme/your_theme/template/module/featured.tpl
Replace all of the code in the page with this:
Now you only display name and image.
catalog/view/theme/your_theme/template/module/featured.tpl
Replace all of the code in the page with this:
Code: Select all
<div class="box">
<div class="box-heading"><?php echo $heading_title; ?></div>
<div class="box-content">
<div class="box-product">
<?php foreach ($products as $product) { ?>
<div>
<?php if ($product['thumb']) { ?>
<div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
<?php } ?>
<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
</div>
<?php } ?>
</div>
</div>
</div>
Make sure you add it to the bottom of the CSS file. For my problem (see above), I added the following code to the bottom of the stylesheet:
Code: Select all
.product-list .cart {
display:none;
}
.product-list .price {
display:none;
}
REMOVING PRICE FROME HOMEPAGE AND CATALOGUE IN OPENCART 3
Navigate to
/home/eapackag/public_html/catalog/view/theme/default/template/extension/module/featured.twig
then delete this line of code and save remember to make a backup before attempting
{% endif %}
{% if product.price %}
<p class="price">
{% if not product.special %}
{{ product.price }}
{% else %}
<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>
{% endif %}
{% if product.tax %}
<span class="price-tax">{{ text_tax }} {{ product.tax }}</span>
{% endif %}
thats all
Navigate to
/home/eapackag/public_html/catalog/view/theme/default/template/extension/module/featured.twig
then delete this line of code and save remember to make a backup before attempting
{% endif %}
{% if product.price %}
<p class="price">
{% if not product.special %}
{{ product.price }}
{% else %}
<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>
{% endif %}
{% if product.tax %}
<span class="price-tax">{{ text_tax }} {{ product.tax }}</span>
{% endif %}
thats all
Who is online
Users browsing this forum: No registered users and 85 guests