Post by pooja-vishnoi » Thu Dec 07, 2017 6:00 pm

Hi,

I have to edit affiliate cookie period but in index.php there is nothing to edit now in latest version.

I am using 3.0.2.0. Please suggest in which file n location to edit for cookie period.

Also, can we track clicks and all for affiliates?How?

Thanks

New member

Posts

Joined
Sun Feb 10, 2013 9:58 pm

Post by straightlight » Thu Dec 07, 2017 10:30 pm

In catalog/controller/startup/startup.php file, this is what you'd be looking for:

Code: Select all

// Tracking Code
		if (isset($this->request->get['tracking'])) {
			setcookie('tracking', $this->request->get['tracking'], time() + 3600 * 24 * 1000, '/');
		
			$this->db->query("UPDATE `" . DB_PREFIX . "marketing` SET clicks = (clicks + 1) WHERE code = '" . $this->db->escape($this->request->get['tracking']) . "'");
		}

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Evilonion, Yahoo [Bot] and 9 guests