����JFIF�����%%��� }!1AQa"q2���#B��R��$3br� %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� w!1AQaq"2�B���� #3R�br� $4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|��O�������h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,���|-��v��(���� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�������;~��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@�������?�_�����j������ (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,���|-��v��(���� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�������;~��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@�������?�_�����j������ (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,��������ο�O�P��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������k�w���~���v��������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j�?�5o�%��?��� g����U@�����&O3�����a�;�^=�wH���D��/��*� �fX�I���,������k?g_���?�5o�%��?��� g����U@�F�����������*������?�o�}��Τ~g��ʀ�#V��Y������~ο�T�j��K/� ������������z��������#;�~���A�;��� w�F�����������*���տ��_�@�o��5����EU������������u�誠��W��[�����������O��?jW���@��տ���@�o��5����EM������������v�訠�#V��Y�������������V��Zv��~����vw�~���c�Q@���,��~���kgo���?�5o�%��/��� o����Q@��o�%�>�ߤ���߳����S������?��o�%�~�ߠ�d�߳����S����g�P��j��K?� _������������[� g�D����[�;�TP7���������'Ѿ���=��;/�P��j��K?� _������������[� g�D����[�;�TP���,��~���kgo���a������۔���B{���ea�`T�+ �n%Ц �����j��K?� _������������[� g�D����[�;�TP���,��~���kgo����?���%�/�~�����#����x��c�~�q�v�t`ȫ��_'h���������'�]�;{s� Pp=N= 5���%�����ڜs�����=���J��A@�����Kp�b��}��X�����4g v+:�Բ�+60�ʩ,� @�����������I �uO�����ToUv��bgUl�cP�T?�#V��Y������������j��K?� _����������!��X��]���������TK�|4��`� ��#��P\y��aa >NgL��j��K?� _������������[� g�D����[�;�TP���,��~���kgo���o�F�����$��ہ�� ��vݞr6��S�q''*02���[� g�D����[�;�TP���,��~���kgo���?�5o�%��/��� o����Q@�F�����������*(��տ���@�o��5����EE������������v�訠��������~1�o���}G�L�������5o�%��/��� o����Q@�F�����������*(��տ���@�o��5����EE5����%�˷���r�v����y�\~���)(?0���=[� i����>��gc��N=����5o�%��/��� o����Q@�F�����������*(��W��Z�l����m#���X�wn_�j`0C6윅����5o�%��/��� o����Q@��տ��y9���gbO�G�5@�n�>���#V��Y������~ο�T��V��Y����9�gc��s�T.�?Z_��[� e�D����Y�:��UP���,������k?g_����_�=_� n�~~�rI������w�,"~ԓ�!72���)( u��#V��Y������~ο�T�j��K/� ��������������K
�����Kr_���}�De>~��Z=��pjX�n[p(�"� �a,Ub�/�×�<����;��<�����K>��o���[�:����V���,��$��ϧ�*�����5O����տ��_�@�o��5����EU5��o�%����?�ꜜm�_�;>Gbs�S�����@��տ��_�@�o��5����EU ��տ��}�~�����v?�������-��o�l��~�ȥ�v����r��B1���@��տ���A�?����ggP��c�S�`@%�*����տ��_�@�o��5����EU������������u�誠7���� O���!c�|0��ёv��4�+�X�Vx�RX3��8����K>��o���[�:���u#�x��#V��Y������~ο�T�j��K/� ������������[� e�D����Y�:��UP���,������k?g_���O��[� g�D����[�:��T��=_� k����~��k����c�;����.8����c��z��Ͽ�/��zc�o����F?Z_��[� e�D����Y�:��UP���,������k?g_���C���,�v����v�o���H������(�z���w�/�����v ��T.G��Ϡ���տ��_�@�o��5����EU������������u�誠��W��[��'����%��o���:�Cڕ�R̀���j���������?�o���[�;������g0q�?��o�%�>o�_��>�gf����~4�������������u�誠�z���7�/��o���������_��[� e�D����Y�:��UP���,������k?g_���C���,�|�����o��;�Ԟ��9�l�z��ؠ3|��O�X�~���;~�q����Z�F�����������*���տ��_�@�o��5����EU!��տ��}�~����-��G��I�T�������������u�誠�#V��Y������~ο�T�j��K/� ����������#�=_� n|���KbB�gtdM��"�ڒA#n�63�6�m�P�����,���/���gS�u����#�9��5o�%��?��� g����U@��o�%�o�_�����u��'�������?��o��� ���3��?go���|m�ڇ���-S�O��x��>���^�����7����x�]_�>�qke>���m��4��7P�Yހ��
0byt3m1n1
0byt3m1n1
Path:
/
hermes
/
bosweb
/
web
/
web
/
sb_web
/
sb_web
/
b744
/
yushibrentwood.com
/
includes
/
classes
/
[
Home
]
File: order.102216.php
<?php /** * File contains the order-processing class ("order") * * @package classes--metrofax * @copyright Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: order.php 7129 2007-09-29 03:03:04Z drbyte $ */ /** * order class * * Handles all order-processing functions * * @package classes */ /* * * Altered for ORDER DELIVERY DATE contribution * Zen Cart Version: 1.3.8a * Modification Date: 2008-03-24 * Author of this modification: MrMeech * Previous authors to this contribution are: Peter Martin (pe7er), James Betesh * This contribution is licensed under the GNU Public License V2.0 * http://www.zen-cart.com/license/2_0.txt * */ require_once(DIR_FS_CATALOG. 'nusoap/nusoap.php'); if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } class order extends base { var $info, $totals, $products, $customer, $delivery, $content_type, $email_low_stock, $products_ordered_attributes, $products_ordered, $products_ordered_email, $attachArray; function order($order_id = '') { $this->info = array(); $this->totals = array(); $this->products = array(); $this->customer = array(); $this->delivery = array(); if (zen_not_null($order_id)) { $this->query($order_id); } else { $this->cart(); } } function query($order_id) { global $db; $order_id = zen_db_prepare_input($order_id); //ORDER DELIVERY DATE MOD - Added order_delivery_date to array $order_query = "select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, payment_module_code, shipping_method, shipping_module_code, coupon_code, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, order_total, order_tax, ip_address, order_delivery_date from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"; $order = $db->Execute($order_query); $totals_query = "select title, text, class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order"; $totals = $db->Execute($totals_query); while (!$totals->EOF) { if ($totals->fields['class'] == 'ot_coupon') { $coupon_link_query = "SELECT coupon_id from " . TABLE_COUPONS . " where coupon_code ='" . $order->fields['coupon_code'] . "'"; $coupon_link = $db->Execute($coupon_link_query); $zc_coupon_link = '<a href="javascript:couponpopupWindow(\'' . zen_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $coupon_link->fields['coupon_id']) . '\')">'; } $this->totals[] = array('title' => ($totals->fields['class'] == 'ot_coupon' ? $zc_coupon_link . $totals->fields['title'] . '</a>' : $totals->fields['title']), 'text' => $totals->fields['text'], 'class' => $totals->fields['class']); $totals->MoveNext(); } $order_total_query = "select text, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_total'"; $order_total = $db->Execute($order_total_query); $shipping_method_query = "select title, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_shipping'"; $shipping_method = $db->Execute($shipping_method_query); $order_status_query = "select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order->fields['orders_status'] . "' and language_id = '" . (int)$_SESSION['languages_id'] . "'"; $order_status = $db->Execute($order_status_query); //ORDER DELIVERY DATE MOD- Added order_delivery_date to array $this->info = array('currency' => $order->fields['currency'], 'currency_value' => $order->fields['currency_value'], 'payment_method' => $order->fields['payment_method'], 'payment_module_code' => $order->fields['payment_module_code'], 'shipping_method' => $order->fields['shipping_method'], 'shipping_module_code' => $order->fields['shipping_module_code'], 'coupon_code' => $order->fields['coupon_code'], 'cc_type' => $order->fields['cc_type'], 'cc_owner' => $order->fields['cc_owner'], 'cc_number' => $order->fields['cc_number'], 'cc_expires' => $order->fields['cc_expires'], 'date_purchased' => $order->fields['date_purchased'], 'orders_status' => $order_status->fields['orders_status_name'], 'last_modified' => $order->fields['last_modified'], 'total' => $order->fields['order_total'], 'tax' => $order->fields['order_tax'], 'ip_address' => $order->fields['ip_address'], 'order_delivery_date' => $order->fields['order_delivery_date'] ); $this->customer = array('id' => $order->fields['customers_id'], 'name' => $order->fields['customers_name'], 'company' => $order->fields['customers_company'], 'street_address' => $order->fields['customers_street_address'], 'suburb' => $order->fields['customers_suburb'], 'city' => $order->fields['customers_city'], 'postcode' => $order->fields['customers_postcode'], 'state' => $order->fields['customers_state'], 'country' => $order->fields['customers_country'], 'format_id' => $order->fields['customers_address_format_id'], 'telephone' => $order->fields['customers_telephone'], 'email_address' => $order->fields['customers_email_address']); $this->delivery = array('name' => $order->fields['delivery_name'], 'company' => $order->fields['delivery_company'], 'street_address' => $order->fields['delivery_street_address'], 'suburb' => $order->fields['delivery_suburb'], 'city' => $order->fields['delivery_city'], 'postcode' => $order->fields['delivery_postcode'], 'state' => $order->fields['delivery_state'], 'country' => $order->fields['delivery_country'], 'format_id' => $order->fields['delivery_address_format_id']); if (empty($this->delivery['name']) && empty($this->delivery['street_address'])) { $this->delivery = false; } $this->billing = array('name' => $order->fields['billing_name'], 'company' => $order->fields['billing_company'], 'street_address' => $order->fields['billing_street_address'], 'suburb' => $order->fields['billing_suburb'], 'city' => $order->fields['billing_city'], 'postcode' => $order->fields['billing_postcode'], 'state' => $order->fields['billing_state'], 'country' => $order->fields['billing_country'], 'format_id' => $order->fields['billing_address_format_id']); $index = 0; $orders_products_query = "select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, onetime_charges, products_priced_by_attribute, product_is_free, products_discount_type, products_discount_type_from from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by orders_products_id"; $orders_products = $db->Execute($orders_products_query); while (!$orders_products->EOF) { // convert quantity to proper decimals - account history if (QUANTITY_DECIMALS != 0) { $fix_qty = $orders_products->fields['products_quantity']; switch (true) { case (!strstr($fix_qty, '.')): $new_qty = $fix_qty; break; default: $new_qty = preg_replace('/[0]+$/', '', $orders_products->fields['products_quantity']); break; } } else { $new_qty = $orders_products->fields['products_quantity']; } $new_qty = round($new_qty, QUANTITY_DECIMALS); if ($new_qty == (int)$new_qty) { $new_qty = (int)$new_qty; } $this->products[$index] = array('qty' => $new_qty, 'id' => $orders_products->fields['products_id'], 'name' => $orders_products->fields['products_name'], 'model' => $orders_products->fields['products_model'], 'tax' => $orders_products->fields['products_tax'], 'price' => $orders_products->fields['products_price'], 'final_price' => $orders_products->fields['final_price'], 'onetime_charges' => $orders_products->fields['onetime_charges'], 'products_priced_by_attribute' => $orders_products->fields['products_priced_by_attribute'], 'product_is_free' => $orders_products->fields['product_is_free'], 'products_discount_type' => $orders_products->fields['products_discount_type'], 'products_discount_type_from' => $orders_products->fields['products_discount_type_from']); $subindex = 0; $attributes_query = "select products_options_id, products_options_values_id, products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products->fields['orders_products_id'] . "'"; $attributes = $db->Execute($attributes_query); if ($attributes->RecordCount()) { while (!$attributes->EOF) { $this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options'], 'value' => $attributes->fields['products_options_values'], 'prefix' => $attributes->fields['price_prefix'], 'price' => $attributes->fields['options_values_price']); $subindex++; $attributes->MoveNext(); } } $this->info['tax_groups']["{$this->products[$index]['tax']}"] = '1'; $index++; $orders_products->MoveNext(); } } function cart() { global $db, $currencies; $this->content_type = $_SESSION['cart']->get_content_type(); $customer_address_query = "select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from (" . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab ) left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$_SESSION['customer_id'] . "' and ab.customers_id = '" . (int)$_SESSION['customer_id'] . "' and c.customers_default_address_id = ab.address_book_id"; $customer_address = $db->Execute($customer_address_query); $shipping_address_query = "select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$_SESSION['customer_id'] . "' and ab.address_book_id = '" . (int)$_SESSION['sendto'] . "'"; $shipping_address = $db->Execute($shipping_address_query); $billing_address_query = "select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$_SESSION['customer_id'] . "' and ab.address_book_id = '" . (int)$_SESSION['billto'] . "'"; $billing_address = $db->Execute($billing_address_query); //STORE_PRODUCT_TAX_BASIS switch (STORE_PRODUCT_TAX_BASIS) { case 'Shipping': $tax_address_query = "select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$_SESSION['customer_id'] . "' and ab.address_book_id = '" . (int)($this->content_type == 'virtual' ? $_SESSION['billto'] : $_SESSION['sendto']) . "'"; $tax_address = $db->Execute($tax_address_query); break; case 'Billing': $tax_address_query = "select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$_SESSION['customer_id'] . "' and ab.address_book_id = '" . (int)$_SESSION['billto'] . "'"; $tax_address = $db->Execute($tax_address_query); break; case 'Store': if ($billing_address->fields['entry_zone_id'] == STORE_ZONE) { $tax_address_query = "select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$_SESSION['customer_id'] . "' and ab.address_book_id = '" . (int)$_SESSION['billto'] . "'"; } else { $tax_address_query = "select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$_SESSION['customer_id'] . "' and ab.address_book_id = '" . (int)($this->content_type == 'virtual' ? $_SESSION['billto'] : $_SESSION['sendto']) . "'"; } $tax_address = $db->Execute($tax_address_query); } $class =& $_SESSION['payment']; if (isset($_SESSION['cc_id'])) { $coupon_code_query = "select coupon_code from " . TABLE_COUPONS . " where coupon_id = '" . (int)$_SESSION['cc_id'] . "'"; $coupon_code = $db->Execute($coupon_code_query); } //ORDER DELIVERY DATE MOD- Added order_delivery_date to array //fix short delivery time for pre order. //$_SESSION['order_delivery_date'] $order_delivery_date = $_SESSION['order_delivery_date']; $delivery_time = (MODULE_SHIPPING_STOREHOURS_DELIVERY_DELAY * 60 + (int)(($_SESSION['cart']->show_total())/50) * 20 * 60); $current_time = time(); $pickuptime = $current_time + $delivery_time; $day_of_week = strtoupper(date(l,$current_time)); $c_day = date(d,$current_time); $c_month = date(m,$current_time); $c_year = date(Y,$current_time); $store_start = constant('MODULE_SHIPPING_STOREHOURS_START_' . $day_of_week); list($starth,$startm ) = preg_split("/[:]/",$store_start); $starttime=mktime($starth,$startm,0,$c_month,$c_day,$c_year); $newtime = $starttime + $delivery_time; $newtime_string = date('H:i',$newtime); if (( $starttime >= $current_time ) && ( $_SESSION['shipping']['id'] != 'storepickup_storepickup')) { $my_delvery_query = "SELECT TIME_FORMAT(STR_TO_DATE('". $order_delivery_date ."', '%m/%d/%Y::%W::%h:%i%p'), '%H:%i') mydeliverytime;"; $convert_time = $db->Execute($my_delvery_query); $mydeliverytime = $convert_time->fields['mydeliverytime']; if ($mydeliverytime < $newtime_string) { $order_delivery_date = date('m/d/Y::l::g:iA',$newtime); } } $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID, 'currency' => $_SESSION['currency'], 'currency_value' => $currencies->currencies[$_SESSION['currency']]['value'], 'payment_method' => $GLOBALS[$class]->title, 'payment_module_code' => $GLOBALS[$class]->code, 'coupon_code' => $coupon_code->fields['coupon_code'], // 'cc_type' => (isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : ''), // 'cc_owner' => (isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : ''), // 'cc_number' => (isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : ''), // 'cc_expires' => (isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : ''), // 'cc_cvv' => (isset($GLOBALS['cc_cvv']) ? $GLOBALS['cc_cvv'] : ''), 'shipping_method' => $_SESSION['shipping']['title'], 'shipping_module_code' => $_SESSION['shipping']['id'], 'shipping_cost' => $_SESSION['shipping']['cost'], 'subtotal' => 0, 'tax' => 0, 'total' => 0, 'tax_groups' => array(), 'comments' => (isset($_SESSION['comments']) ? $_SESSION['comments'] : ''), 'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'], 'order_delivery_date' => $order_delivery_date //'order_delivery_date' => $_SESSION['order_delivery_date'] ); /* // this is set above to the module filename it should be set to the module title like Checks/Money Order rather than moneyorder if (isset($$_SESSION['payment']) && is_object($$_SESSION['payment'])) { $this->info['payment_method'] = $$_SESSION['payment']->title; } */ $this->customer = array('firstname' => $customer_address->fields['customers_firstname'], 'lastname' => $customer_address->fields['customers_lastname'], 'company' => $customer_address->fields['entry_company'], 'street_address' => $customer_address->fields['entry_street_address'], 'suburb' => $customer_address->fields['entry_suburb'], 'city' => $customer_address->fields['entry_city'], 'postcode' => $customer_address->fields['entry_postcode'], 'state' => ((zen_not_null($customer_address->fields['entry_state'])) ? $customer_address->fields['entry_state'] : $customer_address->fields['zone_name']), 'zone_id' => $customer_address->fields['entry_zone_id'], 'country' => array('id' => $customer_address->fields['countries_id'], 'title' => $customer_address->fields['countries_name'], 'iso_code_2' => $customer_address->fields['countries_iso_code_2'], 'iso_code_3' => $customer_address->fields['countries_iso_code_3']), 'format_id' => (int)$customer_address->fields['address_format_id'], 'telephone' => $customer_address->fields['customers_telephone'], 'email_address' => $customer_address->fields['customers_email_address']); $this->delivery = array('firstname' => $shipping_address->fields['entry_firstname'], 'lastname' => $shipping_address->fields['entry_lastname'], 'company' => $shipping_address->fields['entry_company'], 'street_address' => $shipping_address->fields['entry_street_address'], 'suburb' => $shipping_address->fields['entry_suburb'], 'city' => $shipping_address->fields['entry_city'], 'postcode' => $shipping_address->fields['entry_postcode'], 'state' => ((zen_not_null($shipping_address->fields['entry_state'])) ? $shipping_address->fields['entry_state'] : $shipping_address->fields['zone_name']), 'zone_id' => $shipping_address->fields['entry_zone_id'], 'country' => array('id' => $shipping_address->fields['countries_id'], 'title' => $shipping_address->fields['countries_name'], 'iso_code_2' => $shipping_address->fields['countries_iso_code_2'], 'iso_code_3' => $shipping_address->fields['countries_iso_code_3']), 'country_id' => $shipping_address->fields['entry_country_id'], 'format_id' => (int)$shipping_address->fields['address_format_id']); $this->billing = array('firstname' => $billing_address->fields['entry_firstname'], 'lastname' => $billing_address->fields['entry_lastname'], 'company' => $billing_address->fields['entry_company'], 'street_address' => $billing_address->fields['entry_street_address'], 'suburb' => $billing_address->fields['entry_suburb'], 'city' => $billing_address->fields['entry_city'], 'postcode' => $billing_address->fields['entry_postcode'], 'state' => ((zen_not_null($billing_address->fields['entry_state'])) ? $billing_address->fields['entry_state'] : $billing_address->fields['zone_name']), 'zone_id' => $billing_address->fields['entry_zone_id'], 'country' => array('id' => $billing_address->fields['countries_id'], 'title' => $billing_address->fields['countries_name'], 'iso_code_2' => $billing_address->fields['countries_iso_code_2'], 'iso_code_3' => $billing_address->fields['countries_iso_code_3']), 'country_id' => $billing_address->fields['entry_country_id'], 'format_id' => (int)$billing_address->fields['address_format_id']); $index = 0; $products = $_SESSION['cart']->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (($i/2) == floor($i/2)) { $rowClass="rowEven"; } else { $rowClass="rowOdd"; } $this->products[$index] = array('qty' => $products[$i]['quantity'], 'name' => $products[$i]['name'], 'model' => $products[$i]['model'], 'tax' => zen_get_tax_rate($products[$i]['tax_class_id'], $tax_address->fields['entry_country_id'], $tax_address->fields['entry_zone_id']), 'tax_description' => zen_get_tax_description($products[$i]['tax_class_id'], $tax_address->fields['entry_country_id'], $tax_address->fields['entry_zone_id']), 'price' => $products[$i]['price'], 'final_price' => $products[$i]['price'] + $_SESSION['cart']->attributes_price($products[$i]['id']), 'onetime_charges' => $_SESSION['cart']->attributes_price_onetime_charges($products[$i]['id'], $products[$i]['quantity']), 'weight' => $products[$i]['weight'], 'products_priced_by_attribute' => $products[$i]['products_priced_by_attribute'], 'product_is_free' => $products[$i]['product_is_free'], 'products_discount_type' => $products[$i]['products_discount_type'], 'products_discount_type_from' => $products[$i]['products_discount_type_from'], 'id' => $products[$i]['id'], 'rowClass' => $rowClass); if ($products[$i]['attributes']) { $subindex = 0; reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { /* //clr 030714 Determine if attribute is a text attribute and change products array if it is. if ($value == PRODUCTS_OPTIONS_VALUES_TEXT_ID){ $attr_value = $products[$i]['attributes_values'][$option]; } else { $attr_value = $attributes->fields['products_options_values_name']; } */ $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$_SESSION['languages_id'] . "' and poval.language_id = '" . (int)$_SESSION['languages_id'] . "'"; $attributes = $db->Execute($attributes_query); //clr 030714 Determine if attribute is a text attribute and change products array if it is. if ($value == PRODUCTS_OPTIONS_VALUES_TEXT_ID){ $attr_value = $products[$i]['attributes_values'][$option]; } else { $attr_value = $attributes->fields['products_options_values_name']; } $this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options_name'], 'value' => $attr_value, 'option_id' => $option, 'value_id' => $value, 'prefix' => $attributes->fields['price_prefix'], 'price' => $attributes->fields['options_values_price']); $subindex++; } } // add onetime charges here //$_SESSION['cart']->attributes_price_onetime_charges($products[$i]['id'], $products[$i]['quantity']) /********************************************* * Calculate taxes for this product *********************************************/ $shown_price = (zen_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty']) + zen_add_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']); $this->info['subtotal'] += $shown_price; // find product's tax rate and description $products_tax = $this->products[$index]['tax']; $products_tax_description = $this->products[$index]['tax_description']; if (DISPLAY_PRICE_WITH_TAX == 'true') { // calculate the amount of tax "inc"luded in price (used if tax-in pricing is enabled) $tax_add = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); } else { // calculate the amount of tax for this product (assuming tax is NOT included in the price) $tax_add = zen_round(($products_tax / 100) * $shown_price, $currencies->currencies[$this->info['currency']]['decimal_places']); } $this->info['tax'] += $tax_add; if (isset($this->info['tax_groups'][$products_tax_description])) { $this->info['tax_groups'][$products_tax_description] += $tax_add; } else { $this->info['tax_groups'][$products_tax_description] = $tax_add; } /********************************************* * END: Calculate taxes for this product *********************************************/ $index++; } // Update the final total to include tax if not already tax-inc if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost']; } else { $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost']; } if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class])) { if ( isset($GLOBALS[$class]->order_status) && is_numeric($GLOBALS[$class]->order_status) && ($GLOBALS[$class]->order_status > 0) ) { $this->info['order_status'] = $GLOBALS[$class]->order_status; } } } function create($zf_ot_modules, $zf_mode = 2) { global $db, $zco_notifier; if ($this->info['total'] == 0) { if (DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID == 0) { $this->info['order_status'] = DEFAULT_ORDERS_STATUS_ID; } else { if ($_SESSION['payment'] != 'freecharger') { $this->info['order_status'] = DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID; } } } if ($_SESSION['shipping'] == 'free_free') { $this->info['shipping_module_code'] = $_SESSION['shipping']; } //ORDER DELIVERY DATE MOD- Added order_delivery_date to array $sql_data_array = array('customers_id' => $_SESSION['customer_id'], 'customers_name' => $this->customer['firstname'] . ' ' . $this->customer['lastname'], 'customers_company' => $this->customer['company'], 'customers_street_address' => $this->customer['street_address'], 'customers_suburb' => $this->customer['suburb'], 'customers_city' => $this->customer['city'], 'customers_postcode' => $this->customer['postcode'], 'customers_state' => $this->customer['state'], 'customers_country' => $this->customer['country']['title'], 'customers_telephone' => $this->customer['telephone'], 'customers_email_address' => $this->customer['email_address'], 'customers_address_format_id' => $this->customer['format_id'], 'delivery_name' => $this->delivery['firstname'] . ' ' . $this->delivery['lastname'], 'delivery_company' => $this->delivery['company'], 'delivery_street_address' => $this->delivery['street_address'], 'delivery_suburb' => $this->delivery['suburb'], 'delivery_city' => $this->delivery['city'], 'delivery_postcode' => $this->delivery['postcode'], 'delivery_state' => $this->delivery['state'], 'delivery_country' => $this->delivery['country']['title'], 'delivery_address_format_id' => $this->delivery['format_id'], 'billing_name' => $this->billing['firstname'] . ' ' . $this->billing['lastname'], 'billing_company' => $this->billing['company'], 'billing_street_address' => $this->billing['street_address'], 'billing_suburb' => $this->billing['suburb'], 'billing_city' => $this->billing['city'], 'billing_postcode' => $this->billing['postcode'], 'billing_state' => $this->billing['state'], 'billing_country' => $this->billing['country']['title'], 'billing_address_format_id' => $this->billing['format_id'], 'payment_method' => (($this->info['payment_module_code'] == '' and $this->info['payment_method'] == '') ? PAYMENT_METHOD_GV : $this->info['payment_method']), 'payment_module_code' => (($this->info['payment_module_code'] == '' and $this->info['payment_method'] == '') ? PAYMENT_MODULE_GV : $this->info['payment_module_code']), 'shipping_method' => $this->info['shipping_method'], 'shipping_module_code' => (strpos($this->info['shipping_module_code'], '_') > 0 ? substr($this->info['shipping_module_code'], 0, strpos($this->info['shipping_module_code'], '_')) : $this->info['shipping_module_code']), 'coupon_code' => $this->info['coupon_code'], 'cc_type' => $this->info['cc_type'], 'cc_owner' => $this->info['cc_owner'], 'cc_number' => $this->info['cc_number'], 'cc_expires' => $this->info['cc_expires'], 'date_purchased' => 'now()', 'orders_status' => $this->info['order_status'], 'order_total' => $this->info['total'], 'order_tax' => $this->info['tax'], 'currency' => $this->info['currency'], 'currency_value' => $this->info['currency_value'], 'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'], 'order_delivery_date' => $this->info['order_delivery_date'] ); if ($_SESSION['COWOA']) $sql_data_array[COWOA_order] = 1; zen_db_perform(TABLE_ORDERS, $sql_data_array); $insert_id = $db->Insert_ID(); $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_HEADER', array_merge(array('orders_id' => $insert_id, 'shipping_weight' => $_SESSION['cart']->weight), $sql_data_array)); for ($i=0, $n=sizeof($zf_ot_modules); $i<$n; $i++) { $sql_data_array = array('orders_id' => $insert_id, 'title' => $zf_ot_modules[$i]['title'], 'text' => $zf_ot_modules[$i]['text'], 'value' => $zf_ot_modules[$i]['value'], 'class' => $zf_ot_modules[$i]['code'], 'sort_order' => $zf_ot_modules[$i]['sort_order']); zen_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_ORDERTOTAL_LINE_ITEM', $sql_data_array); } $customer_notification = (SEND_EMAILS == 'true') ? '1' : '0'; $sql_data_array = array('orders_id' => $insert_id, 'orders_status_id' => $this->info['order_status'], 'date_added' => 'now()', 'customer_notified' => $customer_notification, 'comments' => $this->info['comments']); zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_COMMENT', $sql_data_array); return($insert_id); } function create_add_products($zf_insert_id, $zf_mode = false) { global $db, $currencies, $order_total_modules, $order_totals, $zco_notifier; // initialized for the email confirmation $this->products_ordered = ''; $this->products_ordered_html = ''; $this->subtotal = 0; $this->total_tax = 0; // lowstock email report $this->email_low_stock=''; for ($i=0, $n=sizeof($this->products); $i<$n; $i++) { $custom_insertable_text = ''; // Stock Update - Joao Correia if (STOCK_LIMITED == 'true') { if (DOWNLOAD_ENABLED == 'true') { $stock_query_raw = "select p.products_quantity, pad.products_attributes_filename, p.product_is_always_free_shipping from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_ATTRIBUTES . " pa on p.products_id=pa.products_id left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id WHERE p.products_id = '" . zen_get_prid($this->products[$i]['id']) . "'"; // Will work with only one option for downloadable products // otherwise, we have to build the query dynamically with a loop $products_attributes = $this->products[$i]['attributes']; if (is_array($products_attributes)) { $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'"; } $stock_values = $db->Execute($stock_query_raw); } else { $stock_values = $db->Execute("select * from " . TABLE_PRODUCTS . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'"); } $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_BEGIN'); if ($stock_values->RecordCount() > 0) { // do not decrement quantities if products_attributes_filename exists if ((DOWNLOAD_ENABLED != 'true') || $stock_values->fields['product_is_always_free_shipping'] == 2 || (!$stock_values->fields['products_attributes_filename']) ) { $stock_left = $stock_values->fields['products_quantity'] - $this->products[$i]['qty']; $this->products[$i]['stock_reduce'] = $this->products[$i]['qty']; } else { $stock_left = $stock_values->fields['products_quantity']; } // $this->products[$i]['stock_value'] = $stock_values->fields['products_quantity']; $db->Execute("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'"); // if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) { if ($stock_left <= 0) { // only set status to off when not displaying sold out if (SHOW_PRODUCTS_SOLD_OUT == '0') { $db->Execute("update " . TABLE_PRODUCTS . " set products_status = 0 where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'"); } } // for low stock email if ( $stock_left <= STOCK_REORDER_LEVEL ) { // WebMakers.com Added: add to low stock email $this->email_low_stock .= 'ID# ' . zen_get_prid($this->products[$i]['id']) . "\t\t" . $this->products[$i]['model'] . "\t\t" . $this->products[$i]['name'] . "\t\t" . ' Qty Left: ' . $stock_left . "\n"; } } } // Update products_ordered (for bestsellers list) // $db->Execute("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . zen_get_prid($order->products[$i]['id']) . "'"); $db->Execute("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%f', $this->products[$i]['qty']) . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'"); $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_END'); $sql_data_array = array('orders_id' => $zf_insert_id, 'products_id' => zen_get_prid($this->products[$i]['id']), 'products_model' => $this->products[$i]['model'], 'products_name' => $this->products[$i]['name'], 'products_price' => $this->products[$i]['price'], 'final_price' => $this->products[$i]['final_price'], 'onetime_charges' => $this->products[$i]['onetime_charges'], 'products_tax' => $this->products[$i]['tax'], 'products_quantity' => $this->products[$i]['qty'], 'products_priced_by_attribute' => $this->products[$i]['products_priced_by_attribute'], 'product_is_free' => $this->products[$i]['product_is_free'], 'products_discount_type' => $this->products[$i]['products_discount_type'], 'products_discount_type_from' => $this->products[$i]['products_discount_type_from'], 'products_prid' => $this->products[$i]['id']); zen_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array); $order_products_id = $db->Insert_ID(); $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_PRODUCT_LINE_ITEM', array_merge(array('orders_products_id' => $order_products_id), $sql_data_array)); $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_CREDIT_ACCOUNT_UPDATE_BEGIN'); $order_total_modules->update_credit_account($i);//ICW ADDED FOR CREDIT CLASS SYSTEM $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_ATTRIBUTES_BEGIN'); //------ bof: insert customer-chosen options to order-------- $attributes_exist = '0'; $this->products_ordered_attributes = ''; if (isset($this->products[$i]['attributes'])) { $attributes_exist = '1'; for ($j=0, $n2=sizeof($this->products[$i]['attributes']); $j<$n2; $j++) { if (DOWNLOAD_ENABLED == 'true') { $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.product_attribute_is_free, pa.products_attributes_weight, pa.products_attributes_weight_prefix, pa.attributes_discounted, pa.attributes_price_base_included, pa.attributes_price_onetime, pa.attributes_price_factor, pa.attributes_price_factor_offset, pa.attributes_price_factor_onetime, pa.attributes_price_factor_onetime_offset, pa.attributes_qty_prices, pa.attributes_qty_prices_onetime, pa.attributes_price_words, pa.attributes_price_words_free, pa.attributes_price_letters, pa.attributes_price_letters_free, pad.products_attributes_maxdays, pad.products_attributes_maxcount, pad.products_attributes_filename from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id where pa.products_id = '" . zen_db_input($this->products[$i]['id']) . "' and pa.options_id = '" . $this->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $this->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $_SESSION['languages_id'] . "' and poval.language_id = '" . $_SESSION['languages_id'] . "'"; $attributes_values = $db->Execute($attributes_query); } else { $attributes_values = $db->Execute("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.product_attribute_is_free, pa.products_attributes_weight, pa.products_attributes_weight_prefix, pa.attributes_discounted, pa.attributes_price_base_included, pa.attributes_price_onetime, pa.attributes_price_factor, pa.attributes_price_factor_offset, pa.attributes_price_factor_onetime, pa.attributes_price_factor_onetime_offset, pa.attributes_qty_prices, pa.attributes_qty_prices_onetime, pa.attributes_price_words, pa.attributes_price_words_free, pa.attributes_price_letters, pa.attributes_price_letters_free from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $this->products[$i]['id'] . "' and pa.options_id = '" . (int)$this->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$this->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $_SESSION['languages_id'] . "' and poval.language_id = '" . $_SESSION['languages_id'] . "'"); } //clr 030714 update insert query. changing to use values form $order->products for products_options_values. $sql_data_array = array('orders_id' => $zf_insert_id, 'orders_products_id' => $order_products_id, 'products_options' => $attributes_values->fields['products_options_name'], // 'products_options_values' => $attributes_values->fields['products_options_values_name'], 'products_options_values' => $this->products[$i]['attributes'][$j]['value'], 'options_values_price' => $attributes_values->fields['options_values_price'], 'price_prefix' => $attributes_values->fields['price_prefix'], 'product_attribute_is_free' => $attributes_values->fields['product_attribute_is_free'], 'products_attributes_weight' => $attributes_values->fields['products_attributes_weight'], 'products_attributes_weight_prefix' => $attributes_values->fields['products_attributes_weight_prefix'], 'attributes_discounted' => $attributes_values->fields['attributes_discounted'], 'attributes_price_base_included' => $attributes_values->fields['attributes_price_base_included'], 'attributes_price_onetime' => $attributes_values->fields['attributes_price_onetime'], 'attributes_price_factor' => $attributes_values->fields['attributes_price_factor'], 'attributes_price_factor_offset' => $attributes_values->fields['attributes_price_factor_offset'], 'attributes_price_factor_onetime' => $attributes_values->fields['attributes_price_factor_onetime'], 'attributes_price_factor_onetime_offset' => $attributes_values->fields['attributes_price_factor_onetime_offset'], 'attributes_qty_prices' => $attributes_values->fields['attributes_qty_prices'], 'attributes_qty_prices_onetime' => $attributes_values->fields['attributes_qty_prices_onetime'], 'attributes_price_words' => $attributes_values->fields['attributes_price_words'], 'attributes_price_words_free' => $attributes_values->fields['attributes_price_words_free'], 'attributes_price_letters' => $attributes_values->fields['attributes_price_letters'], 'attributes_price_letters_free' => $attributes_values->fields['attributes_price_letters_free'], 'products_options_id' => (int)$this->products[$i]['attributes'][$j]['option_id'], 'products_options_values_id' => (int)$this->products[$i]['attributes'][$j]['value_id'], 'products_prid' => $this->products[$i]['id'] ); zen_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array); $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM', $sql_data_array); if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values->fields['products_attributes_filename']) && zen_not_null($attributes_values->fields['products_attributes_filename'])) { $sql_data_array = array('orders_id' => $zf_insert_id, 'orders_products_id' => $order_products_id, 'orders_products_filename' => $attributes_values->fields['products_attributes_filename'], 'download_maxdays' => $attributes_values->fields['products_attributes_maxdays'], 'download_count' => $attributes_values->fields['products_attributes_maxcount'], 'products_prid' => $this->products[$i]['id'] ); zen_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array); $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_DOWNLOAD_LINE_ITEM', $sql_data_array); } //clr 030714 changing to use values from $orders->products and adding call to zen_decode_specialchars() // $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' . $attributes_values->fields['products_options_values_name']; $this->products_ordered_attributes .= "\n\t--" . $attributes_values->fields['products_options_name'] . ': ' . zen_decode_specialchars($this->products[$i]['attributes'][$j]['value']); } } //------eof: insert customer-chosen options ---- $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADD_PRODUCTS', $custom_insertable_text); /* START: ADD MY CUSTOM DETAILS * 1. calculate/prepare custom information to be added to this product entry in order-confirmation. * 2. Add that data to the $this->products_ordered_attributes variable, using this sort of format: * $this->products_ordered_attributes .= {INSERT CUSTOM INFORMATION HERE}; */ $this->products_ordered_attributes .= ''; // $custom_insertable_text; /* END: ADD MY CUSTOM DETAILS */ // update totals counters $this->total_weight += ($this->products[$i]['qty'] * $this->products[$i]['weight']); $this->total_tax += zen_calculate_tax($total_products_price, $products_tax) * $this->products[$i]['qty']; $this->total_cost += $total_products_price; $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_ONE_TIME_CHARGES_BEGIN'); // build output for email notification $this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' . $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) . ($this->products[$i]['onetime_charges'] !=0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') . $this->products_ordered_attributes . "\n"; $this->products_ordered_html .= '<tr>' . "\n" . '<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . ' x</td>' . "\n" . '<td class="product-details" valign="top">' . nl2br($this->products[$i]['name']) . ($this->products[$i]['model'] != '' ? ' (' . nl2br($this->products[$i]['model']) . ') ' : '') . "\n" . '<nobr><small><em> '. nl2br($this->products_ordered_attributes) .'</em></small></nobr></td>' . "\n" . '<td class="product-details-num" valign="top" align="right">' . $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) . ($this->products[$i]['onetime_charges'] !=0 ? '</td></tr>' . "\n" . '<tr><td class="product-details">' . nl2br(TEXT_ONETIME_CHARGES_EMAIL) . '</td>' . "\n" . '<td>' . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') . '</td></tr>' . "\n"; //for fax only $this->products_ordered_htm .= '<tr>' . "\n" . '<td style="border-bottom: thin dotted" align="left" valign="top" width="10%">' . $this->products[$i]['qty'] . ' </td>' . "\n" . '<td style="border-bottom: thin dotted" valign="top" align="left" width="80%"><b><font FACE="Lucida Sans, sans-serif" size=4>' . strip_tags(nl2br($this->products[$i]['name'])) . ($this->products[$i]['model'] != '' ? ' (' . nl2br($this->products[$i]['model']) . ') ' : '') . "\n" . '</font><nobr><font FACE="Lucida Sans, sans-serif" size=3> '. nl2br($this->products_ordered_attributes) .'</font></nobr></b></td>' . "\n" . '<td style="border-bottom: thin dotted" valign="top" align="right" width="10%">' . $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) . ($this->products[$i]['onetime_charges'] !=0 ? '</td></tr>' . "\n" . '<tr><td>' . nl2br(TEXT_ONETIME_CHARGES_EMAIL) . '</td>' . "\n" . '<td>' . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') . '</td></tr>' . "\n"; } $order_total_modules->apply_credit();//ICW ADDED FOR CREDIT CLASS SYSTEM $zco_notifier->notify('NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS'); } function send_order_email($zf_insert_id, $zf_mode) { global $currencies, $order_totals, $zco_notifier; // echo format_phone('1 208 - 386 2934'); // will print: (208) 386-2934 function format_phone($num) { $num = preg_replace('/[^0-9]/', '', $num); $len = strlen($num); if($len == 7) $num = preg_replace('/([0-9]{3})([0-9]{4})/', '$1-$2', $num); elseif($len == 10) $num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{4})/', '($1) $2-$3', $num); return $num; } /** * Add dashes to a credit card number. * @param int|string $cc The credit card number to format with dashes. * @return string The credit card with dashes. */ function format_creditcard($cc) { // Clean out extra data that might be in the cc $cc = str_replace(array('-',' '),'',$cc); // Get the CC Length $cc_length = strlen($cc); // Initialize the new credit card to contian the last four digits $newCreditCard = substr($cc,-4); // Walk backwards through the credit card number and add a dash after every fourth digit for($i=$cc_length-5;$i>=0;$i--){ // If on the fourth character add a dash if((($i+1)-$cc_length)%4 == 0){ $newCreditCard = '-'.$newCreditCard; } // Add the current character to the new credit card $newCreditCard = $cc[$i].$newCreditCard; } // Return the formatted credit card number return $newCreditCard; } // print_r($this); // die(); if ($this->email_low_stock != '' and SEND_LOWSTOCK_EMAIL=='1') { // send an email $email_low_stock = SEND_EXTRA_LOW_STOCK_EMAIL_TITLE . "\n\n" . $this->email_low_stock; zen_mail('', SEND_EXTRA_LOW_STOCK_EMAILS_TO, EMAIL_TEXT_SUBJECT_LOWSTOCK, $email_low_stock, STORE_OWNER, EMAIL_FROM, array('EMAIL_MESSAGE_HTML' => nl2br($email_low_stock)),'low_stock'); } // lets start with the email confirmation // make an array to store the html version $html_msg=array(); // COWOA Conditional if ($_SESSION['COWOA']) { $invoiceInfo=""; $htmlInvoiceURL=""; $htmlInvoiceValue=""; } else { $invoiceInfo=EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n"; $htmlInvoiceURL=EMAIL_TEXT_INVOICE_URL_CLICK;; $htmlInvoiceValue=zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false); } //use timezon setting //$current_time= time() - 60 * 60; // adjust tomezone server time is Easten time $current_time = time(); $current_time_string = date('m/d D g:iA',$current_time); $pickup_asap = time() + 60 * 15; $delivery_asap = time() + 60 * (int)(MODULE_SHIPPING_STOREHOURS_DELIVERY_DELAY); //intro area //ORDER DELIVERY DATE MOD- Added order_delivery_date $email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" . $this->customer['firstname'] . ' ' . $this->customer['lastname'] . ' ' . format_phone($this->customer['telephone']) . "\n\n" . EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . $current_time_string . "\n" . EMAIL_TEXT_DELIVERY_DATE . ' ' . zen_db_output($this->info['order_delivery_date']) . "\n\n" . EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n"; $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER; $my_delivery = explode("::", zen_db_output($this->info['order_delivery_date'])); $delivery_text = "DELIVERY(外送):"; $delivery_time = "Future(预订)"; $payment_class = $_SESSION['payment']; $pay_mathod = $GLOBALS[$payment_class]->title; if ($_SESSION['shipping']['id'] == 'storepickup_storepickup') { $delivery_text = "PICKUP(来拿):"; if (zen_db_output($this->info['order_delivery_date']) == 'NONE') { $delivery_time = "ASAP (尽快)"; } }else { if (zen_db_output($this->info['order_delivery_date']) == 'NONE') { $delivery_time = "ASAP (尽快) Before: ". date('g:i A',$delivery_asap); } } $delivery_text .= ' '. $pay_mathod; $delivery_time .= " " . $my_delivery[2]; $fax_info = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <header><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></header> <BODY STYLE="font-family: Lucida Sans, sans-serif"> <u> <h3> RED PASSION: ' . preg_replace('/\(.*?\)/', '', STORE_NAME) . " # <a href=\"" . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'show_order.php?red=order&oID=' . $zf_insert_id . "\">" . $zf_insert_id . "</a></h3></u>" . '<b><font size=5>' . $delivery_text .'<br>'. $delivery_time . '</font> <font size=4>' . '</b><br> Order Placed: <b>' . $current_time_string . '</font></b><br><br><table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td valign="top" width="40%">'; //Delivery address if ($this->content_type != 'virtual' && $_SESSION['shipping']['id'] != 'storepickup_storepickup') { $fax_info .= "<strong> Delivery(外送) Address</strong><br>" . '--------------------'. '<br><strong><font FACE="Lucida Sans, sans-serif" size=4>' . preg_replace ('/United States/', "", zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, '', "<br />")) . "</font></strong>"; } $fax_info .= '</td><td valign="top" width="32%">'; //Billing address $fax_info .= "Billing (帐单) Address <br>" . '--------------------' . '<br><font FACE="Lucida Sans, sans-serif" size=3>' . preg_replace ('/United States/', "", zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, '', "<br />")) . "</font>"; $fax_info .= '</td><td valign="top" width="28%">'; //Payment method if ( $pay_mathod == 'Credit Card') { $pay_mathod = "Charge " . $pay_mathod . " below."; } $fax_info .= "<strong> " . EMAIL_TEXT_PAYMENT_METHOD . "</strong><br>" . '--------------------' . "<br><b>" . $pay_mathod . "<br>" . format_phone($this->customer['telephone']) . "</b><br>" . $this->customer['email_address'] . "<br>"; $fax_info .= '</td></tr></table>'; $html_msg['EMAIL_TEXT_FROM'] = EMAIL_TEXT_FROM; $html_msg['INTRO_STORE_NAME'] = STORE_NAME; $html_msg['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING; $html_msg['EMAIL_DETAILS_FOLLOW'] = EMAIL_DETAILS_FOLLOW; $html_msg['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER; $html_msg['INTRO_ORDER_NUMBER'] = $zf_insert_id; $html_msg['INTRO_DATE_TITLE'] = EMAIL_TEXT_DATE_ORDERED; $html_msg['INTRO_DATE_ORDERED'] = $current_time_string; //strftime(DATE_FORMAT_LONG_TIME); $html_msg['EMAIL_TEXT_DELIVERY_DATE'] = EMAIL_TEXT_DELIVERY_DATE . ' ' . zen_db_output($this->info['order_delivery_date']); //COWOA replace // $html_msg['INTRO_URL_TEXT'] = EMAIL_TEXT_INVOICE_URL_CLICK; // $html_msg['INTRO_URL_VALUE'] = zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false); $html_msg['INTRO_URL_TEXT'] = $htmlInvoiceURL; $html_msg['INTRO_URL_VALUE'] = $htmlInvoiceValue; //products area $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $this->products_ordered . EMAIL_SEPARATOR . "\n"; $fax_info .= '<hr><table border="0" width="100%" cellspacing="0" cellpadding="2">' . '<tr>'. "\n" . '<td align="left" valign="top" width="10%">QTY</td>' . "\n" . '<td valign="top" align="left" width="80%">ITEMS</td>'. "\n" . '<td valign="top" align="right" width="10%">PRICE</td></tr></table><hr>'. "\n" . '<table border="0" width="100%" cellspacing="0" cellpadding="6">' . $this->products_ordered_htm . '</table>'; //EMAIL_SEPARATOR . "\n" . //$this->products_ordered . //EMAIL_SEPARATOR . "\n"; $html_msg['PRODUCTS_TITLE'] = EMAIL_TEXT_PRODUCTS; $html_msg['PRODUCTS_DETAIL']='<table class="product-details" border="0" width="100%" cellspacing="0" cellpadding="2">' . $this->products_ordered_html . '</table>'; //order totals area $html_ot .= '<td class="order-totals-text" align="right" width="100%">' . ' ' . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">' . '---------' .'</td> </tr>' . "\n" . '<tr>'; $fax_info .= '<table border="0" width="100%" cellspacing="0" cellpadding="2">' . '<tr>'. "\n" . '<td align="right" width="100%">' . ' ' . '</td> ' . "\n" . '<td></td><td align="right" nowrap="nowrap">' . '---------' .'</td> </tr>' . "\n" . '<tr>'; $tip=0; $total=0; $shipping=0; for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { if ($order_totals[$i]['code'] == 'ot_tip'){$tip = preg_replace('/[\$,]/', '', $order_totals[$i]['text']);} if ($order_totals[$i]['code'] == 'ot_total'){$total = preg_replace('/[\$,]/', '', $order_totals[$i]['text']);} if ($order_totals[$i]['code'] == 'ot_total'){ // $total = preg_replace('/[\$,]/', '', $order->totals[$i]['text']); //$fax_info .= '<td align="left" width="100%"><font FACE="Lucida Sans, sans-serif" size=4> ' . $delivery_time .'</td><td align="right" nowrap="nowrap" width="100%"><font FACE="Lucida Sans, sans-serif" size=3> ' . $order->totals[$i]['title'] . '</font></td> ' . "\n" ; $fax_info .= '<td align="right" width="100%"><font FACE="Lucida Sans, sans-serif" size=4> ' . $delivery_time .'</td><td align="right" nowrap="nowrap" width="100%"><font FACE="Lucida Sans, sans-serif" size=4> ' . $order_totals[$i]['title'] . '</font></td> ' . "\n" ; }else { $fax_info .= '<td align="right" width="100%"></td><td align="right" nowrap="nowrap" width="100%"><font FACE="Lucida Sans, sans-serif" size=3> ' . $order_totals[$i]['title'] . '</font></td> ' . "\n" ; } if ($order_totals[$i]['code'] == 'ot_shipping'){$shipping = $order_totals[$i]['value'];} $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; $html_ot .= '<td class="order-totals-text" align="right" width="100%">' . $order_totals[$i]['title'] . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">' .($order_totals[$i]['text']) .'</td> </tr>' . "\n" . '<tr>'; //$fax_info .= '<td align="right" width="100%"><font FACE="Lucida Sans, sans-serif" size=3> ' . $order_totals[$i]['title'] . '</font></td> ' . "\n" ; if (($order_totals[$i]['code'] == 'ot_tip') && ($tip == '0')) { $fax_info .= '<td align="right" nowrap="nowrap"><font szie=3> Pay Driver </font> </td> </tr>' . "\n" . '<tr>'; }else { $fax_info .= '<td align="right" nowrap="nowrap"><font FACE="Lucida Sans, sans-serif" szie=3> <b>' .($order_totals[$i]['text']) .'</b> </font> </td> </tr>' . "\n" . '<tr>'; } } $before_tip = $total - $tip; $subtotal_tax = $before_tip - $shipping; $before_tip = '$'. $before_tip; $subtotal_tax = '$'. $subtotal_tax; $html_msg['ORDER_TOTALS'] = '<table border="0" width="100%" cellspacing="0" cellpadding="2"> ' . $html_ot . ' </table>'; //$fax_info .= '<td class="order-totals-text" align="right" width="100%">' . EMAIL_SEPARATOR . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">------</td> </tr>' . "\n" . '<tr>'; $fax_info .= "</table><hr>"; //comments area $fax_info .= '<table border="0" width="100%" cellspacing="0" cellpadding="2"> ' . '<tr><td align="left" width="60%">'; if ($this->info['comments']) { $email_order .= zen_db_output($this->info['comments']) . "\n\n"; $fax_info .= zen_db_output($this->info['comments']) . "\n"; $html_msg['ORDER_COMMENTS'] = nl2br(zen_db_output($this->info['comments'])); } else { $html_msg['ORDER_COMMENTS'] = ''; $fax_info .= 'No Special Instructions'; } $fax_info .= '</td><td class="order-totals-text" align="right" width="20%">Subtotal w Tax: ' .($subtotal_tax) . '</td> ' . "\n" . '<td class="order-totals-text" align="right" width="20%">Subtotal w/o Tip: ' .($before_tip) . '</td> </tr>' . "\n"; //$fax_info .= '</td><td class="order-totals-text" align="right" width="30%">Do not show credit card info.</td> </tr>' . "\n"; $fax_info .= "</table><hr>"; //addresses area: Delivery $html_msg['HEADING_ADDRESS_INFORMATION']= HEADING_ADDRESS_INFORMATION; $html_msg['ADDRESS_DELIVERY_TITLE'] = EMAIL_TEXT_DELIVERY_ADDRESS; $html_msg['ADDRESS_DELIVERY_DETAIL'] = ($this->content_type != 'virtual') ? zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, '', "<br />") : 'n/a'; $html_msg['SHIPPING_METHOD_TITLE'] = HEADING_SHIPPING_METHOD; $html_msg['SHIPPING_METHOD_DETAIL'] = (zen_not_null($this->info['shipping_method'])) ? $this->info['shipping_method'] : 'n/a'; if ($this->content_type != 'virtual' && $_SESSION['shipping']['id'] != 'storepickup_storepickup') { //if ($_SESSION['shipping']['id'] == 'storepickup_storepickup') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], 0, '', "\n") . "\n"; $fax_info .= preg_replace ( '/\n/', "<br />", $_SESSION['driving_direction']); } //addresses area: Billing $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], 0, '', "\n") . "\n\n"; $html_msg['ADDRESS_BILLING_TITLE'] = EMAIL_TEXT_BILLING_ADDRESS; $html_msg['ADDRESS_BILLING_DETAIL'] = zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, '', "<br />"); if (is_object($GLOBALS[$_SESSION['payment']])) { $html_msg['ADDRESS_BILLING_TITLE'] = EMAIL_TEXT_BILLING_ADDRESS; $html_msg['ADDRESS_BILLING_DETAIL'] = zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, '', "<br />"); $cc_num_display = (isset($this->info['cc_number']) && $this->info['cc_number'] != '') ? substr($this->info['cc_number'], 0, 4) . str_repeat('X', (strlen($this->info['cc_number']) - 8)) . substr($this->info['cc_number'], -4) . "\n\n" : ''; $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; //preg_replace('/\(.*?\)/', '', STORE_NAME) $my_site = explode("/", HTTP_SERVER); if ($_SESSION['driving_direction'] !=='') {$fax_info .= EMAIL_SEPARATOR . "<br>";} $fax_info .= 'Site: '. preg_replace('/www\./', '', $my_site[2]). ' Red Passion: Phone or Fax (8 8 8) 387-3312'; $fax_info .= "<br>" . EMAIL_SEPARATOR . "<br>"; $email_order .= $GLOBALS[$payment_class]->title . "\n\n"; $email_order_owner = $email_order; $email_order .= (isset($this->info['cc_type']) && $this->info['cc_type'] != '') ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : ''; $email_order_owner .= (isset($this->info['cc_type']) && $this->info['cc_type'] != '') ? $this->info['cc_type'] . ' ' . $this->info['cc_number']. "\n\n Exp: " . $this->info['cc_expires']." \n\n CVV: " . $this->info['cc_cvv']. ' Zip: '. $this->billing['postcode'] ."\n\n" : ''; $fax_info .= (isset($this->info['cc_type']) && $this->info['cc_type'] != '') ? $this->info['cc_type'] . ' <b>' . format_creditcard($this->info['cc_number']). "</b> Exp: <b>" . $this->info['cc_expires']."</b> CVV: <b>" . $this->info['cc_cvv'] . '</b> Zip: <b>'. $this->billing['postcode'] ."</b><br>" : ''; $fax_info .= '</b>#' . $zf_insert_id . " " . $this->customer['firstname'] . ' ' . $this->customer['lastname'] . ' ' . format_phone($this->customer['telephone']). ' Fee: $'. $shipping . ' Tips: $' . $tip . ' <b>Total: $' . $total .'</b>'; $email_order .= ($GLOBALS[$payment_class]->email_footer) ? $GLOBALS[$payment_class]->email_footer . "\n\n" : ''; $email_order_owner .= ($GLOBALS[$payment_class]->email_footer) ? $GLOBALS[$payment_class]->email_footer . "\n\n" : ''; } else { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $email_order_owner .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $email_order .= PAYMENT_METHOD_GV . "\n\n"; $email_order_owner .= PAYMENT_METHOD_GV . "\n\n"; } $html_msg['PAYMENT_METHOD_TITLE'] = EMAIL_TEXT_PAYMENT_METHOD; $html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV ); $html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '') ? nl2br($GLOBALS[$payment_class]->email_footer) : (isset($this->info['cc_type']) && $this->info['cc_type'] != '' ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : ''); // include disclaimer $email_order .= "\n-----\n" . sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n"; $email_order_owner .= "\n-----\n" . sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n"; // include copyright $email_order .= "\n-----\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n"; $email_order_owner .= "\n-----\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n"; while (strstr($email_order, ' ')) $email_order = str_replace(' ', ' ', $email_order); while (strstr($email_order_owner, ' ')) $email_order_owner = str_replace(' ', ' ', $email_order_owner); $html_msg['EMAIL_FIRST_NAME'] = $this->customer['firstname']; $html_msg['EMAIL_LAST_NAME'] = $this->customer['lastname']; // $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER; $html_msg['EXTRA_INFO'] = ''; $zco_notifier->notify('NOTIFY_ORDER_INVOICE_CONTENT_READY_TO_SEND', array('zf_insert_id' => $zf_insert_id, 'text_email' => $email_order, 'html_email' => $html_msg)); // send additional emails if (SEND_EXTRA_ORDER_EMAILS_TO != '') { $extra_info=email_collect_extra_info('','', $this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], $this->customer['telephone']); $html_msg['EXTRA_INFO'] = $extra_info['HTML']; if ($GLOBALS[$_SESSION['payment']]->auth_code || $GLOBALS[$_SESSION['payment']]->transaction_id) { $pmt_details = 'AuthCode: ' . $GLOBALS[$_SESSION['payment']]->auth_code . ' TransID: ' . $GLOBALS[$_SESSION['payment']]->transaction_id . "\n\n"; $email_order = $pmt_details . $email_order; $email_order_owner = $pmt_details . $email_order_owner; $html_msg['EMAIL_TEXT_HEADER'] = nl2br($pmt_details) . $html_msg['EMAIL_TEXT_HEADER']; } // add attachment for ring central fax $fax_info = $fax_info . '</body></html>'; $fax_info_email = header('Content-Type: text/html; charset=utf-8') . $fax_info; $this->JattachArray = array(); $attachFileTextContent = $fax_info; //$this->JattachArray = array("raw_data" => $attachFileTextContent, "order_number" => $zf_insert_id ); $this->JattachArray['raw_data'] = $attachFileTextContent; $this->JattachArray['mime_type'] = 'text/html'; $this->JattachArray['name'] = STORE_NAME . $zf_insert_id .'.html'; // filename that the $attachFileTextContent attachment will have inside the email //write the fax info to file for api fax function do_post_request($url, $postdata, $file_contents, $files = null) { $data = ""; $boundary = "---------------------------".substr(md5(rand(0,32000)), 0, 10); //Collect Postdata foreach($postdata as $key => $val) { $data .= "--$boundary\r\n"; $data .= "Content-Disposition: form-data; name=\"".$key."\"\r\n\r\n".$val."\r\n"; } $data .= "--$boundary\r\n"; //Collect Filedata foreach($files as $key => $file) { //Joe instead of read from file, just get fax content //$fileContents = file_get_contents($file); $fileContents = $file_contents; $data .= "Content-Disposition: form-data; name=\"{$key}\"; filename=\"{$file}\"\r\n"; $data .= "Content-Type: text/html\r\n"; $data .= "Content-Transfer-Encoding: binary\r\n\r\n"; $data .= $fileContents."\r\n"; $data .= "--$boundary--\r\n"; } $params = array('http' => array( 'method' => 'POST', 'header' => 'Content-Type: multipart/form-data; boundary='.$boundary, 'content' => $data )); $ctx = stream_context_create($params); $fp = fopen($url, 'rb', false, $ctx); //$fp = fopen($url, 'rb', $ctx); if (!$fp) { $response = "Problem with $url, $php_errormsg"; //throw new Exception("Problem with $url, $php_errormsg"); } $response = utf8_encode(@stream_get_contents($fp)); if ($response === false) { $response = "Problem reading data from $url, $php_errormsg"; //throw new Exception("Problem reading data from $url, $php_errormsg"); } fclose($fp); return $response; } //metrofax function function send_metrofax($zf_insert_id, $fax_info) { $to = MODULE_SHIPPING_STORE_FAX_NUMBER . '@' . MODULE_SHIPPING_ZIPSHIP_FAX_SERVER ; $from = MODULE_SHIPPING_ZIPSHIP_FAX_EMAIL; $subject = STORE_NAME .': '. $zf_insert_id; $data = base64_encode($fax_info); $filename = $zf_insert_id .'.html'; $id = ''; $client = new soapclientnusoap('https://wsf.metrofax.com/webservice.asmx?wsdl', true); $err = $client->getError(); if ($err) { $api_result = '404'; }else { //upload fax message first $uploadparam = array( 'loginId' => MODULE_SHIPPING_ZIPSHIP_FAX_EMAIL, 'password' => 'qi0429hh', 'fileName' => $filename, 'base64EncodedString' => $data ); $uploadresult = $client->call('UploadAttachment', array('parameters' => $uploadparam)); //UploadAttachment if ($client->fault) { $api_result = 'UPLOAD FAULT'; } else { $id = $uploadresult[UploadAttachmentWithFileIdResult][ResultString]; $api_result = $uploadresult[UploadAttachmentWithFileIdResult][ResultCode]; if ($api_result !== '0') { $api_result = 'UPLOAD FAILED'; } } $param2 = array( 'device_number' => '27ab2026da5213ebd6c95e5fbe50965bdfaddf4b', 'user_action' => 'Meeting_Test' ); $param = array( 'loginId' => MODULE_SHIPPING_ZIPSHIP_FAX_EMAIL, 'password' => 'qi0429hh', 'subject' => $subject, 'message' => '', 'fromEmailAddress' => MODULE_SHIPPING_ZIPSHIP_FAX_EMAIL, 'recipients' => array( 'FaxRecipient' => array('FaxNumber' => MODULE_SHIPPING_STORE_FAX_NUMBER) ), 'attachments' => array( 'FileRef' => array('Id' => $id) ), 'coverPageInfo' => $param2, 'scheduleDate' => '', 'billingCode' => '' ); $result = $client->call('SendFaxMessage', array('parameters' => $param)); /** echo $result[SendFaxMessageResult][ResultCode]. '<br>'; echo (int)$result[SendFaxMessageResult][Items][FaxMessage][FaxId]. '<br>'; echo $result[SendFaxMessageResult][Items][FaxMessage][Subject]. '<br>'; echo $result[SendFaxMessageResult][Items][FaxMessage][Destination]. '<br>'; $destination = $result[SendFaxMessageResult][Items][FaxMessage][Destination]; ***/ // Check for a fault if ($client->fault) { $api_result = 'FAULT'; } else { $api_result = $result[SendFaxMessageResult][ResultCode]; if ($api_result !== '0') { $api_result = 'FAX FAILED'; } /*** skip checking 121213 else { //recording the fax info for check status $tracknumber = $result[SendFaxMessageResult][Items][FaxMessage][TrackingNumber]; $host = "redpassion.ipowermysql.com"; $user = "fax"; $pass = "sabrina0329"; $dbname = "contentdb"; $link = mysql_connect($host,$user,$pass) ; if (!$link) { } mysql_select_db($dbname, $link); //$sql_stmt = "insert into fax_status (id, server, account,order_datetime,restaurant,order_number,tacknumber) //values('','" . $server . "','" . $email . "',now(),'" . $store ."','". $zf_insert_id ."','" . $tracknumber . "')"; $sql_stmt = "insert into fax_status (id, server, account,order_datetime,restaurant,order_number,tacknumber) values('','" . MODULE_SHIPPING_ZIPSHIP_FAX_SERVER . "','" . MODULE_SHIPPING_ZIPSHIP_FAX_EMAIL . "',now(),'" . STORE_NAME ."','". $zf_insert_id ."','" . $tracknumber . "')"; mysql_query($sql_stmt, $link); mysql_close($link); } ****/ ///send check status in 8 mins //$cmd = '/usr/local/bin/curl http://www.redpassionhost.com/check_status.php?subject='. $subject . '&destination=' . $destination . ' '; //pclose(popen("$cmd &", 'r')); } } //end of SOAP return $api_result; } function email_order($zf_insert_id, $email_option, $send_to) { $email_info = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <header><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></header> <BODY STYLE="font-family: Lucida Sans, sans-serif"> <u> <h3> RED PASSION Order for ' . preg_replace('/\(.*?\)/', '', STORE_NAME) . " # <a href=\"" . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'show_order.php?red=order&oID=' . $zf_insert_id . "-".$email_option ."\">" . $zf_insert_id . "</a></h3></u>" ; $email_info .= ' <table border="0" cellpadding="0" cellspacing="0" width="100%" > <tr> <td> Click below to view order. </td> </tr> <tr> <td align="center" valign="middle" style="background-color:#800000; color:#FFFFFF; font-family:Helvetica, Arial, sans-serif; font-size:25px; font-weight:bold; letter-spacing:-.5px; line-height:150%; padding-top:15px; padding-right:30px; padding-bottom:15px; padding-left:30px;"> <a href="' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'show_order.php?red=order&oID=' . $zf_insert_id . '-'. $email_option . '" target="_blank" style="color:#FFFFFF; text-decoration:none;">View Order 看订单' . $zf_insert_id . '</a> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%" > <tr> <th> Click below to email customer to call Restaurant. </th> </tr> <tr> <td align="center" valign="middle" style="background-color:orange; color:black; font-family:Helvetica, Arial, sans-serif; font-size:25px; font-weight:bold; letter-spacing:-.5px; line-height:150%; padding-top:15px; padding-right:30px; padding-bottom:15px; padding-left:30px;"> <a href="' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'show_order.php?red=order&oID=' . $zf_insert_id . '-deliveried-callback' . '" target="_blank" style="color:#FFFFFF; text-decoration:none;">Ask Call Back 回电话</a> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%" > <tr> <th> Click below to email customer about Bad Credit Card . </th> </tr> <tr> <td align="center" valign="middle" style="background-color:orange; color:black; font-family:Helvetica, Arial, sans-serif; font-size:25px; font-weight:bold; letter-spacing:-.5px; line-height:150%; padding-top:15px; padding-right:30px; padding-bottom:15px; padding-left:30px;"> <a href="' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'show_order.php?red=order&oID=' . $zf_insert_id . '-deliveried-badcredit' . '" target="_blank" style="color:#FFFFFF; text-decoration:none;">Bad Credit坏信用卡</a> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%" > <tr> <th> Click below to email customer that order is deliveried or ready for pickup. </th> </tr> <tr> <td align="center" valign="middle" style="background-color:#9ACD32; color:#FFFFFF; font-family:Helvetica, Arial, sans-serif; font-size:25px; font-weight:bold; letter-spacing:-.5px; line-height:150%; padding-top:15px; padding-right:30px; padding-bottom:15px; padding-left:30px;"> <a href="' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'show_order.php?red=order&oID=' . $zf_insert_id . '-deliveried' . '" target="_blank" style="color:#FFFFFF; text-decoration:none;">Food is Ready 餐已做好</a> </td> </tr> </table> '; $email_info .= '</body></html>'; $to = $send_to ; $from = STORE_NAME . '<'. EMAIL_FROM .'>'; $subject = MODULE_SHIPPING_STORE_FAX_NUMBER.' ' .STORE_NAME .': '. $zf_insert_id; //begin of HTML message $message = $email_info; //end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text/html;charset=utf-8\r\n"; //options to send to cc+bcc //$headers .= "Cc: [email]spanc07@gmail.com[/email]"; //$headers .= "Bcc: [email]email@maaking.cXom[/email]"; // now lets send the email to metrofax faxing order. $mail_nextiva = mail($to, $subject, $message, $headers); if ($mail_nextiva) { $api_result = '0'; } else { //$api_err .= ' Mail nextiva failed'; } return $api_result; } //start fax api or mail to fax $api_result = ''; $pieces = explode(",", SEND_EXTRA_ORDER_EMAILS_TO); $api_err =''; $email_subject = MODULE_SHIPPING_STORE_FAX_NUMBER; if ($email_subject == '') { $email_subject = SEND_EXTRA_ORDER_EMAILS_TO; } /** if ($pieces[1] !='') { $to = $pieces[1]; //$from = MODULE_SHIPPING_ZIPSHIP_FAX_EMAIL; $from = 'jhuang@redpassionhost.com'; $subject = STORE_NAME .': '. $zf_insert_id; //begin of HTML message $message = 'Check your order email or fax. Question? text Joe Huang: 4146985666 Red Passion LLC'; //end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n"; mail($to, $subject, $message, $headers); } **/ switch (MODULE_SHIPPING_ZIPSHIP_FAX_SERVER) { case 'rcfax.com': //ringcentral api $myurl = 'https://service.ringcentral.com/faxapi.asp'; // RingCentral FaxOut API URL $RCUsername = "18883873312"; // RingCentral Fax Username (10-digit RC phone number) $RCPassword = "Alena1129"; // RingCentral password (5-10 numeric digits) $recipientFax = MODULE_SHIPPING_STORE_FAX_NUMBER; // Recipient 10-digit Fax number //set data (in this example from post) $mypostdata = array( 'Username' => $RCUsername, 'Password' => $RCPassword, 'Recipient' => $recipientFax, 'coverpage' => '0', //None =0 'Resolution' => '2' //Low =2 ); //sample image $files['Attachment'] = $this->JattachArray['name'] ; //ringcentral api $api_result = do_post_request($myurl, $mypostdata, $fax_info, $files); if ($api_result !== '0') { //all the api err will redirect to metrofax api $api_err = ' RCFAX ERROR: '. $api_result; $api_result = send_metrofax($zf_insert_id, $fax_info); } // mail owner // zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, MODULE_SHIPPING_STORE_FAX_NUMBER . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, // $email_order_owner . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->JattachArray, 'htmlonly', $fax_info_email); $api_result = email_order($zf_insert_id, 'email', SEND_EXTRA_ORDER_EMAILS_TO ); break; //nextiva.com mail case 'nextivafax.com': //SEND_EXTRA_ORDER_EMAILS_TO EMAIL_FROM /** //$to = MODULE_SHIPPING_STORE_FAX_NUMBER . '@' . MODULE_SHIPPING_ZIPSHIP_FAX_SERVER ; $to = $pieces[0]; //$from = MODULE_SHIPPING_ZIPSHIP_FAX_EMAIL; $from = EMAIL_FROM; $subject = STORE_NAME .': '. $zf_insert_id; //begin of HTML message $message = $fax_info_email; //end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text/html;charset=utf-8\r\n"; //options to send to cc+bcc //$headers .= "Cc: [email]spanc07@gmail.com[/email]"; //$headers .= "Bcc: [email]email@maaking.cXom[/email]"; // now lets send the email to metrofax faxing order. $mail_nextiva = mail($to, $subject, $message, $headers); if ($mail_nextiva) { $api_result = '0'; } else { $api_err .= ' Mail nextiva failed'; } zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, MODULE_SHIPPING_STORE_FAX_NUMBER . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order_owner . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->JattachArray, 'htmlonly', $fax_info_email); **/ $api_result = email_order($zf_insert_id, 'email', SEND_EXTRA_ORDER_EMAILS_TO ); break; case 'confirm': $api_result = email_order($zf_insert_id, 'confirm', SEND_EXTRA_ORDER_EMAILS_TO ); break; //api with metrofax case 'metrofax.com': //metrofax api $api_result = send_metrofax($zf_insert_id, $fax_info); //In case metrofax.com api is not working using rcfax.com domain 'NO' to send out email other than EMAIL_FROM. if ($api_result !== '0') { $api_err .= ' Metrofax ERROR: '. $api_result; $myurl = 'https://service.ringcentral.com/faxapi.asp'; // RingCentral FaxOut API URL $RCUsername = "18883873312"; // RingCentral Fax Username (10-digit RC phone number) $RCPassword = "Alena1129"; // RingCentral password (5-10 numeric digits) $recipientFax = MODULE_SHIPPING_STORE_FAX_NUMBER; // Recipient 10-digit Fax number //set data (in this example from post) $mypostdata = array( 'Username' => $RCUsername, 'Password' => $RCPassword, 'Recipient' => $recipientFax, 'coverpage' => '0', //None =0 'Resolution' => '2' //Low =2 ); //sample image $files['Attachment'] = $this->JattachArray['name'] ; //ringcentral api $api_result = do_post_request($myurl, $mypostdata, $fax_info, $files); } // mail owner // zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, MODULE_SHIPPING_STORE_FAX_NUMBER . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, // $email_order_owner . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->JattachArray, 'htmlonly', $fax_info_email); $api_result = email_order($zf_insert_id, 'email', SEND_EXTRA_ORDER_EMAILS_TO ); break; //end of metrofax api //eprint mail case 'eprint': //SEND_EXTRA_ORDER_EMAILS_TO EMAIL_FROM /** //$to = MODULE_SHIPPING_STORE_FAX_NUMBER . '@' . MODULE_SHIPPING_ZIPSHIP_FAX_SERVER ; $to = $pieces[0]; //$from = MODULE_SHIPPING_ZIPSHIP_FAX_EMAIL; $from = EMAIL_FROM; $subject = STORE_NAME .': '. $zf_insert_id; //begin of HTML message $message = $fax_info_email; //end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text/html;charset=utf-8\r\n"; //options to send to cc+bcc //$headers .= "Cc: [email]spanc07@gmail.com[/email]"; //$headers .= "Bcc: [email]email@maaking.cXom[/email]"; // now lets send the email to metrofax faxing order. $mail_nextiva = mail($to, $subject, $message, $headers); **/ $api_result = email_order($zf_insert_id, 'email', $pieces[0] ); // mail HP eprint funtion_mail.php has "empty" text condition to empty the email contents with only attachment. Make sure do not change it zen_mail('', $pieces[1], MODULE_SHIPPING_STORE_FAX_NUMBER . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, 'empty', STORE_NAME, 'spancfreedom@gmail.com', $html_msg, 'checkout_extra', $this->JattachArray); break; default: $api_result = email_order($zf_insert_id, 'email', SEND_EXTRA_ORDER_EMAILS_TO ); } if ($api_result !== '0') { //all the api err will redirect email to rcfax zen_mail('', MODULE_SHIPPING_STORE_FAX_NUMBER . '@rcfax.com', '', 'Fax as Attachment', STORE_NAME, 'spanc07@gmail.com', $html_msg, 'checkout_extra', $this->JattachArray); } if ($api_err !='' || $api_result !== '0' ) { zen_mail('', 'annahuangr2@gmail.com', 'API ERROR: ' . $api_result . ' '. $api_err. ' ' . $email_subject . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order_owner . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->JattachArray, 'htmlonly', $fax_info_email); } else { zen_mail('', 'annahuangr2@gmail.com', $email_subject . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order_owner . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->JattachArray, 'htmlonly', $fax_info_email); } //mail to customer zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order, STORE_NAME, EMAIL_FROM, $html_msg, 'checkout', $this->attachArray); } $zco_notifier->notify('NOTIFY_ORDER_AFTER_SEND_ORDER_EMAIL'); } } ?>
© 2017 -
ZeroByte.ID
.