Hi - I'm using the free Reward Points extension by E-Intelligence LINK and it works a treat but I would like something changed on it and have tried to contact E-Intelligence but I haven't received a reply so I was hoping that someone can help me out on here.
The extension adds a number of reward points for the first review but I would like to change it so that it adds reward points for all reviews not just the first one.
Is this something someone can do for me and if so can you let me know the cost?
All other aspects of the extension are great.
Cheers
Marc
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_reward WHERE customer_id = '" . (int)$this->customer->getId() . "' AND description = '" . $this->db->escape($this->language->get('text_review')) . "'");
if($query->row['total'] < 1) {
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_reward SET customer_id = '" . (int)$this->customer->getId() . "', order_id = '0', description = '" . $this->db->escape($this->language->get('text_review')) . "', points = '" . (float)$this->config->get('reward_point_reviews') . "', date_added = NOW()");
}
If you want to add points for every review, remove the check for points.
Edit rewardPoint.ocmod.xml and replace code for catalog/model/catalog/review.php into:
Code: Select all
<file path="catalog/model/catalog/review.php">
<operation>
<search>
<![CDATA[$review_id = $this->db->getLastId();]]>
</search>
<add position="after">
<![CDATA[
if($this->customer->getId() && $this->config->get('reward_point_reviews_status')) {
$this->load->language('product/product');
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_reward SET customer_id = '" . (int)$this->customer->getId() . "', order_id = '0', description = '" . $this->db->escape($this->language->get('text_review')) . "', points = '" . (float)$this->config->get('reward_point_reviews') . "', date_added = NOW()");
}
]]>
</add>
</operation>
</file>
Who is online
Users browsing this forum: No registered users and 1 guest