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']) . "'");
		}

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Users browsing this forum: No registered users and 391 guests