Post by mrfifagamer » Sun Nov 06, 2016 6:40 pm

Hello,

I need an experienced OpenCart developer to help me out with some issues I have on my website.

Please login on my website with the following details:
email: test@account.com
password: test123

1) I have the following xml modification installed, where if people buy a product , the reward points automatically get added.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<modification>



	<id>Automatically Add Reward points when purchased</id>

	<version>200.1</version>

	<vqmver>2.5.1</vqmver>

	<author>Qphoria@gmail.com</author>

	

	<file name="catalog/controller/checkout/success.php">



		<operation info="auto add reward points">

            <search position="after"><![CDATA[

			$this->cart->clear();

            ]]></search>

            <add><![CDATA[

		$order_id = $this->session->data['order_id'];

		$description = 'Order ID: #' . $order_id;

		$customer_id = $this->customer->getId();

		$order_query = $this->db->query("SELECT SUM(reward) as reward FROM `" . DB_PREFIX . "order_product` WHERE order_id = '" . (int)$order_id . "'");

		$order_info = $order_query->row;

		$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "customer_reward WHERE order_id = '" . (int)$order_id . "'");

		$reward_total = $query->row['total'];

		if (!$reward_total && (int)$order_info['reward'] > 0) {

			$this->db->query("INSERT INTO " . DB_PREFIX . "customer_reward SET customer_id = '" . (int)$customer_id . "', order_id = '" . (int)$order_id . "', points = '" . (int)$order_info['reward'] . "', description = '" . $this->db->escape($description) . "', date_added = NOW()");

		}

			]]></add>

        </operation>

	</file>

</modification>





	
Now the problem is that when people use PayPal as payment method, they do not receive their reward points. I tested it with ''cash on delivery'' and it does work, please help me out!

2) All the orders made by paypal show up as 'MISSING ORDERS' in my admin panel

I am willing to pay if necessary to fix.

New member

Posts

Joined
Sun Aug 23, 2015 6:34 pm
Who is online

Users browsing this forum: Baidu [Spider], moye548 and 12 guests