<?php
/**
 * @package J2Store
 * @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org
 * @license GNU GPL v3 or later
 */
// No direct access to this file
defined('_JEXEC') or die;

/**
 * J2Store Message helper.
 */
class J2StoreMessage{

	public static function getMessageTags(){
		return array(
					'billing'	 => self::billingTags(),
					'shipping'	 =>	self::shippingTags(),
					'additional' => self::additionalTags()
				);
	}

	public static function additionalTags(){

		$result = 	array(
				"[SITENAME]" 		=> JText::_('J2STORE_EMAILTEMPLATE_TAG_SITENAME'),
				"[SITEURL]"	 		=> JText::_('J2STORE_EMAILTEMPLATE_TAG_SITEURL'),
				"[INVOICE_URL]"		=> JText::_('J2STORE_EMAILTEMPLATE_TAG_INVOICE_URL'),
				"[CUSTOMER_NOTE]"	=> JText::_('J2STORE_EMAILTEMPLATE_TAG_CUSTOMER_NOTE'),
				"[PAYMENT_TYPE]"	=> JText::_('J2STORE_EMAILTEMPLATE_TAG_PAYMENT_TYPE'),
				"[SHIPPING_TYPE]"	=> JText::_('J2STORE_SHIPM_SHIPPING_TYPE'),
				"[ORDERID]"			=> JText::_('J2STORE_EMAILTEMPLATE_TAG_ORDERID'),
				"[INVOICENO]"		=> JText::_('J2STORE_EMAILTEMPLATE_TAG_INVOICEID'),
				"[ORDERDATE]"		=> JText::_('J2STORE_EMAILTEMPLATE_TAG_ORDERDATE'),
				"[ORDERSTATUS]"		=> JText::_('J2STORE_EMAILTEMPLATE_TAG_ORDERSTATUS'),
				"[ORDERAMOUNT]"		=> JText::_('J2STORE_EMAILTEMPLATE_TAG_ORDERAMOUNT'),
				"[ORDER_TOKEN]"		=> JText::_('J2STORE_EMAILTEMPLATE_TAG_ORDER_TOKEN'),
				"[COUPON_CODE]"		=> JText::_('J2STORE_COUPON_CODE'),
				"[ITEMS]"			=> JText::_('J2STORE_EMAILTEMPLATE_TAG_ITEMS'),
		);
        J2Store::plugin()->event('AfterAdditionalTags', array(&$result));
        return $result;

	}

	public static function shippingTags(){
		return $result =array(
				"[SHIPPING_FIRSTNAME]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_FIRSTNAME'),
				"[SHIPPING_LASTNAME]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_LASTNAME'),
				"[SHIPPING_ADDRESS_1]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_ADDRESS_1'),
				"[SHIPPING_ADDRESS_2]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_ADDRESS_2'),
				"[SHIPPING_CITY]" =>  JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_CITY'),
				"[SHIPPING_ZIP]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_ZIP'),
				"[SHIPPING_COUNTRY]" =>  JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_COUNTRY'),
				"[SHIPPING_STATE]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_STATE'),
				"[SHIPPING_PHONE]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_PHONE'),
				"[SHIPPING_MOBILE]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_MOBILE'),
				"[SHIPPING_COMPANY]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_COMPANY'),
				"[SHIPPING_VATID]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_SHIPPING_VATID'),
				"[SHIPPING_TRACKING_ID]" => JText::_('J2STORE_SHIPPING_TRACKING_ID')
				);
	}

	public static function billingTags(){
			return $result = array(
				"[CUSTOMER_NAME]" 		=> JText::_('J2STORE_CUSTOMER_NAME'),
				"[BILLING_FIRSTNAME]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_FIRSTNAME'),
				"[BILLING_LASTNAME]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_LASTNAME'),
				"[BILLING_EMAIL]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_EMAIL'),
				"[BILLING_ADDRESS_1]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_ADDRESS_1'),
				"[BILLING_ADDRESS_2]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_ADDRESS_2'),
				"[BILLING_CITY]" =>  JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_CITY'),
				"[BILLING_ZIP]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_ZIP'),
				"[BILLING_COUNTRY]" =>  JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_COUNTRY'),
				"[BILLING_STATE]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_STATE'),
				"[BILLING_PHONE]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_PHONE'),
				"[BILLING_MOBILE]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_MOBILE'),
				"[BILLING_COMPANY]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_COMPANY'),
				"[BILLING_VATID]" => JText::_('J2STORE_EMAILTEMPLATE_TAG_BILLING_VATID')
				);
	}


}