I have an instance of OpenCart which I am trying to modify with vQmod. Specifically I am trying to disable the Add to Cart button if a product's price is zero. However, the vQmod operation is failing with a SEARCH NOT FOUND (ABORTING MOD)
error. Why is it failing?
catalog/view/theme/simplegreat/product/category.tpl:
<div class="box-product-buttons clearfix">
<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="buttons-cart"><?php echo $button_cart; ?></a>
<a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="buttons-wish" title="<?php echo $button_wishlist; ?>"></a>
<a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="buttons-compare" title="<?php echo $button_compare; ?>"></a>
</div>
vQmod file:
<operation>
<search position="replace"><![CDATA[<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="buttons-cart"><?php echo $button_cart; ?></a>]]></search>
<add><![CDATA[
// ...
]]></add>
</operation>
There are other vQmod files that modify category.tpl, but they modify other parts of the file (not the line that is being searched for here).