Forums / General Questions / securityToken and $zco_notifier

securityToken and $zco_notifier

Views: 1,438

Results 1 to 2 of 2
16 Mar 2011, 8:29 AM
#1
jaishem avatar

jaishem

New Zenner

Join Date:
Feb 2010
Posts:
55
Plugin Contributions:
0

securityToken and $zco_notifier

Please explain the following code used in the Zen Card code?

  1. What is this securityToken in shopping cart page form?

  2. What is the purpose of this line? Why is should be in the first line od the script?

// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_NO_ACCOUNT');
16 Mar 2011, 8:49 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: securityToken and $zco_notifier

  1. is a security device to prevent third parties from hijacking visitor's shopping cart.
  2. It's a notifier providing a point at which add-on modules can extend the functionality through an observer class without having to hack into the core code. That one is designed to be the first line, so that if an add-on were designed to change how the cart works when there's no account, it can do so before Zen Cart starts normal processing.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)