Code: Select all
<modification>
<id><![CDATA[PHP reviews loader - destroys the js load except on pagination.]]></id>
<version><![CDATA[1.0.0]]></version>
<vqmver><![CDATA[2.4.1]]></vqmver>
<author><![CDATA[CreadevDotOrg]]></author>
<!-- makes php load first page of reviews -->
<file name="catalog/view/theme/*/template/product/product.tpl">
<operation info="adds reviews PHP loader">
<search position="replace"><![CDATA[
<div id="review"></div>
]]></search>
<add><![CDATA[
<div id="review"><?php echo file_get_contents($this->config->get('config_url') . 'index.php?route=product/product/review&product_id=' . $product_id); ?></div>
]]></add>
</operation>
<operation info="kills reviews JS loader">
<search position="replace"><![CDATA[
$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');
]]></search>
<add><![CDATA[
// js review injector removed and replaced with php get file contents
// $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?
]]></add>
</operation>
</file>
</modification>
Code: Select all
<!-- Reviews pagination fix at product level -->
<file name="catalog/controller/product/product.php">
<operation info="increases ajax pull to 100">
<search position="replace"><![CDATA[
$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);
]]></search>
<add><![CDATA[
$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 100, 100);
]]></add>
</operation>
<operation info="increases pagination limit to 100">
<search position="replace"><![CDATA[
$pagination->limit = 5;
]]></search>
<add><![CDATA[
$pagination->limit = 100;
]]></add>
</operation>
</file>