OpenCart Addons wrote:Hi salehjoon,
You're in the correct file, but it's actually easier than you think:
catalog / view / theme / default / template / product / category.tpl
Find:
Code: Select all
<?php if (!$categories && !$products) { ?>
<div class="content"><?php echo $text_empty; ?></div>
<div class="buttons">
<div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_continue; ?></span></a></div>
</div>
<?php } ?>
Remove:
If you'd like, I can create a vQmod version of this so you don't have to edit any of your files.
Cheers,
Joel
Joel,
I'm extremely new to Opencart/php coding in general. I thought I'd take a stab at this (only as a post on the forums though to have someone who actually knows what they are doing take a look at my code and tell me if I'm in the ball park). Here is the VQmod code I wrote thinking this would fix this. Please let me know if this is even close to being correct. I've also included my logic so people can understand my train of thought.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Remove There are no products to list in this category. message</id>
<version>1.0</version>
<vqmver>2.1.5</vqmver>
<author>DSGI</author>
<file name=catalog/view/theme/default/template/product/category.tpl">
<operation>
<search position="replace"><![CDATA[
$var = '<?php echo $text_empty; ?>';
]]></search>
<add><![CDATA[
$var = '';
]]></add>
</operation>
</file>
</modification>
I'm assuming that that VQmod would find the
and simply replace it with nothing - thus removing the message that the category has no products to display in the category.
Any feedback/construction criticism is much appreciated since I've never written a VQmod script before!