INSERT INTO `journal3_style` (`style_name`, `style_label`, `style_type`, `style_value`, `serialized`) VALUES
('Top Menu Default', 'Top Menu Default', 'menu', '{\"valueFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":{\"color\":\"__VAR__GRAY\"},\"text-align\":\"\",\"text-transform\":\"uppercase\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"700\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueAccordionOpenIconHover\":\"\",\"valueAccordionCloseIconHover\":\"\",\"valueAccordionBorder\":{\"border-width\":\"\",\"border-top-width\":\"\",\"border-right-width\":\"\",\"border-bottom-width\":\"\",\"border-left-width\":\"\",\"border-style\":\"\",\"border-color\":\"\"},\"valueTextTruncate\":\"true\",\"valueCountBadge\":\"\",\"valueBackgroundActive\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\",\"background-blend-mode\":\"\"},\"valueAccordionBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueFontActive\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueDivider\":{\"width\":\"\",\"style\":\"\",\"color\":{\"color\":\"\"}},\"valueIconSize\":\"13\",\"valueSFontHover\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueItemPadding\":{\"padding\":\"\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"\",\"padding-left\":\"\"},\"valueDropdownIndicator\":\"false\",\"valueStaticFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":{\"color\":\"\"},\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueCountBadgePosition\":\"inline\",\"valueBorderRadius\":{\"border-radius\":\"\",\"border-top-left-radius\":\"\",\"border-top-right-radius\":\"\",\"border-bottom-right-radius\":\"\",\"border-bottom-left-radius\":\"\",\"borderRadiusUnit\":\"px\",\"custom\":\"\"},\"valueIconActive\":\"\",\"valueSFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":{\"color\":\"\"},\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueDisplay\":\"left\",\"valueIconHover\":\"\",\"valueAccordionBorderRadius\":{\"border-radius\":\"\",\"border-top-left-radius\":\"\",\"border-top-right-radius\":\"\",\"border-bottom-right-radius\":\"\",\"border-bottom-left-radius\":\"\",\"borderRadiusUnit\":\"px\"},\"valueAccordionBackgroundHover\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueCountBadgeVisibility\":\"true\",\"valueCountBadgeOffset\":{\"first\":\"15\",\"second\":\"-5\"},\"valueIconMargin\":{\"margin\":\"\",\"margin-top\":\"\",\"margin-right\":\"5\",\"margin-bottom\":\"\",\"margin-left\":\"\"},\"valueItemSpacing_multi\":[{\"min\":\"\",\"max\":\"__VAR__PHONE_LARGE\",\"value\":{\"margin\":\"\",\"margin-top\":\"\",\"margin-right\":\"\",\"margin-bottom\":\"\",\"margin-left\":\"5\"}}],\"valueAccordionBorderHover\":\"\",\"valueIconColor\":{\"color\":\"\"},\"valueAccordionCloseIcon\":{\"size\":\"\",\"color\":\"\",\"offsetX\":\"\",\"offsetY\":\"\",\"flip\":\"\",\"margin\":{\"margin\":\"\",\"margin-top\":\"\",\"margin-right\":\"\",\"margin-bottom\":\"\",\"margin-left\":\"\"},\"icon\":{\"code\":\"\",\"name\":\"\"},\"type\":\"\",\"image\":\"\"},\"valueAccordionOpenIcon\":{\"size\":\"\",\"color\":\"\",\"offsetX\":\"\",\"offsetY\":\"\",\"flip\":\"\",\"margin\":{\"margin\":\"\",\"margin-top\":\"\",\"margin-right\":\"\",\"margin-bottom\":\"\",\"margin-left\":\"\"},\"icon\":{\"code\":\"\",\"name\":\"\"},\"type\":\"\",\"image\":\"\"},\"valueIconWidth\":\"\",\"valueFontHover\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_16\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBackgroundHover\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\",\"background-blend-mode\":\"\"},\"valueBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":{\"color\":\"\"},\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\",\"background-blend-mode\":\"\"},\"valueItemSpacing\":{\"margin\":\"\",\"margin-top\":\"\",\"margin-right\":\"\",\"margin-bottom\":\"\",\"margin-left\":\"10\"}}', 1),
('LARGE DARK', '', 'button', '{\"valueFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"__VAR__MEDIUM_2\"},\"valuePadding\":{\"padding\":\"20\",\"padding-top\":\"\",\"padding-right\":\"25\",\"padding-bottom\":\"\",\"padding-left\":\"25\"},\"valueBGFocus\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_9\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueBorderActive\":\"\",\"valueFontActive\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBGHover\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_9\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueShadowFocus\":{\"offsetX\":\"0\",\"offsetY\":\"0\",\"blur\":\"20\",\"spread\":\"\",\"color\":\"rgba(0, 0, 0, 0.25)\",\"inner\":\"true\",\"none\":\"false\"},\"valueShadowHover\":\"\",\"valueBorderRadius\":{\"border-radius\":\"2\",\"border-top-left-radius\":\"\",\"border-top-right-radius\":\"\",\"border-bottom-right-radius\":\"\",\"border-bottom-left-radius\":\"\",\"borderRadiusUnit\":\"px\"},\"valueShadow\":{\"offsetX\":\"\",\"offsetY\":\"\",\"blur\":\"\",\"spread\":\"\",\"color\":\"\",\"inner\":\"false\",\"none\":\"false\"},\"valueSize\":{\"first\":\"\",\"second\":\"\"},\"valueMaxSize\":{\"first\":\"\",\"second\":\"\"},\"valueBG\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_4\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueShadowActive\":\"\",\"valueFontFocus\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBorderFocus\":\"\",\"valueBGActive\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_9\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueFontHover\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBorder\":{\"border-width\":\"\",\"border-top-width\":\"\",\"border-right-width\":\"\",\"border-bottom-width\":\"\",\"border-left-width\":\"\",\"border-style\":\"\",\"border-color\":\"\"},\"valueBorderHover\":\"\"}', 1),
('LARGE DEFAULT', '', 'button', '{\"valueFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"__VAR__MEDIUM_2\"},\"valuePadding\":{\"padding\":\"20\",\"padding-top\":\"\",\"padding-right\":\"25\",\"padding-bottom\":\"\",\"padding-left\":\"25\"},\"valueBGFocus\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueBorderActive\":\"\",\"valueFontActive\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBGHover\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueShadowFocus\":{\"offsetX\":\"0\",\"offsetY\":\"0\",\"blur\":\"20\",\"spread\":\"\",\"color\":\"rgba(0, 0, 0, 0.25)\",\"inner\":\"true\",\"none\":\"false\"},\"valueShadowHover\":\"\",\"valueBorderRadius\":{\"border-radius\":\"2\",\"border-top-left-radius\":\"\",\"border-top-right-radius\":\"\",\"border-bottom-right-radius\":\"\",\"border-bottom-left-radius\":\"\",\"borderRadiusUnit\":\"px\"},\"valueShadow\":{\"offsetX\":\"\",\"offsetY\":\"\",\"blur\":\"\",\"spread\":\"\",\"color\":\"\",\"inner\":\"false\",\"none\":\"false\"},\"valueSize\":{\"first\":\"\",\"second\":\"\"},\"valueMaxSize\":{\"first\":\"\",\"second\":\"\"},\"valueBG\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueShadowActive\":\"\",\"valueFontFocus\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBorderFocus\":\"\",\"valueBGActive\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueFontHover\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBorder\":{\"border-width\":\"\",\"border-top-width\":\"\",\"border-right-width\":\"\",\"border-bottom-width\":\"\",\"border-left-width\":\"\",\"border-style\":\"\",\"border-color\":\"\"},\"valueBorderHover\":\"\"}', 1),
('LARGE COLOR', '', 'button', '{\"valueFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"__VAR__MEDIUM\"},\"valuePadding\":{\"padding\":\"17\",\"padding-top\":\"\",\"padding-right\":\"22\",\"padding-bottom\":\"\",\"padding-left\":\"22\"},\"valueBGFocus\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_16\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueBorderActive\":\"\",\"valueFontActive\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBGHover\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_16\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueShadowFocus\":{\"offsetX\":\"0\",\"offsetY\":\"0\",\"blur\":\"20\",\"spread\":\"\",\"color\":\"rgba(0, 0, 0, 0.25)\",\"inner\":\"true\",\"none\":\"false\"},\"valueShadowHover\":\"\",\"valueFontFocusColor\":\"\",\"valueBorderRadius\":{\"border-radius\":\"2\",\"border-top-left-radius\":\"\",\"border-top-right-radius\":\"\",\"border-bottom-right-radius\":\"\",\"border-bottom-left-radius\":\"\",\"borderRadiusUnit\":\"px\"},\"valueShadow\":{\"offsetX\":\"\",\"offsetY\":\"\",\"blur\":\"\",\"spread\":\"\",\"color\":\"\",\"inner\":\"false\",\"none\":\"false\"},\"valueSize\":{\"first\":\"\",\"second\":\"\"},\"valueMaxSize\":{\"first\":\"\",\"second\":\"\"},\"valueBG\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_14\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueShadowActive\":\"\",\"valueFontFocus\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBorderFocus\":\"\",\"valueBGActive\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_16\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueFontHover\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBorder\":{\"border-width\":\"\",\"border-top-width\":\"\",\"border-right-width\":\"\",\"border-bottom-width\":\"\",\"border-left-width\":\"\",\"border-style\":\"\",\"border-color\":\"\"},\"valueFontActiveColor\":\"\",\"valueBorderHover\":\"\"}', 1),
('Right Main Menu Dropdown', '', 'dropdown', '{\"valueFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueMenuStyle\":\"__VAR__Flyout Dropdown\",\"valueCountBadge\":\"\",\"valueMenuTriangleMargin\":\"-10\",\"valueBGHover\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueDivider\":{\"width\":\"\",\"style\":\"solid\",\"color\":\"__VAR__COLOR_11\"},\"valueMenuTriangleStatus\":\"\",\"valueMenuTriangleColor\":\"__VAR__COLOR_16\",\"valueMenuTriangleOffset\":{\"first\":\"\",\"second\":\"\"},\"valueMenuTriangleAlign\":\"\",\"valueItemPadding\":{\"padding\":\"7\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"\",\"padding-left\":\"\"},\"valueStaticFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueBorderRadius\":{\"border-radius\":\"\",\"border-top-left-radius\":\"\",\"border-top-right-radius\":\"\",\"border-bottom-right-radius\":\"\",\"border-bottom-left-radius\":\"\",\"borderRadiusUnit\":\"px\"},\"valueShadow\":\"__VAR__LARGE\",\"valueIconHover\":\"\",\"valueAlign\":\"center\",\"valueWidth\":\"150\",\"valueBG\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueCountBadgeVisibility\":\"true\",\"valueHeight\":\"42\",\"valueIconColor\":\"\",\"valueFontHover\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":\"__VAR__COLOR_1\",\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":\"\",\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"__VAR__SMALL\"},\"valueBorder\":{\"border-width\":\"\",\"border-top-width\":\"\",\"border-right-width\":\"\",\"border-bottom-width\":\"\",\"border-left-width\":\"\",\"border-style\":\"\",\"border-color\":\"\"},\"valueBackgroundHover\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__ACCENT_1\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"__VAR__COLOR_8\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"}}', 1),
('Narrow Content Width', '', 'page', '{\"valueBodyBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueColumnRightBorder\":{\"border-width\":\"\",\"border-top-width\":\"\",\"border-right-width\":\"\",\"border-bottom-width\":\"\",\"border-left-width\":\"\",\"border-style\":\"\",\"border-color\":\"\"},\"valueContainerPadding\":{\"padding\":\"\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"\",\"padding-left\":\"\"},\"valueBoxedLayout\":\"fullwidth\",\"valueColumnRightBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueColumnLeftPadding\":{\"padding\":\"\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"\",\"padding-left\":\"\"},\"valueBoxedBorder\":{\"border-width\":\"\",\"border-top-width\":\"\",\"border-right-width\":\"\",\"border-bottom-width\":\"\",\"border-left-width\":\"\",\"border-style\":\"\",\"border-color\":\"\"},\"valueColumnLeftTabletStatus\":\"\",\"valueBoxedBodySpacing\":\"\",\"valueBoxedContainerShadow\":{\"offsetX\":\"\",\"offsetY\":\"\",\"blur\":\"\",\"spread\":\"\",\"color\":\"\",\"inner\":\"false\",\"none\":\"false\"},\"valueContentPadding\":{\"padding\":\"\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"\",\"padding-left\":\"\"},\"valuePageTitleVisibility\":\"true\",\"valueBoxedHeaderPadding\":\"\",\"valueColumnRightTabletStatus\":\"\",\"valueContentSidePadding\":\"\",\"valueContentBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueContainerWidth\":\"1000\",\"valuePageTitleStyle\":\"\",\"valueColumnLeftBorder\":{\"border-width\":\"\",\"border-top-width\":\"\",\"border-right-width\":\"\",\"border-bottom-width\":\"\",\"border-left-width\":\"\",\"border-style\":\"\",\"border-color\":\"\"},\"valueColumnsWidth\":\"\",\"valueColumnRightPadding\":{\"padding\":\"\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"\",\"padding-left\":\"\"},\"valueColumnLeftBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"},\"valueContentWidth\":\"\",\"valueContainerBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":\"\",\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\"}}', 1),
('LINKS_MENU_GN51VJ', 'Footer Menu', 'links_menu', '{\"valuePadding\":{\"padding\":\"\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"\",\"padding-left\":\"\"},\"valueScrollTouch\":\"true\",\"valueItemWidth\":\"auto\",\"valueCountBadge\":\"\",\"valueScrollColor\":{\"color\":\"\"},\"valueLinksPlusMobileCloseOffset\":{\"first\":\"\",\"second\":\"\"},\"valueItemPadding_multi\":[{\"min\":\"\",\"max\":\"__VAR__PHONE_LARGE\",\"value\":{\"padding\":\"\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"10\",\"padding-left\":\"\"}}],\"valueItemDividerHover\":{\"color\":\"\"},\"valueLinksColumnDividerColor\":{\"color\":\"\"},\"valueLinksPlusButtonMobileStatus\":\"false\",\"valueTrackColor\":{\"color\":\"\"},\"valueItemFontHover\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":{\"color\":\"\"},\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":{\"color\":\"\"},\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueItemBackgroundHover\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":{\"color\":\"\"},\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\",\"background-blend-mode\":\"\"},\"valueLinksColumnDividerWidth\":\"\",\"valueItemPadding\":{\"padding\":\"\",\"padding-top\":\"\",\"padding-right\":\"\",\"padding-bottom\":\"\",\"padding-left\":\"\"},\"valueDirection\":\"vertical\",\"valueLinksPlusMobileOpen\":{\"size\":\"\",\"color\":{\"color\":\"\"},\"offsetX\":\"\",\"offsetY\":\"\",\"flip\":\"\",\"margin\":{\"margin\":\"\",\"margin-top\":\"\",\"margin-right\":\"\",\"margin-bottom\":\"\",\"margin-left\":\"\"},\"none\":\"false\",\"icon\":{\"code\":\"\",\"name\":\"\"},\"type\":\"\",\"image\":\"\"},\"valueItemBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":{\"color\":\"\"},\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\",\"background-blend-mode\":\"\"},\"valueTitleDivider\":\"\",\"valueItemFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":{\"color\":\"\"},\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":{\"color\":\"\"},\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueAlign\":\"start\",\"valueLinksPlusMobileClose\":{\"size\":\"\",\"color\":{\"color\":\"\"},\"offsetX\":\"\",\"offsetY\":\"\",\"flip\":\"\",\"margin\":{\"margin\":\"\",\"margin-top\":\"\",\"margin-right\":\"\",\"margin-bottom\":\"\",\"margin-left\":\"\"},\"none\":\"false\",\"icon\":{\"code\":\"\",\"name\":\"\"},\"type\":\"\",\"image\":\"\"},\"valueLinksColumns\":\"initial\",\"valueItemDivider\":{\"width\":\"\",\"style\":\"\",\"color\":{\"color\":\"\"}},\"valueTitleFont\":{\"word-spacing\":\"\",\"line-height\":\"\",\"font-family\":\"\",\"color\":{\"color\":\"\"},\"text-align\":\"\",\"text-transform\":\"\",\"text-decoration\":\"\",\"font-style\":\"\",\"textShadowBlur\":\"\",\"font-weight\":\"\",\"textShadowColor\":{\"color\":\"\"},\"textShadowOffsetX\":\"\",\"textShadowOffsetY\":\"\",\"word-break\":\"\",\"letter-spacing\":\"\",\"font-size\":\"\"},\"valueLinksColumnDividerStyle\":\"solid\",\"valueCountBadgeVisibility\":\"false\",\"valueCountBadgeOffset\":{\"first\":\"\",\"second\":\"\"},\"valueLinksColumnGap\":\"\",\"valueModuleTitle\":\"\",\"valueLayout\":\"start\",\"valueItemIcon\":{\"size\":\"\",\"color\":{\"color\":\"\"},\"offsetX\":\"\",\"offsetY\":\"\",\"flip\":\"\",\"margin\":{\"margin\":\"\",\"margin-top\":\"\",\"margin-right\":\"7\",\"margin-bottom\":\"\",\"margin-left\":\"\"},\"none\":\"false\",\"icon\":{\"name\":\"angle-right\",\"code\":\"f105\"},\"type\":\"\",\"image\":\"\"},\"valueScroll\":\"false\",\"valueTitleAlign\":\"\",\"valueItemIconHover\":{\"color\":\"\"},\"valueBackground\":{\"backgroundPositionX\":\"\",\"backgroundPositionY\":\"\",\"background-attachment\":\"\",\"background-color\":{\"color\":\"\"},\"background-origin\":\"\",\"background-position\":\"\",\"backgroundSizeW\":\"\",\"overlay\":\"\",\"gradient\":\"\",\"backgroundSizeUnit\":\"px\",\"none\":\"false\",\"backgroundSizeH\":\"\",\"background-repeat\":\"\",\"backgroundPositionUnit\":\"px\",\"background-image\":\"\",\"background-blend-mode\":\"\"}}', 1);

-- --------------------------------------------------------

--
-- Table structure for table `journal3_variable`
--

CREATE TABLE `journal3_variable` (
  `variable_name` varchar(64) NOT NULL,
  `variable_label` varchar(64) NOT NULL,
  `variable_type` varchar(64) NOT NULL,
  `variable_value` text NOT NULL,
  `serialized` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `journal3_variable`
--

INSERT INTO `journal3_variable` (`variable_name`, `variable_label`, `variable_type`, `variable_value`, `serialized`) VALUES
('COLOR_2', '', 'color', 'rgba(35, 56, 81, 1)', 0),
('COLOR_1', '', 'color', 'rgba(255, 255, 255, 1)', 0),
('COLOR_5', '', 'color', 'rgba(143, 210, 238, 1)', 0),
('COLOR_6', '', 'color', 'rgba(232, 40, 77, 1)', 0),
('COLOR_7', '', 'color', 'rgba(254, 225, 91, 1)', 0),
('PHONE', '', 'breakpoint', '470', 0),
('PHONE_LARGE', '', 'breakpoint', '760', 0),
('TABLET', '', 'breakpoint', '1024', 0),
('DESKTOP', '', 'breakpoint', '1500', 0),
('NONE', '', 'shadow', '{\"offsetX\":\"\",\"offsetY\":\"\",\"blur\":\"\",\"spread\":\"\",\"color\":\"\",\"inner\":\"false\",\"none\":\"true\"}', 1),
('ACCENT', '', 'font', '{\"type\":\"google\",\"subsets\":\"latin-ext\",\"font-family\":\"Pacifico\",\"font-weight\":\"regular\",\"font-style\":\"\"}', 1),
('COLOR_3', '', 'color', 'rgba(245, 245, 245, 1)', 0),
('COLOR_4', '', 'color', 'rgba(6, 30, 187, 1)', 0),
('SPACING', '', 'value', '20', 0),
('MEDIUM', '', 'font_size', '16', 0),
('TRANSPARENT', '', 'color', 'rgba(0, 0, 0, 0)', 0),
('DEFAULT', 'DEFAULT', 'font_size', '6', 0),
('SMALL', '', 'font_size', '13', 0),
('EXTRA_SMALL', 'EXTRA_SMALL', 'font_size', '13', 0),
('COLOR_12', '', 'color', 'rgba(247, 249, 255, 1)', 0),
('LIGHT', '', 'gradient', 'background-image: linear-gradient(to top, #fff ,#dee6f9);', 0),
('DARK', '', 'gradient', 'background-image: linear-gradient(315deg, #336994 0%, #223752 74%)', 0),
('ORANGE', '', 'gradient', 'background-image: linear-gradient(to right, #fa709a 0%, #fee140 100%);', 0),
('COLOR_10', '', 'color', 'rgba(250, 250, 250, 1)', 0),
('HEADING_MEDIUM', '', 'font_size', '32', 0),
('COLOR_11', '', 'color', 'rgba(221, 221, 221, 1)', 0),
('COLOR_9', '', 'color', 'rgba(78, 177, 66, 1)', 0),
('LARGE', 'LARGE', 'font_size', '22', 0),
('HEADING', '', 'font_size', '28', 0),
('HEADING_LARGE', '', 'font_size', '40', 0),
('INNER', '', 'shadow', '{\"offsetX\":\"0\",\"offsetY\":\"0\",\"blur\":\"15\",\"spread\":\"-5\",\"color\":\"rgba(0, 0, 0, 0.4)\",\"inner\":\"true\",\"none\":\"false\"}', 1),
('COLOR_8', '', 'color', 'rgba(237, 242, 254, 1)', 0),
('ACCENT-1', '', 'color', 'rgba(187, 198, 221, 1)', 0),
('HEADINGS BOLD', '', 'font', '{\"type\":\"google\",\"subsets\":\"latin-ext\",\"font-family\":\"Overpass\",\"font-weight\":\"700\",\"font-style\":\"\"}', 1),
('LIGHT', '', 'shadow', '{\"offsetX\":\"0\",\"offsetY\":\"5\",\"blur\":\"30\",\"spread\":\"-5\",\"color\":\"rgba(0, 0, 0, 0.15)\",\"inner\":\"false\",\"none\":\"false\"}', 1),
('HUGE', '', 'font_size', '60', 0),
('BIG', '', 'font_size', '48', 0),
('BODY', '', 'font', '{\"type\":\"google\",\"subsets\":\"latin-ext\",\"font-family\":\"Overpass\",\"font-weight\":\"regular\",\"font-style\":\"normal\"}', 1),
('MEDIUM', '', 'shadow', '{\"offsetX\":\"0\",\"offsetY\":\"0\",\"blur\":\"85\",\"spread\":\"-10\",\"color\":\"rgba(0, 0, 0, 0.2)\",\"inner\":\"false\",\"none\":\"false\"}', 1),
('COLOR_15', '', 'color', 'rgba(48, 95, 124, 1)', 0),
('PHONE_SMALL', '', 'breakpoint', '370', 0),
('COLOR_14', '', 'color', 'rgba(248, 86, 57, 1)', 0),
('MEDIUM_2', '', 'font_size', '18', 0),
('GRAY', '', 'color', 'rgba(109, 118, 125, 1)', 0),
('SPACING_2', '', 'value', '10', 0),
('MAIL', '', 'gradient', 'background: repeating-linear-gradient(140deg,#168CDA,#3498db 8px,#fafafa 8px,#fafafa 14px,#EB524E 14px,#ff5e37 21px,#fafafa 21px,#fafafa 30px) ; background-size: 100% 3px; background-repeat: no-repeat;', 0),
('LARGE', '', 'shadow', '{\"offsetX\":\"0\",\"offsetY\":\"5\",\"blur\":\"60\",\"spread\":\"-10\",\"color\":\"rgba(0, 0, 0, 0.3)\",\"inner\":\"false\",\"none\":\"false\"}', 1),
('LAPTOP', '', 'breakpoint', '1300', 0),
('BLUE', '', 'gradient', 'background-image: linear-gradient(to bottom, #31C5F9, #22BAF2);', 0),
('SMALLER', '', 'font_size', '12', 0),
('ACCENT_2', '', 'color', 'rgba(238, 238, 238, 1)', 0),
('ACCENT_3', '', 'color', 'rgba(225, 238, 250, 1)', 0),
('SPACING_3', '', 'value', '15', 0),
('TABS', '', 'shadow', '{\"offsetX\":\"0\",\"offsetY\":\"-5\",\"blur\":\"10\",\"spread\":\"-5\",\"color\":\"rgba(0, 0, 0, 0.5)\",\"inner\":\"true\",\"none\":\"false\"}', 1),
('UPWARD', '', 'shadow', '{\"offsetX\":\"0\",\"offsetY\":\"-15\",\"blur\":\"100\",\"spread\":\"-10\",\"color\":\"rgba(0, 0, 0, 0.1)\",\"inner\":\"false\",\"none\":\"false\"}', 1),
('COLOR_16', '', 'color', 'rgba(33, 200, 168, 1)', 0),
('SPACING_4', '', 'value', '30', 0),
('SERIF', '', 'font', '{\"type\":\"google\",\"subsets\":\"latin-ext\",\"font-family\":\"Noto Serif\",\"font-weight\":\"regular\",\"font-style\":\"\"}', 1),
('OVERLAY', '', 'gradient', 'background-image: linear-gradient( to top, rgba(0,0,0,.7) 0%, transparent 40% );', 0),
('OVERLAY_2', '', 'gradient', 'background-image: linear-gradient( to top, rgba(0,0,0,.6) 0%, transparent 90% );', 0),
('DEFAULT_2', '', 'font_size', '15', 0),
('DOTS', '', 'gradient', 'background-image: radial-gradient(rgba(0, 0, 0, 0.1) 0, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 100%);\n    background-size: 7px 7px;', 0),
('SMALL', '', 'value', '0', 0),
('Flyout', '', 'shadow', '{\"offsetX\":\"30\",\"offsetY\":\"25\",\"blur\":\"50\",\"spread\":\"-10\",\"color\":\"rgba(0, 0, 0, 0.15)\",\"inner\":\"false\",\"none\":\"false\"}', 1),
('PAPER', '', 'gradient', 'background: repeating-linear-gradient(90deg, #f0f0f0 0, #f0f0f0 5%, transparent 0, transparent 50%) 0 / 15px 15px, repeating-linear-gradient(180deg, #f0f0f0 0, #f0f0f0 5%, transparent 0, transparent 50%) 0 / 15px 15px;', 0);

-- --------------------------------------------------------

--
-- Table structure for table `language`
--

CREATE TABLE `language` (
  `language_id` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `code` varchar(5) NOT NULL,
  `locale` varchar(255) NOT NULL,
  `image` varchar(64) NOT NULL,
  `directory` varchar(32) NOT NULL,
  `sort_order` int(3) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `language`
--

INSERT INTO `language` (`language_id`, `name`, `code`, `locale`, `image`, `directory`, `sort_order`, `status`) VALUES
(1, 'English', 'en-gb', 'en-US,en_US.UTF-8,en_US,en-gb,english', 'gb.png', 'english', 1, 1);

-- --------------------------------------------------------

--
-- Table structure for table `layout`
--

CREATE TABLE `layout` (
  `layout_id` int(11) NOT NULL,
  `name` varchar(64) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `layout`
--

INSERT INTO `layout` (`layout_id`, `name`) VALUES
(1, 'Home'),
(2, 'Product'),
(3, 'Category'),
(4, 'Default'),
(5, 'Manufacturer'),
(6, 'Account'),
(7, 'Checkout'),
(8, 'Contact'),
(9, 'Sitemap'),
(10, 'Affiliate'),
(11, 'Information'),
(12, 'Compare'),
(13, 'Search'),
(14, 'Wishlist'),
(15, 'Blog'),
(16, 'Blog Post'),
(17, 'Catalog'),
(18, 'Special'),
(19, 'Success'),
(21, 'FAQ'),
(22, 'Your Layout Name');

-- --------------------------------------------------------

--
-- Table structure for table `layout_module`
--

CREATE TABLE `layout_module` (
  `layout_module_id` int(11) NOT NULL,
  `layout_id` int(11) NOT NULL,
  `code` varchar(64) NOT NULL,
  `position` varchar(14) NOT NULL,
  `sort_order` int(3) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `layout_module`
--

INSERT INTO `layout_module` (`layout_module_id`, `layout_id`, `code`, `position`, `sort_order`) VALUES
(2, 4, '0', 'content_top', 0),
(3, 4, '0', 'content_top', 1),
(20, 5, '0', 'column_left', 2),
(69, 10, 'account', 'column_right', 1),
(68, 6, 'account', 'column_right', 1),
(67, 1, 'carousel.29', 'content_top', 3),
(66, 1, 'slideshow.27', 'content_top', 1),
(65, 1, 'featured.28', 'content_top', 2),
(72, 3, 'category', 'column_left', 1),
(73, 3, 'banner.30', 'column_left', 2);

-- --------------------------------------------------------

--
-- Table structure for table `layout_route`
--

CREATE TABLE `layout_route` (
  `layout_route_id` int(11) NOT NULL,
  `layout_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `route` varchar(64) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `layout_route`
--

INSERT INTO `layout_route` (`layout_route_id`, `layout_id`, `store_id`, `route`) VALUES
(38, 6, 0, 'account/%'),
(17, 10, 0, 'affiliate/%'),
(44, 3, 0, 'product/category'),
(54, 1, 0, 'common/home'),
(20, 2, 0, 'product/product'),
(24, 11, 0, 'information/information'),
(23, 7, 0, 'checkout/%'),
(31, 8, 0, 'information/contact'),
(32, 9, 0, 'information/sitemap'),
(34, 4, 0, ''),
(58, 5, 0, 'product/manufacturer%'),
(52, 12, 0, 'product/compare'),
(53, 13, 0, 'product/search'),
(55, 14, 0, 'account/wishlist'),
(56, 15, 0, 'journal3/blog'),
(57, 16, 0, 'journal3/blog/post'),
(59, 17, 0, 'product/catalog'),
(60, 18, 0, 'product/special'),
(61, 19, 0, 'checkout/success'),
(62, 6, 0, 'extension/module/emailtemplate_newsletter%');

-- --------------------------------------------------------

--
-- Table structure for table `length_class`
--

CREATE TABLE `length_class` (
  `length_class_id` int(11) NOT NULL,
  `value` decimal(15,8) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `length_class`
--

INSERT INTO `length_class` (`length_class_id`, `value`) VALUES
(1, 1.00000000),
(2, 10.00000000),
(3, 0.39370000);

-- --------------------------------------------------------

--
-- Table structure for table `length_class_description`
--

CREATE TABLE `length_class_description` (
  `length_class_id` int(11) NOT NULL,
  `language_id` int(11) NOT NULL,
  `title` varchar(32) NOT NULL,
  `unit` varchar(4) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `length_class_description`
--

INSERT INTO `length_class_description` (`length_class_id`, `language_id`, `title`, `unit`) VALUES
(1, 1, 'Centimeter', 'cm'),
(2, 1, 'Millimeter', 'mm'),
(3, 1, 'Inch', 'in');

-- --------------------------------------------------------

--
-- Table structure for table `location`
--

CREATE TABLE `location` (
  `location_id` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `address` text NOT NULL,
  `telephone` varchar(32) NOT NULL,
  `fax` varchar(32) NOT NULL,
  `geocode` varchar(32) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `open` text NOT NULL,
  `comment` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `manufacturer`
--

CREATE TABLE `manufacturer` (
  `manufacturer_id` int(11) NOT NULL,
  `name` varchar(64) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `sort_order` int(3) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `manufacturer`
--

INSERT INTO `manufacturer` (`manufacturer_id`, `name`, `image`, `sort_order`) VALUES
(5, 'Canon', 'catalog/all/brands/canon-150x150.png', 8),
(6, 'Matador', 'catalog/all/brands/matador-150x150.png', 10),
(7, 'BossTV', 'catalog/all/brands/bosstv-150x150.png', 12),
(8, 'EVPad', 'catalog/all/brands/evpad-150x150.png', 14),
(9, 'Unblock Tech', 'catalog/all/brands/unblock-tech-150x150.png', 16),
(10, 'HKE360', 'catalog/all/brands/hke360-150x150.png', 18),
(11, 'Chef-Topf La Rose', 'catalog/all/brands/chef_topf-150x150.png', 20),
(12, 'Hamptons', 'catalog/all/brands/hamptons-150x150.png', 22),
(13, 'Sitram', 'catalog/all/brands/sitram-150x150.png', 24),
(14, 'Kalstory', 'catalog/all/brands/kalstory-150x150.png', 26),
(15, 'Eufy', 'catalog/all/brands/eufy-150x150.png', 28),
(16, 'Unitek', 'catalog/all/brands/unitek-150x150.png', 30),
(17, 'Maono', 'catalog/all/brands/maono-150x150.png', 32),
(18, 'Primada', 'catalog/all/brands/primada-150x150.png', 34),
(19, 'Logitech', 'catalog/all/brands/logitech-150x150.png', 36),
(20, 'Prologic Robotics', 'catalog/all/brands/prologic-150x150.png', 38),
(21, 'Rumpl', 'catalog/all/brands/rumpl-150x150.png', 40),
(22, 'Samsung', 'catalog/all/brands/samsung-150x150.png', 42),
(1, 'Awesome Brand', 'catalog/all/brands/awesome-brand-150x150.png', 0),
(2, 'Sony', 'catalog/all/brands/sony-150x150.png', 2),
(3, 'Harman Kardon', 'catalog/all/brands/harman-kardon-150x150.png', 4),
(4, 'Peak Design', 'catalog/all/brands/peakdesign-150x150.png', 6),
(24, 'Sandisk', 'catalog/all/brands/sandisk-150x150.png', 46),
(23, 'MEC', 'catalog/all/brands/mec-150x150.png', 44),
(25, 'Insta360', 'catalog/all/brands/insta360-150x150.png', 48),
(26, 'Lexar', 'catalog/all/brands/lexar-150x150.png', 50),
(27, 'JFT', 'catalog/all/brands/jft-150x150.png', 52),
(28, 'Makey Makey', 'catalog/all/brands/makey-makey-150x150.png', 54),
(29, 'Microsoft', 'catalog/all/brands/microsoft-150x150.png', 56),
(30, 'Tactica', 'catalog/all/brands/tactica-logo-150x150.png', 58),
(31, 'Bio-Key', 'catalog/all/brands/bio-key-150x150.png', 60),
(32, 'Synology', 'catalog/all/brands/synology-150x150.png', 62),
(33, 'Seagate', 'catalog/all/brands/seagate-150x150.png', 64),
(34, 'MSI', 'catalog/all/brands/msi-150x150.png', 66),
(35, 'Qnap', 'catalog/all/brands/qnap-150x150.png', 68),
(36, 'Cisco', 'catalog/all/brands/cisco-150x150.png', 70),
(37, 'Eset', 'catalog/all/brands/eset-150x150.png', 72),
(38, 'D-link', 'catalog/all/brands/dlink-150x150.png', 74),
(39, 'Buffalo', 'catalog/all/brands/buffalo-150x150.png', 76),
(40, 'Camelion', 'catalog/all/brands/camelion-150x150.png', 78),
(41, 'Schneider Electric', 'catalog/all/brands/schneider-electric-150x150.png', 80),
(42, 'Sublue', 'catalog/all/brands/sublue-150x150.png', 82),
(43, 'AsiaHorse', 'catalog/all/brands/asiahorse-150x150.png', 84),
(44, 'Asus', 'catalog/all/brands/asus-150x150.png', 86),
(45, 'Crucial', 'catalog/all/brands/crucial-150x150.png', 88),
(46, 'Arlo', 'catalog/all/brands/arlo-150x150.png', 90),
(47, 'Anker', 'catalog/all/brands/anker-150x150.png', 92),
(48, 'Ximagtek', 'catalog/all/brands/xigmatek-150x150.png', 94),
(49, 'Adata', 'catalog/all/brands/adata-150x150.png', 96),
(50, 'Team Group', 'catalog/all/brands/teamgroup-150x150.png', 98),
(51, 'Apple', 'catalog/all/brands/apple-150x150.png', 100),
(52, 'XPower', 'catalog/all/brands/xpower-150x150.png', 102),
(53, 'Fujihoro', 'catalog/all/brands/fujihoro-150x150.png', 104),
(54, 'Hewlett-Packard', 'catalog/all/brands/hp-150x150.png', 106),
(55, 'LG', 'catalog/all/brands/lg-150x150.png', 108),
(56, 'J5Create', 'catalog/all/brands/j5create-150x150.png', 110),
(57, 'Intehill', 'catalog/all/brands/intehill-150x150.png', 112),
(58, 'Vention', 'catalog/all/brands/vention-150x150.png', 114),
(59, 'Sabrent', 'catalog/all/brands/sabrent-150x150.png', 116),
(60, 'Acer', 'catalog/all/brands/acer-150x150.png', 118),
(61, 'acoustune', 'catalog/all/brands/acoustune-150x150.png', 120),
(62, 'Aimedia', 'catalog/all/brands/aimedia-150x150.png', 122),
(63, 'Ant', 'catalog/all/brands/ant-150x150.png', 124),
(64, 'Aorus', 'catalog/all/brands/aorus-150x150.png', 126),
(65, 'Banale', 'catalog/all/brands/banale-150x150.png', 128),
(66, 'Chaeum', 'catalog/all/brands/chaeum-150x150.png', 130),
(67, 'Dobot', 'catalog/all/brands/dobot-150x150.png', 132),
(68, 'Jabra', 'catalog/all/brands/jabra-150x150.png', 134),
(69, 'Fitbit', 'catalog/all/brands/fitbit-150x150.png', 136),
(70, 'Gigabyte', 'catalog/all/brands/gigabyte-150x150.png', 138),
(71, 'HeroClip', 'catalog/all/brands/heroclip-150x150.png', 140),
(72, 'Netgear', 'catalog/all/brands/netgear-150x150.png', 142),
(73, 'hii', 'catalog/all/brands/hii-150x150.png', 144),
(74, 'Thermaltake', 'catalog/all/brands/thermaltake-150x150.png', 146),
(75, 'Intel', 'catalog/all/brands/intel-150x150.png', 148),
(76, 'Zing Anything', 'catalog/all/brands/zing-anything-150x150.png', 150),
(77, 'Zolo', 'catalog/all/brands/zolo-150x150.png', 152),
(78, 'Toshiba', 'catalog/all/brands/toshiba-150x150.png', 154),
(79, 'HongPai', 'catalog/all/brands/hongpai-150x150.png', 156),
(80, 'Kingston', 'catalog/all/brands/kingston-150x150.png', 158),
(81, 'Magisso', 'catalog/all/brands/magisso-150x150.png', 160),
(82, 'Moai', 'catalog/all/brands/moai-150x150.png', 162),
(83, 'Nanoclo2', 'catalog/all/brands/nanoclo2-150x150.png', 164),
(84, 'Ocube', 'catalog/all/brands/ocube-150x150.png', 166),
(85, 'Outlines', 'catalog/all/brands/outlines-150x150.png', 168),
(86, 'That!', 'catalog/all/brands/that-150x150.png', 170),
(87, 'Toamit', 'catalog/all/brands/toamit-150x150.png', 172),
(88, 'Uyeki', 'catalog/all/brands/uyeki-150x150.png', 174),
(89, 'Viewsonic', 'catalog/all/brands/viewsonic-150x150.png', 176),
(90, 'Western Digital', 'catalog/all/brands/western-digital-150x150.png', 178),
(91, 'WK Design', 'catalog/all/brands/wk-design-50x150.png', 180),
(92, 'AutoBot Rock', 'catalog/all/brands/autobot-rock-150x150.png', 182),
(93, 'Aspetic Space', 'catalog/all/brands/aspetic-space-150x150.png', 184),
(94, 'ProMini', 'catalog/all/brands/promini-150x150.png', 31);

-- --------------------------------------------------------

--
-- Table structure for table `manufacturer_to_store`
--

CREATE TABLE `manufacturer_to_store` (
  `manufacturer_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `manufacturer_to_store`
--

INSERT INTO `manufacturer_to_store` (`manufacturer_id`, `store_id`) VALUES
(1, 0),
(2, 0),
(3, 0),
(4, 0),
(6, 0),
(7, 0),
(8, 0),
(9, 0),
(10, 0),
(11, 0),
(12, 0),
(13, 0),
(14, 0),
(15, 0),
(16, 0),
(17, 0),
(18, 0),
(19, 0),
(20, 0),
(21, 0),
(22, 0),
(23, 0),
(24, 0),
(25, 0),
(26, 0),
(27, 0),
(28, 0),
(29, 0),
(30, 0),
(31, 0),
(32, 0),
(33, 0),
(34, 0),
(35, 0),
(36, 0),
(37, 0),
(38, 0),
(39, 0),
(40, 0),
(41, 0),
(42, 0),
(43, 0),
(44, 0),
(45, 0),
(46, 0),
(47, 0),
(48, 0),
(49, 0),
(50, 0),
(51, 0),
(52, 0),
(53, 0),
(54, 0),
(55, 0),
(56, 0),
(57, 0),
(58, 0),
(59, 0),
(60, 0),
(61, 0),
(62, 0),
(63, 0),
(64, 0),
(65, 0),
(66, 0),
(67, 0),
(68, 0),
(69, 0),
(70, 0),
(71, 0),
(72, 0),
(73, 0),
(74, 0),
(75, 0),
(76, 0),
(77, 0),
(78, 0),
(79, 0),
(80, 0),
(81, 0),
(82, 0),
(83, 0),
(84, 0),
(85, 0),
(86, 0),
(87, 0),
(88, 0),
(89, 0),
(90, 0),
(91, 0),
(92, 0),
(93, 0),
(94, 0);

-- --------------------------------------------------------

--
-- Table structure for table `marketing`
--

CREATE TABLE `marketing` (
  `marketing_id` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `description` text NOT NULL,
  `code` varchar(64) NOT NULL,
  `clicks` int(5) NOT NULL DEFAULT 0,
  `date_added` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `may_advanced_option_product_config`
--

CREATE TABLE `may_advanced_option_product_config` (
  `product_id` int(11) NOT NULL,
  `option_name` varchar(255) NOT NULL,
  `subtract` int(1) DEFAULT NULL,
  `swatch_image` int(1) DEFAULT NULL,
  `show_first_option_in_list` int(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `may_advanced_option_product_config`
--

INSERT INTO `may_advanced_option_product_config` (`product_id`, `option_name`, `subtract`, `swatch_image`, `show_first_option_in_list`) VALUES
(13, 'Size', 0, 0, 0),
(14, 'Color-Size', 1, 0, 1),
(57, 'Type', 0, 1, 1),
(41, 'Size-Color', 0, 0, 0),
(18, 'Color', 1, 1, 0),
(22, 'Color', 0, 0, 1),
(40, 'Size', 0, 0, 0),
(25, 'Color', 0, 1, 1),
(30, 'Color-Size', 0, 0, 0),
(47, 'Color', 0, 0, 0),
(42, 'Color', 0, 0, 0),
(33, 'Color', 0, 1, 1),
(34, 'Color', 0, 0, 0),
(44, 'Color', 0, 0, 0),
(28, 'Color', 0, 0, 0),
(27, 'Color', 0, 0, 0),
(26, 'Color', 0, 0, 0),
(38, 'Color-Size', 0, 0, 0),
(37, 'Color', 0, 0, 0),
(48, 'Peak Design Materials', 0, 0, 0),
(29, 'Color', 0, 0, 0),
(43, 'Color', 0, 0, 0),
(36, 'Color', 0, 0, 0),
(35, 'Color', 0, 0, 0),
(31, 'Color-Size', 0, 0, 0),
(32, 'Color-Size', 0, 0, 0),
(54, 'Mobile-Style', 0, 1, 0),
(55, 'Style', 0, 0, 0),
(21, 'Color', 0, 0, 1);

-- --------------------------------------------------------

--
-- Table structure for table `may_advanced_option_product_value`
--

CREATE TABLE `may_advanced_option_product_value` (
  `product_option_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `option_id` int(11) NOT NULL,
  `combination_id` varchar(255) NOT NULL,
  `option_value_id` int(11) NOT NULL,
  `model` varchar(255) DEFAULT NULL,
  `sku` varchar(255) DEFAULT NULL,
  `upc` varchar(12) DEFAULT NULL,
  `ean` varchar(14) DEFAULT NULL,
  `jan` varchar(13) DEFAULT NULL,
  `isbn` varchar(17) DEFAULT NULL,
  `mpn` varchar(255) DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL,
  `image` text DEFAULT NULL,
  `price` decimal(15,4) DEFAULT NULL,
  `price_prefix` varchar(255) DEFAULT NULL,
  `point` int(8) DEFAULT NULL,
  `point_prefix` varchar(255) DEFAULT NULL,
  `weight` decimal(15,8) DEFAULT NULL,
  `weight_prefix` varchar(255) DEFAULT NULL,
  `dimension_l` decimal(15,8) DEFAULT NULL,
  `dimension_w` decimal(15,8) DEFAULT NULL,
  `dimension_h` decimal(15,8) DEFAULT NULL,
  `hide` int(1) DEFAULT NULL,
  `quantity` int(4) DEFAULT NULL,
  `stock_status_id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `may_advanced_option_product_value`
--

INSERT INTO `may_advanced_option_product_value` (`product_option_id`, `product_id`, `option_id`, `combination_id`, `option_value_id`, `model`, `sku`, `upc`, `ean`, `jan`, `isbn`, `mpn`, `location`, `image`, `price`, `price_prefix`, `point`, `point_prefix`, `weight`, `weight_prefix`, `dimension_l`, `dimension_w`, `dimension_h`, `hide`, `quantity`, `stock_status_id`) VALUES
(779, 14, 11, '0-74', 70, 'bedb-midnight-30l', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(780, 14, 11, '0-75', 69, 'bedb-ash-20l', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(778, 14, 11, '0-73', 70, 'bedb-charcoal-30l', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(973, 13, 11, '0', 77, 'SH-S-1', 'PD-SHS1', '855110003485', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(974, 18, 2, '0', 49, 'cb-xx-1-silver', '', '', '', '', '', '', '', '[\"catalog/all/items/peak-design/bolt-pack/peakdesign-bolt-pack-silver-00-low.jpg\",\"catalog/all/items/peak-design/bolt-pack/peakdesign-bolt-pack-silver-01-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(973, 13, 11, '0', 79, 'SH-L-1', 'PD-SHL1', '855110003508', '', '', '', '', '', '[]', 13.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(973, 13, 11, '0', 78, 'SH-M-1', 'PD-SHM1', '855110003492', '', '', '', '', '', '[]', 9.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(779, 14, 11, '0-74', 69, 'bedb-midnight-20l', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(777, 14, 11, '0-71', 70, 'bedb-black-30l', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(778, 14, 11, '0-73', 69, 'bedb-charcoal-20l', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(777, 14, 11, '0-71', 69, 'bedb-black-20l', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(776, 14, 2, '0', 71, 'bedb-black', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 7),
(776, 14, 2, '0', 73, 'bedb-charcoal', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 7),
(776, 14, 2, '0', 74, 'bedb-midnight', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(776, 14, 2, '0', 75, 'bedb-ash', '', '', '', '', '', '', '', '[]', 200.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(970, 41, 2, '0-77', 80, 'BPC-S-RW-1', '', '818373022723', '', '', '', '', '', '[\"catalog/all/items/peak-design/packing-cube/peakdesign-packing-cube-small-raw-00-low.jpg\"]', 39.0000, 'as', 0, 'as', 0.19000000, 'as', 27.00000000, 26.00000000, 3.00000000, 0, 1, 7),
(971, 41, 2, '0-78', 72, 'BPC-M-SG-1', '', '818373022730', '', '', '', '', '', '[\"catalog/all/items/peak-design/packing-cube/peakdesign-packing-cube-medium-sage-00-low.jpg\"]', 49.0000, 'as', 0, 'as', 0.29000000, 'as', 39.00000000, 29.00000000, 4.90000000, 0, 1, 7),
(971, 41, 2, '0-78', 73, 'BPC-M-CH-1', '', '818373020958', '', '', '', '', '', '[\"catalog/all/items/peak-design/packing-cube/peakdesign-packing-cube-medium-charcoal-00-low.jpg\"]', 49.0000, 'as', 0, 'as', 0.29000000, 'as', 39.00000000, 29.00000000, 4.90000000, 0, 1, 7),
(974, 18, 2, '0', 71, 'cb-xx-1-black', '', '', '', '', '', '', '', '[\"catalog/all/items/peak-design/bolt-pack/peakdesign-bolt-pack-black-00-low.jpg\",\"catalog/all/items/peak-design/bolt-pack/peakdesign-bolt-pack-black-01-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(979, 25, 2, '0', 75, 'CF-AS-3', '', '818373020088', '', '', '', '', '', '[\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-ash-00-low.jpg\",\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-ash-01-low.jpg\",\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-ash-02-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(1042, 22, 2, '0', 49, 'cp-xx-3-silver', '', '', '', '', '', '', '', '[\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-silver-03-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 0),
(1042, 22, 2, '0', 71, 'cp-xx-3-black', '', '', '', '', '', '', '', '[\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-black-03-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 0),
(977, 57, 15, '0', 87, 'm-cm-non-charging', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(976, 40, 11, '0', 79, 'BCC-L-BK-1', 'PD-BCCLBK1', '818373020910', '', '', '', '', '', '[\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-large-00-low.jpg\",\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-large-01-low.jpg\",\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-large-02-low.jpg\"]', 46.0000, '+', 0, 'as', 1.13000000, 'as', 47.00000000, 37.00000000, 21.00000000, 0, 2, 7),
(976, 40, 11, '0', 78, 'BCC-M-BK-1', 'PD-BCCMBK1', '818373020903', '', '', '', '', '', '[\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-medium-00-low.jpg\",\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-medium-01-low.jpg\",\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-medium-02-low.jpg\"]', 23.0000, '+', 0, 'as', 0.78000000, '+', 36.00000000, 34.00000000, 18.00000000, 0, 2, 7),
(976, 40, 11, '0', 77, 'BCC-S-BK-1', 'PD-BCCSBK1', '818373020897', '', '', '', '', '', '[\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-small-00-low.jpg\",\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-small-01-low.jpg\",\"catalog/all/items/peak-design/camera-cube/peakdesign-camera-cube-small-02-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.45000000, 'as', 39.00000000, 20.00000000, 19.00000000, 0, 0, 7),
(977, 57, 15, '0', 86, 'm-cm-charging', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(979, 25, 2, '0', 71, 'cf-xx-3-black', '', '818373020057', '', '', '', '', '', '[\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-black-00-low.jpg\",\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-black-01-low.jpg\",\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-black-02-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(979, 25, 2, '0', 72, 'CF-SG-3', '', '818373022617', '', '', '', '', '', '[\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-sage-00-low.jpg\",\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-sage-01-low.jpg\",\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-sage-02-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(979, 25, 2, '0', 74, 'CF-MN-3', '', '818373022709', '', '', '', '', '', '[\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-midnight-00-low.jpg\",\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-midnight-01-low.jpg\",\"catalog/all/items/peak-design/cuff-v3/peakdesign-cuff-midnight-02-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 7),
(992, 30, 11, '0-75', 70, 'BEDB-30-AS-2', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 1, 1, 7),
(992, 30, 11, '0-75', 69, 'BEDB-20-AS-2', '', '818373021436', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-20l-ash-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-ash-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-ash-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-ash-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-ash-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-ash-08-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-ash-09-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-ash-10-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-ash-11-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(991, 30, 11, '0-74', 70, 'BEDB-30-MN-2', '', '818373021474', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-30l-midnight-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-08-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-09-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-11-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(991, 30, 11, '0-74', 69, 'BEDB-20-MN-2', '', '818373021443', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-20l-midnight-00.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-08-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-09-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-midnight-10-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(990, 30, 11, '0-73', 70, 'BEDB-30-CH-2', '', '818373021467', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-30l-charcoal-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-08-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-09-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-10-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(993, 47, 2, '0', 80, 'BPT-RW-1', '', '818373022860', '', '', '', '', '', '[\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-raw-00-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-raw-01-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-raw-02-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-raw-03-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-raw-04-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 0),
(993, 47, 2, '0', 73, 'BPT-CH-1', '', '818373022532', '', '', '', '', '', '[\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-00-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-01-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-02-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-03-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-04-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-05-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-06-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-07-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-08-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-09-low.jpg\",\"catalog/all/items/peak-design/packable-tote/peakdesign-packagble-tote-charcoal-10-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 0),
(994, 42, 2, '0', 73, 'BP-CH-2', 'PD-BPCH2', '818373022563', '', '', '', '', '', '[\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-charcoal-00-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-charcoal-01-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-charcoal-02-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-charcoal-03-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-charcoal-04-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-charcoal-05-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-charcoal-06-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-charcoal-07-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(994, 42, 2, '0', 74, 'BP-MN-2', 'PD-BPMN2', '818373022686', '', '', '', '', '', '[\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-midnight-00-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-midnight-01-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-midnight-02-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-midnight-03-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-midnight-04-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-midnight-05-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-midnight-06-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-midnight-07-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(994, 42, 2, '0', 71, 'BP-BK-2', 'PD-BPBK2', '818373022570', '', '', '', '', '', '[\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-black-00-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-black-01-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-black-02-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-black-03-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-black-04-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-black-05-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-black-06-low.jpg\",\"catalog/all/items/peak-design/field-pouch-v2/peakdesign-field-pouch-black-07-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(995, 33, 2, '0', 76, 'BEDT-15-BO-2', '', '818373021580', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-01-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-05-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-06-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-07-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-08-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-bone-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(995, 33, 2, '0', 71, 'BEDT-15-BK-2', '', '818373021573', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-01-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-02-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-03-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-04-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-06-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-07-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-08-low.jpg\",\"catalog/all/items/peak-design/everyday-tote-v2/peak-design-everyday-tote-15l-black-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(996, 34, 2, '0', 76, 'BEDTP-20-BO-2', '', '818373021603', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-totepack-v2/peak-design-everday-totepack-20l-bone-01-low.jpg\",\"catalog/all/items/peak-design/everyday-totepack-v2/peak-design-everday-totepack-20l-bone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-totepack-v2/peak-design-everday-totepack-20l-bone-03-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(996, 34, 2, '0', 71, 'BEDTP-20-BK-2', '', '818373021597', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-totepack-v2/peak-design-everday-totepack-20l-black-01-low.jpg\",\"catalog/all/items/peak-design/everyday-totepack-v2/peak-design-everday-totepack-20l-black-02-low.jpg\",\"catalog/all/items/peak-design/everyday-totepack-v2/peak-design-everday-totepack-20l-black-03-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(997, 44, 2, '0', 80, 'BSP-RW-1', '', '818373022761', '', '', '', '', '', '[\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-raw-00-low.jpg\",\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-raw-01-low.jpg\",\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-raw-02-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(997, 44, 2, '0', 73, 'BPT-CH-1', '', '818373022532', '', '', '', '', '', '[\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-charcoal-00-low.jpg\",\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-charcoal-01-low.jpg\",\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-charcoal-02-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(997, 44, 2, '0', 72, 'BSP-SG-1', '', '818373022754', '', '', '', '', '', '[\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-sage-00-low.jpg\",\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-sage-01-low.jpg\",\"catalog/all/items/peak-design/shoe-pouch/peakdesign-shoe-pouch-sage-02-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(998, 28, 2, '0', 71, 'SL-BK-3', '', '818373020484', '', '', '', '', '', '[\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-black-00-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-black-01-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-black-02-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-black-03-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-black-04-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-black-05-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-black-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(998, 28, 2, '0', 74, 'SL-MN-3', '', '818373022662', '', '', '', '', '', '[\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-midnight-00-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-midnight-01-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-midnight-02-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-midnight-03-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-midnight-04-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-midnight-05-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-midnight-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(998, 28, 2, '0', 72, 'SL-SG-3', '', '818373022655', '', '', '', '', '', '[\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-sage-00-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-sage-01-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-sage-02-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-sage-03-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-sage-04-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-sage-05-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-sage-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(998, 28, 2, '0', 75, 'SL-AS-3', '', '818373020491', '', '', '', '', '', '[\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-ash-00-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-ash-01-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-ash-02-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-ash-03-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-ash-04-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-ash-05-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-ash-06-low.jpg\",\"catalog/all/items/peak-design/slide-v3/peakdesign-slide-ash-07-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(999, 27, 2, '0', 72, 'SLL-SG-3', '', '818373022693', '', '', '', '', '', '[\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-sage-00-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-sage-01-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-sage-02-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-sage-03-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-sage-04-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-sage-05-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-sage-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(999, 27, 2, '0', 74, 'SLL-MN-3', '', '818373022648', '', '', '', '', '', '[\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-midnight-00-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-midnight-01-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-midnight-02-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-midnight-03-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-midnight-04-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-midnight-05-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(999, 27, 2, '0', 71, 'SLL-BK-3', '', '818373020514', '', '', '', '', '', '[\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-black-00-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-black-01-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-black-02-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-black-03-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-black-04-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-black-05-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-black-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(999, 27, 2, '0', 75, 'SLL-AS-3', '', '818373020507', '', '', '', '', '', '[\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-ash-00-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-ash-01-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-ash-02-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-ash-03-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-ash-04-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-ash-05-low.jpg\",\"catalog/all/items/peak-design/slide-lite-v3/peakdesign-slidelite-ash-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1000, 26, 2, '0', 75, 'L-AS-3', '', '818373020040', '', '', '', '', '', '[\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-ash-00-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-ash-01-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-ash-02-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-ash-03-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-ash-04-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-ash-05-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-ash-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1000, 26, 2, '0', 72, 'L-SG-3', '', '818373022594', '', '', '', '', '', '[\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-sage-00-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-sage-01-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-sage-02-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-sage-03-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-sage-04-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-sage-05-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-sage-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1000, 26, 2, '0', 74, 'L-MN-3', '', '818373022600', '', '', '', '', '', '[\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-midnight-00-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-midnight-01-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-midnight-02-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-midnight-03-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-midnight-04-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-midnight-05-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-midnight-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1000, 26, 2, '0', 71, 'L-BL-3', '', '818373020071', '', '', '', '', '', '[\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-black-00-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-black-01-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-black-02-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-black-03-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-black-04-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-black-05-low.jpg\",\"catalog/all/items/peak-design/leash-v3/peakdesign-leash-v3-black-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1003, 38, 11, '0-72', 93, 'BTRD-35-SG-1', '', '818373020880', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-sage-00-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-sage-01-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-sage-02-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-sage-03-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-sage-04-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-sage-05-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-sage-06-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-sage-07-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1003, 38, 11, '0-72', 95, 'BTRD-65-SG-1', '', '818373022808', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-sage-00-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-sage-01-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-sage-02-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-sage-03-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-sage-04-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-sage-05-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1004, 37, 2, '0', 71, 'BTRDP-65-BK-1', '', '818373021238', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-duffelpack/peakdesign-travel-duffelpack-65l-black-01-low.jpg\",\"catalog/all/items/peak-design/travel-duffelpack/peakdesign-travel-duffelpack-65l-black-02-low.jpg\",\"catalog/all/items/peak-design/travel-duffelpack/peakdesign-travel-duffelpack-65l-black-03-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1004, 37, 2, '0', 72, 'BTRDP-65-SG-1', '', '818373021245', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-duffelpack/peakdesign-travel-duffelpack-65l-sage-01-low.jpg\",\"catalog/all/items/peak-design/travel-duffelpack/peakdesign-travel-duffelpack-65l-sage-02-low.jpg\",\"catalog/all/items/peak-design/travel-duffelpack/peakdesign-travel-duffelpack-65l-sage-03-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1001, 38, 2, '0', 71, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1001, 38, 2, '0', 72, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1002, 38, 11, '0-71', 95, 'BTRD-65-BK-1', '', '818373022815', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-black-00-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-black-01-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-black-02-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-black-03-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-65l-black-04-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1002, 38, 11, '0-71', 93, 'BTRD-35-BK-1', '', '818373020873', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-black-00-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-black-01-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-black-02-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-black-03-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-black-04-low.jpg\",\"catalog/all/items/peak-design/travel-duffle/peakdesign-travel-duffel-35l-black-05-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1005, 48, 14, '6', 82, 'TT-CB-5-150-CF-1', '', '818373021269', '', '', '', '', '', '[\"catalog/all/items/peak-design/tripod/peakdesign-travel-tripod-carbon-fibre-00-low.jpg\",\"catalog/all/items/peak-design/tripod/peakdesign-travel-tripod-carbon-fibre-01-low.jpg\",\"catalog/all/items/peak-design/tripod/peakdesign-travel-tripod-carbon-fibre-02-low.jpg\",\"catalog/all/items/peak-design/tripod/peakdesign-travel-tripod-carbon-fibre-03-low.jpg\"]', 300.0000, '+', 0, 'as', 2.00000000, 'as', 51.00000000, 13.00000000, 13.00000000, 0, 1, 7),
(1005, 48, 14, '6', 81, 'TT-CB-5-150-AL-1', '', '818373021276', '', '', '', '', '', '[\"catalog/all/items/peak-design/tripod/peakdesign-travel-tripod-aluminium-00-low.jpg\",\"catalog/all/items/peak-design/tripod/peakdesign-travel-tripod-aluminium-01-low.jpg\",\"catalog/all/items/peak-design/tripod/peakdesign-travel-tripod-aluminium-02-low.jpg\",\"catalog/all/items/peak-design/tripod/peakdesign-travel-tripod-aluminium-03-low.jpg\"]', 0.0000, 'as', 0, 'as', 2.30000000, 'as', 51.00000000, 13.00000000, 13.00000000, 0, 3, 7),
(1006, 29, 2, '0', 75, 'BEDM-13-AS-2', '', '818373021566', '', '', '', '', '', '[\"catalog/all/items/peak-design/messenger-v2/peak-design-everyday-messenger-13l-ash-02-low.jpg\",\"catalog/all/items/peak-design/messenger-v2/peak-design-everyday-messenger-13l-ash-03-low.jpg\",\"catalog/all/items/peak-design/messenger-v2/peak-design-everyday-messenger-13l-ash-04-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1006, 29, 2, '0', 71, 'BEDM-13-BK-2', '', '818373021559', '', '', '', '', '', '[\"catalog/all/items/peak-design/messenger-v2/peak-design-everyday-messenger-13l-black-02-low.jpg\",\"catalog/all/items/peak-design/messenger-v2/peak-design-everyday-messenger-13l-black-03-low.jpg\",\"catalog/all/items/peak-design/messenger-v2/peak-design-everyday-messenger-13l-black-04-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1007, 43, 2, '0', 74, 'BTP-MN-2', '', '818373022419', '', '', '', '', '', '[\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-00-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-01-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-02-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-03-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-04-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-05-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-06-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-07-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-charcoal-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1007, 43, 2, '0', 76, 'BTP-BO-2', '', '818373022426', '', '', '', '', '', '[\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-00-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-01-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-03-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-04-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-05-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-06-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-07-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-08-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-bone-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1007, 43, 2, '0', 73, 'BTP-CH-2', '', '818373022402', '', '', '', '', '', '[\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-midnight-00-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-midnight-01-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-midnight-02-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-midnight-03-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-midnight-04-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-midnight-05-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-midnight-06-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-midnight-07-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1007, 43, 2, '0', 71, 'BTP-BK-2', '', '818373020927', '', '', '', '', '', '[\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-00-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-01-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-02-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-03-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-04-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-05-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-06-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-07-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-black-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1007, 43, 2, '0', 72, 'BTP-SG-2', '', '818373021023', '', '', '', '', '', '[\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-00-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-01-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-02-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-03-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-04-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-05-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-06-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-07-low.jpg\",\"catalog/all/items/peak-design/tech-pouch/peakdesign-tech-pouch-sage-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1008, 36, 2, '0', 72, 'BTR-45-SG-1', '', '818373020866', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-00-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-01-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-02-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-03-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-05-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-06-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-07-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-08-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-sage-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1008, 36, 2, '0', 71, 'BTR-45-BK-1', '', '818373020859', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-00-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-01-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-02-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-03-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-04-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-05-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-06-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-07-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-45l/peakdesign-travel-backpack-45l-black-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1009, 35, 2, '0', 74, 'BTR-30-MN-1', '', '818373022792', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-00-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-01-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-02-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-03-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-04-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-05-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-06-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-07-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-midnight-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1009, 35, 2, '0', 71, 'BTR-30-BK-1', '', '818373022785', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-00-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-01-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-02-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-03-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-04-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-05-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-06-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-07-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-black-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(988, 30, 2, '0', 74, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(988, 30, 2, '0', 75, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(989, 30, 11, '0-71', 69, 'BEDB-20-BK-2', '', '818373021344', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-20l-black-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-20l-02-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-08-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(989, 30, 11, '0-71', 70, 'BEDB-30-BK-2', '', '818373021450', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-30l-black-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-30l-02-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-08-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(990, 30, 11, '0-73', 69, 'BEDB-20-CH-2', '', '818373021412', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-20l-charcoal-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-08-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-09-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-v2/peakdesign-everyday-backpack-v2-charcoal-10-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(988, 30, 2, '0', 73, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(988, 30, 2, '0', 71, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0);
INSERT INTO `may_advanced_option_product_value` (`product_option_id`, `product_id`, `option_id`, `combination_id`, `option_value_id`, `model`, `sku`, `upc`, `ean`, `jan`, `isbn`, `mpn`, `location`, `image`, `price`, `price_prefix`, `point`, `point_prefix`, `weight`, `weight_prefix`, `dimension_l`, `dimension_w`, `dimension_h`, `hide`, `quantity`, `stock_status_id`) VALUES
(1016, 32, 11, '0-71', 67, 'BEDS-10-BK-2', '', '818373021405', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-10l-black-03-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-10l-01-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-04-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-06-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-07-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-08-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-11-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1014, 31, 11, '0-76', 68, 'BEDBZ-15-BO-2', '', '818373021511', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-bone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-bone-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-bone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-bone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-bone-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-bone-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-bone-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-bone-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1013, 31, 11, '0-75', 69, 'BEDBZ-20-AS-2', '', '818373021535', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-20l-ash-00-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-02-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-08-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-09-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-10-low.jpg\"]', 38.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1013, 31, 11, '0-75', 68, 'BEDBZ-15-AS-2', '', '818373021498', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-ash-00-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-02-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-ash-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1012, 31, 11, '0-74', 69, 'BEDBZ-20-MN-2', '', '818373021542', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-20l-midnight-00-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-02-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-09-low.jpg\"]', 38.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1012, 31, 11, '0-74', 68, 'BEDBZ-15-MN-2', '', '818373021504', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-midnight-00-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-02-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-midnight-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1011, 31, 11, '0-71', 69, 'BEDBZ-20-BK-2', '', '818373021528', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-20l-black-00-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-02-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-08-low.jpg\"]', 38.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1010, 31, 2, '0', 74, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1010, 31, 2, '0', 75, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1010, 31, 2, '0', 76, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 0),
(1011, 31, 11, '0-71', 68, 'BEDBZ-15-BK-2', '', '818373021481', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-15l-black-00-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-01-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-02-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-03-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-04-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-06-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-07-low.jpg\",\"catalog/all/items/peak-design/everyday-backpack-zip/peakdesign-everyday-backpack-zip-black-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1010, 31, 2, '0', 71, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1014, 31, 11, '0-76', 69, 'BEDBZ-20-BO-2', '', '', '', '', '', '', '', '[]', 0.0000, '', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 1, 0, 7),
(1036, 54, 16, '0-83', 88, 'M-MC-AR-CH-1', '', '818373023041', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-05-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-06-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1035, 54, 16, '0-64', 89, 'M-LC-AS-CH-1', '', '818373023034', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-05-low.jpg\"]', 12.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1035, 54, 16, '0-64', 88, 'M-MC-AS-CH-1', '', '818373023065', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-05-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-06-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1034, 54, 13, '0', 96, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1034, 54, 13, '0', 84, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1034, 54, 13, '0', 85, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1034, 54, 13, '0', 64, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1034, 54, 13, '0', 83, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 2, 0),
(1036, 54, 16, '0-83', 89, 'M-LC-AR-CH-1', '', '818373023010', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-05-low.jpg\"]', 12.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1037, 54, 16, '0-84', 88, 'M-MC-AQ-CH-1', '', '818373023058', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-05-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-06-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1037, 54, 16, '0-84', 89, 'M-LC-AQ-CH-1', '', '818373023027', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-05-low.jpg\"]', 12.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1038, 54, 16, '0-85', 88, 'M-MC-AT-CH-1', '', '818373023072', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-05-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-06-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1038, 54, 16, '0-85', 89, 'm-mc-a-iphone 13 mini-everyday case with loop', '', '', '', '', '', '', '', '[]', 12.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 1, 1, 7),
(1039, 54, 16, '0-96', 88, 'M-MC-AG-CH-1', '', '818373022952', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-05-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-06-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-iphone-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1039, 54, 16, '0-96', 89, 'M-LC-AG-CH-1', '', '818373023003', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-00-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-02-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-03-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-04-low.jpg\",\"catalog/all/items/peak-design/everyday-case-iphone/peakdesign-everyday-case-loop-iphone-05-low.jpg\"]', 12.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1016, 32, 11, '0-71', 66, 'BEDS-6-BK-2', '', '818373021375', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-6l-black-00-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-6l-01-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-04-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-06-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-07-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-08-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-10-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1016, 32, 11, '0-71', 65, 'BEDS-3-BK-2', '', '818373021351', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-3l-black-00-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-3l-01-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-04-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-05-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-06-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-07-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-08-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-black-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1015, 32, 2, '0', 71, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 3, 0),
(1015, 32, 2, '0', 74, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 0),
(1015, 32, 2, '0', 75, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 3, 0),
(1017, 32, 11, '0-74', 65, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 1, 0, 7),
(1017, 32, 11, '0-74', 66, 'BEDS-6-MN-2', '', '818373021399', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-6l-midnight-00-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-6l-01-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-midnight-04-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-midnight-05-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-midnight-06-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-midnight-07-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-midnight-08-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-midnight-09-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1017, 32, 11, '0-74', 67, '', '', '', '', '', '', '', '', '[]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 1, 0, 7),
(1018, 32, 11, '0-75', 65, 'BEDS-3-AS-2', '', '818373021368', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-3l-ash-00-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-3l-01-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-04-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-05-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-06-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-07-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-09-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-10-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1018, 32, 11, '0-75', 66, 'BEDS-6-AS-2', '', '818373021382', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-6l-ash-00-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-6l-01-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-04-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-05-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-06-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-09-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-11-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-10-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1018, 32, 11, '0-75', 67, 'BEDS-10-AS-2', '', '818373021429', '', '', '', '', '', '[\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-10l-ash-03-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-10l-01-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-04-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-05-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-06-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-08-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-10-low.jpg\",\"catalog/all/items/peak-design/everyday-sling-v2/peakdesign-everyday-sling-v2-ash-11-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1040, 55, 16, '0', 90, 'M-WA-AB-CH-1', '', '818373023249', '', '', '', '', '', '[\"catalog/all/items/peak-design/mobile-wallet/peakdesign-stand-wallet-02-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-stand-wallet-03-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-stand-wallet-04-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-stand-wallet-05-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-stand-wallet-06-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-stand-wallet-07-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-stand-wallet-08-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-stand-wallet-10-low.jpg\"]', 11.0000, '+', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1040, 55, 16, '0', 91, 'M-WA-AA-CH-1', '', '818373023232', '', '', '', '', '', '[\"catalog/all/items/peak-design/mobile-wallet/peakdesign-slim-wallet-02-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-slim-wallet-03-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-slim-wallet-04-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-slim-wallet-05-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-slim-wallet-06-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-slim-wallet-07-low.jpg\",\"catalog/all/items/peak-design/mobile-wallet/peakdesign-slim-wallet-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(971, 41, 2, '0-78', 80, 'BPC-M-RW-1', '', '818373022747', '', '', '', '', '', '[\"catalog/all/items/peak-design/packing-cube/peakdesign-packing-cube-medium-raw-00-low.jpg\"]', 49.0000, 'as', 0, 'as', 0.29000000, 'as', 39.00000000, 29.00000000, 4.90000000, 0, 1, 7),
(970, 41, 2, '0-77', 73, 'BPC-S-CH-1', '', '818373020941', '', '', '', '', '', '[\"catalog/all/items/peak-design/packing-cube/peakdesign-packing-cube-small-charcoal-00-low.jpg\"]', 39.0000, 'as', 0, 'as', 0.19000000, 'as', 27.00000000, 26.00000000, 3.00000000, 0, 1, 7),
(970, 41, 2, '0-77', 72, 'BPC-S-SG-1', '', '818373022716', '', '', '', '', '', '[\"catalog/all/items/peak-design/packing-cube/peakdesign-packing-cube-small-sage-00-low.jpg\"]', 39.0000, 'as', 0, 'as', 0.19000000, 'as', 27.00000000, 26.00000000, 3.00000000, 0, 1, 7),
(969, 41, 11, '0', 77, '', '', '', '', '', '', '', '', '[]', 39.0000, 'as', 0, 'as', 0.19000000, 'as', 27.00000000, 26.00000000, 3.00000000, 0, 3, 7),
(969, 41, 11, '0', 78, '', '', '', '', '', '', '', '', '[]', 49.0000, 'as', 0, 'as', 0.29000000, 'as', 39.00000000, 29.00000000, 4.90000000, 0, 3, 7),
(1009, 35, 2, '0', 72, 'BTR-30-SG-1', '', '818373022778', '', '', '', '', '', '[\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-00-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-01-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-02-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-03-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-04-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-05-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-06-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-07-low.jpg\",\"catalog/all/items/peak-design/travel-backpack-30l/peakdesign-travel-backpack-30l-sage-08-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 1, 7),
(1041, 21, 2, '0', 49, 'cp-xx-3-silver', '', '', '', '', '', '', '', '[\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-silver-00-low.jpg\",\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-silver-03-low.jpg\",\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-silver-04-low.jpg\",\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-silver-05-low.jpg\",\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-silver-06-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 0),
(1041, 21, 2, '0', 71, 'cp-xx-3-black', '', '', '', '', '', '', '', '[\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-black-00-low.jpg\",\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-black-03-low.jpg\",\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-black-04-low.jpg\",\"catalog/all/items/peak-design/capture-v3/peakdesign-capture-v3-black-05-low.jpg\"]', 0.0000, 'as', 0, 'as', 0.00000000, 'as', 0.00000000, 0.00000000, 0.00000000, 0, 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `may_advanced_option_template`
--

CREATE TABLE `may_advanced_option_template` (
  `option_id` int(11) NOT NULL,
  `option_name` varchar(255) NOT NULL,
  `children` varchar(255) NOT NULL,
  `swatch_image` int(1) DEFAULT NULL,
  `sort_order` int(3) DEFAULT NULL,
  `content` text DEFAULT NULL,
  `show_first_option_in_list` int(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `may_advanced_option_template`
--

INSERT INTO `may_advanced_option_template` (`option_id`, `option_name`, `children`, `swatch_image`, `sort_order`, `content`, `show_first_option_in_list`) VALUES
(2, 'Peak Design Size', '11', 0, 0, '{\"11\":{\"65\":[],\"66\":[],\"67\":[],\"68\":[],\"69\":[],\"70\":[],\"77\":[],\"78\":[],\"79\":[]}}', 1),
(3, 'Peak Design Color', '2', 1, 1, '{\"2\":{\"71\":[],\"72\":[],\"73\":[],\"74\":[],\"75\":[],\"76\":[],\"80\":[]}}', 1),
(4, 'Peak Design Color &amp; Size', '2,11', 1, 2, '{\"2\":{\"71\":[\"65\",\"66\",\"67\",\"68\",\"69\",\"70\"],\"72\":[\"65\",\"66\",\"67\",\"68\",\"69\",\"70\"],\"73\":[\"65\",\"66\",\"67\",\"68\",\"69\",\"70\"],\"74\":[\"65\",\"66\",\"67\",\"68\",\"69\",\"70\"],\"75\":[\"65\",\"66\",\"67\",\"68\",\"69\",\"70\"],\"76\":[\"65\",\"66\",\"67\",\"68\",\"69\",\"70\"]},\"11\":{\"65\":[],\"66\":[],\"67\":[],\"68\":[],\"69\":[],\"70\":[]}}', 1),
(5, 'Peak Design Everyday Backpack', '11,2', 0, 2, '{\"11\":{\"69\":[\"71\",\"73\",\"74\",\"75\",\"76\"],\"70\":[\"71\",\"73\",\"74\",\"75\",\"76\"]},\"2\":{\"71\":[],\"73\":[],\"74\":[],\"75\":[],\"76\":[]}}', 0),
(6, 'Peak Design Materials', '14', 0, 3, '{\"14\":{\"81\":[],\"82\":[]}}', 0);

-- --------------------------------------------------------

--
-- Table structure for table `me_product_video`
--

CREATE TABLE `me_product_video` (
  `video_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `status` tinyint(2) NOT NULL,
  `sort_order` int(11) NOT NULL,
  `video_type` int(11) NOT NULL,
  `video_link` varchar(250) NOT NULL,
  `image` varchar(250) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `me_product_video`
--

INSERT INTO `me_product_video` (`video_id`, `product_id`, `status`, `sort_order`, `video_type`, `video_link`, `image`) VALUES
(70, 13, 1, 3, 1, 'https://youtu.be/sGGqAYY1WVU', 'catalog/sGGqAYY1WVU.jpg'),
(281, 47, 1, 0, 1, 'https://www.youtube.com/embed/1aEOLY_Perk', 'catalog/1aEOLY_Perk.jpg'),
(89, 34, 1, 0, 1, 'https://youtu.be/3bwXadGv8n4', 'catalog/3bwXadGv8n4.jpg'),
(90, 34, 1, 1, 1, 'https://youtu.be/S0f7OWVGNQ4', 'catalog/S0f7OWVGNQ4.jpg'),
(101, 44, 1, 0, 1, 'https://youtu.be/NJRy3DlLbJ0?t=703s', 'catalog/NJRy3DlLbJ0.jpg'),
(115, 28, 1, 1, 1, 'https://youtu.be/ZOY03ICKvSI', 'catalog/ZOY03ICKvSI.jpg'),
(114, 28, 1, 0, 1, 'https://youtu.be/O3kdwSGiqQc', 'catalog/O3kdwSGiqQc.jpg'),
(122, 27, 1, 0, 1, 'https://youtu.be/O3kdwSGiqQc', 'catalog/O3kdwSGiqQc.jpg'),
(123, 27, 1, 1, 1, 'https://youtu.be/ZOY03ICKvSI', 'catalog/ZOY03ICKvSI.jpg'),
(126, 46, 1, 0, 1, 'https://youtu.be/izg0ZzRprWk', 'catalog/izg0ZzRprWk.jpg'),
(130, 49, 1, 0, 1, 'https://youtu.be/xV9Pcw0a0Jo', 'catalog/xV9Pcw0a0Jo.jpg'),
(137, 26, 1, 0, 1, 'https://youtu.be/uQ08kc3lIcY', 'catalog/uQ08kc3lIcY.jpg'),
(138, 26, 1, 1, 1, 'https://youtu.be/nE40wLbjar0', 'catalog/nE40wLbjar0.jpg'),
(156, 48, 1, 1, 1, 'https://youtu.be/xV9Pcw0a0Jo', 'catalog/xV9Pcw0a0Jo.jpg'),
(155, 48, 1, 0, 1, 'https://youtu.be/Xkw9lPVKMOA', 'catalog/Xkw9lPVKMOA.jpg'),
(168, 29, 1, 1, 1, 'https://youtu.be/4ZkaOSJid9w', 'catalog/4ZkaOSJid9w.jpg'),
(167, 29, 1, 0, 1, 'https://youtu.be/8v5L2RqJzlA', 'catalog/8v5L2RqJzlA.jpg'),
(175, 43, 1, 0, 1, 'https://youtu.be/pe3nq7ifmkc', 'catalog/pe3nq7ifmkc.jpg'),
(176, 43, 1, 1, 1, 'https://youtu.be/NJRy3DlLbJ0', 'catalog/NJRy3DlLbJ0.jpg'),
(183, 36, 1, 0, 1, 'https://youtu.be/MGS0-L9GNWc', 'catalog/MGS0-L9GNWc.jpg'),
(184, 36, 1, 1, 1, 'https://youtu.be/HyOHbn18PR4', 'catalog/HyOHbn18PR4.jpg'),
(279, 35, 1, 0, 1, 'https://youtu.be/DHseadBKJNs', ''),
(203, 30, 1, 1, 1, 'https://youtu.be/yxmcpOqrGnY', 'catalog/yxmcpOqrGnY.jpg'),
(202, 30, 1, 0, 1, 'https://youtu.be/Itw2F_N54GI', 'catalog/Itw2F_N54GI.jpg'),
(233, 31, 1, 1, 1, 'https://youtu.be/eUkp4dStSLA', 'catalog/eUkp4dStSLA.jpg'),
(232, 31, 1, 0, 1, 'https://youtu.be/VnfP5TKgrjA', 'catalog/VnfP5TKgrjA.jpg'),
(248, 54, 1, 0, 1, 'https://youtu.be/1wFrX9Vyles', 'catalog/1wFrX9Vyles.jpg'),
(262, 32, 1, 1, 1, 'https://youtu.be/-HEkYlNVfJ8', 'catalog/-HEkYlNVfJ8.jpg'),
(261, 32, 1, 0, 1, 'https://youtu.be/hi1u_A2VMcg', 'catalog/hi1u_A2VMcg.jpg'),
(272, 55, 1, 1, 1, 'https://youtu.be/-HEkYlNVfJ8', 'catalog/-HEkYlNVfJ8.jpg'),
(271, 55, 1, 0, 1, 'https://youtu.be/hi1u_A2VMcg', 'catalog/hi1u_A2VMcg.jpg'),
(274, 38, 1, 0, 1, 'https://youtu.be/KwEhAd74DZY', 'catalog/KwEhAd74DZY.jpg');

-- --------------------------------------------------------

--
-- Table structure for table `modification`
--

CREATE TABLE `modification` (
  `modification_id` int(11) NOT NULL,
  `extension_install_id` int(11) NOT NULL,
  `name` varchar(64) NOT NULL,
  `code` varchar(64) NOT NULL,
  `author` varchar(64) NOT NULL,
  `version` varchar(32) NOT NULL,
  `link` varchar(255) NOT NULL,
  `xml` mediumtext NOT NULL,
  `status` tinyint(1) NOT NULL,
  `date_added` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `modification`
--

INSERT INTO `modification` (`modification_id`, `extension_install_id`, `name`, `code`, `author`, `version`, `link`, `xml`, `status`, `date_added`) VALUES
(1, 1, 'Fix opencart 3 installer folder limitation', 'fix_oc3_installer', 'GeekoDev', '1.0', 'https://geekodev.com', '<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<modification>\n  <id>Fix opencart 3 installer folder limitation</id>\n  <name>Fix opencart 3 installer folder limitation</name>\n  <code>fix_oc3_installer</code>\n  <version>1.0</version>\n  <author>GeekoDev</author>\n  <link><![CDATA[https://geekodev.com]]></link>\n\n  <file path=\"admin/controller/marketplace/install.php\">\n  \n    <operation>\n      <search position=\"replace\"><![CDATA[$safe = false;]]></search>\n      <add position=\"replace\"><![CDATA[$safe = true;]]></add>\n    </operation>\n    \n    <operation>\n      <search position=\"before\"><![CDATA[if (is_dir($file) && !is_dir($path)) {]]></search>\n      <add position=\"before\"><![CDATA[		\n        if ($path == \'\') {\n          $path = DIR_CATALOG . \'../\' . $destination;\n        }\n      ]]></add>\n    </operation>\n    \n  </file>\n  \n</modification>', 1, '2021-09-02 09:36:44'),
(3, 3, 'Cl!cker Elfinder Filemanager - OC 3.x', 'clicker_elfinder', 'Cl!cker', '3.6.2_E2.1.60n', 'https://opencart.click', '<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<modification>\n	<code>clicker_elfinder</code>\n	<name>Cl!cker Elfinder Filemanager - OC 3.x</name>\n	<version>3.6.2_E2.1.60n</version>\n	<author>Cl!cker</author>\n	<link>https://opencart.click</link>\n\n	<file path=\"admin/controller/common/filemanager.php\">\n		<operation>\n			<search trim=\"true\" index=\"0\"><![CDATA[\n				public function index() {\n			]]></search>\n			<add position=\"replace\" trim=\"false\" offset=\"0\"><![CDATA[\n				public function index() {\n					if (!$this->user->hasPermission(\'access\', \'extension/elfinder\')) {\n						$this->index_fm();\n						return;\n					}\n\n					$data = $this->language->load(\'extension/elfinder\');\n\n					if (version_compare(VERSION, \'3.0.0\') >= 0) {\n						$data[\'token_name\'] = \'user_token\';\n						$data[\'user_token\'] = $this->session->data[$data[\'token_name\']];\n					} else {\n						$data[\'token_name\'] = \'token\';\n						$data[\'user_token\'] = $this->session->data[$data[\'token_name\']];\n					}\n\n					$data[\'connector_url\'] = $this->url->link(\'extension/elfinder/connector\', $data[\'token_name\'] . \'=\' . $data[\'user_token\'], true);\n					$data[\'setting_url\'] = $this->url->link(\'extension/elfinder/setting\', $data[\'token_name\'] . \'=\' . $data[\'user_token\'], true);\n					$data[\'el_setting\'] = $this->load->controller(\'extension/elfinder/getsetting\');\n\n					$data[\'modal\'] = true;\n					$data[\'iframe\'] = false;\n\n					$data[\'thumb_image\'] = !empty($this->request->get[\'thumb\']) ? $this->request->get[\'thumb\'] : \'\';\n					$data[\'target_image\'] = !empty($this->request->get[\'target\']) ? $this->request->get[\'target\'] : \'\';\n					$data[\'multiple\'] = !empty($this->request->get[\'multiple\']) ? $this->request->get[\'multiple\'] : \'\';\n					$data[\'CKEditor\'] = !empty($this->request->get[\'CKEditor\']) ? $this->request->get[\'CKEditor\'] : \'\';\n					$data[\'CKEditorFuncNum\'] = !empty($this->request->get[\'CKEditorFuncNum\']) ? $this->request->get[\'CKEditorFuncNum\'] : \'\';\n\n					$data[\'version\'] = $this->load->controller(\'extension/elfinder/getversion\');\n					$data[\'oc_version\'] = defined(\'VERSION\') ? VERSION : 0;\n\n					if (!empty($data[\'CKEditorFuncNum\'])) {\n						$data[\'iframe\'] = true;\n						//$this->el_iframe();\n						//return true;\n					}\n\n					$params = !empty($this->request->get) ? $this->request->get : array($data[\'token_name\'] => $data[\'user_token\']);\n\n					if (isset($params[\'route\'])) {\n						unset($params[\'route\']);\n					}\n\n					$data[\'iframe_link\'] = $this->url->link(\'common/filemanager/el_iframe\', http_build_query($params), true);\n\n					$this->response->setOutput($this->load->view(\'extension/elfinder\', $data));\n				}\n\n				public function el_iframe() {\n					if (!$this->user->hasPermission(\'access\', \'extension/elfinder\')) {\n						die(\'Permission extension/elfinder denied!\');\n						return;\n					}\n\n					$data = $this->language->load(\'extension/elfinder\');\n\n					$data[\'title\'] = $this->language->get(\'heading_title\');\n					$data[\'lang\'] = $this->language->get(\'code\');\n					$data[\'direction\'] = $this->language->get(\'direction\');\n\n					if (version_compare(VERSION, \'3.0.0\') >= 0) {\n						$data[\'token_name\'] = \'user_token\';\n						$data[\'user_token\'] = $this->session->data[$data[\'token_name\']];\n					} else {\n						$data[\'token_name\'] = \'token\';\n						$data[\'user_token\'] = $this->session->data[$data[\'token_name\']];\n					}\n\n					$data[\'connector_url\'] = $this->url->link(\'extension/elfinder/connector\', $data[\'token_name\'] . \'=\' . $data[\'user_token\'], true);\n					$data[\'setting_url\'] = $this->url->link(\'extension/elfinder/setting\', $data[\'token_name\'] . \'=\' . $data[\'user_token\'], true);\n					$data[\'el_setting\'] = $this->load->controller(\'extension/elfinder/getsetting\');\n\n					$data[\'iframe\'] = true;\n					$data[\'modal\'] = false;\n\n					$data[\'thumb_image\'] = !empty($this->request->get[\'thumb\']) ? $this->request->get[\'thumb\'] : \'\';\n					$data[\'target_image\'] = !empty($this->request->get[\'target\']) ? $this->request->get[\'target\'] : \'\';\n					$data[\'multiple\'] = !empty($this->request->get[\'multiple\']) ? $this->request->get[\'multiple\'] : \'\';\n					$data[\'CKEditor\'] = !empty($this->request->get[\'CKEditor\']) ? $this->request->get[\'CKEditor\'] : \'\';\n					$data[\'CKEditorFuncNum\'] = !empty($this->request->get[\'CKEditorFuncNum\']) ? $this->request->get[\'CKEditorFuncNum\'] : \'\';\n\n					$data[\'version\'] = $this->load->controller(\'extension/elfinder/getversion\');\n					$data[\'oc_version\'] = defined(\'VERSION\') ? VERSION : 0;\n\n					$this->response->setOutput($this->load->view(\'extension/elfinder\', $data));\n				}\n\n				public function index_fm() {\n			]]></add>\n		</operation>\n	</file>\n\n	<file path=\"admin/controller/common/column_left.php\">\n		<operation>\n			<search trim=\"true\" index=\"0\"><![CDATA[\n				$marketplace = array();\n			]]></search>\n			<add position=\"after\" trim=\"false\" offset=\"0\"><![CDATA[\n				if ($this->user->hasPermission(\'access\', \'extension/elfinder\')) {\n					if (version_compare(VERSION, \'3.0.0\') >= 0) {\n						$data[\'token_name\'] = \'user_token\';\n						$data[\'user_token\'] = $this->session->data[$data[\'token_name\']];\n					} else {\n						$data[\'token_name\'] = \'token\';\n						$data[\'user_token\'] = $this->session->data[$data[\'token_name\']];\n					}\n\n					$this->language->load(\'extension/elfinder\');\n					$marketplace[] = array(\n						\'name\'	   => $this->language->get(\'text_filemanager\'),\n						\'href\'     => $this->url->link(\'extension/elfinder\', $data[\'token_name\'] . \'=\'. $data[\'user_token\'], true),\n						\'children\' => array()\n					);\n				}\n			]]></add>\n		</operation>\n	</file>\n\n	<file path=\"admin/view/template/catalog/product_form.twig\">\n		<operation>\n			<search trim=\"true\" index=\"0\"><![CDATA[\n				{{ footer }}\n			]]></search>\n			<add position=\"before\" trim=\"false\" offset=\"0\"><![CDATA[\n				<script type=\"text/javascript\">\n					$(document).ready(function() {\n						var html = \'&nbsp;&nbsp;<button type=\"button\" onclick=\"addMultipleImages(this);\" data-toggle=\"tooltip\" title=\"Add multiple images\" class=\"btn btn-success\"><i class=\"fa fa-list\"></i></button>\';\n						html += \'<input type=\"hidden\" id=\"elfinder_multiple\" value=\"\"/>\';\n						$(\'button[onclick*=\"addImage(\"]\').after(html);\n					});\n\n					function addMultipleImages(btn) {\n						var $button = $(btn);\n\n						$(\'#modal-image\').remove();\n\n						if (getURLVar(\'user_token\')) {\n							var user_token = \'&user_token=\' + getURLVar(\'user_token\');\n						} else {\n							var user_token = \'&token=\' + getURLVar(\'token\');\n						}\n\n						$.ajax({\n						  url: \'index.php?route=common/filemanager\' + user_token + \'&multiple=callbackMultipleImages&target=elfinder_multiple&thumb=placeholder\',\n							dataType: \'html\',\n							beforeSend: function() {\n								$button.prop(\'disabled\', true);\n							},\n							complete: function() {\n								$button.prop(\'disabled\', false);\n							},\n							success: function(html) {\n								$(\'body\').append(\'<div id=\"modal-image\" class=\"modal\">\' + html + \'</div>\');\n\n								$(\'#modal-image\').modal(\'show\');\n							}\n						});\n					}\n\n					function callbackMultipleImages(data={}) {\n						if (!data) return;\n\n						for (idx in data) {\n							if (data[idx].mime) {\n								var file = data[idx];\n								if (file.path && (String(file.path).substring(0, 6) == \'image\\\\\' || String(file.path).substring(0, 6) == \'image/\')) {\n									// Fix root for image folder if default is not image/catalog\n									file.path = String(file.path).substring(6);\n								}\n\n								var curr_image_row = image_row;\n								addImage();\n\n								$(\'#thumb-image\' + curr_image_row + \' img\').attr(\'src\', file.tmb).css(\'max-width\', \'100%\');\n								$(\'#input-image\' + curr_image_row + \'\').val(file.path);\n								$(\'input[name=\"product_image[\' + curr_image_row + \'][sort_order]\"]\').val(curr_image_row);\n							}\n						}\n					}\n				</script>\n			]]></add>\n		</operation>\n	</file>\n\n</modification>', 1, '2022-03-26 15:19:48'),
(4, 5, 'Admin Quick Edit PRO', 'admin_quick_edit', 'bull5-i', '6.3.0', 'https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=3805', '<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<modification>\n	<name>Admin Quick Edit PRO</name>\n	<code>admin_quick_edit</code>\n	<version>6.3.0</version>\n	<author>bull5-i</author>\n	<link><![CDATA[https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=3805]]></link>\n\n	<file path=\"system/config/aqep.php\">\n		<operation info=\"Indicate that the OCMOD script is working\" error=\"skip\">\n			<search><![CDATA[<?php]]></search>\n			<add position=\"after\"><![CDATA[$_[\'aqe_pro_ocmod_script_working\'] = true;\n			]]></add>\n		</operation>\n	</file>\n\n	<file path=\"admin/controller/design/layout.php\">\n		<operation info=\"Hack: filter out AQE from modules list\" error=\"skip\">\n			<search><![CDATA[foreach ($extensions as $code)]]></search>\n			<add position=\"after\"><![CDATA[\n			if ($code == \'admin_quick_edit\') continue;\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- DESIGN -> SEO URLs -->\n	<file path=\"admin/controller/design/seo_url.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_design_seo_urls_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_design_seo_urls\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- MARKETING -> COUPONS -->\n	<file path=\"admin/controller/marketing/coupon.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_marketing_coupons_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_marketing_coupons\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- MARKETING -> MARKETING -->\n	<file path=\"admin/controller/marketing/marketing.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_marketing_marketing_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_marketing_marketing\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- SALES -> GIFT VOUCHER THEMES -->\n	<file path=\"admin/controller/sale/voucher_theme.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_sale_voucher_themes_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_sale_voucher_themes\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- SALES -> GIFT VOUCHERS -->\n	<file path=\"admin/controller/sale/voucher.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_sale_vouchers_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_sale_vouchers\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- SALES -> RETURNS -->\n	<file path=\"admin/controller/sale/return.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_sale_returns_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_sale_returns\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- SALES -> ORDERS -->\n	<file path=\"admin/controller/sale/order.php\">\n		<operation error=\"skip\">\n			<search><![CDATA[\n			function getList() {\n			]]></search>\n			<add position=\"after\"><![CDATA[\n		if ((int)$this->config->get(\'module_admin_quick_edit_status\') && (int)$this->config->get(\'module_admin_quick_edit_sale_orders_status\')) {\n			if (!function_exists(\'column_display\')) {\n				function column_display($a) {\n					return (isset($a[\'display\'])) ? (int)$a[\'display\'] : false;\n				}\n			}\n			$this->load->language(\'extension/module/aqe/sale/general\');\n			$this->document->addScript(\'view/javascript/aqe/catalog.min.js\');\n			$this->document->addStyle(\'view/stylesheet/aqe/catalog.min.css\');\n\n			$actions = array();\n			$columns = $this->config->get(\'module_admin_quick_edit_sale_orders\');\n			$columns = array_filter($columns, \'column_display\');\n			foreach ($columns as $column => $attr) {\n				$columns[$column][\'name\'] = $this->language->get(\'column_\' . $column);\n			}\n\n			$related_columns = array_merge(array_map(function($v) { return isset($v[\'rel\']) ? $v[\'rel\'] : \'\'; }, $columns), array_map(function($v) { return isset($v[\'rel\']) ? $v[\'rel\'] : \'\'; }, $actions));\n\n			$data[\'related\'] = $related_columns;\n			$data[\'column_info\'] = $columns;\n\n			$data[\'update_url\'] = html_entity_decode($this->url->link(\'extension/module/admin_quick_edit/sale__order__quick_update\', \'user_token=\' . $this->session->data[\'user_token\'], true));\n\n			$this->load->model(\'localisation/order_status\');\n			$order_statuses = $this->model_localisation_order_status->getOrderStatuses();\n			$status_select = array();\n			foreach ($order_statuses as $status) {\n				$status_select[$status[\'order_status_id\']] = $status[\'name\'];\n			}\n			$data[\'status_select\'] = addslashes(json_encode($status_select));\n\n			$data[\'notify_customer\'] = $this->config->get(\'module_admin_quick_edit_sale_orders_notify_customer\');\n\n			$data[\'module_admin_quick_edit_enabled\'] = true;\n			$data[\'module_admin_quick_edit_tooltip\'] = ($this->config->get(\'module_admin_quick_edit_quick_edit_on\') == \'dblclick\') ? $this->language->get(\'text_double_click_edit\') : $this->language->get(\'text_click_edit\');\n			$data[\'module_admin_quick_edit_quick_edit_on\'] = $this->config->get(\'module_admin_quick_edit_quick_edit_on\');\n			$data[\'batch_edit\'] = (int)$this->config->get(\'module_admin_quick_edit_batch_edit\');\n		} else {\n			$data[\'module_admin_quick_edit_enabled\'] = false;\n		}\n			]]></add>\n		</operation>\n	</file>\n\n	<file path=\"admin/view/template/sale/order_list.twig\">\n		<operation error=\"skip\">\n			<search><![CDATA[\n			<div id=\"filter-order\"\n			]]></search>\n			<add position=\"before\"><![CDATA[\n		{% if module_admin_quick_edit_enabled %}\n		<div class=\"alerts\">\n			<div class=\"container-fluid\" id=\"alerts\">\n			</div>\n		</div>\n		{% endif %}\n			]]></add>\n		</operation>\n		<operation error=\"skip\">\n			<search><![CDATA[\n			<button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_filter }}\"\n			]]></search>\n			<add position=\"before\"><![CDATA[\n		{% if module_admin_quick_edit_enabled %}<label for=\"batch_edit\" class=\"hidden\" id=\"batch-edit-container\"><input type=\"checkbox\" id=\"batch-edit\"{{ batch_edit ? \' checked\' : \'\' }}> {{ text_batch_edit }}</label>{% endif %}\n			]]></add>\n		</operation>\n		<operation error=\"skip\">\n			<search regex=\"true\"><![CDATA[~<td class=\"text-left\">{{ order\\.(.*)status }}</td>~]]></search>\n			<add position=\"replace\"><![CDATA[\n		{% if module_admin_quick_edit_enabled %}\n		<td class=\"{{ column_info.status.align }}{{ column_info.status.qe_status ? \' \' ~ column_info.status.type : \'\' }}\" id=\"status-{{ order.order_id }}\">{{ order.$1status }}</td>\n		{% else %}\n		<td class=\"text-left\">{{ order.$1status }}</td>\n		{% endif %}\n			]]></add>\n		</operation>\n		<operation error=\"skip\">\n			<search><![CDATA[\n			{{ footer }}\n			]]></search>\n			<add position=\"before\"><![CDATA[\n		{% if module_admin_quick_edit_enabled %}\n		<script type=\"text/javascript\"><!--\n		!function(t,e){t.batch_edit=parseInt(\"{{ batch_edit * 1 }}\"),t.texts=e.extend({},t.texts,{error_ajax_request:\"{{ error_ajax_request }}\"}),e(function(){e(\".status_qe\").editable(function(i,o){var a=e(\"#notify\",this).is(\":checked\")?1:0,n={notify:a};return t.quick_update(this,i,o,\"{{ update_url }}\",n).done(e.proxy(t.update_finished,{column:e(this).attr(\"id\").split(\"-\")[0]})).fail(e.proxy(t.update_failed,this)),o.indicator},{type:\"status_edit\",data:\"{{ status_select|trim() }}\",indicator:\"{{ text_saving }}\",tooltip:\"{{ module_admin_quick_edit_tooltip }}\",event:\"{{ module_admin_quick_edit_quick_edit_on }}\",onblur:\"cancel\",notify_customer_text:\"{{ text_notify_customer }}\",notify_customer:parseInt(\"{{ notify_customer * 1 }}\")})})}(window.bull5i=window.bull5i||{},jQuery);\n		//--></script>\n		{% endif %}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CUSTOMER -> CUSTOMERS -->\n	<file path=\"admin/controller/customer/customer.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_customer_customers_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_customer_customers\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> INFORMATION -->\n	<file path=\"admin/controller/catalog/information.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_information_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_information\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> REVIEWS -->\n	<file path=\"admin/controller/catalog/review.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_reviews_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_reviews\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> DOWNLOADS -->\n	<file path=\"admin/controller/catalog/download.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_downloads_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_downloads\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> MANUFACTURERS -->\n	<file path=\"admin/controller/catalog/manufacturer.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_manufacturers_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_manufacturers\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> OPTIONS -->\n	<file path=\"admin/controller/catalog/option.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_options_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_options\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> ATTRIBUTE GROUPS -->\n	<file path=\"admin/controller/catalog/attribute_group.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_attribute_groups_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_attribute_groups\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> ATTRIBUTES -->\n	<file path=\"admin/controller/catalog/attribute.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_attributes_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_attributes\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> FILTERS -->\n	<file path=\"admin/controller/catalog/filter.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_filters_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_filters\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> RECURRINGS -->\n	<file path=\"admin/controller/catalog/recurring.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_recurrings_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_recurrings\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> CATEGORIES -->\n	<file path=\"admin/controller/catalog/category.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&sort=\' . $this->request->get[\'sort\'];\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_categories_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_categories\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n		}\n			]]></add>\n		</operation>\n	</file>\n\n\n<!-- CATALOG -> PRODUCTS -->\n	<file path=\"admin/controller/catalog/product.php\">\n		<operation info=\"Add custom column filters\" error=\"skip\">\n			<search><![CDATA[\n			$url .= \'&filter_name=\' . urlencode(html_entity_decode($this->request->get[\'filter_name\'], ENT_QUOTES, \'UTF-8\'));\n			]]></search>\n			<add position=\"before\" offset=\"1\"><![CDATA[\n		if ($this->config->get(\'module_admin_quick_edit_status\') && $this->config->get(\'module_admin_quick_edit_catalog_products_status\')) {\n			foreach ($this->config->get(\'module_admin_quick_edit_catalog_products\') as $column => $attr) {\n				if ($attr[\'filter\'][\'show\'] && isset($this->request->get[\'filter_\' . $column])) {\n					$url .= \'&filter_\' . $column . \'=\' . urlencode(html_entity_decode($this->request->get[\'filter_\' . $column], ENT_QUOTES, \'UTF-8\'));\n				}\n			}\n			if (isset($this->request->get[\'filter_sub_category\'])) {\n				$url .= \'&filter_sub_category=\' . urlencode(html_entity_decode($this->request->get[\'filter_sub_category\'], ENT_QUOTES, \'UTF-8\'));\n			}\n		}\n			]]></add>\n		</operation>\n		<operation info=\"Fix for filter urls\" error=\"skip\">\n			<search regex=\"true\"><![CDATA[~\\$url \\.= \'&(.*?)=\' \\. \\$this->request->get\\[\'(.*?)\'\\];~]]></search>\n			<add position=\"replace\"><![CDATA[$url .= \'&$1=\' . urlencode(html_entity_decode($this->request->get[\'$2\'], ENT_QUOTES, \'UTF-8\'));]]></add>\n		</operation>\n	</file>\n\n	<file path=\"admin/view/template/catalog/product_list.twig\">\n		<operation info=\"Sort &amp; order fix for filtering\" error=\"skip\">\n			<search regex=\"true\"><![CDATA[~location = \'index\\.php\\?route=(.*?)&user_token={{ user_token }}\' \\+ url;~]]></search>\n			<add position=\"replace\"><![CDATA[location = \'index.php?route=$1&user_token={{ user_token }}&sort={{ sort }}&order={{ order }}\' + url;]]></add>\n		</operation>\n	</file>\n\n	<file path=\"admin/view/template/{catalog,sale,customer}/*_list.twig\">\n		<operation info=\"Add \'change\' event trigger\" error=\"skip\">\n			<search><![CDATA[<input type=\"checkbox\" onclick=\"$(\'input[name*=\\\'selected\\\']\').prop(\'checked\', this.checked);\" />]]></search>\n			<add position=\"replace\"><![CDATA[<input type=\"checkbox\" onclick=\"$(\'input[name*=\\\'selected\\\']\').prop(\'checked\', this.checked).trigger(\'change\');\" />]]></add>\n		</operation>\n	</file>\n\n	<file path=\"system/engine/action.php\">\n		<operation error=\"skip\">\n			<ignoreif><![CDATA[$reflection->hasMethod(\"__call\")]]></ignoreif>\n			<search><![CDATA[\n			<= count($args)\n			]]></search>\n			<add position=\"replace\"><![CDATA[<= count($args) || $reflection->hasMethod(\"__call\")]]></add>\n		</operation>\n	</file>\n\n	<file path=\"system/library/db/mysql.php\">\n		<operation error=\"skip\">\n			<ignoreif><![CDATA[SET SESSION group_concat_max_len]]></ignoreif>\n			<search><![CDATA[\n			SET SQL_MODE = \'\'\n			]]></search>\n			<add position=\"after\"><![CDATA[\n		mysql_query(\"SET SESSION group_concat_max_len = 65535\", $this->connection);\n			]]></add>\n		</operation>\n	</file>\n\n	<file path=\"system/library/db/mysqli.php\">\n		<operation error=\"skip\">\n			<ignoreif><![CDATA[SET SESSION group_concat_max_len]]></ignoreif>\n			<search><![CDATA[\n			SET SESSION sql_mode =\n			]]></search>\n			<add position=\"after\"><![CDATA[\n		$this->connection->query(\"SET SESSION group_concat_max_len = 65535\");\n			]]></add>\n		</operation>\n	</file>\n\n	<file path=\"system/library/template/twig.php\">\n		<operation info=\"Add custom Twig filters OC &lt; 3.0.3.6\" error=\"skip\">\n			<search><![CDATA[\n			$template = $this->twig->loadTemplate($template\n			]]></search>\n			<add position=\"before\"><![CDATA[\n			if (strpos($template, \"extension/module/admin_quick_edit\") !== FALSE || strpos($template, \"extension/module/aqe\") !== FALSE) {\n				$this->twig->addFilter(new \\Twig_SimpleFilter(\'addslashes\', \'addslashes\'));\n			}\n			]]></add>\n		</operation>\n		<operation info=\"Add custom Twig filters OC &gt;= 3.0.3.6\" error=\"skip\">\n			<search><![CDATA[\n			return $twig->render($filename\n			]]></search>\n			<add position=\"before\"><![CDATA[\n			if (strpos($filename, \"extension/module/admin_quick_edit\") !== FALSE || strpos($filename, \"extension/module/aqe\") !== FALSE) {\n				$twig->addFilter(new \\Twig\\TwigFilter(\'addslashes\', \'addslashes\'));\n			}\n			]]></add>\n		</operation>\n	</file>\n\n</modification>\n', 1, '2022-03-30 15:39:27'),
(24, 23, 'ExcelPort', 'isense_excelport_3', 'iSenseLabs', '3.2.0', 'http://isenselabs.com', '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<modification>\n    <name><![CDATA[ExcelPort]]></name>\n	<code><![CDATA[isense_excelport_3]]></code>\n	<version><![CDATA[3.2.0]]></version>\n	<author><![CDATA[iSenseLabs]]></author>\n	<link><![CDATA[http://isenselabs.com]]></link>\n\n	<file path=\"admin/view/template/catalog/product_list.twig\">\n		<operation>\n			<search><![CDATA[<i class=\"fa fa-copy\"></i></button>]]></search>\n			<add position=\"after\"><![CDATA[\n				<a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a>\n			]]></add>\n		</operation>\n	</file>\n    <file path=\"admin/controller/catalog/category.php\">\n        <operation>\n            <search><![CDATA[$data[\'order\'] = $order;]]></search>\n            <add position=\"before\"><![CDATA[\n                $data[\'user_token\'] = $this->session->data[\'user_token\'];\n            ]]></add>\n        </operation>\n    </file>\n	<file path=\"admin/view/template/catalog/category_list.twig\">\n		<operation>\n			<search><![CDATA[<a href=\"{{ repair }}\" data-toggle=\"tooltip\" title=\"{{ button_rebuild }}\" class=\"btn btn-default\"><i class=\"fa fa-refresh\"></i></a>]]></search>\n			<add position=\"replace\"><![CDATA[\n				<a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a> <a href=\"{{ repair }}\" data-toggle=\"tooltip\" title=\"{{ button_rebuild }}\" class=\"btn btn-default\"><i class=\"fa fa-refresh\"></i></a>\n			]]></add>\n		</operation>\n	</file>\n    <file path=\"admin/controller/catalog/option.php\">\n        <operation>\n            <search><![CDATA[$data[\'order\'] = $order;]]></search>\n            <add position=\"after\"><![CDATA[\n                $data[\'user_token\'] = $this->session->data[\'user_token\'];\n            ]]></add>\n        </operation>\n    </file>\n	<file path=\"admin/view/template/catalog/option_list.twig\">\n		<operation>\n			<search><![CDATA[<button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_delete }}\" class=\"btn btn-danger\" onclick=\"confirm(\'{{ text_confirm }}\') ? $(\'#form-option\').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>]]></search>\n			<add position=\"before\"><![CDATA[\n				<a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a>\n			]]></add>\n		</operation>\n	</file>\n    <file path=\"admin/controller/catalog/attribute.php\">\n        <operation>\n            <search><![CDATA[$data[\'order\'] = $order;]]></search>\n            <add position=\"after\"><![CDATA[\n                $data[\'user_token\'] = $this->session->data[\'user_token\'];\n            ]]></add>\n        </operation>\n    </file>\n	<file path=\"admin/view/template/catalog/attribute_list.twig\">\n		<operation>\n			<search><![CDATA[<button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_delete }}\" class=\"btn btn-danger\" onclick=\"confirm(\'{{ text_confirm }}\') ? $(\'#form-attribute\').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>]]></search>\n			<add position=\"before\"><![CDATA[\n				<a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a>\n			]]></add>\n		</operation>\n	</file>\n    <file path=\"admin/controller/catalog/attribute_group.php\">\n        <operation>\n            <search><![CDATA[$data[\'order\'] = $order;]]></search>\n            <add position=\"after\"><![CDATA[\n                $data[\'user_token\'] = $this->session->data[\'user_token\'];\n            ]]></add>\n        </operation>\n    </file>\n	<file path=\"admin/view/template/catalog/attribute_group_list.twig\">\n		<operation>\n			<search><![CDATA[<button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_delete }}\" class=\"btn btn-danger\" onclick=\"confirm(\'{{ text_confirm }}\') ? $(\'#form-attribute-group\').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>]]></search>\n			<add position=\"before\"><![CDATA[\n				<a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a>\n			]]></add>\n		</operation>\n	</file>\n    <file path=\"admin/controller/customer/customer.php\">\n        <operation>\n            <search><![CDATA[$data[\'order\'] = $order;]]></search>\n            <add position=\"after\"><![CDATA[\n                $data[\'user_token\'] = $this->session->data[\'user_token\'];\n            ]]></add>\n        </operation>\n    </file>\n    <file path=\"admin/view/template/customer/customer_list.twig\">\n        <operation>\n            <search><![CDATA[<button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_delete }}\" class=\"btn btn-danger\" onclick=\"confirm(\'{{ text_confirm }}\') ? $(\'#form-customer\').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>]]></search>\n            <add position=\"before\"><![CDATA[\n                <a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a>\n            ]]></add>\n        </operation>\n    </file>\n    <file path=\"admin/controller/customer/customer_group.php\">\n        <operation>\n            <search><![CDATA[$data[\'order\'] = $order;]]></search>\n            <add position=\"after\"><![CDATA[\n                $data[\'user_token\'] = $this->session->data[\'user_token\'];\n            ]]></add>\n        </operation>\n    </file>\n    <file path=\"admin/view/template/customer/customer_group_list.twig\">\n        <operation>\n            <search><![CDATA[<button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_delete }}\" class=\"btn btn-danger\" onclick=\"confirm(\'{{ text_confirm }}\') ? $(\'#form-customer-group\').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>]]></search>\n            <add position=\"before\"><![CDATA[\n                <a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a>\n            ]]></add>\n        </operation>\n    </file>\n    <file path=\"admin/controller/sale/order.php\">\n        <operation>\n            <search><![CDATA[$data[\'order\'] = $order;]]></search>\n            <add position=\"after\"><![CDATA[\n                $data[\'user_token\'] = $this->session->data[\'user_token\'];\n            ]]></add>\n        </operation>\n    </file>\n	<file path=\"admin/view/template/sale/order_list.twig\">\n		<operation>\n			<search><![CDATA[<a href=\"{{ add }}\" data-toggle=\"tooltip\" title=\"{{ button_add }}\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i></a>]]></search>\n			<add position=\"before\"><![CDATA[\n                <a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a>\n            ]]></add>\n		</operation>\n	</file>\n    <file path=\"admin/controller/catalog/manufacturer.php\">\n        <operation>\n            <search><![CDATA[$data[\'order\'] = $order;]]></search>\n            <add position=\"after\"><![CDATA[\n                $data[\'user_token\'] = $this->session->data[\'user_token\'];\n            ]]></add>\n        </operation>\n    </file>\n    <file path=\"admin/view/template/catalog/manufacturer_list.twig\">\n        <operation>\n            <search><![CDATA[<button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_delete }}\" class=\"btn btn-danger\" onclick=\"confirm(\'{{ text_confirm }}\') ? $(\'#form-manufacturer\').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>]]></search>\n            <add position=\"before\"><![CDATA[\n                <a href=\"index.php?route=extension/module/excelport&user_token={{ user_token }}\" class=\"btn btn-info\" data-toggle=\"tooltip\" title=\"Export / Import\"><i class=\"fa fa-file-excel-o\"></i></a>\n            ]]></add>\n        </operation>\n    </file>\n    <file path=\"admin/controller/common/column_left.php\">\n        <operation>\n            <search><![CDATA[if ($this->user->hasPermission(\'access\', \'tool/log\')) {]]></search>\n            <add position=\"before\"><![CDATA[\n                if ($this->user->hasPermission(\'access\', \'extension/module/excelport\')) {\n                    $maintenance[] = array(\n                        \'name\'     => \'ExcelPort: Export / Import\',\n                        \'href\'     => $this->url->link(\'extension/module/excelport\', \'user_token=\' . $this->session->data[\'user_token\'], true),\n                        \'children\' => array()\n                    );\n                }\n            ]]></add>\n        </operation>\n    </file>\n</modification>\n', 1, '2022-05-14 14:23:16');
INSERT INTO `modification` (`modification_id`, `extension_install_id`, `name`, `code`, `author`, `version`, `link`, `xml`, `status`, `date_added`) VALUES
(25, 24, 'CountryZone Manager - Country', 'countrymanager', 'AlexDW', '1.05', 'https://www.opencart.com/index.php?route=marketplace/extension&filter_member=AlexDW', '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<modification>\r\n	<name>CountryZone Manager - Country</name>\r\n	<version>1.05</version>\r\n	<author>AlexDW</author>\r\n	<link>https://www.opencart.com/index.php?route=marketplace/extension&amp;filter_member=AlexDW</link>\r\n	<code>countrymanager</code>\r\n	<file path=\"admin/view/template/localisation/country_list.twig\">\r\n		<operation error=\"skip\">\r\n			<search><![CDATA[\r\n<h1>{{ heading_title }}</h1>\r\n			]]></search>\r\n			<add position=\"replace\"><![CDATA[\r\n<!-- CountryManager -->\r\n      <h1>CountryManager</h1>\r\n<!-- CountryManager -->\r\n			]]></add>\r\n		</operation>\r\n	</file>\r\n	<file path=\"admin/view/template/localisation/country_list.twig\">\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n<div class=\"pull-right\"><a href=\"{{ add }}\" data-toggle=\"tooltip\" title=\"{{ button_add }}\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i></a>\r\n			]]></search>\r\n			<add position=\"replace\"><![CDATA[\r\n<!-- CountryManager -->\r\n      <div class=\"pull-right\">\r\n		<span style=\"padding-right:20px;\">\r\n		<a href=\"https://www.opencart.com/index.php?route=marketplace/extension&filter_member=AlexDW\" target=\"_blank\" data-toggle=\"tooltip\" title=\"Get more extensions\" class=\"btn btn-info\"><i class=\"fa fa-download\"></i></a></span>\r\n        <button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_enable_country }}\" class=\"btn btn-success\" onclick=\"$(\'#form-country\').attr(\'action\', \'{{ enable_country }}\'); $(\'#form-country\').submit();\"><i class=\"fa fa-plus\"></i></button>\r\n        <button type=\"button\" data-toggle=\"tooltip\" title=\"{{ button_disable_country }}\" class=\"btn btn-danger\" onclick=\"$(\'#form-country\').attr(\'action\', \'{{ disable_country }}\'); $(\'#form-country\').submit();\"><i class=\"fa fa-minus\"></i></button>\r\n	  <a href=\"{{ enable_all }}\" data-toggle=\"tooltip\" title=\"{{ button_enable_all }}\" class=\"btn btn-success\" data-confirm=\"{{ button_enable_all }}\"><i class=\"fa fa-globe fa-2x\"></i></a>\r\n	  <a href=\"{{ disable_all }}\" data-toggle=\"tooltip\" title=\"{{ button_disable_all }}\" class=\"btn btn-danger\" data-confirm=\"{{ button_disable_all }}\"><i class=\"fa fa-globe fa-2x\"></i></a>\r\n	  <a href=\"{{ add }}\" data-toggle=\"tooltip\" title=\"{{ button_add }}\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i></a>\r\n<!-- CountryManager -->\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n<td class=\"text-left\">{% if sort == \'name\' %}\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n<!-- CountryManager -->\r\n              <td class=\"text-left\" width=\"80px\">{% if sort == \'country_id\' %}\r\n                <a href=\"{{ sort_id }}\" class=\"{{ order|lower }}\">ID</a>\r\n                {% else %}\r\n                <a href=\"{{ sort_id }}\">ID</a>\r\n                {% endif %}</td>\r\n<!-- CountryManager -->\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n<td class=\"text-right\">{{ column_action }}</td>\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n<!-- CountryManager -->\r\n              <td class=\"text-left\">{{ entry_postcode_required }}</td>\r\n              <td class=\"text-left\">{{ entry_status }}</td>\r\n<!-- CountryManager -->\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n<div class=\"panel-body\">\r\n			]]></search>\r\n			<add position=\"after\"><![CDATA[\r\n<!-- CountryManager -->\r\n        <div class=\"well\">\r\n          <div class=\"row\">\r\n            <div class=\"col-sm-4\">\r\n              <div class=\"form-group\">\r\n                <label class=\"control-label\" for=\"input-id\">ID</label>\r\n                <input type=\"text\" name=\"filter_id\" value=\"{{ filter_id }}\" placeholder=\"ID\" id=\"input-id\" class=\"form-control\" />\r\n              </div>\r\n              <div class=\"form-group\">\r\n                <label class=\"control-label\" for=\"input-country\">{{ entry_name }}</label>\r\n                <input type=\"text\" name=\"filter_country\" value=\"{{ filter_country }}\" placeholder=\"{{ entry_name }}\" id=\"input-country\" class=\"form-control\" />\r\n              </div>\r\n            </div>\r\n            <div class=\"col-sm-4\">\r\n              <div class=\"form-group\">\r\n                <label class=\"control-label\" for=\"input-iso2\">{{ entry_iso_code_2 }}</label>\r\n                <input type=\"text\" name=\"filter_iso2\" value=\"{{ filter_iso2 }}\" placeholder=\"{{ entry_iso_code_2 }}\" id=\"input-iso2\" class=\"form-control\" />\r\n              </div>\r\n              <div class=\"form-group\">\r\n                <label class=\"control-label\" for=\"input-iso3\">{{ entry_iso_code_3 }}</label>\r\n                <input type=\"text\" name=\"filter_iso3\" value=\"{{ filter_iso3 }}\" placeholder=\"{{ entry_iso_code_3 }}\" id=\"input-iso3\" class=\"form-control\" />\r\n              </div>\r\n            </div>\r\n            <div class=\"col-sm-4\">\r\n              <div class=\"form-group\">\r\n                <label class=\"control-label\" for=\"input-code\">{{ entry_postcode_required }}</label>\r\n                <select name=\"filter_code\" id=\"input-code\" class=\"form-control\">\r\n                  <option value=\"*\"></option>\r\n				  {% if filter_code == 1 %}\r\n                  <option value=\"1\" selected=\"selected\">{{ text_yes }}</option>\r\n                  {% else %}\r\n                  <option value=\"1\">{{ text_yes }}</option>\r\n                  {% endif %}\r\n                  {% if filter_code == 2 %}\r\n                  <option value=\"2\" selected=\"selected\">{{ text_no }}</option>\r\n                  {% else %}\r\n                  <option value=\"2\">{{ text_no }}</option>\r\n                  {% endif %}\r\n                </select>\r\n              </div>\r\n              <div class=\"form-group\">\r\n                <label class=\"control-label\" for=\"input-status\">{{ entry_status }}</label>\r\n                <select name=\"filter_status\" id=\"input-status\" class=\"form-control\">\r\n                  <option value=\"*\"></option>\r\n				  {% if filter_status == 1 %}\r\n                  <option value=\"1\" selected=\"selected\">{{ text_enabled }}</option>\r\n                  {% else %}\r\n                  <option value=\"1\">{{ text_enabled }}</option>\r\n                  {% endif %}\r\n                  {% if filter_status == 2 %}\r\n                  <option value=\"2\" selected=\"selected\">{{ text_disabled }}</option>\r\n                  {% else %}\r\n                  <option value=\"2\">{{ text_disabled }}</option>\r\n                  {% endif %}\r\n                </select>\r\n              </div>\r\n            </div>\r\n            <div class=\"col-sm-12\">\r\n			<div class=\"pull-right\">\r\n              <button type=\"button\" id=\"button-clear\" class=\"btn btn-info\"><i class=\"fa fa-eraser\"></i> Clear</button>\r\n			  <button type=\"button\" id=\"button-filter\" class=\"btn btn-primary\"><i class=\"fa fa-search\"></i> Filter</button>\r\n            </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n        <div class=\"row\" style=\"padding-bottom: 10px;\">\r\n          <div class=\"col-sm-6 text-left\">{{ pagination }}</div>\r\n          <div class=\"col-sm-6 text-right\">{{ results }}</div>\r\n        </div>\r\n<!-- CountryManager -->\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n<td class=\"text-left\">{{ country.name }}</td>\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n<!-- CountryManager -->\r\n              <td class=\"text-left\">{{ country.country_id }}</td>\r\n<!-- CountryManager -->\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n<td class=\"text-left\">{{ country.iso_code_3 }}</td>\r\n			]]></search>\r\n			<add position=\"after\"><![CDATA[\r\n<!-- CountryManager -->\r\n              <td class=\"text-left\">\r\n				{% if country.postcode > 0 %}\r\n                    <span style=\"font-size: 90%;\" class=\"label label-info\">{{ text_yes }}</span>\r\n                {% else %}\r\n                    {{ text_no }}\r\n                {% endif %}\r\n			  </td>\r\n\r\n              <td class=\"text-left\">\r\n			  	{% if country.status > 0 %}\r\n                    <span style=\"font-size: 90%;\" class=\"label label-success\">{{ text_enabled }}</span>\r\n                {% else %}\r\n                    <span style=\"font-size: 90%;\" class=\"label label-warning\">{{ text_disabled }}</span>\r\n                {% endif %}\r\n			  </td>\r\n<!-- CountryManager -->\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n{{ footer }}\r\n			]]></search>\r\n			<add position=\"after\"><![CDATA[\r\n<!-- CountryManager -->\r\n<script type=\"text/javascript\"><!--\r\n$(document).ready(function() {\r\n	$(\'a[data-confirm]\').click(function(ev) {\r\n		var href = $(this).attr(\'href\');\r\n		if (!$(\'#dataConfirmModal\').length) {\r\n			$(\'body\').append(\'<div id=\"dataConfirmModal\" class=\"modal\" role=\"dialog\" aria-labelledby=\"dataConfirmLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-body\"></div><div class=\"modal-footer\"><button class=\"btn btn-default\" data-dismiss=\"modal\" aria-hidden=\"true\">{{ text_no }}</button><a class=\"btn btn-danger\" id=\"dataConfirmOK\">{{ text_yes }}</a></div></div></div></div>\');\r\n		} \r\n		$(\'#dataConfirmModal\').find(\'.modal-body\').text($(this).attr(\'data-confirm\')+\' ?\');\r\n		$(\'#dataConfirmOK\').attr(\'href\', href);\r\n		$(\'#dataConfirmModal\').modal({show:true});\r\n		return false;\r\n	});\r\n});\r\n\r\nfunction filter() {\r\n	url = \'index.php?route=localisation/country&user_token={{ user_token }}\';\r\n\r\n	var filter_id = $(\'input[name=\\\'filter_id\\\']\').val();\r\n	\r\n	if (filter_id) {\r\n		url += \'&filter_id=\' + encodeURIComponent(filter_id);\r\n	}\r\n\r\n	var filter_status = $(\'select[name=\\\'filter_status\\\']\').val();\r\n	\r\n	if (filter_status !=\'*\') {\r\n		url += \'&filter_status=\' + encodeURIComponent(filter_status);\r\n	}\r\n\r\n	var filter_code = $(\'select[name=\\\'filter_code\\\']\').val();\r\n	\r\n	if (filter_code !=\'*\') {\r\n		url += \'&filter_code=\' + encodeURIComponent(filter_code);\r\n	}\r\n\r\n	var filter_country = $(\'input[name=\\\'filter_country\\\']\').val();\r\n	\r\n	if (filter_country) {\r\n		url += \'&filter_country=\' + encodeURIComponent(filter_country);\r\n	}\r\n\r\n	var filter_iso2 = $(\'input[name=\\\'filter_iso2\\\']\').val();\r\n	\r\n	if (filter_iso2) {\r\n		url += \'&filter_iso2=\' + encodeURIComponent(filter_iso2);\r\n	}\r\n\r\n	var filter_iso3 = $(\'input[name=\\\'filter_iso3\\\']\').val();\r\n	\r\n	if (filter_iso3) {\r\n		url += \'&filter_iso3=\' + encodeURIComponent(filter_iso3);\r\n	}\r\n\r\n	location = url;\r\n}\r\n\r\nfunction clear_filter() {\r\n	$(\'select[class=\\\'form-control\\\']\').val(\'*\');\r\n	$(\'input[class=\\\'form-control\\\']\').val(\'\');\r\n	filter();\r\n	return false;\r\n}\r\n//--></script>  \r\n<script type=\"text/javascript\"><!--\r\n$(\'input[class=\\\'form-control\\\']\').keydown(function(e) {\r\n	if (e.keyCode == 13) {\r\n		filter();\r\n	}\r\n});\r\n\r\n$(\'#button-filter\').on(\'click\', function() {\r\n		filter();\r\n});\r\n\r\n$(\'#button-clear\').on(\'click\', function() {\r\n		clear_filter();\r\n});\r\n//--></script>\r\n			]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"admin/controller/localisation/country.php\">\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n$url .= \'&sort=\' . $this->request->get[\'sort\'];\r\n			]]></search>\r\n			<add position=\"after\" offset=\"1\"><![CDATA[\r\n			// CountryManager\r\n			if (isset($this->request->get[\'filter_id\'])) {\r\n				$url .= \'&filter_id=\' . $this->request->get[\'filter_id\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_status\'])) {\r\n				$url .= \'&filter_status=\' . $this->request->get[\'filter_status\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_code\'])) {\r\n				$url .= \'&filter_code=\' . $this->request->get[\'filter_code\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_country\'])) {\r\n				$url .= \'&filter_country=\' . urlencode(html_entity_decode($this->request->get[\'filter_country\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso2\'])) {\r\n				$url .= \'&filter_iso2=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso2\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso3\'])) {\r\n				$url .= \'&filter_iso3=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso3\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n			// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\nfunction getList() {\r\n			]]></search>\r\n			<add  position=\"after\"><![CDATA[\r\n		// CountryManager\r\n		if (isset($this->request->get[\'filter_id\'])) {\r\n			$filter_id = $this->request->get[\'filter_id\'];\r\n		} else {\r\n			$filter_id = null;\r\n		}\r\n\r\n		if (isset($this->request->get[\'filter_status\'])) {\r\n			$filter_status = $this->request->get[\'filter_status\'];\r\n		} else {\r\n			$filter_status = null;\r\n		}\r\n\r\n		if (isset($this->request->get[\'filter_code\'])) {\r\n			$filter_code = $this->request->get[\'filter_code\'];\r\n		} else {\r\n			$filter_code = null;\r\n		}\r\n\r\n		if (isset($this->request->get[\'filter_country\'])) {\r\n			$filter_country = $this->request->get[\'filter_country\'];\r\n		} else {\r\n			$filter_country = null;\r\n		}\r\n\r\n		if (isset($this->request->get[\'filter_iso2\'])) {\r\n			$filter_iso2 = $this->request->get[\'filter_iso2\'];\r\n		} else {\r\n			$filter_iso2 = null;\r\n		}\r\n\r\n		if (isset($this->request->get[\'filter_iso3\'])) {\r\n			$filter_iso3 = $this->request->get[\'filter_iso3\'];\r\n		} else {\r\n			$filter_iso3 = null;\r\n		}\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n\'sort\'  => $sort,\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n		// CountryManager\r\n			\'filter_id\'         => $filter_id,\r\n			\'filter_status\'     => $filter_status,\r\n			\'filter_code\'       => $filter_code,\r\n			\'filter_country\'    => $filter_country,\r\n			\'filter_iso2\'       => $filter_iso2,\r\n			\'filter_iso3\'       => $filter_iso3,\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n$data[\'sort\'] = $sort;\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n		// CountryManager\r\n			$data[\'filter_id\'] = $filter_id;\r\n			$data[\'filter_status\'] = $filter_status;\r\n			$data[\'filter_code\'] = $filter_code;\r\n			$data[\'filter_country\'] = $filter_country;\r\n			$data[\'filter_iso2\'] = $filter_iso2;\r\n			$data[\'filter_iso3\'] = $filter_iso3;\r\n			$data[\'user_token\'] = $this->session->data[\'user_token\'];\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\nif ($order == \'ASC\') {\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n		// CountryManager\r\n			if (isset($this->request->get[\'filter_id\'])) {\r\n				$url .= \'&filter_id=\' . $this->request->get[\'filter_id\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_status\'])) {\r\n				$url .= \'&filter_status=\' . $this->request->get[\'filter_status\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_code\'])) {\r\n				$url .= \'&filter_code=\' . $this->request->get[\'filter_code\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_country\'])) {\r\n				$url .= \'&filter_country=\' . urlencode(html_entity_decode($this->request->get[\'filter_country\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso2\'])) {\r\n				$url .= \'&filter_iso2=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso2\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso3\'])) {\r\n				$url .= \'&filter_iso3=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso3\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n$country_total = $this->model_localisation_country->getTotalCountries();\r\n			]]></search>\r\n			<add position=\"replace\"><![CDATA[\r\n		// CountryManager\r\n			$country_total = $this->model_localisation_country->getTotalCountryManager($filter_data);\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n$data[\'sort_name\'] = $this->url->link(\'localisation/country\', \'user_token=\' . $this->session->data[\'user_token\'] . \'&sort=name\' . $url, true);\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n		// CountryManager\r\n			$data[\'sort_id\'] = $this->url->link(\'localisation/country\', \'user_token=\' . $this->session->data[\'user_token\'] . \'&sort=country_id\' . $url, true);\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n$data[\'delete\'] = $this->url->link(\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n		// CountryManager\r\n			$data[\'enable_all\'] = $this->url->link(\'localisation/country/enable_all\', \'user_token=\' . $this->session->data[\'user_token\'] . $url, true);\r\n			$data[\'disable_all\'] = $this->url->link(\'localisation/country/disable_all\', \'user_token=\' . $this->session->data[\'user_token\'] . $url, true);\r\n			$data[\'enable_country\'] = $this->url->link(\'localisation/country/enable_country\', \'user_token=\' . $this->session->data[\'user_token\'] . $url, true);\r\n			$data[\'disable_country\'] = $this->url->link(\'localisation/country/disable_country\', \'user_token=\' . $this->session->data[\'user_token\'] . $url, true);\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n\'country_id\' => $result[\'country_id\'],\r\n			]]></search>\r\n			<add position=\"after\"><![CDATA[\r\n		// CountryManager\r\n			\'postcode\' => $result[\'postcode_required\'],\r\n			\'status\' => $result[\'status\'],\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\npublic function delete() {\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n		// CountryManager\r\n	public function disable_all() {\r\n		$this->language->load(\'localisation/country\');\r\n \r\n		$this->document->setTitle($this->language->get(\'heading_title\'));\r\n		\r\n		$this->load->model(\'localisation/country\');\r\n\r\n		if (!$this->user->hasPermission(\'modify\', \'localisation/country\')) {\r\n			$this->error[\'warning\'] = $this->language->get(\'error_permission\');\r\n\r\n		} else {\r\n			\r\n			$this->model_localisation_country->disableAllCountry();\r\n			\r\n			$this->session->data[\'success\'] = $this->language->get(\'text_success\');\r\n\r\n			$url = \'\';\r\n			\r\n			if (isset($this->request->get[\'sort\'])) {\r\n				$url .= \'&sort=\' . $this->request->get[\'sort\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_id\'])) {\r\n				$url .= \'&filter_id=\' . $this->request->get[\'filter_id\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_status\'])) {\r\n				$url .= \'&filter_status=\' . $this->request->get[\'filter_status\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_code\'])) {\r\n				$url .= \'&filter_code=\' . $this->request->get[\'filter_code\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_country\'])) {\r\n				$url .= \'&filter_country=\' . urlencode(html_entity_decode($this->request->get[\'filter_country\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso2\'])) {\r\n				$url .= \'&filter_iso2=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso2\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso3\'])) {\r\n				$url .= \'&filter_iso3=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso3\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'order\'])) {\r\n				$url .= \'&order=\' . $this->request->get[\'order\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'page\'])) {\r\n				$url .= \'&page=\' . $this->request->get[\'page\'];\r\n			}\r\n\r\n			$this->response->redirect($this->url->link(\'localisation/country\', \'user_token=\' . $this->session->data[\'user_token\'] . $url, true));\r\n		}\r\n\r\n		$this->getList();\r\n	}\r\n\r\n	public function enable_all() {\r\n		$this->language->load(\'localisation/country\');\r\n \r\n		$this->document->setTitle($this->language->get(\'heading_title\'));\r\n		\r\n		$this->load->model(\'localisation/country\');\r\n\r\n		if (!$this->user->hasPermission(\'modify\', \'localisation/country\')) {\r\n			$this->error[\'warning\'] = $this->language->get(\'error_permission\');\r\n\r\n		} else {\r\n			\r\n			$this->model_localisation_country->enableAllCountry();\r\n			\r\n			$this->session->data[\'success\'] = $this->language->get(\'text_success\');\r\n\r\n			$url = \'\';\r\n			\r\n			if (isset($this->request->get[\'sort\'])) {\r\n				$url .= \'&sort=\' . $this->request->get[\'sort\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_id\'])) {\r\n				$url .= \'&filter_id=\' . $this->request->get[\'filter_id\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_status\'])) {\r\n				$url .= \'&filter_status=\' . $this->request->get[\'filter_status\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_code\'])) {\r\n				$url .= \'&filter_code=\' . $this->request->get[\'filter_code\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_country\'])) {\r\n				$url .= \'&filter_country=\' . urlencode(html_entity_decode($this->request->get[\'filter_country\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso2\'])) {\r\n				$url .= \'&filter_iso2=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso2\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso3\'])) {\r\n				$url .= \'&filter_iso3=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso3\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'order\'])) {\r\n				$url .= \'&order=\' . $this->request->get[\'order\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'page\'])) {\r\n				$url .= \'&page=\' . $this->request->get[\'page\'];\r\n			}\r\n\r\n			$this->response->redirect($this->url->link(\'localisation/country\', \'user_token=\' . $this->session->data[\'user_token\'] . $url, true));\r\n		}\r\n\r\n		$this->getList();\r\n	}\r\n\r\n	public function enable_country() {\r\n		$this->language->load(\'localisation/country\');\r\n \r\n		$this->document->setTitle($this->language->get(\'heading_title\'));\r\n		\r\n		$this->load->model(\'localisation/country\');\r\n\r\n		if (!$this->user->hasPermission(\'modify\', \'localisation/country\')) {\r\n			$this->error[\'warning\'] = $this->language->get(\'error_permission\');\r\n		} elseif (isset($this->request->post[\'selected\'])) {\r\n\r\n			foreach ($this->request->post[\'selected\'] as $country_id) {\r\n			$this->model_localisation_country->enableCountry($country_id);\r\n			}\r\n\r\n			$this->session->data[\'success\'] = $this->language->get(\'text_success\');\r\n\r\n			$url = \'\';\r\n			\r\n			if (isset($this->request->get[\'sort\'])) {\r\n				$url .= \'&sort=\' . $this->request->get[\'sort\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_id\'])) {\r\n				$url .= \'&filter_id=\' . $this->request->get[\'filter_id\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_status\'])) {\r\n				$url .= \'&filter_status=\' . $this->request->get[\'filter_status\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_code\'])) {\r\n				$url .= \'&filter_code=\' . $this->request->get[\'filter_code\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_country\'])) {\r\n				$url .= \'&filter_country=\' . urlencode(html_entity_decode($this->request->get[\'filter_country\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso2\'])) {\r\n				$url .= \'&filter_iso2=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso2\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso3\'])) {\r\n				$url .= \'&filter_iso3=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso3\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'order\'])) {\r\n				$url .= \'&order=\' . $this->request->get[\'order\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'page\'])) {\r\n				$url .= \'&page=\' . $this->request->get[\'page\'];\r\n			}\r\n\r\n			$this->response->redirect($this->url->link(\'localisation/country\', \'user_token=\' . $this->session->data[\'user_token\'] . $url, true));\r\n		}\r\n\r\n		$this->getList();\r\n	}\r\n\r\n	public function disable_country() {\r\n		$this->language->load(\'localisation/country\');\r\n \r\n		$this->document->setTitle($this->language->get(\'heading_title\'));\r\n		\r\n		$this->load->model(\'localisation/country\');\r\n\r\n		if (!$this->user->hasPermission(\'modify\', \'localisation/country\')) {\r\n			$this->error[\'warning\'] = $this->language->get(\'error_permission\');\r\n		} elseif (isset($this->request->post[\'selected\'])) {\r\n\r\n			foreach ($this->request->post[\'selected\'] as $country_id) {\r\n			$this->model_localisation_country->disableCountry($country_id);\r\n			}\r\n\r\n			$this->session->data[\'success\'] = $this->language->get(\'text_success\');\r\n\r\n			$url = \'\';\r\n			\r\n			if (isset($this->request->get[\'sort\'])) {\r\n				$url .= \'&sort=\' . $this->request->get[\'sort\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_id\'])) {\r\n				$url .= \'&filter_id=\' . $this->request->get[\'filter_id\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_status\'])) {\r\n				$url .= \'&filter_status=\' . $this->request->get[\'filter_status\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_code\'])) {\r\n				$url .= \'&filter_code=\' . $this->request->get[\'filter_code\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_country\'])) {\r\n				$url .= \'&filter_country=\' . urlencode(html_entity_decode($this->request->get[\'filter_country\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso2\'])) {\r\n				$url .= \'&filter_iso2=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso2\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'filter_iso3\'])) {\r\n				$url .= \'&filter_iso3=\' . urlencode(html_entity_decode($this->request->get[\'filter_iso3\'], ENT_QUOTES, \'UTF-8\'));\r\n			}\r\n\r\n			if (isset($this->request->get[\'order\'])) {\r\n				$url .= \'&order=\' . $this->request->get[\'order\'];\r\n			}\r\n\r\n			if (isset($this->request->get[\'page\'])) {\r\n				$url .= \'&page=\' . $this->request->get[\'page\'];\r\n			}\r\n\r\n			$this->response->redirect($this->url->link(\'localisation/country\', \'user_token=\' . $this->session->data[\'user_token\'] . $url, true));\r\n		}\r\n\r\n		$this->getList();\r\n	}\r\n		// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"admin/model/localisation/country.php\">		\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\n$sort_data = array(\r\n			]]></search>\r\n			<add position=\"after\"><![CDATA[\r\n			// CountryManager\r\n				\'country_id\',\r\n			// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\nif (isset($data[\'sort\']) && in_array($data[\'sort\'], $sort_data)) {\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n	// CountryManager\r\n			$sql .= \" WHERE name <> \'AlexDW\' \";\r\n		if (isset($data[\'filter_id\'])) {\r\n			$sql .= \" AND country_id LIKE \'%\" . (int)$data[\'filter_id\'] . \"%\'\";\r\n		}\r\n\r\n		if (isset($data[\'filter_status\'])) {\r\n		if (($data[\'filter_status\']) == 1) {\r\n			$sql .= \" AND status = \'1\'\";\r\n		} else {\r\n			$sql .= \" AND status <> \'1\'\";\r\n		}\r\n		}\r\n\r\n		if (isset($data[\'filter_code\'])) {\r\n		if (($data[\'filter_code\']) == 1) {\r\n			$sql .= \" AND postcode_required = \'1\'\";\r\n		} else {\r\n			$sql .= \" AND postcode_required <> \'1\'\";\r\n		}\r\n		}\r\n\r\n		if (isset($data[\'filter_country\'])) {\r\n			$sql .= \" AND name LIKE \'%\" . $this->db->escape($data[\'filter_country\']) . \"%\'\";\r\n		}\r\n\r\n		if (isset($data[\'filter_iso2\'])) {\r\n			$sql .= \" AND iso_code_2 LIKE \'%\" . $this->db->escape($data[\'filter_iso2\']) . \"%\'\";\r\n		}\r\n\r\n		if (isset($data[\'filter_iso3\'])) {\r\n			$sql .= \" AND iso_code_3 LIKE \'%\" . $this->db->escape($data[\'filter_iso3\']) . \"%\'\";\r\n		}\r\n	// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n		<operation error=\"abort\">\r\n			<search><![CDATA[\r\npublic function getTotalCountries() {\r\n			]]></search>\r\n			<add position=\"before\"><![CDATA[\r\n	// CountryManager\r\n		public function getTotalCountryManager($data = array()) {\r\n		\r\n			$sql = \"SELECT COUNT(*) AS total FROM \" . DB_PREFIX . \"country \";\r\n			$sql .= \" WHERE 1 \";\r\n\r\n		if (isset($data[\'filter_id\'])) {\r\n			$sql .= \" AND country_id LIKE \'%\" . (int)$data[\'filter_id\'] . \"%\'\";\r\n		}\r\n\r\n		if (isset($data[\'filter_status\'])) {\r\n		if (($data[\'filter_status\']) == 1) {\r\n			$sql .= \" AND status = \'1\'\";\r\n		} else {\r\n			$sql .= \" AND status <> \'1\'\";\r\n		}\r\n		}\r\n\r\n		if (isset($data[\'filter_code\'])) {\r\n		if (($data[\'filter_code\']) == 1) {\r\n			$sql .= \" AND postcode_required = \'1\'\";\r\n		} else {\r\n			$sql .= \" AND postcode_required <> \'1\'\";\r\n		}\r\n		}\r\n\r\n		if (isset($data[\'filter_country\'])) {\r\n			$sql .= \" AND name LIKE \'%\" . $this->db->escape($data[\'filter_country\']) . \"%\'\";\r\n		}\r\n\r\n		if (isset($data[\'filter_iso2\'])) {\r\n			$sql .= \" AND iso_code_2 LIKE \'%\" . $this->db->escape($data[\'filter_iso2\']) . \"%\'\";\r\n		}\r\n\r\n		if (isset($data[\'filter_iso3\'])) {\r\n			$sql .= \" AND iso_code_3 LIKE \'%\" . $this->db->escape($data[\'filter_iso3\']) . \"%\'\";\r\n		}\r\n			$query = $this->db->query($sql);\r\n\r\n			return $query->row[\'total\'];\r\n		}\r\n\r\n		public function disableAllCountry() {\r\n			$query = $this->db->query(\"UPDATE \" . DB_PREFIX . \"country SET `status`=\'0\' \");\r\n			$this->cache->delete(\'country\');\r\n		}\r\n\r\n		public function enableAllCountry() {\r\n			$query = $this->db->query(\"UPDATE \" . DB_PREFIX . \"country SET `status`=\'1\' \");\r\n			$this->cache->delete(\'country\');\r\n		}\r\n\r\n		public function enableCountry($country_id) {\r\n			$this->db->query(\"UPDATE \" . DB_PREFIX . \"country SET `status`=\'1\' WHERE country_id = \'\" . (int)$country_id . \"\'\");\r\n			$this->cache->delete(\'country\');	\r\n		}\r\n\r\n		public function disableCountry($country_id) {\r\n			$this->db->query(\"UPDATE \" . DB_PREFIX . \"country SET `status`=\'0\' WHERE country_id = \'\" . (int)$country_id . \"\'\");\r\n			$this->cache->delete(\'country\');	\r\n		}\r\n	// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"admin/language/en-gb/localisation/country.php\">		\r\n		<operation error=\"skip\">\r\n			<search><![CDATA[\r\n<?php\r\n			]]></search>\r\n			<add position=\"after\"><![CDATA[\r\n			// CountryManager\r\n				$_[\'button_enable_all\']    = \'Enable All Countries\';\r\n				$_[\'button_disable_all\']   = \'Disable All Countries\';\r\n				$_[\'button_enable_country\']    = \'Enable Selected\';\r\n				$_[\'button_disable_country\']   = \'Disable Selected\';\r\n			// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"admin/language/ru-ru/localisation/country.php\">		\r\n		<operation error=\"skip\">\r\n			<search><![CDATA[\r\n<?php\r\n			]]></search>\r\n			<add position=\"after\"><![CDATA[\r\n			// CountryManager\r\n				$_[\'button_enable_all\']    = \'Включить все страны\';\r\n				$_[\'button_disable_all\']   = \'Отключить все страны\';\r\n				$_[\'button_enable_country\']    = \'Включить выбранные\';\r\n				$_[\'button_disable_country\']   = \'Отключить выбранные\';\r\n			// CountryManager end\r\n			]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n</modification>', 1, '2022-05-15 14:31:05'),
(34, 34, 'Maybooster Advanced Options', 'may-advanced-options', 'HHR(maysoft1116@outlook.com)', '2.1.0.8', '', '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<modification>\r\n  <name>Maybooster Advanced Options</name>\r\n  <code>may-advanced-options</code>\r\n  <version>2.1.0.8</version>\r\n  <author>HHR(maysoft1116@outlook.com)</author>\r\n  <link></link>\r\n  <file path=\"catalog/controller/product/product.php\">\r\n    <operation>\r\n      <search><![CDATA[\r\n      if (!$option_value[\'subtract\'] || ($option_value[\'quantity\'] > 0)) {\r\n      ]]></search>\r\n      <add position=\"replace\"><![CDATA[\r\n      if (!$option_value[\'subtract\'] || ($option_value[\'quantity\'] > 0) || (($option[\'type\'] == \'select\' || $option[\'type\'] == \'radio\') && $option[\'value\'] == \'may_advanced_option\')) {\r\n      ]]></add>\r\n    </operation>\r\n  </file>\r\n  <file path=\"catalog/controller/journal3/checkout.php\">\r\n    <operation>\r\n      <search><![CDATA[\r\n      $this->renderJson(\'success\', $json);\r\n      ]]></search>\r\n      <add position=\"replace\"><![CDATA[\r\n      $this->load->model(\'extension/may/advanced_options\');\r\n      $json = $this->model_extension_may_advanced_options->dispatchJson($json);\r\n      $this->renderJson(\'success\', $json);\r\n      ]]></add>\r\n    </operation>\r\n  </file>\r\n  <file path=\"catalog/controller/extension/basel/basel_features.php\">\r\n    <operation>\r\n      <search><![CDATA[\r\n      $this->response->setOutput(json_encode($json));\r\n      ]]></search>\r\n      <add position=\"replace\"><![CDATA[\r\n      $this->load->model(\'extension/may/advanced_options\');\r\n      $json = $this->model_extension_may_advanced_options->dispatchJson($json);\r\n      $this->response->setOutput(json_encode($json));\r\n      ]]></add>\r\n    </operation>\r\n  </file>\r\n</modification>\r\n', 1, '2022-07-23 14:35:23'),
(7, 9, 'X-Shipping Pro', 'xshippingpro', 'OpenCartMart', '4.1.2', 'http://www.opencartmart.com', '<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<modification>\n    <name>X-Shipping Pro</name>\n    <code>xshippingpro</code>\n    <version>4.1.2</version>\n    <author>OpenCartMart</author>\n    <link>http://www.opencartmart.com</link>\n    <file path=\"admin/view/template/sale/order_form.twig\">\n        <operation>\n            <search><![CDATA[ {{ footer }} ]]></search>\n            <add position=\"before\"><![CDATA[\n            <script type=\"text/javascript\">\n            // TODO - controll centrally\n            var _ocm_catalog = \'{{ catalog }}\' || $(\'select[name=\\\'store\\\'] option:selected\').val();\n            var _ocm_request_cache = {};\n            var _ocm_request_counter = 1;\n            var xshippingpro_sub_options = {};\n            var xshippingpro_sub_options_flag = true;\n            var api_token = \'&api_token={{ api_token }}\';\n            $(\'#input-shipping-method\').on(\'change\', function() {\n                if (!$.isEmptyObject(xshippingpro_sub_options)) {\n                   setSubOptions();\n                }\n            });\n            function setSubOptions() {\n                var code = $(\'#input-shipping-method\').val();\n                var url = _ocm_catalog + \'index.php?route=api/shipping/update_sup_options\' + api_token;\n                $.post(url, {xshippingpro_code: code}, function( ) {\n                   // for future    \n                });\n            }\n            // following will be common for all mods\n            $.ajaxPrefilter(_onOcmAjaxReq);\n            $(document).ajaxComplete(_onOcmAjaxReqComplete);\n            function _onOcmAjaxReqComplete(event, xhr, settings) {\n                if (xshippingpro_sub_options_flag) {\n                     $.get(_ocm_catalog + \'index.php?route=api/shipping/get_sup_options\' + api_token, function(json) {\n                        xshippingpro_sub_options = json.sub_options;\n                     });\n                     xshippingpro_sub_options_flag = false;  \n                }\n            }\n            function _onOcmAjaxSuccess(data, status, jqXhr) {\n                var xshippingpro_quote = parseAndGetData(data, \'shipping_methods.xshippingpro.quote\');\n                if (xshippingpro_quote) {\n                    for (var key in xshippingpro_quote) {\n                        var tab_id = key.replace(\'xshippingpro\', \'\');\n                        if (xshippingpro_sub_options[tab_id]) {\n                            for (var _key in xshippingpro_sub_options[tab_id]) {\n                                var sub_option = xshippingpro_sub_options[tab_id][_key];\n                                var code = sub_option.code.replace(\'xshippingpro.\', \'\');\n                                xshippingpro_quote[code] = {\n                                   code: sub_option.code,\n                                   title: sub_option.title,\n                                   text: \'\'\n                                };\n                            }\n                        }\n                    }\n                    if (!$.isEmptyObject(xshippingpro_sub_options)) {\n                        setTimeout(setSubOptions, 500);\n                    }\n                }\n                if (_ocm_request_cache[jqXhr.xid]) {\n                    _ocm_request_cache[jqXhr.xid].call(null, data, status, jqXhr);\n                    _ocm_request_cache[jqXhr.xid] = null;\n                }\n            }\n            function _onOcmAjaxReq(options, originalOptions, jqXhr) {\n                if (options.dataType == \'json\' || !options.dataType) {\n                    jqXhr.xid = _ocm_request_counter++;\n                    _ocm_request_cache[jqXhr.xid] = options.success;\n                    options.success = _onOcmAjaxSuccess;\n                }\n            }\n            function parseAndGetData(data, keys) {\n                var _keys = keys.split(\'.\');\n                var _data = data;\n                if (!data || !$.isPlainObject(data)) {\n                   return false;\n                }\n                for (var i = 0; i < _keys.length; i++) {\n                    var key = _keys[i];\n                    if (_data[key]) {\n                        _data = _data[key];    \n                    } else {\n                       return false;\n                    }\n                }\n                return _data;\n            }\n            </script>\n            ]]></add>\n        </operation>\n    </file>\n   <file path=\"system/library/cart/cart.php\">\n    <operation error=\"log\">\n        <ignoreif regex=\"true\"><![CDATA[ /ocm_special/ ]]></ignoreif>\n        <search><![CDATA[ => ($price + $option_price), ]]></search>\n        <add position=\"before\"><![CDATA[\n              \'ocm_special\'      => $price != $product_query->row[\'price\'],\n        ]]></add>\n    </operation>\n</file>\n</modification>', 1, '2022-03-30 21:39:08'),
(8, 0, 'Hidden Shipping Adjustments', 'hidden_shipping_adjustments', 'Clear Thinking, LLC', 'v303.1', 'http://www.getclearthinking.com/contact?inquiry=Question regarding Hidden Shipping Adjustments: ', '<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<modification>\n    \n	<name>Hidden Shipping Adjustments</name>\n    <code>hidden_shipping_adjustments</code>\n	<version>v303.1</version>\n	<author>Clear Thinking, LLC</author>\n	<link>http://www.getclearthinking.com/contact?inquiry=Question regarding Hidden Shipping Adjustments: </link>\n	\n	<file path=\"catalog/*/{*,extension/*}/*.php\">\n		<operation error=\"skip\">\n			<search trim=\"true\"><![CDATA[\n				$quote = $this->{\n			]]></search>\n			<add position=\"before\" trim=\"true\"><![CDATA[\n				// Clear Thinking: Hidden Shipping Adjustments\n				$prefix = (version_compare(VERSION, \'3.0\', \'<\')) ? \'\' : \'module_\';\n				if ($this->config->get($prefix . \'hidden_shipping_adjustments_status\')) {\n					$this->session->data[\'hidden_shipping_adjustments\'] = $result[\'code\'];\n				}\n				// end\n			]]></add>\n		</operation>\n		<operation error=\"skip\">\n			<search trim=\"true\"><![CDATA[\n				$quote = $this->{\n			]]></search>\n			<add position=\"after\" trim=\"true\"><![CDATA[\n				// Clear Thinking: Hidden Shipping Adjustments\n				$prefix = (version_compare(VERSION, \'3.0\', \'<\')) ? \'\' : \'module_\';\n				if ($this->config->get($prefix . \'hidden_shipping_adjustments_status\')) {\n					$this->load->model(\'extension/module/hidden_shipping_adjustments\');\n					if (!empty($quote[\'quote\'])) {\n						foreach ($quote[\'quote\'] as $i => $q) {\n							$quote[\'quote\'][$i] = $this->model_extension_module_hidden_shipping_adjustments->adjust($q);\n						}\n					}\n				}\n				// end\n			]]></add>\n		</operation>\n	</file>\n	\n	<file path=\"system/library/{cart,cart/cart}.php\">\n		<operation error=\"skip\">\n			<search trim=\"true\"><![CDATA[\n				public function __construct($registry) {\n			]]></search>\n			<add position=\"after\" trim=\"true\"><![CDATA[\n				// Clear Thinking: Hidden Shipping Adjustments\n				$this->registry = $registry;\n				// end\n			]]></add>\n		</operation>\n		<operation error=\"skip\">\n			<search trim=\"true\"><![CDATA[\n				return $weight;\n			]]></search>\n			<add position=\"before\" trim=\"true\"><![CDATA[\n				// Clear Thinking: Hidden Shipping Adjustments\n				$prefix = (version_compare(VERSION, \'3.0\', \'<\')) ? \'\' : \'module_\';\n				if ($this->config->get($prefix . \'hidden_shipping_adjustments_status\')) {\n					if (!class_exists(\'ModelExtensionModuleHiddenShippingAdjustments\')) {\n						include_once(DIR_APPLICATION . \'model/extension/module/hidden_shipping_adjustments.php\');\n					}\n					$hidden_shipping_adjustments = new \\ModelExtensionModuleHiddenShippingAdjustments($this->registry);\n					$weight = $hidden_shipping_adjustments->adjust($weight);\n				}\n				// end\n			]]></add>\n		</operation>\n	</file>\n	\n</modification>', 1, '2022-03-31 15:48:06'),
(9, 12, 'Restrict Shipping Methods', 'restrict_shipping', 'Clear Thinking, LLC', 'v303.3', 'https://www.getclearthinking.com/contact?inquiry=Question regarding Restrict Shipping Methods: ', '<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<modification>\n    \n	<name>Restrict Shipping Methods</name>\n    <code>restrict_shipping</code>\n	<version>v303.3</version>\n	<author>Clear Thinking, LLC</author>\n	<link>https://www.getclearthinking.com/contact?inquiry=Question regarding Restrict Shipping Methods: </link>\n	\n	<!-- All OpenCart versions -->\n	<file path=\"catalog/model/*/extension.php\">\n		<operation error=\"skip\">\n			<search trim=\"true\"><![CDATA[\n				$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"extension WHERE `type` = \'\" . $this->db->escape($type) . \"\'\");\n			]]></search>\n			<add position=\"after\" trim=\"true\"><![CDATA[\n				// Clear Thinking: Restrict Shipping Methods\n				$prefix = (version_compare(VERSION, \'3.0\', \'<\')) ? \'\' : \'module_\';\n				if ($type == \'shipping\' && $this->config->get($prefix . \'restrict_shipping_status\')) {\n					$this->load->model(\'extension/module/restrict_shipping\');\n					$query->rows = $this->model_extension_module_restrict_shipping->restrict($query->rows);\n				}\n				// end\n			]]></add>\n		</operation>\n	</file>\n	\n	<!-- Individual Shipping extension -->\n	<file path=\"catalog/model/{shipping,extension/shipping}/individual_shipping.php\">\n		<operation error=\"skip\">\n			<search index=\"1\" trim=\"true\"><![CDATA[\n				$shipping_methods = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"extension WHERE `type` = \'shipping\' ORDER BY `code` ASC\")->rows;\n			]]></search>\n			<add position=\"after\" trim=\"true\"><![CDATA[\n				// Clear Thinking: Restrict Shipping Methods\n				$prefix = (version_compare(VERSION, \'3.0\', \'<\')) ? \'\' : \'module_\';\n				if ($this->config->get($prefix . \'restrict_shipping_status\')) {\n					$this->load->model(\'extension/module/restrict_shipping\');\n					$shipping_methods = $this->model_extension_module_restrict_shipping->restrict($shipping_methods);\n				}\n				// end\n			]]></add>\n		</operation>\n	</file>\n	\n	<!-- One-Page Checkout extension -->\n	<file path=\"catalog/model/onecheckout/checkout.php\">\n		<operation error=\"skip\">\n			<search trim=\"true\"><![CDATA[\n				return $query->rows;\n			]]></search>\n			<add position=\"before\" trim=\"true\"><![CDATA[\n				// Clear Thinking: Restrict Shipping Methods\n				$prefix = (version_compare(VERSION, \'3.0\', \'<\')) ? \'\' : \'module_\';\n				if ($type == \'shipping\' && $this->config->get($prefix . \'restrict_shipping_status\')) {\n					$this->load->model(\'extension/module/restrict_shipping\');\n					$query->rows = $this->model_extension_module_restrict_shipping->restrict($query->rows);\n				}\n				// end\n			]]></add>\n		</operation>\n	</file>\n	\n	<!-- Disable individual shipping rates -->\n	<file path=\"catalog/*/*/*.php|catalog/*/*/*/*.php\">\n		<operation error=\"skip\">\n			<search trim=\"true\"><![CDATA[\n				if ($quote) {\n			]]></search>\n			<add position=\"after\" trim=\"true\"><![CDATA[\n				// Clear Thinking: Restrict Shipping Methods\n				$prefix = (version_compare(VERSION, \'3.0\', \'<\')) ? \'\' : \'module_\';\n				if ($this->config->get($prefix . \'restrict_shipping_status\') && isset($this->session->data[\'restrict_shipping\'])) {\n					foreach ($quote[\'quote\'] as $index => $restricting_quote) {\n						foreach ($this->session->data[\'restrict_shipping\'] as $extension => $rules) {\n							if ($extension != $result[\'code\']) continue;\n							foreach ($rules as $comparison => $values) {\n								$adjusted_title = explode(\'(\', $restricting_quote[\'title\']);\n								$adjusted_title = strtolower(html_entity_decode(trim($adjusted_title[0]), ENT_QUOTES, \'UTF-8\'));\n								if (($comparison == \'is\' && in_array($adjusted_title, $values)) || ($comparison == \'not\' && !in_array($adjusted_title, $values))) {\n									unset($quote[\'quote\'][$index]);\n								}\n							}\n						}\n					}\n					if (empty($quote[\'quote\'])) {\n						continue;\n					}\n				}\n				// end\n			]]></add>\n		</operation>\n	</file>\n	\n</modification>', 1, '2022-03-31 16:17:06');
INSERT INTO `modification` (`modification_id`, `extension_install_id`, `name`, `code`, `author`, `version`, `link`, `xml`, `status`, `date_added`) VALUES
(10, 14, 'Cl!cker CKEditor Full integration - OC 3.0', 'clicker_ckeditor', 'Cl!cker', '5.0.7_CKE4.18.0', 'https://opencart.click', '<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<modification>\r\n	<code>clicker_ckeditor</code>\r\n	<name>Cl!cker CKEditor Full integration - OC 3.0</name>\r\n	<version>5.0.7_CKE4.18.0</version>\r\n	<author>Cl!cker</author>\r\n	<link>https://opencart.click</link>\r\n\r\n\r\n	<file path=\"admin/controller/common/header.php\">\r\n		<operation>\r\n			<search trim=\"true\" index=\"0\"><![CDATA[\r\n				$data[\'title\'] =\r\n			]]></search>\r\n			<add position=\"after\" trim=\"false\" offset=\"0\"><![CDATA[\r\n				if ($this->config->get(\'module_clicker_ckeditor_status\')) {\r\n					$enable_ckeditor = true;\r\n\r\n					$exclude_ckeditor_routes = array(\r\n						\'common/login\',\r\n						\'common/forgotten\',\r\n						\'common/reset\',\r\n						\'marketplace/modification\',\r\n						\'design/theme\',\r\n						\'module/journal2\',\r\n					);\r\n\r\n					if (!empty($this->request->get[\'route\'])) {\r\n						foreach ($exclude_ckeditor_routes as $exclude_ckeditor_route) {\r\n							if (strpos($this->request->get[\'route\'], $exclude_ckeditor_route) === 0) {\r\n								$enable_ckeditor = false;\r\n								break;\r\n							}\r\n						}\r\n					} else {\r\n						$enable_ckeditor = false;\r\n					}\r\n\r\n					if ($enable_ckeditor) {\r\n						global $cke_settings, $cke_status;\r\n						$cke_settings = $this->load->controller(\'extension/module/clicker_ckeditor/getSettings\');\r\n						$cke_status = $this->config->get(\'module_clicker_ckeditor_status\');\r\n\r\n						$cke_plugins = $this->load->controller(\'extension/module/clicker_ckeditor/getPlugins\');\r\n\r\n						if ($cke_plugins) {\r\n							$cke_settings[\'externalPlugins\'] = $cke_plugins;\r\n						}\r\n\r\n						$cke_version = $this->load->controller(\'extension/module/clicker_ckeditor/getVersion\');\r\n						$cke_t = date(\'Ymd000000\');\r\n\r\n						$onload = \'cke_settings = \' . str_replace(\'\"\', \"\'\", json_encode($cke_settings, JSON_HEX_QUOT)) . \';\';\r\n						$onload .= \"CKEDITOR.config.customConfig = \'clicker/config.js\';\";\r\n\r\n						$this->document->addScript(\'view/javascript/clicker_ckeditor/ckeditor.js\' . \'?t=\' . date(\'YmdHis\', filemtime(DIR_APPLICATION . \'view/javascript/clicker_ckeditor/ckeditor.js\')) . \'\" onload=\"\' . $onload);\r\n\r\n						$this->document->addScript(\'view/javascript/clicker_ckeditor/clicker/ck_clicker.js?oc=\' . (defined(\'VERSION\') ? urlencode(VERSION) : urlencode(\'3.x\')) . \'&v=\' . urlencode($cke_version) . \'&t=\' . date(\'YmdHis\', filemtime(DIR_APPLICATION . \'view/javascript/clicker_ckeditor/clicker/ck_clicker.js\')));\r\n\r\n						$this->document->addScript(\'view/javascript/clicker_ckeditor/clicker/config.js\' . \'?t=\' . date(\'YmdHis\', filemtime(DIR_APPLICATION . \'view/javascript/clicker_ckeditor/clicker/config.js\')));\r\n\r\n						$this->document->addStyle(\'view/javascript/clicker_ckeditor/clicker/ck_clicker.css\' . \'?t=\' . date(\'YmdHis\', filemtime(DIR_APPLICATION . \'view/javascript/clicker_ckeditor/clicker/ck_clicker.css\')));\r\n					}\r\n				}\r\n			]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"system/library/response.php\">\r\n		<operation>\r\n			<search trim=\"true\" index=\"0\"><![CDATA[\r\n				function output(\r\n			]]></search>\r\n			<add position=\"after\" trim=\"false\" offset=\"0\"><![CDATA[\r\n				// Replace Summernote paths if CKEditor Full is enabled\r\n				global $cke_settings, $cke_status;\r\n\r\n				if (!empty($cke_status) && !empty($this->output) && defined(\'DIR_CATALOG\')) {\r\n\r\n					$parts = explode(\'</head>\', $this->output, 2);\r\n\r\n					if (!empty($parts[0]) && strpos($parts[0], \'view/javascript/clicker_ckeditor/clicker/config.js\') !== false) {\r\n						$search = array(\r\n							\'view/javascript\' . \'/summernote/summernote.css\' => \'view/javascript/clicker_ckeditor/clicker/summernote/summernote.css\',\r\n							\'view/javascript\' . \'/summernote/summernote.js\' => \'view/javascript/clicker_ckeditor/clicker/summernote/summernote.js\',\r\n							\'view/javascript\' . \'/summernote/summernote-image-attributes.js\' => \'view/javascript/clicker_ckeditor/clicker/summernote/summernote-image-attributes.js\',\r\n							\'view/javascript\' . \'/summernote/opencart.js\' => \'view/javascript/clicker_ckeditor/clicker/summernote/opencart.js\',\r\n							\'view/javascript\' . \'/summernote/\' => \'view/javascript/clicker_ckeditor/clicker/summernote/\', // OC3.0.3.8\r\n						);\r\n\r\n						$this->output = str_replace(array_keys($search), array_values($search), $this->output);\r\n					}\r\n				}\r\n			]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n</modification>', 1, '2022-04-01 17:14:35'),
(12, 56, 'Email Templates Core', 'emailtemplates_core', 'Opencart-Templates', '3.0.5.111', 'https://www.opencart-templates.co.uk/advanced_professional_email_template', '<modification>\r\n	<name>Email Templates Core</name>\r\n	<code>emailtemplates_core</code>\r\n	<version>3.0.5.111</version>\r\n	<author>Opencart-Templates</author>\r\n	<link>https://www.opencart-templates.co.uk/advanced_professional_email_template</link>\r\n\r\n	<file path=\"system/library/language.php\">\r\n		<operation>\r\n			<search><![CDATA[$file = DIR_LANGUAGE]]></search>\r\n			<ignoreif><![CDATA[$file = $this->path]]></ignoreif>\r\n			<add position=\"replace\"><![CDATA[$file = $this->path]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[private $directory;]]></search>\r\n			<ignoreif><![CDATA[private $path = DIR_LANGUAGE;]]></ignoreif>\r\n			<add position=\"after\"><![CDATA[private $path = DIR_LANGUAGE;]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function get($key]]></search>\r\n			<ignoreif><![CDATA[public function setPath($path)]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	public function setPath($path) {\r\n		if (!is_dir($path)) {\r\n			trigger_error(\'Error: check path exists: \'.$path);\r\n			exit;\r\n		}\r\n\r\n		$this->path = $path;\r\n	}\r\n	]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"system/library/mail.php\">\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[protected $subject;]]></search>\r\n			<ignoreif><![CDATA[protected $bcc;]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	protected $bcc;]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[protected $subject;]]></search>\r\n			<ignoreif><![CDATA[protected $cc;]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	protected $cc;]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[protected $subject;]]></search>\r\n			<ignoreif><![CDATA[protected $mail_queue;]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	protected $mail_queue;]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[protected $subject;]]></search>\r\n			<ignoreif><![CDATA[protected $mail_send;]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	protected $mail_send;]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[protected $subject;]]></search>\r\n			<ignoreif><![CDATA[protected $reply_to_name;]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	protected $reply_to_name;]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function send(]]></search>\r\n			<ignoreif><![CDATA[public function setMailQueue(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	public function setMailQueue($option) {\r\n		$this->mail_queue = (bool)$option;\r\n	}]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function send(]]></search>\r\n			<ignoreif><![CDATA[public function setMailSend(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	public function setMailSend($option) {\r\n		$this->mail_send = (bool)$option;\r\n	}]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function send(]]></search>\r\n			<ignoreif><![CDATA[public function getSubject(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[	public function getSubject() {\r\n		return $this->subject;\r\n	}]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function send(]]></search>\r\n			<ignoreif><![CDATA[public function setCc(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n	public function setCc($address) {\r\n		$this->cc = $address;\r\n	}]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function send(]]></search>\r\n			<ignoreif><![CDATA[public function setBcc(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n	public function setBcc($address) {\r\n		$this->bcc = $address;\r\n	}]]></add>\r\n		</operation>\r\n		<operation error=\"skip\">\r\n			<search index=\"0\"><![CDATA[public function setReplyTo($reply_to) {]]></search>\r\n			<add position=\"replace\"><![CDATA[public function setReplyTo($reply_to, $reply_to_name = \'\') {\r\n		if ($reply_to_name) {\r\n			$this->reply_to_name = $reply_to_name;\r\n		}\r\n	]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function send(]]></search>\r\n			<ignoreif><![CDATA[public function getMailProperties(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n	public function getMailProperties() {\r\n		return array(\r\n			\'mail_queue\' => $this->mail_queue,\r\n			\'smtp\' => array(\r\n				\'hostname\' => $this->smtp_hostname,\r\n				\'username\' => $this->smtp_username,\r\n				//\'password\' => $this->smtp_password,\r\n				\'post\' => $this->smtp_port,\r\n				\'timeout\' => $this->smtp_timeout\r\n			),\r\n			//\'protocol\' => $this->protocol,\r\n			\'parameter\' => $this->parameter,\r\n			\'attachments\' => $this->attachments,\r\n			\'to\' => $this->to,\r\n			\'from\' => $this->from,\r\n			\'sender\' => $this->sender,\r\n			\'reply_to\' => $this->reply_to,\r\n			\'reply_to_name\' => $this->reply_to_name,\r\n			\'cc\' => $this->cc,\r\n			\'bcc\' => $this->bcc,\r\n			\'subject\' => $this->subject,\r\n			\'text\' => $this->text\r\n		);\r\n	}\r\n	]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function send() {]]></search>\r\n			<ignoreif><![CDATA[if ($this->mail_queue) return true;]]></ignoreif>\r\n			<add position=\"after\"><![CDATA[		if ($this->mail_send === false) {\r\n			return true; // unsubscribed\r\n		}\r\n\r\n		if ($this->mail_queue) {\r\n			return true; // send later via cron\r\n		}\r\n]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"system/library/mail/{smtp,mail}.php\">\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[$header .= \'Reply-To: =?UTF-8?B?\' . base64_encode($this->reply_to) . \'?= <\' . $this->reply_to . \'>\' . PHP_EOL;]]></search>\r\n			<add position=\"replace\"><![CDATA[\r\n			if (!empty($this->reply_to_name)) {\r\n				$header .= \'Reply-To: =?UTF-8?B?\' . base64_encode($this->reply_to_name) . \'?= <\' . $this->reply_to . \'>\' . PHP_EOL;\r\n			} else {\r\n				$header .= \'Reply-To: \' . $this->reply_to . PHP_EOL;\r\n			}\r\n		]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[$header .= \'Return-Path]]></search>\r\n			<ignoreif><![CDATA[$header .= \'CC: \' . $this->cc . PHP_EOL;]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		if ($this->cc) {\r\n			$header .= \'CC: \' . $this->cc . PHP_EOL;\r\n		}\r\n		]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[$header .= \'Return-Path]]></search>\r\n			<ignoreif><![CDATA[$header .= \'BCC: \' . $this->bcc . PHP_EOL;]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		if ($this->bcc) {\r\n			$header .= \'BCC: \' . $this->bcc . PHP_EOL;\r\n		}\r\n		]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"system/library/cache.php\">\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function get(]]></search>\r\n			<ignoreif><![CDATA[public function getAllKeys(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		public function getAllKeys() {\r\n			return $this->adaptor->getAllKeys();\r\n		}]]></add>\r\n		</operation>\r\n	    <operation>\r\n			<search index=\"0\"><![CDATA[public function get(]]></search>\r\n			<ignoreif><![CDATA[public function flush(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		public function flush() {\r\n			return $this->adaptor->flush();\r\n		}]]></add>\r\n		</operation>\r\n	</file>\r\n	<file path=\"system/library/cache/apc.php\">\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function get(]]></search>\r\n			<ignoreif><![CDATA[public function getAllKeys(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		public function getAllKeys() {\r\n			if (!$this->active) {\r\n				return false;\r\n			}\r\n\r\n			$cache_info = apc_cache_info(\'user\');\r\n			return $cache_info[\'cache_list\'];\r\n		}]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function get(]]></search>\r\n			<ignoreif><![CDATA[public function flush(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		public function flush() {\r\n			apc_cache_clear();\r\n		}]]></add>\r\n		</operation>\r\n	</file>\r\n	<file path=\"system/library/cache/mem.php\">\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function get(]]></search>\r\n			<ignoreif><![CDATA[public function getAllKeys(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		public function getAllKeys() {\r\n		    if (!method_exists($this->memcache, \'getAllKeys\')) {\r\n		        return false;\r\n		    }\r\n			return $this->memcache->getAllKeys();\r\n		}]]></add>\r\n		</operation>\r\n	    <operation>\r\n			<search index=\"0\"><![CDATA[public function get(]]></search>\r\n			<ignoreif><![CDATA[public function flush(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		public function flush() {\r\n			return $this->memcache->flush();\r\n		}]]></add>\r\n		</operation>\r\n	</file>\r\n	<file path=\"system/library/cache/memcached.php\" error=\"skip\">\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[public function get(]]></search>\r\n			<ignoreif><![CDATA[public function getAllKeys(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		public function getAllKeys() {\r\n		    if (!method_exists($this->memcached, \'getAllKeys\')) {\r\n		        return false;\r\n		    }\r\n			return $this->memcached->getAllKeys();\r\n		}]]></add>\r\n		</operation>\r\n	    <operation>\r\n			<search index=\"0\"><![CDATA[public function get(]]></search>\r\n			<ignoreif><![CDATA[public function flush(]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[\r\n		public function flush() {\r\n			return $this->memcached->flush();\r\n		}]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n    <file path=\"system/library/db/mssql.php\" error=\"skip\">\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[$this->connection->exec(\"SET NAMES \'utf8\'\");]]></search>\r\n            <add position=\"replace\"><![CDATA[$this->connection->exec(\"SET NAMES \'utf8mb4\'\");]]></add>\r\n        </operation>\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[$this->connection->exec(\"SET CHARACTER SET utf8\");]]></search>\r\n            <add position=\"replace\"><![CDATA[$this->connection->exec(\"SET CHARACTER SET utf8mb4\");]]></add>\r\n        </operation>\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[$this->connection->exec(\"SET CHARACTER_SET_CONNECTION=utf8\");]]></search>\r\n            <add position=\"replace\"><![CDATA[$this->connection->exec(\"SET CHARACTER_SET_CONNECTION=utf8mb4\");]]></add>\r\n        </operation>\r\n    </file>\r\n    <file path=\"system/library/db/mssql.php\" error=\"skip\">\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[mssql_query(\"SET NAMES \'utf8\'\", $this->connection);]]></search>\r\n            <add position=\"replace\"><![CDATA[mssql_query(\"SET NAMES \'utf8mb4\'\", $this->connection);]]></add>\r\n        </operation>\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[mssql_query(\"SET CHARACTER SET utf8\", $this->connection);]]></search>\r\n            <add position=\"replace\"><![CDATA[mssql_query(\"SET CHARACTER SET utf8mb4\", $this->connection);]]></add>\r\n        </operation>\r\n    </file>\r\n    <file path=\"system/library/db/mysql.php\" error=\"skip\">\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[mysql_query(\"SET NAMES \'utf8\'\", $this->connection);]]></search>\r\n            <add position=\"replace\"><![CDATA[mysql_query(\"SET NAMES \'utf8mb4\'\", $this->connection);]]></add>\r\n        </operation>\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[mysql_query(\"SET CHARACTER SET utf8\", $this->connection);]]></search>\r\n            <add position=\"replace\"><![CDATA[mysql_query(\"SET CHARACTER SET utf8mb4\", $this->connection);]]></add>\r\n        </operation>\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[mysql_query(\"SET CHARACTER_SET_CONNECTION=utf8\", $this->connection);]]></search>\r\n            <add position=\"replace\"><![CDATA[mysql_query(\"SET CHARACTER_SET_CONNECTION=utf8mb4\", $this->connection);]]></add>\r\n        </operation>\r\n    </file>\r\n    <file path=\"system/library/db/mysqli.php\" error=\"skip\">\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[$this->connection->set_charset(\"utf8\");]]></search>\r\n            <add position=\"replace\"><![CDATA[$this->connection->set_charset(\"utf8mb4\");]]></add>\r\n        </operation>\r\n    </file>\r\n    <file path=\"system/library/db/postgre.php\" error=\"skip\">\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[pg_query($this->link, \"SET CLIENT_ENCODING TO \'UTF8\'\");]]></search>\r\n            <add position=\"replace\"><![CDATA[pg_query($this->link, \"SET CLIENT_ENCODING TO \'UTF8MB4\'\");]]></add>\r\n        </operation>\r\n    </file>\r\n\r\n    <file path=\"catalog/controller/account/order.php\">\r\n        <operation error=\"skip\">\r\n            <search index=\"0\"><![CDATA[nl2br($result[\'comment\'])]]></search>\r\n            <add position=\"replace\"><![CDATA[($result[\'notify\'] ? html_entity_decode($result[\'comment\'], ENT_QUOTES, \'UTF-8\') : \'\')]]></add>\r\n        </operation>\r\n    </file>\r\n\r\n	<file path=\"catalog/model/checkout/order.php\">\r\n		<operation error=\"log\">\r\n			<search index=\"0\"><![CDATA[$this->db->query(\"INSERT INTO `\" . DB_PREFIX . \"order` SET]]></search>\r\n			<ignoreif>\r\n				<![CDATA[weight = \'\" . (isset($data[\'weight\']) ? floatval($data[\'weight\']) : 0) . \"\',]]></ignoreif>\r\n			<add position=\"replace\">\r\n				<![CDATA[$this->db->query(\"INSERT INTO `\" . DB_PREFIX . \"order` SET weight = \'\" . (isset($data[\'weight\']) ? floatval($data[\'weight\']) : 0) . \"\',]]></add>\r\n		</operation>\r\n		<operation error=\"log\">\r\n			<search index=\"0\"><![CDATA[=> $order_query->row[\'customer_id\'],]]></search>\r\n			<ignoreif><![CDATA[\'weight\' => (isset($order_query->row[\'weight\'])) ? $order_query->row[\'weight\'] : 0,]]></ignoreif>\r\n			<add position=\"after\"><![CDATA[            	\'weight\' => (isset($order_query->row[\'weight\'])) ? $order_query->row[\'weight\'] : 0,]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[=> $order_query->row[\'customer_id\'],]]></search>\r\n			<ignoreif><![CDATA[\'customer_group_id\' => (isset($order_query->row[\'customer_group_id\'])) ? $order_query->row[\'customer_group_id\'] : \'\',]]></ignoreif>\r\n			<add position=\"after\"><![CDATA[				\'customer_group_id\' => (isset($order_query->row[\'customer_group_id\'])) ? $order_query->row[\'customer_group_id\'] : \'\',]]></add>\r\n		</operation>\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[=> $order_query->row[\'customer_id\'],]]></search>\r\n			<ignoreif>\r\n				<![CDATA[\'affiliate_id\' => (isset($order_query->row[\'affiliate_id\'])) ? $order_query->row[\'affiliate_id\'] : \'\',]]></ignoreif>\r\n			<add position=\"after\">\r\n				<![CDATA[				\'affiliate_id\' => (isset($order_query->row[\'affiliate_id\'])) ? $order_query->row[\'affiliate_id\'] : \'\',]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"catalog/controller/affiliate/login.php\">\r\n		<operation error=\"skip\">\r\n			<search index=\"0\"><![CDATA[$data[\'email\'] = $this->request->post[\'email\'];]]></search>\r\n			<ignoreif><![CDATA[elseif (isset($this->request->get[\'email\']))]]></ignoreif>\r\n			<add position=\"after\"><![CDATA[		} elseif (isset($this->request->get[\'email\'])) {\r\n			$data[\'email\'] = $this->request->get[\'email\'];]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"catalog/controller/account/login.php\">\r\n		<operation error=\"skip\">\r\n			<search index=\"0\"><![CDATA[$data[\'email\'] = $this->request->post[\'email\'];]]></search>\r\n			<ignoreif><![CDATA[elseif (isset($this->request->get[\'email\']))]]></ignoreif>\r\n			<add position=\"after\"><![CDATA[		} elseif (isset($this->request->get[\'email\'])) {\r\n			$data[\'email\'] = $this->request->get[\'email\'];]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"admin/controller/startup/permission.php\">\r\n		<operation error=\"skip\">\r\n			<search index=\"0\"><![CDATA[\'extension/module\']]></search>\r\n			<ignoreif><![CDATA[\'extension/module/emailtemplate\']]></ignoreif>\r\n			<add position=\"before\"><![CDATA[				\'extension/module/emailtemplate\',]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"admin/controller/common/column_left.php\">\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[if ($marketplace) {]]></search>\r\n			<ignoreif><![CDATA[$this->url->link(\'extension/module/emailtemplate\',]]></ignoreif>\r\n			<add position=\"before\"><![CDATA[            if ($this->user->hasPermission(\'access\', \'extension/module/emailtemplate\')) {\r\n                $marketplace[] = array(\r\n                    \'name\'     => $this->language->get(\'text_emailtemplate\'),\r\n                    \'href\'     => $this->url->link(\'extension/module/emailtemplate\', \'user_token=\' . $this->session->data[\'user_token\'], true),\r\n                    \'children\' => array()\r\n                );\r\n            }\r\n        ]]></add>\r\n		</operation>\r\n	</file>\r\n\r\n	<file path=\"admin/language/*/common/column_left.php\">\r\n		<operation>\r\n			<search index=\"0\"><![CDATA[<?php]]></search>\r\n			<ignoreif><![CDATA[$_[\'text_emailtemplate\']]]></ignoreif>\r\n			<add position=\"after\"><![CDATA[$_[\'text_emailtemplate\'] = \'Email Templates\';]]></add>\r\n		</operation>\r\n	</file>\r\n</modification>\r\n', 1, '2022-04-01 17:57:17'),
(14, 57, 'Email Templates Newsletter', 'emailtemplates_newsletter', 'Opencart-Templates', '3.0.5.111', 'https://www.opencart-templates.co.uk/advanced_professional_email_template', '<modification>\n    <name>Email Templates Newsletter</name>\n    <code>emailtemplates_newsletter</code>\n    <version>3.0.5.111</version>\n    <author>Opencart-Templates</author>\n    <link>https://www.opencart-templates.co.uk/advanced_professional_email_template</link>\n\n    <file path=\"catalog/controller/account/newsletter.php\">\n        <operation>\n            <search index=\"0\"><![CDATA[function index(]]></search>\n            <add position=\"after\"><![CDATA[     if ($this->config->get(\'module_emailtemplate_newsletter_status\') && $this->config->get(\'module_emailtemplate_newsletter_preference\')) {\n            $this->response->redirect($this->url->link(\'extension/module/emailtemplate_newsletter\', \'\', true));\n        }]]></add>\n        </operation>\n    </file>\n\n    <file path=\"admin/model/customer/customer.php|catalog/model/account/customer.php\">\n        <operation>\n            <search index=\"0\"><![CDATA[$customer_id = $this->db->getLastId();]]></search>\n            <add position=\"after\"><![CDATA[\n		// trigger event eventAddCustomer\n		$this->load->controller(\'extension/module/emailtemplate_newsletter/eventAddCustomer\', $this->getCustomer($customer_id));\n        ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"catalog/controller/common/footer.php|catalog/controller/extension/module/account.php\">\n        <operation>\n            <search index=\"0\"><![CDATA[$data[\'newsletter\'] = $this->url->link(\'account/newsletter\', \'\', true);]]></search>\n            <ignoreif><![CDATA[$data[\'newsletter\'] = $this->url->link(\'extension/module/emailtemplate_newsletter\']]></ignoreif>\n            <add position=\"replace\"><![CDATA[//$data[\'newsletter\'] = $this->url->link(\'account/newsletter\', \'\', true);\n		if ($this->config->get(\'module_emailtemplate_newsletter_status\') && $this->config->get(\'module_emailtemplate_newsletter_preference\')) {\n			$data[\'newsletter\'] = $this->url->link(\'extension/module/emailtemplate_newsletter\', \'\', true);\n		} else {\n			$data[\'newsletter\'] = $this->url->link(\'account/newsletter\', \'\', true);\n		}\n        ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"catalog/controller/account/account.php\">\n        <operation>\n            <search index=\"0\"><![CDATA[$data[\'newsletter\'] = $this->url->link(\'account/newsletter\', \'\', true);]]></search>\n            <ignoreif><![CDATA[$data[\'newsletter\'] = $this->url->link(\'extension/module/emailtemplate_newsletter\']]></ignoreif>\n            <add position=\"replace\"><![CDATA[//$data[\'newsletter\'] = $this->url->link(\'account/newsletter\', \'\', true);\n		if ($this->config->get(\'module_emailtemplate_newsletter_status\') && $this->config->get(\'module_emailtemplate_newsletter_preference\')) {\n			$data[\'newsletter\'] = $this->url->link(\'extension/module/emailtemplate_newsletter\', \'\', true);\n\n			// Create new language to prevent overwriting\n			$language_code = !empty($this->session->data[\'language\']) ? $this->session->data[\'language\'] : $this->config->get(\'config_language\');\n\n			$oLanguage = new Language($language_code);\n			$oLanguage->load(\'extension/module/emailtemplate_newsletter\');\n\n			$data[\'text_newsletter\'] = $oLanguage->get(\'text_edit_newsletter_preference\');\n		} else {\n			$data[\'newsletter\'] = $this->url->link(\'account/newsletter\', \'\', true);\n		}\n        ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"catalog/controller/account/register.php\">\n        <operation>\n            <search index=\"0\"><![CDATA[if (isset($this->request->post[\'newsletter\'])) {]]></search>\n            <add position=\"before\"><![CDATA[		if ($this->config->get(\'module_emailtemplate_newsletter_status\') && $this->config->get(\'module_emailtemplate_newsletter_preference\')) {\n			// Create new language to prevent overwriting\n			$language_code = !empty($this->session->data[\'language\']) ? $this->session->data[\'language\'] : $this->config->get(\'config_language\');\n\n			$oLanguage = new Language($language_code);\n			$oLanguage->load(\'extension/module/emailtemplate_newsletter\');\n\n   			$data[\'module_emailtemplate_newsletter_status\'] = $this->config->get(\'module_emailtemplate_newsletter_status\');\n			$data[\'module_emailtemplate_newsletter_notification\'] = $this->config->get(\'module_emailtemplate_newsletter_notification\');\n			$data[\'module_emailtemplate_newsletter_showcase\'] = $this->config->get(\'module_emailtemplate_newsletter_showcase\');\n\n			$data[\'text_preference\'] = $oLanguage->get(\'text_preference\');\n			$data[\'entry_preference_essential\'] = $oLanguage->get(\'entry_preference_essential\');\n			$data[\'entry_preference_notification\'] = $oLanguage->get(\'entry_preference_notification\');\n			$data[\'entry_preference_showcase\'] = $oLanguage->get(\'entry_preference_showcase\');\n\n			$data[\'preference_notification\'] = (isset($this->request->post[\'preference_notification\'])) ? $this->request->post[\'preference_notification\'] : 1;\n			$data[\'preference_showcase\'] = (isset($this->request->post[\'preference_showcase\'])) ? $this->request->post[\'preference_showcase\'] : 1;\n		}\n        ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"catalog/controller/checkout/register.php\">\n        <operation>\n            <search index=\"0\"><![CDATA[$data[\'entry_newsletter\'] =]]></search>\n            <add position=\"after\"><![CDATA[\n        if ($this->config->get(\'module_emailtemplate_newsletter_status\') && $this->config->get(\'module_emailtemplate_newsletter_preference\')) {\n			// Create new language to prevent overwriting\n			$language_code = !empty($this->session->data[\'language\']) ? $this->session->data[\'language\'] : $this->config->get(\'config_language\');\n\n			$oLanguage = new Language($language_code);\n			$oLanguage->load(\'extension/module/emailtemplate_newsletter\');\n\n   			$data[\'module_emailtemplate_newsletter_status\'] = $this->config->get(\'module_emailtemplate_newsletter_status\');\n			$data[\'module_emailtemplate_newsletter_notification\'] = $this->config->get(\'module_emailtemplate_newsletter_notification\');\n			$data[\'module_emailtemplate_newsletter_showcase\'] = $this->config->get(\'module_emailtemplate_newsletter_showcase\');\n\n			$data[\'text_preference\'] = $oLanguage->get(\'text_preference\');\n			$data[\'entry_preference_essential\'] = $oLanguage->get(\'entry_preference_essential\');\n			$data[\'entry_preference_notification\'] = $oLanguage->get(\'entry_preference_notification\');\n			$data[\'entry_preference_newsletter\'] = $oLanguage->get(\'entry_preference_newsletter\');\n			$data[\'entry_preference_showcase\'] = $oLanguage->get(\'entry_preference_showcase\');\n\n			$data[\'preference_notification\'] = (isset($this->request->post[\'preference_notification\'])) ? $this->request->post[\'preference_notification\'] : 1;\n			$data[\'preference_showcase\'] = (isset($this->request->post[\'preference_showcase\'])) ? $this->request->post[\'preference_showcase\'] : 1;\n		}\n        ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"catalog/view/theme/*/template/account/register.twig\">\n        <operation>\n            <search index=\"0\"><![CDATA[{{ footer }}]]></search>\n            <add position=\"before\"><![CDATA[{% if module_emailtemplate_newsletter_status %}<div id=\"emailtemplate-preference\" class=\"row\">\n  <div class=\"col-sm-10 col-sm-offset-2\">\n  <div class=\"help-block\"><button type=\"button\" class=\"btn btn-link btn-collapse collapsed\" data-toggle=\"collapse\" data-target=\"#collapse-preference\" style=\"padding:0;\"><i class=\"fa fa-fw\"></i> {{ text_preference }}</button></div>\n  <div id=\"collapse-preference\" class=\"collapse\">\n    <div class=\"form-group row\">\n      <div class=\"col-xs-12\">\n        <div class=\"checkbox disabled text-muted\">\n          <label>\n            <input type=\"checkbox\" name=\"preference_essential\" id=\"input_preference_essential\" value=\"1\" checked=\"checked\" disabled=\"disabled\" />\n            {{ entry_preference_essential }}</label>\n        </div>\n        {% if module_emailtemplate_newsletter_notification %}<div class=\"checkbox\">\n          <label>\n            <input type=\"checkbox\" name=\"preference_notification\" id=\"input_preference_notification\" value=\"1\"{% if preference_notification %} checked=\"checked\"{% endif %} />\n            {{ entry_preference_notification }}</label>\n        </div>{% endif %}\n        {% if module_emailtemplate_newsletter_showcase %}<div class=\"checkbox\">\n          <label>\n            <input type=\"checkbox\" name=\"preference_showcase\" id=\"input_preference_showcase\" value=\"1\"{% if preference_showcase %} checked=\"checked\"{% endif %} />\n            {{ entry_preference_showcase }}</label>\n        </div>{% endif %}\n      </div>\n    </div>\n  </div>\n  </div>\n</div>\n<style type=\"text/css\">\n.btn-collapse .fa:before {content:\"\\f103\";}\n.btn-collapse.collapsed .fa:before {content:\"\\f101\";}\n</style>\n<script type=\"text/javascript\"><!--\n$(\'#emailtemplate-preference\').each(function() {\n  var $emailtemplate_preference = $(this);\n  var $input_newsletter = $(\'input[name=newsletter]\');\n  if ($emailtemplate_preference.length && $input_newsletter.length) {\n    $emailtemplate_preference.insertAfter($input_newsletter.eq(0).parents(\'.form-group\'));\n  }\n});\n//--></script>{% endif %}]]></add>\n        </operation>\n    </file>\n\n    <file path=\"catalog/view/theme/*/template/checkout/register.twig\">\n        <operation>\n            <search index=\"0\"><![CDATA[name=\"newsletter\"]]></search>\n            <add position=\"after\" offset=\"1\"><![CDATA[{% if module_emailtemplate_newsletter_status %}<div id=\"emailtemplate-preference\">\n  <div class=\"help-block\"><button type=\"button\" class=\"btn btn-link btn-collapse collapsed\" data-toggle=\"collapse\" data-target=\"#collapse-preference\" style=\"padding:0;\"><i class=\"fa fa-fw\"></i> {{ text_preference }}</button></div>\n  <div id=\"collapse-preference\" class=\"collapse\">\n    <div class=\"form-group row\">\n      <div class=\"col-xs-12\">\n        <div class=\"checkbox disabled text-muted\">\n          <label>\n            <input type=\"checkbox\" name=\"preference_essential\" id=\"input_preference_essential\" value=\"1\" checked=\"checked\" disabled=\"disabled\" />\n            {{ entry_preference_essential }}</label>\n        </div>\n        {% if module_emailtemplate_newsletter_notification %}<div class=\"checkbox\">\n          <label>\n            <input type=\"checkbox\" name=\"preference_notification\" id=\"input_preference_notification\" value=\"1\"{% if preference_notification %} checked=\"checked\"{% endif %} />\n            {{ entry_preference_notification }}</label>\n        </div>{% endif %}\n        {% if module_emailtemplate_newsletter_showcase %}<div class=\"checkbox\">\n          <label>\n            <input type=\"checkbox\" name=\"preference_showcase\" id=\"input_preference_showcase\" value=\"1\"{% if preference_showcase %} checked=\"checked\"{% endif %} />\n            {{ entry_preference_showcase }}</label>\n        </div>{% endif %}\n      </div>\n    </div>\n  </div>\n</div>\n<style type=\"text/css\">\n.btn-collapse .fa:before {content:\"\\f103\";}\n.btn-collapse.collapsed .fa:before {content:\"\\f101\";}\n</style>\n<script type=\"text/javascript\"><!--\n$(\'#emailtemplate-preference\').each(function() {\n  var $emailtemplate_preference = $(this);\n  var $input_newsletter = $(\'input[name=newsletter]\');\n  if ($emailtemplate_preference.length && $input_newsletter.length) {\n    $emailtemplate_preference.insertAfter($input_newsletter.parents(\'.checkbox\'));\n  }\n});\n//--></script>{% endif %}]]></add>\n        </operation>\n    </file>\n\n    <file path=\"admin/controller/customer/customer.php\">\n        <operation>\n            <search index=\"0\"><![CDATA[if (isset($this->request->post[\'newsletter\'])) {]]></search>\n            <add position=\"before\"><![CDATA[        if ($this->config->get(\'module_emailtemplate_newsletter_status\') && $this->config->get(\'module_emailtemplate_newsletter_preference\')) {\n			// Prevent language overwrite\n			// Create new language to prevent overwriting\n			$language_code = !empty($this->session->data[\'language\']) ? $this->session->data[\'language\'] : $this->config->get(\'config_language\');\n\n			$oLanguage = new Language($language_code);\n			$oLanguage->load(\'extension/module/emailtemplate_newsletter\');\n\n			$this->load->model(\'extension/module/emailtemplate_newsletter\');\n\n   			$data[\'module_emailtemplate_newsletter_status\'] = $this->config->get(\'module_emailtemplate_newsletter_status\');\n			$data[\'module_emailtemplate_newsletter_notification\'] = $this->config->get(\'module_emailtemplate_newsletter_notification\');\n			$data[\'module_emailtemplate_newsletter_showcase\'] = $this->config->get(\'module_emailtemplate_newsletter_showcase\');\n\n			$data[\'entry_preference\'] = $oLanguage->get(\'entry_preference\');\n			$data[\'entry_preference_notification\'] = $oLanguage->get(\'entry_preference_notification\');\n			$data[\'entry_preference_showcase\'] = $oLanguage->get(\'entry_preference_showcase\');\n\n            if (isset($this->request->get[\'customer_id\'])) {\n			    $customer_preference_info = $this->model_extension_module_emailtemplate_newsletter->getCustomerPreference($this->request->get[\'customer_id\']);\n            }\n\n			if (isset($this->request->post[\'preference_notification\'])) {\n				$data[\'preference_notification\'] =  $this->request->post[\'preference_notification\'];\n			} elseif (!empty($customer_preference_info)) {\n				$data[\'preference_notification\'] = $customer_preference_info[\'notification\'];\n			} else {\n				$data[\'preference_notification\'] = \'\';\n			}\n\n			if (isset($this->request->post[\'preference_showcase\'])) {\n				$data[\'preference_showcase\'] =  $this->request->post[\'preference_showcase\'];\n			} elseif (!empty($customer_preference_info)) {\n				$data[\'preference_showcase\'] = $customer_preference_info[\'showcase\'];\n			} else {\n				$data[\'preference_showcase\'] = \'\';\n			}\n		}\n        ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"admin/view/template/customer/customer_form.twig\">\n        <operation>\n            <search index=\"0\"><![CDATA[{{ entry_status }}</label>]]></search>\n            <add position=\"before\" offset=\"1\"><![CDATA[                      {% if module_emailtemplate_newsletter_status %}\n                        <div class=\"form-group\">\n                          <label class=\"col-sm-2 control-label\">{{ entry_preference }}</label>\n                          <div class=\"col-sm-10\">\n                            {% if module_emailtemplate_newsletter_notification %}<div class=\"checkbox\">\n                              <label><input type=\"checkbox\" name=\"preference_notification\" value=\"1\"{{ preference_notification ? \' checked=\"checked\"\' : \'\' }} /> {{ entry_preference_notification }}</label>\n                            </div>{% endif %}\n                            {% if module_emailtemplate_newsletter_showcase %}<div class=\"checkbox\">\n                              <label><input type=\"checkbox\" name=\"preference_showcase\" value=\"1\"{{ preference_showcase ? \' checked=\"checked\"\' : \'\' }} /> {{ entry_preference_showcase }}</label>\n                            </div>{% endif %}\n                          </div>\n                        </div>\n                      {% endif %}]]></add>\n        </operation>\n    </file>\n</modification>\n', 1, '2022-04-01 17:57:21'),
(15, 56, 'Email Templates Security', 'emailtemplates_security', 'Opencart-Templates', '3.0.5.111', 'https://www.opencart-templates.co.uk/advanced_professional_email_template', '<modification>\n    <name>Email Templates Security</name>\n    <code>emailtemplates_security</code>\n    <version>3.0.5.111</version>\n    <author>Opencart-Templates</author>\n    <link>https://www.opencart-templates.co.uk/advanced_professional_email_template</link>\n\n    <file path=\"system/library/cart/customer.php\">\n        <operation>\n            <search index=\"0\"><![CDATA[private $customer_id;]]></search>\n            <ignoreif><![CDATA[private $load;]]></ignoreif>\n            <add position=\"after\"><![CDATA[	private $load;]]></add>\n        </operation>\n        <operation>\n            <search index=\"0\"><![CDATA[$this->request = $registry->get(\'request\');]]></search>\n            <ignoreif><![CDATA[$this->load = $registry->get(\'load\');]]></ignoreif>\n            <add position=\"after\"><![CDATA[		$this->load = $registry->get(\'load\');]]></add>\n        </operation>\n        <operation>\n            <search index=\"0\"><![CDATA[$this->db->query(\"UPDATE \" . DB_PREFIX . \"customer SET]]></search>\n            <add position=\"before\"><![CDATA[				// Customer IP Changed?\n                        if (isset($this->request->get[\'route\']) && !in_array($this->request->get[\'route\'], array(\'common/login\', \'common/logout\')) && (empty($_SERVER[\'HTTP_X_REQUESTED_WITH\']) || strtolower($_SERVER[\'HTTP_X_REQUESTED_WITH\']) != \'xmlhttprequest\')) {\n                            $user = new User($registry);\n\n                            if (!$user->isLogged()) {\n                                $customer_ip_query = $this->db->query(\"(SELECT ip FROM \" . DB_PREFIX . \"customer WHERE customer_id = \'\" . (int)$this->customer_id . \"\' AND ip = \'\" . $this->db->escape($this->request->server[\'REMOTE_ADDR\']) . \"\') UNION (SELECT ip FROM \" . DB_PREFIX . \"customer_ip WHERE customer_id = \'\" . (int)$this->customer_id . \"\' AND ip = \'\" . $this->db->escape($this->request->server[\'REMOTE_ADDR\']) . \"\')\");\n\n                                if (!$customer_ip_query->num_rows) {\n                                    $this->load->controller(\'extension/module/emailtemplate_security/customerIpChanged\', array($this->customer_id));\n                                }\n                            }\n                        }\n            ]]></add>\n        </operation>\n        <operation>\n            <search index=\"1\"><![CDATA[$this->db->query(\"UPDATE \" . DB_PREFIX . \"customer SET]]></search>\n            <add position=\"before\"><![CDATA[			// Customer IP Changed?\n			if (!$override) {\n                $customer_ip_query = $this->db->query(\"(SELECT ip FROM \" . DB_PREFIX . \"customer WHERE customer_id = \'\" . (int)$this->customer_id . \"\' AND ip = \'\" . $this->db->escape($this->request->server[\'REMOTE_ADDR\']) . \"\') UNION (SELECT ip FROM \" . DB_PREFIX . \"customer_ip WHERE customer_id = \'\" . (int)$this->customer_id . \"\' AND ip = \'\" . $this->db->escape($this->request->server[\'REMOTE_ADDR\']) . \"\')\");\n\n                if (!$customer_ip_query->num_rows) {\n                    $this->load->controller(\'extension/module/emailtemplate_security/customerIpChanged\', array($this->customer_id));\n                }\n            }\n            ]]></add>\n        </operation>\n    </file>\n</modification>\n', 1, '2022-04-01 17:57:24');
INSERT INTO `modification` (`modification_id`, `extension_install_id`, `name`, `code`, `author`, `version`, `link`, `xml`, `status`, `date_added`) VALUES
(16, 56, 'Email Templates', 'emailtemplates', 'Opencart-Templates', '3.0.5.111', 'https://www.opencart-templates.co.uk/advanced_professional_email_template', '<modification>\r\n	<name>Email Templates</name>\r\n	<code>emailtemplates</code>\r\n	<author>Opencart-Templates</author>\r\n	<version>3.0.5.111</version>\r\n	<link>https://www.opencart-templates.co.uk/advanced_professional_email_template</link>\n\n<file path=\"admin/controller/mail/affiliate.php\" email_template=\"admin.affiliate_approve\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n			// Prepare mail: admin.affiliate_approve\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\r\n				\'key\' => \'admin.affiliate_approve\',\r\n				\'customer_id\' => $customer_info[\'customer_id\'],\r\n				\'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n				\'language_id\' => $customer_info[\'language_id\'],\r\n				\'store_id\' => $customer_info[\'store_id\']\r\n			);\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n                $template->addData($customer_info);\r\n\r\n                if (!empty($args[0][\'custom_field\'])) {\r\n                    $this->load->model(\'account/custom_field\');\r\n\r\n                    $custom_fields = $this->model_account_custom_field->getCustomFields($customer_info[\'customer_group_id\']);\r\n\r\n                    foreach ($custom_fields as $custom_field) {\r\n                        if (isset($args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']])) {\r\n                            $custom_field_key = \'custom_field_\' . ($custom_field[\'location\'] != \'account\' ? $custom_field[\'location\'] . \'_\' : \'\') . $custom_field[\'custom_field_id\'];\r\n                            $custom_field_value = $args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']];\r\n\r\n                            $template->data[$custom_field_key . \'_name\'] = $custom_field[\'name\'];\r\n                            $template->data[$custom_field_key . \'_value\'] = \'\';\r\n\r\n                            if ($custom_field[\'custom_field_value\']) {\r\n                                foreach ($custom_field[\'custom_field_value\'] as $custom_field_value_info) {\r\n                                    if (is_array($custom_field_value)) {\r\n                                        if (in_array($custom_field_value_info[\'custom_field_value_id\'], $custom_field_value)) {\r\n                                            $template->data[$custom_field_key . \'_value_\' . $custom_field_value_info[\'custom_field_value_id\']] = $custom_field_value_info[\'name\'];\r\n                                        }\r\n                                    } else {\r\n                                        if ($custom_field_value_info[\'custom_field_value_id\'] == $custom_field_value) {\r\n                                            $template->data[$custom_field_key . \'_value\'] = $custom_field_value_info[\'name\'];\r\n                                        }\r\n                                    }\r\n                                }\r\n                            } else {\r\n                                $template->data[$custom_field_key . \'_value\'] = $custom_field_value;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if ($store_info) {\r\n                    $store_url = $store_info[\'url\'] . \'index.php?route=affiliate/login\';\r\n                } else {\r\n                    $store_url = HTTP_CATALOG . \'index.php?route=affiliate/login\';\r\n                }\r\n\r\n                $template->data[\'account_login\'] = $store_url . \'&amp;email=\' . $customer_info[\'email\'];\r\n\r\n                if (!empty($template->data[\'button_account_login\'])) {\r\n                    $template->data[\'account_login_text\'] = $template->data[\'button_account_login\'];\r\n                } else {\r\n                    $template->data[\'account_login_text\'] = $template->data[\'account_login\'];\r\n                }\r\n			    // Prepared mail: admin.affiliate_approve\r\n            }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n		// Send mail: admin.affiliate_approve\r\n		if ($template && $template->check()) {\r\n		    $template->build();\r\n		    $template->hook($mail);\r\n        }\r\n\r\n		$mail->send();\r\n\r\n		$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setText($this->load->view(\'mail/affiliate_approve\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setText($this->load->view(\'mail/affiliate_approve\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setText($this->load->view(\'mail/affiliate_approve\', $data));]]></add>\r\n    </operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/affiliate_approve\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/affiliate_approve\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/affiliate_approve\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/mail/affiliate.php\" email_template=\"admin.affiliate_deny\">\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n			// Prepare mail: admin.affiliate_deny\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\r\n				\'key\' => \'admin.affiliate_deny\',\r\n				\'customer_id\' => $customer_info[\'customer_id\'],\r\n				\'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n				\'language_id\' => $customer_info[\'language_id\'],\r\n				\'store_id\' => $customer_info[\'store_id\']\r\n			);\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n			    $template->addData($customer_info);\r\n			    // Prepared mail: admin.affiliate_deny\r\n            }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n		// Send mail: admin.affiliate_deny\r\n		if ($template && $template->check()) {\r\n		    $template->build();\r\n            $template->hook($mail);\r\n        }\r\n\r\n		$mail->send();\r\n\r\n		$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setText($this->load->view(\'mail/affiliate_deny\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setText($this->load->view(\'mail/affiliate_deny\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setText($this->load->view(\'mail/affiliate_deny\', $data));]]></add>\r\n    </operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/affiliate_deny\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/affiliate_deny\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/affiliate_deny\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/mail/customer.php\" email_template=\"admin.customer_approve\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n			// Prepare mail: admin.customer_approve\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\r\n				\'key\' => \'admin.customer_approve\',\r\n				\'customer_id\' => $customer_info[\'customer_id\'],\r\n				\'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n				\'language_id\' => $customer_info[\'language_id\'],\r\n				\'store_id\' => $customer_info[\'store_id\']\r\n			);\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n                $template->addData($customer_info);\r\n\r\n                if (!empty($args[0][\'custom_field\'])) {\r\n                    $this->load->model(\'account/custom_field\');\r\n\r\n                    $custom_fields = $this->model_account_custom_field->getCustomFields($customer_info[\'customer_group_id\']);\r\n\r\n                    foreach ($custom_fields as $custom_field) {\r\n                        if (isset($args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']])) {\r\n                            $custom_field_key = \'custom_field_\' . ($custom_field[\'location\'] != \'account\' ? $custom_field[\'location\'] . \'_\' : \'\') . $custom_field[\'custom_field_id\'];\r\n                            $custom_field_value = $args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']];\r\n\r\n                            $template->data[$custom_field_key . \'_name\'] = $custom_field[\'name\'];\r\n                            $template->data[$custom_field_key . \'_value\'] = \'\';\r\n\r\n                            if ($custom_field[\'custom_field_value\']) {\r\n                                foreach ($custom_field[\'custom_field_value\'] as $custom_field_value_info) {\r\n                                    if (is_array($custom_field_value)) {\r\n                                        if (in_array($custom_field_value_info[\'custom_field_value_id\'], $custom_field_value)) {\r\n                                            $template->data[$custom_field_key . \'_value_\' . $custom_field_value_info[\'custom_field_value_id\']] = $custom_field_value_info[\'name\'];\r\n                                        }\r\n                                    } else {\r\n                                        if ($custom_field_value_info[\'custom_field_value_id\'] == $custom_field_value) {\r\n                                            $template->data[$custom_field_key . \'_value\'] = $custom_field_value_info[\'name\'];\r\n                                        }\r\n                                    }\r\n                                }\r\n                            } else {\r\n                                $template->data[$custom_field_key . \'_value\'] = $custom_field_value;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                $template->data[\'account_login\'] = $store_url . \'&amp;email=\' . $customer_info[\'email\'];\r\n\r\n                if (!empty($template->data[\'button_account_login\'])) {\r\n                    $template->data[\'account_login_text\'] = $template->data[\'button_account_login\'];\r\n                } else {\r\n                    $template->data[\'account_login_text\'] = $template->data[\'account_login\'];\r\n                }\r\n			    // Prepared mail: admin.customer_approve\r\n            }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n		// Send mail: admin.customer_approve\r\n		if ($template && $template->check()) {\r\n		    $template->build();\r\n		    $template->hook($mail);\r\n\r\n            $mail->send();\r\n\r\n            $this->model_extension_module_emailtemplate->sent();\r\n        }]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/customer_approve\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/customer_approve\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/customer_approve\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/customer/customer.php\" email_template=\"admin.customer_create\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[if (isset($this->request->post[\'status\'])) {]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n		$this->load->language(\'extension/module/emailtemplate/customer\');\r\n\r\n		$data[\'entry_notify\'] = $this->language->get(\'entry_notify\');\r\n\r\n		if (isset($this->request->post[\'notify\'])) {\r\n			$data[\'notify\'] = $this->request->post[\'notify\'];\r\n		} else {\r\n			$data[\'notify\'] = true;\r\n		}\r\n		]]></add>\r\n	</operation>\r\n</file>\r\n\r\n<file path=\"admin/view/template/customer/customer_form.twig\" email_template=\"admin.customer_create\">\r\n	<operation>\r\n        <search index=\"0\"><![CDATA[<legend>{{ text_other }}</legend>]]></search>\r\n		<add position=\"after\"><![CDATA[                          {% if not customer_id %}\r\n                        <div class=\"form-group\">\r\n                          <label class=\"col-sm-2 control-label\" for=\"input-notify\">{{ entry_notify }}</label>\r\n                          <div class=\"col-sm-10\">\r\n                            <div class=\"btn-group btn-group-toggle\" data-toggle=\"buttons\">\r\n                              <label class=\"btn btn-default danger{{ notify == 0 ? \' active\' }}\" data-toggle=\"tooltip\" title=\"{{ text_no }}\">\r\n                                <input type=\"radio\" name=\"notify\" value=\"0\" {{ notify == 0 ? \' checked=\"checked\" \' }}/><i class=\"fa fa-fw fa-times\"></i>\r\n                              </label>\r\n                              <label class=\"btn btn-default success{{ notify == 1 ? \' active\' }}\" data-toggle=\"tooltip\" title=\"{{ text_yes }}\">\r\n                                <input type=\"radio\" name=\"notify\" value=\"1\" {{ notify == 1 ? \' checked=\"checked\" \' }}/><i class=\"fa fa-fw fa-check\"></i>\r\n                              </label>\r\n                            </div>\r\n                          </div>\r\n                        </div>\r\n                      {% endif %}]]></add>\r\n	</operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/mail/customer.php\" email_template=\"admin.customer_deny\">\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n			// Prepare mail: admin.customer_deny\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\r\n				\'key\' => \'admin.customer_deny\',\r\n				\'customer_id\' => $customer_info[\'customer_id\'],\r\n				\'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n				\'language_id\' => $customer_info[\'language_id\'],\r\n				\'store_id\' => $customer_info[\'store_id\']\r\n			);\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n			    $template->addData($customer_info);\r\n			    // Prepared mail: admin.customer_deny\r\n            }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n		// Send mail: admin.customer_deny\r\n		if ($template && $template->check()) {\r\n		    $template->build();\r\n            $template->hook($mail);\r\n\r\n            $mail->send();\r\n\r\n            $this->model_extension_module_emailtemplate->sent();\r\n        }]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/customer_deny\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/customer_deny\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/customer_deny\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/customer/customer.php\" email_template=\"admin.customer_history\">\r\n    <operation error=\"skip\">\r\n        <search index=\"0\"><![CDATA[$this->model_customer_customer->addHistory($customer_id, $this->request->post[\'comment\']);]]></search>\r\n        <ignoreif><![CDATA[$this->model_customer_customer->addHistory($customer_id, $this->request->post[\'comment\'], $history_notify]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[$history_notify = !empty($this->request->post[\'history_notify\']) ? true : false;\r\n\r\n                $this->model_customer_customer->addHistory($customer_id, $this->request->post[\'comment\'], $history_notify);]]></add>\r\n    </operation>\r\n    <operation error=\"skip\">\r\n        <search index=\"0\"><![CDATA[$this->model_customer_customer->addHistory($this->request->get[\'customer_id\'], $this->request->post[\'comment\']);]]></search>\r\n        <ignoreif><![CDATA[$this->model_customer_customer->addHistory($this->request->get[\'customer_id\'], $this->request->post[\'comment\'], $history_notify]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[$history_notify = !empty($this->request->post[\'history_notify\']) ? true : false;\r\n\r\n                $this->model_customer_customer->addHistory($this->request->get[\'customer_id\'], $this->request->post[\'comment\'], $history_notify);]]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[$customer_info = $this->model_customer_customer->getCustomer($this->request->get[\'customer_id\']);]]></search>\r\n        <add position=\"after\" offset=\"1\"><![CDATA[\r\n        $this->document->addScript(\'view/javascript/summernote/summernote.js\');\r\n		$this->document->addScript(\'view/javascript/summernote/opencart.js\');\r\n		$this->document->addStyle(\'view/javascript/summernote/summernote.css\');\r\n\r\n        $this->load->language(\'extension/module/emailtemplate/customer\');\r\n\r\n		$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n		$templates = $this->model_extension_module_emailtemplate->getTemplates(array(\r\n			\'emailtemplate_key\' => \'admin.customer_history\'\r\n		));\r\n\r\n		$data[\'language_id\'] = array();\r\n\r\n		$data[\'template_options\'] = array();\r\n\r\n		foreach($templates as $row) {\r\n			$data[\'template_options\'][] = array(\r\n				\'value\' => $row[\'emailtemplate_id\'],\r\n				\'label\' => $row[\'emailtemplate_label\'] . (!empty($row[\'emailtemplate_default\']) ? \' (\' . strip_tags($this->language->get(\'text_default\')) . \')\': \'\')\r\n			);\r\n		}\r\n\r\n		$data[\'user_token\'] = $this->session->data[\'user_token\'];\r\n\r\n        $data[\'summernote_language\'] = $this->language->get(\'summernote\');\r\n        if ($data[\'summernote_language\'] == \'summernote\') $data[\'summernote_language\'] = \'en\';\r\n\r\n        if (isset($this->request->post[\'language_id\'])) {\r\n			$data[\'language_id\'] = $this->request->post[\'language_id\'];\r\n		} elseif (!empty($customer_info)) {\r\n			$data[\'language_id\'] = $customer_info[\'language_id\'];\r\n		} else {\r\n			$data[\'language_id\'] = $this->config->get(\'config_language_id\');\r\n		}\r\n\r\n        if (isset($this->request->post[\'store_id\'])) {\r\n			$data[\'store_id\'] = $this->request->post[\'store_id\'];\r\n		} elseif (!empty($customer_info)) {\r\n			$data[\'store_id\'] = $customer_info[\'store_id\'];\r\n		} else {\r\n			$data[\'store_id\'] = $this->config->get(\'config_store_id\');\r\n		}\r\n        ]]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[\'comment\'    => $result[\'comment\'],]]></search>\r\n        <add position=\"replace\"><![CDATA[\'comment\'    => html_entity_decode($result[\'comment\'], ENT_QUOTES, \'UTF-8\'),\r\n        		\'notify\'    => $this->language->get($result[\'notified\'] ? \'text_yes\' : \'text_no\'),]]></add>\r\n    </operation>\r\n</file>\r\n\r\n<file path=\"admin/model/customer/customer.php\" email_template=\"admin.customer_history\">\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[function addHistory($customer_id, $comment]]></search>\r\n        <ignoreif><![CDATA[function addHistory($customer_id, $comment, $notify = false]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[function addHistory($customer_id, $comment, $notify = false]]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"customer_history SET]]></search>\r\n        <ignoreif><![CDATA[notified = \'\" . (int)$notify]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"customer_history SET notified = \'\" . (int)$notify . \"\', ]]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"customer_history]]></search>\r\n        <ignoreif><![CDATA[$customer_history_id = $this->db->getLastId();]]></ignoreif>\r\n        <add position=\"after\"><![CDATA[\r\n        $customer_history_id = $this->db->getLastId();\r\n\r\n        return $customer_history_id;]]></add>\r\n    </operation>\r\n    <operation error=\"skip\">\r\n        <search index=\"0\"><![CDATA[comment = \'\" . $this->db->escape(strip_tags($comment)) . \"\']]></search>\r\n        <add position=\"replace\"><![CDATA[comment = \'\" . $this->db->escape((string)$comment) . \"\']]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[SELECT comment, date_added]]></search>\r\n        <add position=\"replace\"><![CDATA[SELECT comment, date_added, notified]]></add>\r\n    </operation>\r\n</file>\r\n\r\n<file path=\"admin/view/template/customer/customer_history.twig\" email_template=\"admin.customer_history\">\r\n<operation>\r\n    <search index=\"0\"><![CDATA[{{ column_comment }}</td>]]></search>\r\n    <add position=\"after\"><![CDATA[        <td class=\"text-left\">{{ column_notify }}</td>]]></add>\r\n</operation>\r\n<operation>\r\n    <search index=\"0\"><![CDATA[{{ history.comment }}</td>]]></search>\r\n    <add position=\"after\"><![CDATA[        <td class=\"text-left\">{{ history.notify }}</td>]]></add>\r\n</operation>\r\n</file>\r\n\r\n<file path=\"admin/view/template/customer/customer_form.twig\" email_template=\"admin.customer_history\">\r\n<operation>\r\n    <search index=\"0\"><![CDATA[id=\"input-comment\" class=\"form-control]]></search>\r\n    <add position=\"replace\"><![CDATA[data-toggle=\"summernote\" data-lang=\"{{ summernote_language }}\" id=\"input-comment\" class=\"form-control summernote]]></add>\r\n</operation>\r\n<operation>\r\n    <search index=\"0\"><![CDATA[id=\"input-comment\"]]></search>\r\n    <add position=\"after\"><![CDATA[\r\n                  {% if customer_id %}\r\n                      </div>\r\n                  </div>\r\n                  <div class=\"form-group row\">\r\n                    <label class=\"col-sm-2 col-form-label\" for=\"input-history-notify\">{{ entry_notify }}</label>\r\n                    <div class=\"col-sm-10\">\r\n                      <div class=\"btn-group btn-group-toggle\" data-toggle=\"buttons\">\r\n                        <label class=\"btn btn-default danger active\" data-toggle=\"tooltip\" title=\"{{ text_no }}\">\r\n                          <input type=\"radio\" name=\"history_notify\" value=\"0\" checked=\"checked\" /><i class=\"fa fa-fw fa-times\"></i>\r\n                        </label>\r\n                        <label class=\"btn btn-default success\" data-toggle=\"tooltip\" title=\"{{ text_yes }}\">\r\n                          <input type=\"radio\" name=\"history_notify\" id=\"input-history-notify\" value=\"1\" /><i class=\"fa fa-fw fa-check\"></i>\r\n                        </label>\r\n                      </div>\r\n                    </div>\r\n                  </div>\r\n                  <div class=\"row form-group form-group-history-notify\" style=\"display:none\">\r\n                    <label class=\"col-sm-2 col-form-label\" for=\"input-templates\">{{ entry_template }}</label>\r\n                    <div class=\"col-sm-10\">\r\n                      <select id=\"input-templates\" name=\"emailtemplate_id\" class=\"form-control\">\r\n                        <option value=\"\">{{ text_select }}</option>\r\n                        {% for item in template_options %}\r\n                          <option value=\"{{ item.value }}\">{{ item.label }}</option>\r\n                        {% endfor %}\r\n                      </select>\r\n                  {% endif %}\r\n		]]></add>\r\n</operation>\r\n<operation>\r\n    <search index=\"0\"><![CDATA[$(\'#button-history\').on(\'click\']]></search>\r\n    <add position=\"after\"><![CDATA[  if (typeof CKEDITOR !== \"undefined\" && (CKEDITOR.instances[\"input-comment\"] || CKEDITOR.instances[\"comment\"])) {\r\n  	  if (CKEDITOR.instances[\"input-comment\"]) {\r\n		  CKEDITOR.instances[\"input-comment\"].updateElement();\r\n	  } else {\r\n		  CKEDITOR.instances[\"comment\"].updateElement();\r\n	  }\r\n  }\r\n\r\n  if ($(\"textarea[name=\'comment\']\").val().replace(/(<([^>]+)>)/ig,\"\") == \'\') {\r\n    $(\"textarea[name=\'comment\']\").val(\'\');\r\n  }]]></add>\r\n</operation>\r\n<operation>\r\n    <search index=\"0\"><![CDATA[data: \'comment=\' + encodeURIComponent($(\'#tab-history textarea[name=\\\'comment\\\']\').val()),]]></search>\r\n    <add position=\"replace\"><![CDATA[data: $(\'#tab-history :input\').serialize(),]]></add>\r\n</operation>\r\n<operation>\r\n    <search index=\"0\"><![CDATA[$(\'#tab-history textarea[name=\\\'comment\\\']\').val(\'\');]]></search>\r\n    <add position=\"after\"><![CDATA[if (typeof CKEDITOR !== \"undefined\" && (CKEDITOR.instances[\"input-comment\"] || CKEDITOR.instances[\"comment\"])) {\r\n			  if (CKEDITOR.instances[\"input-comment\"]) {\r\n				  CKEDITOR.instances[\"input-comment\"].setData(\'\');\r\n			  } else {\r\n				  CKEDITOR.instances[\"comment\"].setData(\'\');\r\n			  }\r\n	        } else if ($.fn.summernote) {\r\n              $(\'#tab-history textarea[name=comment]\').summernote(\'reset\');\r\n            }\r\n\r\n			$(\'select[name=history_notify] > option:selected\').prop(\'selected\', false);\r\n\r\n           	$(\'.form-group-history-notify\').hide().each(function(){\r\n           		$(this).find(\'input[type=checkbox]\').prop(\'checked\', false);\r\n           		$(this).find(\'input[type=radio][value!=0]\').prop(\'selected\', false);\r\n           		$(this).find(\'input[type=radio][value=0]\').prop(\'selected\', true);\r\n           		$(this).find(\'option:selected\').prop(\'selected\', false);\r\n           	});]]></add>\r\n</operation>\r\n<operation>\r\n    <search index=\"0\"><![CDATA[{{ footer }}]]></search>\r\n    <add position=\"before\"><![CDATA[\r\n<script type=\"text/javascript\"><!--\r\n(function($){\r\n  $(document).ready(function(){\r\n    var $comment = $(\'#tab-history textarea[name=comment]\');\r\n\r\n    $(\'input[name=history_notify]\').on(\'change\', function(){\r\n      $(\'.form-group-history-notify\').toggle($(this).val() == 1 ? true : false);\r\n    });\r\n\r\n    $(\'select[name=emailtemplate_id]\').change(function() {\r\n      var val = $(this).val();\r\n\r\n      if (!val || ($comment.val() != \'\' && $comment.val() != \'<p><br></p>\' && !confirm(\"{{ warning_template_content }}\"))) return;\r\n\r\n	  $comment.val(\'\');\r\n\r\n      $.ajax({\r\n        url: \'index.php?route=extension/module/emailtemplate/fetch_template&output=comment&user_token={{ user_token }}\',\r\n        type: \'get\',\r\n        data: \'emailtemplate_id=\' + val + \'&store_id={{ store_id }}\' + \'&language_id={{ language_id }}\' + \'&customer_id={{ customer_id }}\',\r\n        dataType: \'html\',\r\n        success: function(html) {\r\n          if (html) {\r\n            $comment.val(html);\r\n\r\n            if (typeof CKEDITOR !== \"undefined\" && (CKEDITOR.instances[\"input-comment\"] || CKEDITOR.instances[\"comment\"])) {\r\n              if (CKEDITOR.instances[\"input-comment\"]) {\r\n                CKEDITOR.instances[\"input-comment\"].setData(html);\r\n              } else {\r\n                CKEDITOR.instances[\"comment\"].setData(html);\r\n              }\r\n            } else if ($.fn.summernote) {\r\n				$comment.summernote(\'code\', html);\r\n			}\r\n          }\r\n        },\r\n        error: function(xhr, ajaxOptions, thrownError) {\r\n          console.log(thrownError + \"\\r\\n\" + xhr.statusText + \"\\r\\n\" + xhr.responseText);\r\n        }\r\n      });\r\n    });\r\n  });\r\n})(jQuery);\r\n//--></script>]]></add>\r\n</operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/mail/reward.php\" email_template=\"admin.customer_reward\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n			// Prepare mail: admin.customer_reward\r\n			$this->load->model(\'customer/customer\');\r\n			$this->load->model(\'sale/order\');\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\r\n			    \'key\' =>\'admin.customer_reward\',\r\n			    \'customer_id\' => $customer_info[\'customer_id\'],\r\n				\'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n				\'language_id\' => $customer_info[\'language_id\'],\r\n				\'store_id\' => $customer_info[\'store_id\']\r\n            );\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n                $template->addData($customer_info, \'customer\');\r\n\r\n                if ($order_id) {\r\n                	$order_info = $this->model_sale_order->getOrder($order_id);\r\n                	if ($order_info) {\r\n                		$template->addData($order_info, \'order\');\r\n					}\r\n                }\r\n\r\n                $template->data[\'customer_reward_points\'] = $points ? $points : 0;\r\n                $template->data[\'customer_reward_description\'] = $description ? $description : \'\';\r\n                $template->data[\'customer_reward_total\'] = $this->model_customer_customer->getRewardTotal($customer_id);\r\n\r\n                $template->data[\'reward_received\'] = sprintf($template->data[\'text_reward_received\'], $template->data[\'customer_reward_points\']);\r\n                $template->data[\'reward_total\'] = sprintf($template->data[\'text_reward_total\'], $template->data[\'customer_reward_total\']);\r\n\r\n                $template->data[\'text_reward_subject\'] = sprintf($template->data[\'text_reward_subject\'], $store_name);\r\n			    // Prepared mail: admin.customer_reward\r\n			}\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n			// Send mail: admin.customer_reward\r\n            if ($template && $template->check()) {\r\n                $template->build();\r\n			    $template->hook($mail);\r\n\r\n                $mail->send();\r\n\r\n                $this->model_extension_module_emailtemplate->sent();\r\n            }]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/reward\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/reward\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/reward\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/mail/transaction.php\" email_template=\"admin.customer_transaction\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n			// Prepare mail: admin.customer_transaction\r\n			$this->load->model(\'customer/customer\');\r\n			$this->load->model(\'sale/order\');\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\r\n			    \'key\' =>\'admin.customer_transaction\',\r\n			    \'customer_id\' => $customer_info[\'customer_id\'],\r\n				\'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n				\'language_id\' => $customer_info[\'language_id\'],\r\n				\'store_id\' => $customer_info[\'store_id\']\r\n            );\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n                $template->data[\'amount\'] = $amount;\r\n                $template->data[\'description\'] = $description;\r\n\r\n                $template->addData($customer_info, \'customer\');\r\n\r\n                if ($order_id) {\r\n                    $order_info = $this->model_sale_order->getOrder($order_id);\r\n\r\n                    $template->addData($order_info, \'order\');\r\n                }\r\n\r\n                $affiliate_info = $this->model_customer_customer->getAffiliate($customer_info[\'customer_id\']);\r\n\r\n                if ($affiliate_info) {\r\n                    $template->addData($affiliate_info, \'affiliate\');\r\n                }\r\n\r\n                $template->data[\'customer_transaction_received\'] = $this->currency->format($amount, $this->config->get(\'config_currency\'));\r\n                $template->data[\'customer_transaction_total\'] = $this->currency->format($this->model_customer_customer->getTransactionTotal($customer_id), $this->config->get(\'config_currency\'));\r\n\r\n                $template->data[\'transaction_received\'] = sprintf($template->data[\'text_transaction_received\'], $template->data[\'customer_transaction_received\']);\r\n                $template->data[\'transaction_total\'] = sprintf($template->data[\'text_transaction_total\'], $template->data[\'customer_transaction_total\']);\r\n			    // Prepared mail: admin.customer_transaction\r\n            }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n			// Send mail: admin.customer_transaction\r\n            if ($template && $template->check()) {\r\n                $template->build();\r\n			    $template->hook($mail);\r\n\r\n                $mail->send();\r\n\r\n                $this->model_extension_module_emailtemplate->sent();\r\n            }]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/transaction\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/transaction\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/transaction\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\r\n\n\n<file path=\"admin/controller/marketing/contact.php\" email_template=\"admin.newsletter\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$data[\'breadcrumbs\'] = array();]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n        $this->document->addScript(\'view/javascript/summernote/summernote.js\');\r\n        $this->document->addScript(\'view/javascript/summernote/opencart.js\');\r\n        $this->document->addStyle(\'view/javascript/summernote/summernote.css\');\r\n\r\n		$this->load->model(\'localisation/language\');\r\n		$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n		$this->load->language(\'extension/module/emailtemplate/newsletter\');\r\n\r\n        $templates = $this->model_extension_module_emailtemplate->getTemplates(array(\r\n			\'emailtemplate_key\' => \'admin.newsletter\'\r\n		));\r\n\r\n		$data[\'email_templates\'] = array();\r\n\r\n		foreach($templates as $row) {\r\n			$data[\'email_templates\'][] = array(\r\n				\'value\' => $row[\'emailtemplate_id\'],\r\n				\'label\' => $row[\'emailtemplate_label\'] . (!empty($row[\'emailtemplate_default\']) ? \' (\' . strip_tags($this->language->get(\'text_default\')) . \')\': \'\')\r\n			);\r\n		}\r\n\r\n		$data[\'languages\'] = $this->model_localisation_language->getLanguages();\r\n\r\n        $data[\'user_token\'] = $this->session->data[\'user_token\'];\r\n\r\n        $data[\'summernote_language\'] = $this->language->get(\'summernote\');\r\n        if ($data[\'summernote_language\'] == \'summernote\') $data[\'summernote_language\'] = \'en\';\r\n	]]></add>\r\n	</operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[if (!$this->request->post[\'subject\']) {]]></search>\r\n        <add position=\"replace\" offset=\"6\"><![CDATA[if (empty($json[\'error\'])) {\r\n				$this->load->model(\'localisation/language\');\r\n\r\n				$languages = $this->model_localisation_language->getLanguages();\r\n\r\n				foreach ($languages as $language) {\r\n					if (empty($this->request->post[\'subject\'][$language[\'language_id\']])) {\r\n						$json[\'error\'][\'subject\'][$language[\'language_id\']] = $this->language->get(\'error_subject\');\r\n					}\r\n\r\n					if (empty($this->request->post[\'message\'][$language[\'language_id\']]) || trim(strip_tags(html_entity_decode($this->request->post[\'message\'][$language[\'language_id\']], ENT_QUOTES, \'UTF-8\'))) == \'\') {\r\n						$json[\'error\'][\'message\'][$language[\'language_id\']] = $this->language->get(\'error_message\');\r\n					}\r\n				}\r\n\r\n				if (!empty($json[\'error\'])) {\r\n					$json[\'error\'][\'warning\'] = $this->language->get(\'error_warning\');\r\n				}\r\n			}]]></add>\r\n    </operation>\r\n	<operation info=\"Add extra info into email array. Regex to be backwards compatible with 3.0.1.*\">\r\n		<search regex=\"true\"><![CDATA[~\\$emails\\[.*?\\] = \\$customer_info\\[\'email\'\\];~]]></search>\r\n		<add position=\"replace\"><![CDATA[$email_total = isset($this->request->post[\'customer\']) ? count($this->request->post[\'customer\']) : 1;;\r\n\r\n									$emails[] = array(\r\n										\'customer\' => $customer_info,\r\n										\'email\' => $customer_info[\'email\'],\r\n										\'customer_id\' => $customer_info[\'customer_id\'],\r\n										\'store_id\' => $customer_info[\'store_id\'],\r\n										\'language_id\' => $customer_info[\'language_id\']\r\n									);]]></add>\r\n	</operation>\r\n	<operation info=\"Add extra info into email array\">\r\n		<search><![CDATA[$emails[$result[\'customer_id\']] = $result[\'email\'];]]></search>\r\n		<add position=\"replace\"><![CDATA[$emails[] = array(\r\n								\'email\' => $result[\'email\'],\r\n								\'customer_id\' => isset($result[\'customer_id\']) ? $result[\'customer_id\'] : 0,\r\n								\'store_id\' => isset($result[\'store_id\']) ? $result[\'store_id\'] : 0,\r\n								\'language_id\' => isset($result[\'language_id\']) ? $result[\'language_id\'] : 0\r\n							);]]></add>\r\n	</operation>\r\n	<operation info=\"affiliate_all\">\r\n		<search index=\"2\"><![CDATA[$emails[] = $result[\'email\'];]]></search>\r\n		<add position=\"replace\"><![CDATA[$emails[] = array(\r\n								\'email\' => $result[\'email\'],\r\n								\'affiliate_id\' => $result[\'affiliate_id\']\r\n							);]]></add>\r\n	</operation>\r\n	<operation info=\"affiliate\">\r\n		<search><![CDATA[$emails[] = $affiliate_info[\'email\'];]]></search>\r\n		<add position=\"replace\"><![CDATA[$email_total = 1;\r\n\r\n									$emails[] = array(\r\n										\'affiliate\' => $affiliate_info,\r\n										\'email\' => $affiliate_info[\'email\'],\r\n										\'affiliate_id\' => $affiliate_info[\'affiliate_id\']\r\n									);]]></add>\r\n	</operation>\r\n	<operation info=\"newsletter, customer_all, product\">\r\n		<search><![CDATA[$emails[] = $result[\'email\'];]]></search>\r\n		<add position=\"replace\"><![CDATA[$emails[] = array(\r\n								\'email\' => $result[\'email\'],\r\n								\'customer_id\' => isset($result[\'customer_id\']) ? $result[\'customer_id\'] : 0,\r\n								\'store_id\' => isset($result[\'store_id\']) ? $result[\'store_id\'] : 0,\r\n								\'language_id\' => isset($result[\'language_id\']) ? $result[\'language_id\'] : 0\r\n							);]]></add>\r\n	</operation>\r\n\r\n	<operation info=\"Move message into foreach\">\r\n		<search index=\"0\"><![CDATA[foreach ($emails as $email) {]]></search>\r\n		<add/>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$message  = \'<html ]]></search>\r\n		<add position=\"before\"><![CDATA[					if (isset($this->request->get[\'sent_total\'])) {\r\n                        $sent_total = $this->request->get[\'sent_total\'];\r\n                    } else {\r\n                        $sent_total = 0;\r\n                    }\r\n\r\n		            foreach ($emails as $email_info) {\r\n						$email = is_array($email_info) ? $email_info[\'email\'] : $email_info;\r\n\r\n						if (!empty($email_info[\'language_id\'])) {\r\n							$language_id = $email_info[\'language_id\'];\r\n						} else {\r\n							$language_id = $this->config->get(\'config_language_id\');\r\n						}\r\n\r\n						if (isset($email_info[\'store_id\']) && $this->request->post[\'store_id\'] == 0) {\r\n 							$store_id = $email_info[\'store_id\'];\r\n						} else {\r\n							$store_id = $this->request->post[\'store_id\'];\r\n						}\r\n\r\n						// Prepare mail: admin.newsletter\r\n						$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n						$template_load = array(\r\n							\'key\' => \'admin.newsletter\',\r\n							\'language_id\' => $language_id,\r\n							\'email\' => $email,\r\n							\'store_id\' => $store_id\r\n						);\r\n\r\n						if (isset($email_info[\'customer\']) && isset($email_info[\'customer\'][\'customer_id\'])) {\r\n							$template_load[\'customer_id\'] = $email_info[\'customer\'][\'customer_id\'];\r\n						} elseif (!empty($email_info[\'customer_id\'])) {\r\n                            $template_load[\'customer_id\'] = $email_info[\'customer_id\'];\r\n                        } else {\r\n                            $this->load->model(\'customer/customer\');\r\n\r\n                            $customer_info = $this->model_customer_customer->getCustomerByEmail($email);\r\n\r\n                            if ($customer_info) {\r\n                                $template_load[\'customer_id\'] = $email_info[\'customer_id\'];\r\n                            }\r\n						}\r\n\r\n						if (!empty($this->request->post[\'emailtemplate_id\'])) {\r\n                            $template_load[\'emailtemplate_id\'] = $this->request->post[\'emailtemplate_id\'];\r\n                        }\r\n\r\n						$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n                        if ($template) {\r\n                            if (isset($email_info[\'customer\'])) {\r\n                                $template->addData($email_info[\'customer\']);\r\n                                unset($email_info[\'customer\']);\r\n                            } elseif (isset($template_load[\'customer_id\'])) {\r\n                                $customer_info = $this->model_customer_customer->getCustomer($template_load[\'customer_id\']);\r\n\r\n                                if ($customer_info) {\r\n                                    $template->addData($customer_info);\r\n                                }\r\n                            }\r\n\r\n                            if (isset($email_info[\'affiliate\'])) {\r\n                                $template->addData($email_info[\'affiliate\']);\r\n                                unset($email_info[\'affiliate\']);\r\n                            } elseif (isset($email_info[\'affiliate_id\'])) {\r\n                                $affiliate_info = $this->model_sale_affiliate->getAffiliate($email_info[\'affiliate_id\']);\r\n                                $template->addData($affiliate_info);\r\n                            }\r\n\r\n                            if (!empty($this->request->post[\'subject\'][$language_id])) {\r\n                                $template->data[\'emailtemplate\'][\'subject\'] = $this->request->post[\'subject\'][$language_id];\r\n                            } else {\r\n                                $template->data[\'emailtemplate\'][\'subject\'] = $this->config->get(\'config_name\');\r\n                            }\r\n\r\n                            if (!empty($this->request->post[\'preview\'][$language_id])) {\r\n                                $template->data[\'emailtemplate\'][\'preheader_preview\'] = $this->request->post[\'preview\'][$language_id];\r\n                            }\r\n\r\n                            if (!empty($this->request->post[\'message\'][$language_id]) && is_array($this->request->post[\'message\'])) {\r\n                                $template->data[\'message\'] = $this->request->post[\'message\'][$language_id];\r\n                            } else {\r\n                                $template->data[\'message\'] = \'\';\r\n                            }\r\n\r\n                            if (is_array($email_info)) {\r\n                                $template->addData($email_info);\r\n                            } else {\r\n                                $template->addData(\'email\', $email_info);\r\n                            }\r\n						    // Prepared mail: admin.newsletter\r\n                        }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[<title>\' . $this->request->post[\'subject\'] . \'</title>]]></search>\r\n		<add position=\"replace\"><![CDATA[<title></title>]]></add>\r\n	</operation>\r\n    <operation>\r\n		<search index=\"0\"><![CDATA[$mail->setSubject(html_entity_decode($this->request->post[\'subject\'], ENT_QUOTES, \'UTF-8\'));]]></search>\r\n		<add position=\"replace\"></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[html_entity_decode($this->request->post[\'message\'],]]></search>\r\n		<add position=\"replace\"><![CDATA[html_entity_decode(($template ? $template->data[\'message\'] : \'\'),]]></add>\r\n	</operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[if ($emails) {]]></search>\r\n        <ignoreif><![CDATA[$json[\'error\'][\'email\'] = $this->language->get(\'error_email\');]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (!$emails) {\r\n                    $json[\'error\'][\'email\'] = $this->language->get(\'error_email\');\r\n                } else {]]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n        <add position=\"after\" offset=\"1\"><![CDATA[					if ($json[\'next\'] && $sent_total) {\r\n						$json[\'next\'] .= \'&sent_total=\' . $sent_total;\r\n        			}\r\n\r\n        			$json[\'success\'] = sprintf($this->language->get(\'text_sent\'), $sent_total, $email_total);]]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n        <add position=\"replace\"><![CDATA[// Send mail: admin.newsletter\r\n							if ($template && $template->check()) {\r\n								if ($template->data[\'message\']) {\r\n									$template->data[\'message\'] = $template->replaceContent($template->data[\'message\']);\r\n								}\r\n\r\n								$template->build();\r\n\r\n                                // Disable preference checking if not newsletter\r\n                                $module_status = ($this->config->get(\'module_emailtemplate_newsletter_status\') && $this->config->get(\'module_emailtemplate_newsletter_preference\'));\r\n                                if ($module_status && isset($this->request->post[\'to\']) && in_array($this->request->post[\'to\'], array(\'customer\', \'customer_all\'))) {\r\n                                    $template->data[\'emailtemplate\'][\'preference\'] = false;\r\n                                }\r\n\r\n								$mail->setSubject($template->data[\'emailtemplate\'][\'subject\']);\r\n\r\n								if (trim(strip_tags($template->data[\'emailtemplate\'][\'content1\'])) == \'\') {\r\n                                    $template->fetch(null, $template->data[\'message\']);\r\n								}\r\n\r\n								$template->hook($mail);\r\n\r\n								$mail->send();\r\n\r\n								$this->model_extension_module_emailtemplate->sent();\r\n\r\n								$sent_total++;\r\n							}]]></add>\r\n    </operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$this->load->view(\'marketing/contact\']]></search>\r\n		<add position=\"replace\"><![CDATA[$this->load->view(\'extension/module/emailtemplate/marketing_contact\']]></add>\r\n	</operation>\r\n</file>\r\n\r\n<file path=\"catalog/controller/account/newsletter.php\" email_template=\"admin.newsletter\">\r\n	<operation>\r\n	    <search index=\"0\"><![CDATA[class ControllerAccountNewsletter extends Controller {]]></search>\r\n	   	<ignoreif><![CDATA[public function unsubscribe(]]></ignoreif>\r\n	   	<add position=\"after\"><![CDATA[	public function unsubscribe() {\r\n        $this->response->redirect($this->url->link(\'extension/module/emailtemplate_newsletter/unsubscribe\'));\r\n 	}\r\n 	  ]]></add>\r\n	</operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/mail/return.php\" email_template=\"admin.return_history\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n				// Prepare mail: admin.return_history\r\n				$this->load->model(\'extension/module/emailtemplate\');\r\n				$this->load->model(\'sale/order\');\r\n\r\n				$order_info = $this->model_sale_order->getOrder($return_info[\'order_id\']);\r\n\r\n                $template_load = array(\r\n                    \'key\' => \'admin.return_history\',\r\n                    \'customer_id\' => $return_info[\'customer_id\']\r\n                );\r\n\r\n                if (isset($order_info[\'store_id\'])) {\r\n                    $template_load[\'store_id\'] = $order_info[\'store_id\'];\r\n                    $template_load[\'payment_method\'] = $order_info[\'payment_code\'];\r\n                    $template_load[\'shipping_method\'] = $order_info[\'shipping_code\'];\r\n                }\r\n\r\n                if (!empty($this->request->post[\'emailtemplate_id\'])) {\r\n                    $template_load[\'emailtemplate_id\'] = $this->request->post[\'emailtemplate_id\'];\r\n                }\r\n\r\n                if (isset($order_info[\'language_id\'])) {\r\n					$language_id = $order_info[\'language_id\'];\r\n				} elseif (!empty($return_info[\'customer_id\'])) {\r\n				    $this->load->model(\'customer/customer\');\r\n\r\n		            $customer_info = $this->model_customer_customer->getCustomer($return_info[\'customer_id\']);\r\n\r\n                    $language_id = $customer_info[\'language_id\'];\r\n				} else {\r\n				    $language_id = $this->config->get(\'config_language_id\');\r\n				}\r\n\r\n				$template_load[\'language_id\'] = $language_id;\r\n\r\n				$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n                if ($template) {\r\n                    $this->load->model(\'localisation/language\');\r\n\r\n                    $language_info = $this->model_localisation_language->getLanguage($language_id);\r\n\r\n                    if ($language_info) {\r\n                        $language_code = $language_info[\'code\'];\r\n                    } else {\r\n                        $language_code = $this->config->get(\'config_language\');\r\n                    }\r\n\r\n                    $language = new Language($language_code);\r\n                    $language->load($language_code);\r\n                    $language->load(\'mail/return\');\r\n                    $language->load(\'extension/module/emailtemplate/return\');\r\n\r\n                    $template->addData($return_info);\r\n\r\n                    if ($return_info[\'product_id\']) {\r\n                        $this->load->model(\'catalog/product\');\r\n\r\n                        $product_info = $this->model_catalog_product->getProduct($return_info[\'product_id\']);\r\n\r\n                        $template->addData($product_info, \'product\');\r\n                    }\r\n\r\n                    if ($order_info) {\r\n                        $template->addData($order_info, \'order\');\r\n\r\n                        $template->data[\'order_id\'] = $order_info[\'order_id\'];\r\n\r\n                        $template->data[\'order_total\'] = $this->currency->format($order_info[\'total\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']);\r\n\r\n                        $template->data[\'return_link\'] = $order_info[\'store_url\'] . \'index.php?route=account/return/info&return_id=\' . $return_id;\r\n                    } else {\r\n                        $template->data[\'return_link\'] = HTTP_CATALOG . \'index.php?route=account/return/info&return_id=\' . $return_id;\r\n                    }\r\n\r\n                    if (!empty($template->data[\'button_return_link\'])) {\r\n                        $template->data[\'return_link_text\'] = $template->data[\'button_return_link\'];\r\n                    } else {\r\n                        $template->data[\'return_link_text\'] = $template->data[\'return_link\'];\r\n                    }\r\n\r\n                    $return_reason_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"return_reason WHERE return_reason_id = \'\" . (int)$return_info[\'return_reason_id\'] . \"\' AND language_id = \'\" . (int)$language_id . \"\'\");\r\n\r\n                    if ($return_reason_query->row) {\r\n                        $template->data[\'reason\'] = $return_reason_query->row[\'name\'];\r\n                    }\r\n\r\n                    $return_status_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"return_status WHERE return_status_id = \'\" . (int)$return_info[\'return_status_id\'] . \"\' AND language_id = \'\" . (int)$language_id . \"\'\");\r\n\r\n                    if ($return_status_query->row) {\r\n                        $template->data[\'return_status\'] = $return_status_query->row[\'name\'];\r\n                    }\r\n\r\n                    $template->data[\'return_id\'] = $return_id;\r\n\r\n                    $template->data[\'date_added\'] = date($language->get(\'date_format_short\'), strtotime($return_info[\'date_added\']));\r\n\r\n                    $template->data[\'comment\'] = (!empty($comment)) ? (strcmp($comment, strip_tags($html_str = html_entity_decode($comment, ENT_QUOTES, \'UTF-8\'))) == 0) ? nl2br($comment) : $html_str : \'\';\r\n\r\n                    $template->data[\'opened\'] = $return_info[\'opened\'] ? $language->get(\'text_yes\') : $language->get(\'text_no\');\r\n\r\n                    $template->data[\'text_subject\'] = sprintf($language->get(\'text_subject\'), html_entity_decode($this->config->get(\'config_name\'), ENT_QUOTES, \'UTF-8\'), $return_id);\r\n				    // Prepared mail: admin.return_history\r\n                }\r\n			]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n				// Send mail: admin.return_history\r\n				if ($template && $template->check()) {\r\n				    $template->build();\r\n				    $template->hook($mail);\r\n\r\n                    $mail->send();\r\n\r\n                    $this->model_extension_module_emailtemplate->sent();\r\n                }]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/return\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/return\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/return\', $data));]]></add>\r\n    </operation>\r\n    <operation error=\"skip\" info=\"Bug fix\">\r\n        <search index=\"0\"><![CDATA[$language_info = $this->model_localisation_language->getLanguage($return_info[\'language_id\']);]]></search>\r\n        <ignoreif><![CDATA[$this->load->model(\'localisation/language\');]]></ignoreif>\r\n        <add position=\"before\"><![CDATA[				$this->load->model(\'localisation/language\');\r\n        ]]></add>\r\n    </operation>\r\n</file>\r\n\r\n<file path=\"admin/controller/sale/return.php\" email_template=\"admin.return_history\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[protected function getForm() {]]></search>\r\n		<add position=\"after\"><![CDATA[\r\n				$this->document->addScript(\'view/javascript/summernote/summernote.js\');\r\n				$this->document->addScript(\'view/javascript/summernote/opencart.js\');\r\n				$this->document->addStyle(\'view/javascript/summernote/summernote.css\');\r\n\r\n				$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n				$this->load->language(\'mail/return\');\r\n				$this->load->language(\'extension/module/emailtemplate/return\');\r\n\r\n				$data[\'entry_summary\'] = $this->language->get(\'entry_summary\');\r\n				$data[\'entry_template\'] = $this->language->get(\'entry_template\');\r\n				$data[\'text_select\'] = $this->language->get(\'text_select\');\r\n				$data[\'warning_template_content\'] = $this->language->get(\'warning_template_content\');\r\n\r\n				$templates = $this->model_extension_module_emailtemplate->getTemplates(array(\r\n					\'emailtemplate_key\' => \'admin.return_history\'\r\n				));\r\n\r\n				$data[\'template_options\'] = array();\r\n\r\n				foreach($templates as $row) {\r\n					$data[\'template_options\'][] = array(\r\n						\'value\' => $row[\'emailtemplate_id\'],\r\n						\'label\' => $row[\'emailtemplate_label\'] . (!empty($row[\'emailtemplate_default\']) ? strip_tags($this->language->get(\'text_default\')) : \'\')\r\n					);\r\n				}\r\n\r\n				$data[\'user_token\'] = $this->session->data[\'user_token\'];\r\n\r\n        		$data[\'summernote_language\'] = $this->language->get(\'summernote\');\r\n        		if ($data[\'summernote_language\'] == \'summernote\') $data[\'summernote_language\'] = \'en\';\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search><![CDATA[$data[\'order_id\'] = $return_info[\'order_id\'];]]></search>\r\n		<add position=\"after\"><![CDATA[\r\n				$this->load->model(\'sale/order\');\r\n\r\n				$order_info = $this->model_sale_order->getOrder($return_info[\'order_id\']);\r\n\r\n				if ($order_info) {\r\n					$data[\'language_id\'] = $order_info[\'language_id\'];\r\n					$data[\'store_id\'] = $order_info[\'store_id\'];\r\n				} else {\r\n					$data[\'language_id\'] = $this->config->get(\'config_language_id\');\r\n					$data[\'store_id\'] = 0;\r\n				}]]></add>\r\n	</operation>\r\n	<operation error=\"skip\">\r\n		<search><![CDATA[$data[\'comment\'] = $this->request->post[\'comment\'];]]></search>\r\n		<add position=\"replace\"><![CDATA[$data[\'comment\'] = html_entity_decode($this->request->post[\'comment\'], ENT_QUOTES, \'UTF-8\');]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search><![CDATA[$data[\'comment\'] = $return_info[\'comment\'];]]></search>\r\n		<add position=\"replace\"><![CDATA[$data[\'comment\'] = html_entity_decode($return_info[\'comment\'], ENT_QUOTES, \'UTF-8\');]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search><![CDATA[nl2br($result[\'comment\'])]]></search>\r\n		<add position=\"replace\"><![CDATA[html_entity_decode($result[\'comment\'], ENT_QUOTES, \'UTF-8\')]]></add>\r\n	</operation>\r\n</file>\r\n\r\n<file path=\"admin/view/template/sale/return_form.twig\" email_template=\"admin.return_history\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[id=\"input-history-comment\" class=\"form-control\"]]></search>\r\n		<add position=\"replace\"><![CDATA[id=\"input-history-comment\" class=\"form-control summernote\" data-lang=\"{{ summernote_language }}\" data-toggle=\"summernote\"]]></add>\r\n	</operation>\r\n	<operation error=\"skip\" info=\"Version conflict\">\r\n		<search index=\"0\"><![CDATA[<input type=\"checkbox\" name=\"notify\" value=\"1\" id=\"input-notify\"/>]]></search>\r\n		<add position=\"replace\"><![CDATA[<input type=\"checkbox\" name=\"notify\" value=\"1\" id=\"input-notify\" />]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[<input type=\"checkbox\" name=\"notify\" value=\"1\" id=\"input-notify\" />]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n          		  <div class=\"checkbox\"><label><input type=\"checkbox\" name=\"notify\" value=\"1\" id=\"input-notify\" data-toggle=\"collapse\" data-target=\".form-group-notify\" autocomplete=\"off\" /></label></div>\r\n                </div>\r\n              </div>\r\n\r\n              <div class=\"form-group form-group-notify collapse\">\r\n                <label class=\"col-sm-2 control-label\" for=\"input-templates\">{{ entry_template }}</label>\r\n                <div class=\"col-sm-10\">\r\n                  <select id=\"input-templates\" name=\"emailtemplate_id\" class=\"form-control\" autocomplete=\"off\">\r\n	 				<option value=\'\'>{{ text_select }}</option>\r\n	            	{% for item in template_options %}\r\n	            		<option value=\"{{ item.value }}\">{{ item.label }}</option>\r\n	            	{% endfor %}\r\n            	  </select>]]></add>\r\n	</operation>\r\n    <operation>\r\n		<search index=\"0\"><![CDATA[{{ footer }}]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n<script type=\"text/javascript\"><!--\r\n			(function($) {\r\n				$(document).ready(function() {\r\n			    	var $comment = $(\'#input-history-comment\');\r\n\r\n					$(\'select[name=emailtemplate_id]\').change(function() {\r\n						var val = $(this).val();\r\n						var $comment = $(\'#input-history-comment\');\r\n\r\n						if (!val || ($comment.val() != \'\' && $comment.val() != \'<p><br /></p>\' && !confirm(\"{{ warning_template_content }}\"))) return;\r\n\r\n						$.ajax({\r\n							url: \'index.php?route=extension/module/emailtemplate/fetch_template&output=comment&user_token={{ user_token }}\',\r\n							type: \'get\',\r\n							data: \'id=\' + val + \'&store_id={{ store_id }}\' + \'&language_id={{ language_id }}\' + \'&order_id={{ order_id }}\' + \'&return_id={{ return_id }}\',\r\n							dataType: \'html\',\r\n							success: function(html) {\r\n								if (typeof CKEDITOR !== \"undefined\" && CKEDITOR.instances[\"input-history-comment\"]) {\r\n								  CKEDITOR.instances[\"input-history-comment\"].setData(html);\r\n								} else if ($.fn.summernote) {\r\n                                    $comment.summernote(\'code\', html);\r\n                                } else {\r\n									$comment.val(html);\r\n								}\r\n							},\r\n							error: function(xhr, ajaxOptions, thrownError) {\r\n								console.log(thrownError + \"\\r\\n\" + xhr.statusText + \"\\r\\n\" + xhr.responseText);\r\n							}\r\n						});\r\n					});\r\n\r\n				});\r\n			})(jQuery);\r\n		//--></script>\r\n		]]></add>\r\n	</operation>\r\n    <operation>\r\n		<search index=\"0\"><![CDATA[$(\'#button-history\').on(\'click\', function(e) {]]></search>\r\n		<add position=\"after\"><![CDATA[\r\n	if (typeof CKEDITOR !== \"undefined\" && CKEDITOR.instances[\"input-history-comment\"]) {\r\n	  CKEDITOR.instances[\"input-history-comment\"].updateElement();\r\n	}\r\n\r\n	if ($(\"#input-history-comment\").val() == \'<br />\' || $(\"#input-history-comment\").val() == \'<p><br></p>\') {\r\n		$(\"#input-history-comment\").val(\'\');\r\n	}\r\n]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[\'&comment=\' + encodeURIComponent($(\'#tab-history textarea[name=\\\'comment\\\']\').val())]]></search>\r\n		<add position=\"replace\"><![CDATA[\'&comment=\' + encodeURIComponent($(\'#input-history-comment\').val()) + \'&show_summary=0\' + \'&emailtemplate_id=\' + encodeURIComponent($(\'select[name=\\\'emailtemplate_id\\\']\').val())]]></add>\r\n	</operation>\r\n    <operation>\r\n		<search index=\"0\"><![CDATA[$(\'#tab-history textarea[name=\\\'comment\\\']\').val(\'\');]]></search>\r\n		<add position=\"after\"><![CDATA[\r\n	  if (typeof CKEDITOR !== \"undefined\" && CKEDITOR.instances[\"input-history-comment\"]) {\r\n		CKEDITOR.instances[\"input-history-comment\"].setData(\'\');\r\n	  } else if ($.fn.summernote) {\r\n        $(\'#input-history-comment\').summernote(\'reset\');\r\n      }\r\n\r\n	  $(\'#input-templates\').each(function(){ this.selectedIndex = this.defaultSelected });]]></add>\r\n	</operation>\r\n</file>\r\n\r\n<file path=\"catalog/controller/account/return.php\" email_template=\"admin.return_history\">\r\n	<operation>\r\n		<search><![CDATA[nl2br($result[\'comment\'])]]></search>\r\n		<add position=\"replace\"><![CDATA[html_entity_decode($result[\'comment\'], ENT_QUOTES, \'UTF-8\')]]></add>\r\n	</operation>\r\n</file>\r\n\n\n<file path=\"admin/controller/sale/voucher.php\" email_template=\"admin.voucher\">\r\n	<operation>\r\n	    <search index=\"0,1\"><![CDATA[$mail->setHtml($this->load->view(\'mail/voucher\', $data));]]></search>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/voucher\', $data));]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n	    <add position=\"before\"><![CDATA[							// Prepare mail: admin.voucher\r\n	    					$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n							$template_load = array(\r\n							    \'key\' => \'admin.voucher\',\r\n							    \'customer_id\' => $order_info[\'customer_id\'],\r\n							    \'customer_group_id\' => $order_info[\'customer_group_id\'],\r\n							    \'language_id\' => $order_info[\'language_id\'],\r\n							    \'store_id\' => $order_info[\'store_id\'],\r\n                                \'payment_method\' => $order_info[\'payment_code\'],\r\n                                \'shipping_method\' => $order_info[\'shipping_code\']\r\n                            );\r\n\r\n							$template = $this->model_extension_module_emailtemplate->load($template_load, $data);\r\n\r\n                            if ($template) {\r\n                                $template->addData($order_info);\r\n\r\n                                $template->data[\'store_id\'] = $order_info[\'store_id\'];\r\n                                $template->data[\'language_id\'] = $order_info[\'language_id\'];\r\n\r\n                                $template->addData($voucher_info);\r\n\r\n                                $template->addData($voucher_theme_info);\r\n\r\n                                if ($voucher_theme_info[\'image\'] && file_exists(DIR_IMAGE . $voucher_theme_info[\'image\'])) {\r\n                                    $template->data[\'image\'] = $template->data[\'store_url\'] . \'image/\' . $voucher_theme_info[\'image\'];\r\n\r\n                                    list($template->data[\'image_width\'], $template->data[\'image_height\']) = getimagesize(DIR_IMAGE . $voucher_theme_info[\'image\']);\r\n                                }\r\n\r\n                                $template->data[\'amount\'] = $this->currency->format($voucher_info[\'amount\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']);\r\n\r\n                                $template->data[\'text_heading\'] = sprintf($template->data[\'text_heading\'], $template->data[\'store_name\']);\r\n\r\n                                $template->data[\'voucher_url\'] = $template->data[\'store_url\'];\r\n\r\n                                if (!empty($template->data[\'button_voucher_url\'])) {\r\n                                    $template->data[\'voucher_url_text\'] = $template->data[\'button_voucher_url\'];\r\n                                } else {\r\n                                    $template->data[\'voucher_url_text\'] = $template->data[\'voucher_url\'];\r\n                                }\r\n							}]]></add>\r\n	</operation>\r\n	<operation>\r\n	    <search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n	    <add position=\"replace\"><![CDATA[// Send mail: admin.voucher\r\n	    					if ($template && $template->check()) {\r\n	    					    $template->build();\r\n							    $template->hook($mail);\r\n                            }\r\n\r\n							$mail->send();\r\n\r\n							$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n	<operation>\r\n	    <search index=\"1\"><![CDATA[$mail = new Mail(]]></search>\r\n	    <add position=\"before\"><![CDATA[	    					$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n							$template_load = array(\'key\' => \'admin.voucher\');\r\n\r\n							$template = $this->model_extension_module_emailtemplate->load($template_load, $data);\r\n\r\n							if ($template) {\r\n                                $template->addData($voucher_info);\r\n\r\n                                $template->addData($voucher_theme_info);\r\n\r\n                                if ($voucher_theme_info[\'image\'] && file_exists(DIR_IMAGE . $voucher_theme_info[\'image\'])) {\r\n                                    $template->data[\'image\'] = $template->data[\'store_url\'] . \'image/\' . $voucher_theme_info[\'image\'];\r\n\r\n                                    list($template->data[\'image_width\'], $template->data[\'image_height\']) = getimagesize(DIR_IMAGE . $voucher_theme_info[\'image\']);\r\n                                }\r\n\r\n                                $template->data[\'amount\'] = $this->currency->format($voucher_info[\'amount\'], $this->config->get(\'config_currency\'), $this->currency->getValue($this->config->get(\'config_currency\')));\r\n\r\n                                $template->data[\'text_heading\'] = sprintf($template->data[\'text_heading\'], $template->data[\'store_name\']);\r\n\r\n                                $template->data[\'voucher_url\'] = $template->data[\'store_url\'];\r\n\r\n                                if (!empty($template->data[\'button_voucher_url\'])) {\r\n                                    $template->data[\'voucher_url_text\'] = $template->data[\'button_voucher_url\'];\r\n                                } else {\r\n                                    $template->data[\'voucher_url_text\'] = $template->data[\'voucher_url\'];\r\n                                }\r\n							    // Prepared mail: admin.voucher\r\n							}\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n	    <search index=\"1\"><![CDATA[$mail->send();]]></search>\r\n	    <add position=\"replace\"><![CDATA[if ($template) {\r\n	                            $template->build();\r\n							    $template->hook($mail);\r\n\r\n                                $mail->send();\r\n\r\n                                $this->model_extension_module_emailtemplate->sent();\r\n				            }]]></add>\r\n	</operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/mail/affiliate.php\" email_template=\"affiliate.register\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n		// Prepare mail: affiliate.register\r\n		$this->load->model(\'account/customer\');\r\n\r\n		if ($this->customer && $this->customer->isLogged()) {\r\n			$customer_id = $this->customer->getId();\r\n		} else {\r\n			$customer_id = $args[0];\r\n		}\r\n\r\n		$customer_info = $this->model_account_customer->getCustomer($customer_id);\r\n\r\n		if (!$customer_info) {\r\n			trigger_error(\'Unable to find customer: \' . $args[0][\'customer_id\']);\r\n			return false;\r\n		}\r\n\r\n		$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n		$template_load = array(\r\n		    \'key\' => \'affiliate.register\',\r\n		    \'customer_id\' => $customer_info[\'customer_id\'],\r\n		    \'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n		    \'language_id\' => $customer_info[\'language_id\'],\r\n		    \'store_id\' => $customer_info[\'store_id\']\r\n        );\r\n\r\n		$template = $this->model_extension_module_emailtemplate->load($template_load, $data);\r\n\r\n        if ($template) {\r\n            $template->addData($args[1], \'affiliate\');\r\n\r\n            $template->addData($customer_info, \'customer\');\r\n\r\n            $template->data[\'affiliate_login\'] = $this->url->link(\'affiliate/login\');\r\n\r\n            if (!empty($template->data[\'button_affiliate_login\'])) {\r\n                $template->data[\'affiliate_login_text\'] = $template->data[\'button_affiliate_login\'];\r\n            } else {\r\n                $template->data[\'affiliate_login_text\'] = $template->data[\'affiliate_login\'];\r\n            }\r\n\r\n            if (!empty($args[0][\'custom_field\'])) {\r\n                $this->load->model(\'account/custom_field\');\r\n\r\n                $custom_fields = $this->model_account_custom_field->getCustomFields($customer_group_id);\r\n\r\n                foreach ($custom_fields as $custom_field) {\r\n                        if (isset($args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']])) {\r\n                            $custom_field_key = \'custom_field_\' . ($custom_field[\'location\'] != \'account\' ? $custom_field[\'location\'] . \'_\' : \'\') . $custom_field[\'custom_field_id\'];\r\n                            $custom_field_value = $args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']];\r\n\r\n                            $template->data[$custom_field_key . \'_name\'] = $custom_field[\'name\'];\r\n                            $template->data[$custom_field_key . \'_value\'] = \'\';\r\n\r\n                            if ($custom_field[\'custom_field_value\']) {\r\n                                foreach ($custom_field[\'custom_field_value\'] as $custom_field_value_info) {\r\n                                    if (is_array($custom_field_value)) {\r\n                                        if (in_array($custom_field_value_info[\'custom_field_value_id\'], $custom_field_value)) {\r\n                                            $template->data[$custom_field_key . \'_value_\' . $custom_field_value_info[\'custom_field_value_id\']] = $custom_field_value_info[\'name\'];\r\n                                        }\r\n                                    } else {\r\n                                        if ($custom_field_value_info[\'custom_field_value_id\'] == $custom_field_value) {\r\n                                            $template->data[$custom_field_key . \'_value\'] = $custom_field_value_info[\'name\'];\r\n                                        }\r\n                                    }\r\n                                }\r\n                            } else {\r\n                                $template->data[$custom_field_key . \'_value\'] = $custom_field_value;\r\n                            }\r\n                        }\r\n                    }\r\n            }\r\n\r\n            $template->data[\'customer_group\'] = $customer_group_info[\'name\'];\r\n\r\n            if ($customer_group_info && ($this->config->get(\'config_affiliate_approval\') || $customer_group_info[\'approval\'])) {\r\n                $template->data[\'affiliate_text\'] = $this->language->get(\'text_approval\');\r\n            } else {\r\n                $template->data[\'affiliate_text\'] = $this->language->get(\'text_login\');\r\n            }\r\n            // Prepared mail: affiliate.register\r\n        }\r\n]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[// Send mail: affiliate.register\r\n		if ($template && $template->check()) {\r\n		    $template->build();\r\n		    $template->hook($mail);\r\n        }\r\n\r\n		$mail->send();\r\n\r\n		$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search index=\"0\"><![CDATA[$mail->setHtml($this->load->view(\'mail/affiliate\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/affiliate\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/affiliate\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/mail/affiliate.php\" email_template=\"affiliate.register\">\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n		// Prepare mail: affiliate.register_admin\r\n		$affiliate_info = $args[1];\r\n\r\n		if ($this->customer && $this->customer->isLogged()) {\r\n			$customer_id = $this->customer->getId();\r\n		} else {\r\n			$customer_id = $args[0];\r\n		}\r\n\r\n		$customer_info = $this->model_account_customer->getCustomer($customer_id);\r\n\r\n		if (!$customer_info) {\r\n			trigger_error(\'Unable to find customer: \' . $args[0][\'customer_id\']);\r\n			return false;\r\n		}\r\n\r\n		// Load template\r\n		$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n		$template_load = array(\r\n		    \'key\' => \'affiliate.register_admin\',\r\n		    \'customer_id\' => $customer_info[\'customer_id\'],\r\n		    \'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n		    \'language_id\' => $customer_info[\'language_id\'],\r\n		    \'store_id\' => $customer_info[\'store_id\']\r\n        );\r\n\r\n		$template = $this->model_extension_module_emailtemplate->load($template_load, $data);\r\n\r\n        if ($template) {\r\n            // Add data to: affiliate.register_admin\r\n            $template->addData($args[1], \'affiliate\');\r\n\r\n            $template->addData($customer_info, \'customer\');\r\n\r\n            $template->data[\'affiliate_login\'] = $this->url->link(\'affiliate/login\');\r\n\r\n            if (!empty($template->data[\'button_affiliate_login\'])) {\r\n                $template->data[\'affiliate_login_text\'] = $template->data[\'button_affiliate_login\'];\r\n            } else {\r\n                $template->data[\'affiliate_login_text\'] = $template->data[\'affiliate_login\'];\r\n            }\r\n\r\n            if (!empty($args[0][\'custom_field\'])) {\r\n                $this->load->model(\'account/custom_field\');\r\n\r\n                $custom_fields = $this->model_account_custom_field->getCustomFields($customer_group_id);\r\n\r\n                foreach ($custom_fields as $custom_field) {\r\n                    if (isset($args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']])) {\r\n                        $custom_field_key = \'custom_field_\' . ($custom_field[\'location\'] != \'account\' ? $custom_field[\'location\'] . \'_\' : \'\') . $custom_field[\'custom_field_id\'];\r\n                        $custom_field_value = $args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']];\r\n\r\n                        $template->data[$custom_field_key . \'_name\'] = $custom_field[\'name\'];\r\n                        $template->data[$custom_field_key . \'_value\'] = \'\';\r\n\r\n                        if ($custom_field[\'custom_field_value\']) {\r\n                            foreach ($custom_field[\'custom_field_value\'] as $custom_field_value_info) {\r\n                                if (is_array($custom_field_value)) {\r\n                                    if (in_array($custom_field_value_info[\'custom_field_value_id\'], $custom_field_value)) {\r\n                                        $template->data[$custom_field_key . \'_value_\' . $custom_field_value_info[\'custom_field_value_id\']] = $custom_field_value_info[\'name\'];\r\n                                    }\r\n                                } else {\r\n                                    if ($custom_field_value_info[\'custom_field_value_id\'] == $custom_field_value) {\r\n                                        $template->data[$custom_field_key . \'_value\'] = $custom_field_value_info[\'name\'];\r\n                                    }\r\n                                }\r\n                            }\r\n                        } else {\r\n                            $template->data[$custom_field_key . \'_value\'] = $custom_field_value;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            $template->data[\'customer_group\'] = $customer_group_info[\'name\'];\r\n\r\n            if (defined(\'HTTP_ADMIN\')) {\r\n                $admin_url = HTTP_ADMIN;\r\n            } elseif ($this->config->get(\'config_ssl\')) {\r\n                $admin_url = $this->config->get(\'config_ssl\') . \'admin/\';\r\n            } else {\r\n                $admin_url = $this->config->get(\'config_url\') . \'admin/\';\r\n            }\r\n\r\n            if ($customer_group_info && ($this->config->get(\'config_affiliate_approval\') || $customer_group_info[\'approval\'])) {\r\n                $template->data[\'subject\'] = $template->data[\'text_approve_subject_admin\'];\r\n\r\n                $template->data[\'affiliate_link\'] = $admin_url . \'index.php?route=customer/customer_approval&filter_type=affiliate&filter_email=\' . $customer_info[\'email\'];\r\n\r\n                $template->data[\'status\'] = $template->data[\'text_admin_approve\'];\r\n            } else {\r\n                $template->data[\'subject\'] = $template->data[\'text_subject_admin\'];\r\n\r\n                $template->data[\'affiliate_link\'] = $admin_url . \'index.php?route=customer/customer/edit&customer_id=\' . $affiliate_info[\'customer_id\'];\r\n\r\n                $template->data[\'status\'] = $template->data[$affiliate_info[\'status\'] ? \'text_enabled\' : \'text_disabled\'];\r\n            }\r\n\r\n            if (isset($template->data[\'button_affiliate_link\']) && $template->data[\'button_affiliate_link\'] != \'button_affiliate_link\') {\r\n                $template->data[\'affiliate_link_text\'] =  $template->data[\'button_affiliate_link\'];\r\n            } else {\r\n                $template->data[\'affiliate_link_text\'] =  $template->data[\'affiliate_link\'];\r\n            }\r\n		    // Prepared mail: affiliate.register_admin\r\n		}\r\n]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[// Send mail: affiliate.register_admin\r\n			if ($template && $template->check()) {\r\n			    $template->build();\r\n			    $template->hook($mail);\r\n            }\r\n\r\n			$mail->send();\r\n\r\n			$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search index=\"0\"><![CDATA[$mail->setHtml($this->load->view(\'mail/affiliate_alert\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/affiliate_alert\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/affiliate_alert\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/mail/forgotten.php\" email_template=\"customer.forgotten\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[			// Prepare mail: customer.forgotten\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$this->load->model(\'account/customer\');\r\n\r\n			$customer_info = $this->model_account_customer->getCustomerByEmail($args[0]);\r\n\r\n			$template_load = array(\'key\' => \'customer.forgotten\');\r\n\r\n			if ($customer_info) {\r\n				$template_load[\'customer_id\'] = $customer_info[\'customer_id\'];\r\n				$template_load[\'customer_group_id\'] = $customer_info[\'customer_group_id\'];\r\n				$template_load[\'language_id\'] = $customer_info[\'language_id\'];\r\n			}\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load, $data);\r\n\r\n            if ($template) {\r\n                if (isset($this->request->post[\'email\'])) {\r\n                    $template->addData($this->request->post[\'email\']);\r\n                }\r\n\r\n                if ($customer_info) {\r\n                    $template->addData($customer_info, \'customer\');\r\n                }\r\n\r\n                if (!empty($template->data[\'text_greeting\'])) {\r\n                    $template->data[\'text_greeting\'] = sprintf($template->data[\'text_greeting\'], $template->data[\'store_name\']);\r\n                }\r\n\r\n                if (isset($template->data[\'text_ip\'])) {\r\n                    $template->data[\'text_ip\'] = sprintf($template->data[\'text_ip\'], $this->request->server[\'REMOTE_ADDR\']);\r\n                }\r\n\r\n                $template->data[\'password_link\'] = $this->url->link(\'account/reset\', \'email=\' . urlencode($args[0]) . \'&code=\' . $args[1]);\r\n\r\n                if (!empty($template->data[\'button_password_link\'])) {\r\n                    $template->data[\'password_link_text\'] = $template->data[\'button_password_link\'];\r\n                } else {\r\n                    $template->data[\'password_link_text\'] = $template->data[\'password_link\'];\r\n                }\r\n\r\n                $template->data[\'account_login\'] = $this->url->link(\'account/login\');\r\n\r\n                if (!empty($template->data[\'button_account_login\'])) {\r\n                    $template->data[\'account_login_text\'] = $template->data[\'button_account_login\'];\r\n                } else {\r\n                    $template->data[\'account_login_text\'] = $template->data[\'account_login\'];\r\n                }\r\n			    // Prepared mail: customer.forgotten\r\n            }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[// Send mail: customer.forgotten\r\n			if ($template && $template->check()) {\r\n			    $template->build();\r\n			    $template->hook($mail);\r\n\r\n                $mail->send();\r\n\r\n                $this->model_extension_module_emailtemplate->sent();\r\n            }]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search index=\"0\"><![CDATA[$mail->setHtml($this->load->view(\'mail/forgotten\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/forgotten\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/forgotten\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/mail/register.php\" email_template=\"customer.register\">\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[public function index(]]></search>\r\n        <ignoreif><![CDATA[if ($this->request->get[\'route\'] == \'affiliate/register\') {]]></ignoreif>\r\n        <add position=\"after\"><![CDATA[        if ($this->request->get[\'route\'] == \'affiliate/register\') {\r\n            return null;\r\n        }\r\n        ]]></add>\r\n    </operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n			// Prepare mail: customer.register\r\n			$this->load->model(\'account/customer\');\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$this->load->language(\'extension/module/emailtemplate/customer\');\r\n\r\n			if (!empty($args[0][\'customer_id\'])) {\r\n				$customer_info = $this->model_account_customer->getCustomer($args[0][\'customer_id\']);\r\n			} else {\r\n				$customer_info = $this->model_account_customer->getCustomerByEmail($args[0][\'email\']);\r\n			}\r\n\r\n			if (empty($customer_info)) {\r\n                trigger_error(\'Unable to find customer by email: \' . $args[0][\'email\']);\r\n                return false;\r\n            }\r\n\r\n			$template_load = array(\r\n			    \'key\' => \'customer.register\',\r\n			    \'customer_id\' => $customer_info[\'customer_id\'],\r\n			    \'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n			    \'language_id\' => $customer_info[\'language_id\'],\r\n			    \'store_id\' => $customer_info[\'store_id\']\r\n            );\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n                $template->addData($args[0]);\r\n\r\n                $template->addData($customer_info, \'customer\');\r\n\r\n                $template->data[\'newsletter\'] = $this->language->get((isset($args[0][\'newsletter\']) && $args[0][\'newsletter\'] == 1) ? \'text_yes\' : \'text_no\');\r\n\r\n                $template->data[\'account_login\'] = $this->url->link(\'account/login\');\r\n\r\n                if (!empty($template->data[\'button_account_login\'])) {\r\n                    $template->data[\'account_login_text\'] = $template->data[\'button_account_login\'];\r\n                } else {\r\n                    $template->data[\'account_login_text\'] = $template->data[\'account_login\'];\r\n                }\r\n\r\n                if (!empty($args[0][\'custom_field\'])) {\r\n                    $this->load->model(\'account/custom_field\');\r\n\r\n                    $custom_fields = $this->model_account_custom_field->getCustomFields($customer_group_id);\r\n\r\n                    foreach ($custom_fields as $custom_field) {\r\n                        if (isset($args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']])) {\r\n                            $custom_field_key = \'custom_field_\' . ($custom_field[\'location\'] != \'account\' ? $custom_field[\'location\'] . \'_\' : \'\') . $custom_field[\'custom_field_id\'];\r\n                            $custom_field_value = $args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']];\r\n\r\n                            $template->data[$custom_field_key . \'_name\'] = $custom_field[\'name\'];\r\n                            $template->data[$custom_field_key . \'_value\'] = \'\';\r\n\r\n                            if ($custom_field[\'custom_field_value\']) {\r\n                                foreach ($custom_field[\'custom_field_value\'] as $custom_field_value_info) {\r\n                                    if (is_array($custom_field_value)) {\r\n                                        if (in_array($custom_field_value_info[\'custom_field_value_id\'], $custom_field_value)) {\r\n                                            $template->data[$custom_field_key . \'_value_\' . $custom_field_value_info[\'custom_field_value_id\']] = $custom_field_value_info[\'name\'];\r\n                                        }\r\n                                    } else {\r\n                                        if ($custom_field_value_info[\'custom_field_value_id\'] == $custom_field_value) {\r\n                                            $template->data[$custom_field_key . \'_value\'] = $custom_field_value_info[\'name\'];\r\n                                        }\r\n                                    }\r\n                                }\r\n                            } else {\r\n                                $template->data[$custom_field_key . \'_value\'] = $custom_field_value;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                $template->data[\'customer_group\'] = $customer_group_info[\'name\'];\r\n\r\n                if ($customer_group_info[\'approval\']) {\r\n                    $template->data[\'customer_text\'] = $this->language->get(\'text_approval\');\r\n                } else {\r\n                    $template->data[\'customer_text\'] = $this->language->get(\'text_login\');\r\n                }\r\n\r\n                if (!empty($customer_info[\'address_id\'])) {\r\n                    $this->load->model(\'account/address\');\r\n\r\n                    $address = $this->model_account_address->getAddress($customer_info[\'address_id\']);\r\n\r\n                    if ($address) {\r\n                        $country = \'\';\r\n                        $iso_code_2 = \'\';\r\n                        $iso_code_3 = \'\';\r\n                        $address_format = \'\';\r\n                        $zone = \'\';\r\n                        $zone_code = \'\';\r\n\r\n                        if (!empty($address[\'country_id\'])) {\r\n                            $this->load->model(\'localisation/country\');\r\n\r\n                            $country_info = $this->model_localisation_country->getCountry($address[\'country_id\']);\r\n\r\n                            if ($country_info) {\r\n                                $country = $country_info[\'name\'];\r\n                                $iso_code_2 = $country_info[\'iso_code_2\'];\r\n                                $iso_code_3 = $country_info[\'iso_code_3\'];\r\n                                $address_format = $country_info[\'address_format\'];\r\n                            }\r\n                        }\r\n\r\n                        if (!empty($address[\'zone_id\'])) {\r\n                            $this->load->model(\'localisation/zone\');\r\n\r\n                            $zone_info = $this->model_localisation_zone->getZone($address[\'zone_id\']);\r\n\r\n                            if ($zone_info) {\r\n                                $zone = $zone_info[\'name\'];\r\n                                $zone_code = $zone_info[\'code\'];\r\n                            }\r\n                        }\r\n\r\n                        $address_data = array(\r\n                            \'address_id\'     => $customer_info[\'address_id\'],\r\n                            \'firstname\'      => $address[\'firstname\'],\r\n                            \'lastname\'       => $address[\'lastname\'],\r\n                            \'company\'        => $address[\'company\'],\r\n                            \'address_1\'      => $address[\'address_1\'],\r\n                            \'address_2\'      => $address[\'address_2\'],\r\n                            \'postcode\'       => $address[\'postcode\'],\r\n                            \'city\'           => $address[\'city\'],\r\n                            \'zone_id\'        => $address[\'zone_id\'],\r\n                            \'zone\'           => $zone,\r\n                            \'zone_code\'      => $zone_code,\r\n                            \'country_id\'     => $address[\'country_id\'],\r\n                            \'country\'        => $country,\r\n                            \'iso_code_2\'     => $iso_code_2,\r\n                            \'iso_code_3\'     => $iso_code_3\r\n                        );\r\n\r\n                        $find = array();\r\n                        $replace = array();\r\n\r\n                        foreach(array_keys($address_data) as $key) {\r\n                            $find[$key] = \'{\'.$key.\'}\';\r\n                            $replace[$key] =  $address_data[$key];\r\n                        }\r\n\r\n                        if (isset($address[\'custom_field\']) && is_array($address[\'custom_field\'])) {\r\n                            foreach ($address[\'custom_field\'] as $custom_field_id => $custom_field) {\r\n                                $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                                $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : \'\';\r\n                            }\r\n                        }\r\n\r\n                        if (!$address_format) {\r\n                            $address_format = \'{firstname} {lastname}\' . \"\\n\" . \'{company}\' . \"\\n\" . \'{address_1}\' . \"\\n\" . \'{address_2}\' . \"\\n\" . \'{city} {postcode}\' . \"\\n\" . \'{zone}\' . \"\\n\" . \'{country}\';\r\n                        }\r\n\r\n                        $template->data[\'address\'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \'<br />\', preg_replace(array(\"/\\s\\s+/\", \"/\\r\\r+/\", \"/\\n\\n+/\"), \'<br />\', trim(str_replace($find, $replace, $address_format))));\r\n                        $template->data[\'address_zone\'] = $zone;\r\n                        $template->data[\'address_country\'] = $country;\r\n                    }\r\n                }\r\n			    // Prepared mail: customer.register\r\n			}\r\n	]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[// Send mail: customer.register\r\n			if ($template && $template->check()) {\r\n			    $template->build();\r\n			    $template->hook($mail);\r\n\r\n                $mail->send();\r\n\r\n                $this->model_extension_module_emailtemplate->sent();\r\n            }]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/register\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/register\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/register\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/mail/register.php\" email_template=\"customer.register_admin\">\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[public function index(]]></search>\r\n        <ignoreif><![CDATA[if ($this->request->get[\'route\'] == \'affiliate/register\') {]]></ignoreif>\r\n        <add position=\"after\"><![CDATA[        if ($this->request->get[\'route\'] == \'affiliate/register\') {\r\n            return null;\r\n        }\r\n        ]]></add>\r\n    </operation>\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[		// Prepare mail: customer.register_admin\r\n		$this->load->model(\'account/customer\');\r\n		$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n		$this->load->language(\'extension/module/emailtemplate/customer\');\r\n\r\n		if (!empty($args[0][\'customer_id\'])) {\r\n			$customer_info = $this->model_account_customer->getCustomer($args[0][\'customer_id\']);\r\n		} else {\r\n			$customer_info = $this->model_account_customer->getCustomerByEmail($args[0][\'email\']);\r\n		}\r\n\r\n		if (empty($customer_info)) {\r\n            trigger_error(\'Unable to find customer by email: \' . $args[0][\'email\']);\r\n            return false;\r\n        }\r\n\r\n		$template_load = array(\r\n		    \'key\' => \'customer.register_admin\',\r\n            \'customer_id\' => $customer_info[\'customer_id\'],\r\n            \'customer_group_id\' => $customer_info[\'customer_group_id\'],\r\n            \'language_id\' => $customer_info[\'language_id\'],\r\n            \'store_id\' => $customer_info[\'store_id\']\r\n        );\r\n\r\n		$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n        if ($template) {\r\n            $template->addData($args[0]);\r\n\r\n            $template->addData($customer_info, \'customer\');\r\n\r\n            $template->data[\'newsletter\'] = $this->language->get((isset($args[0][\'newsletter\']) && $args[0][\'newsletter\'] == 1) ? \'text_yes\' : \'text_no\');\r\n\r\n            if (!empty($args[0][\'custom_field\'])) {\r\n                $this->load->model(\'account/custom_field\');\r\n\r\n                $custom_fields = $this->model_account_custom_field->getCustomFields($customer_group_id);\r\n\r\n                foreach ($custom_fields as $custom_field) {\r\n                    if (isset($args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']])) {\r\n                        $custom_field_key = \'custom_field_\' . ($custom_field[\'location\'] != \'account\' ? $custom_field[\'location\'] . \'_\' : \'\') . $custom_field[\'custom_field_id\'];\r\n                        $custom_field_value = $args[0][\'custom_field\'][$custom_field[\'location\']][$custom_field[\'custom_field_id\']];\r\n\r\n                        $template->data[$custom_field_key . \'_name\'] = $custom_field[\'name\'];\r\n                        $template->data[$custom_field_key . \'_value\'] = \'\';\r\n\r\n                        if ($custom_field[\'custom_field_value\']) {\r\n                            foreach ($custom_field[\'custom_field_value\'] as $custom_field_value_info) {\r\n                                if (is_array($custom_field_value)) {\r\n                                    if (in_array($custom_field_value_info[\'custom_field_value_id\'], $custom_field_value)) {\r\n                                        $template->data[$custom_field_key . \'_value_\' . $custom_field_value_info[\'custom_field_value_id\']] = $custom_field_value_info[\'name\'];\r\n                                    }\r\n                                } else {\r\n                                    if ($custom_field_value_info[\'custom_field_value_id\'] == $custom_field_value) {\r\n                                        $template->data[$custom_field_key . \'_value\'] = $custom_field_value_info[\'name\'];\r\n                                    }\r\n                                }\r\n                            }\r\n                        } else {\r\n                            $template->data[$custom_field_key . \'_value\'] = $custom_field_value;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (!empty($args[0][\'address_1\'])) {\r\n                $country = \'\';\r\n                $iso_code_2 = \'\';\r\n                $iso_code_3 = \'\';\r\n                $address_format = \'\';\r\n                $zone = \'\';\r\n                $zone_code = \'\';\r\n\r\n                if (!empty($args[0][\'country_id\'])) {\r\n                    $this->load->model(\'localisation/country\');\r\n\r\n                    $country_info = $this->model_localisation_country->getCountry($args[0][\'country_id\']);\r\n\r\n                    if ($country_info) {\r\n                        $country = $country_info[\'name\'];\r\n                        $iso_code_2 = $country_info[\'iso_code_2\'];\r\n                        $iso_code_3 = $country_info[\'iso_code_3\'];\r\n                        $address_format = $country_info[\'address_format\'];\r\n                    }\r\n                }\r\n\r\n                if (!empty($args[0][\'zone_id\'])) {\r\n                    $this->load->model(\'localisation/zone\');\r\n\r\n                    $zone_info = $this->model_localisation_zone->getZone($args[0][\'zone_id\']);\r\n\r\n                    if ($zone_info) {\r\n                        $zone = $zone_info[\'name\'];\r\n                        $zone_code = $zone_info[\'code\'];\r\n                    }\r\n                }\r\n\r\n                $address_data = array(\r\n                    \'firstname\'      => $args[0][\'firstname\'],\r\n                    \'lastname\'       => $args[0][\'lastname\'],\r\n                    \'company\'        => $args[0][\'company\'],\r\n                    \'address_1\'      => $args[0][\'address_1\'],\r\n                    \'address_2\'      => $args[0][\'address_2\'],\r\n                    \'postcode\'       => $args[0][\'postcode\'],\r\n                    \'city\'           => $args[0][\'city\'],\r\n                    \'zone_id\'        => $args[0][\'zone_id\'],\r\n                    \'zone\'           => $zone,\r\n                    \'zone_code\'      => $zone_code,\r\n                    \'country_id\'     => $args[0][\'country_id\'],\r\n                    \'country\'        => $country,\r\n                    \'iso_code_2\'     => $iso_code_2,\r\n                    \'iso_code_3\'     => $iso_code_3\r\n                );\r\n\r\n                $find = array();\r\n                $replace = array();\r\n\r\n                foreach(array_keys($address_data) as $key) {\r\n                    $find[$key] = \'{\'.$key.\'}\';\r\n                    $replace[$key] =  $address_data[$key];\r\n                }\r\n\r\n                if (isset($address[\'custom_field\']) && is_array($address[\'custom_field\'])) {\r\n                    foreach ($address[\'custom_field\'] as $custom_field_id => $custom_field) {\r\n                        $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                        $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : \'\';\r\n                    }\r\n                }\r\n\r\n                if (!$address_format) {\r\n                    $address_format = \'{firstname} {lastname}\' . \"\\n\" . \'{company}\' . \"\\n\" . \'{address_1}\' . \"\\n\" . \'{address_2}\' . \"\\n\" . \'{city} {postcode}\' . \"\\n\" . \'{zone}\' . \"\\n\" . \'{country}\';\r\n                }\r\n\r\n                $template->data[\'address\'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \'<br />\', preg_replace(array(\"/\\s\\s+/\", \"/\\r\\r+/\", \"/\\n\\n+/\"), \'<br />\', trim(str_replace($find, $replace, $address_format))));\r\n                $template->data[\'address_zone\'] = $zone;\r\n                $template->data[\'address_country\'] = $country;\r\n            }\r\n\r\n            if (!empty($customer_info[\'address_id\'])) {\r\n                $this->load->model(\'account/address\');\r\n\r\n                $address = $this->model_account_address->getAddress($customer_info[\'address_id\']);\r\n\r\n                if ($address) {\r\n                    $country = \'\';\r\n                    $iso_code_2 = \'\';\r\n                    $iso_code_3 = \'\';\r\n                    $address_format = \'\';\r\n                    $zone = \'\';\r\n                    $zone_code = \'\';\r\n\r\n                    if (!empty($address[\'country_id\'])) {\r\n                        $this->load->model(\'localisation/country\');\r\n\r\n                        $country_info = $this->model_localisation_country->getCountry($address[\'country_id\']);\r\n\r\n                        if ($country_info) {\r\n                            $country = $country_info[\'name\'];\r\n                            $iso_code_2 = $country_info[\'iso_code_2\'];\r\n                            $iso_code_3 = $country_info[\'iso_code_3\'];\r\n                            $address_format = $country_info[\'address_format\'];\r\n                        }\r\n                    }\r\n\r\n                    if (!empty($address[\'zone_id\'])) {\r\n                        $this->load->model(\'localisation/zone\');\r\n\r\n                        $zone_info = $this->model_localisation_zone->getZone($address[\'zone_id\']);\r\n\r\n                        if ($zone_info) {\r\n                            $zone = $zone_info[\'name\'];\r\n                            $zone_code = $zone_info[\'code\'];\r\n                        }\r\n                    }\r\n\r\n                    $address_data = array(\r\n                        \'address_id\'     => $customer_info[\'address_id\'],\r\n                        \'firstname\'      => $address[\'firstname\'],\r\n                        \'lastname\'       => $address[\'lastname\'],\r\n                        \'company\'        => $address[\'company\'],\r\n                        \'address_1\'      => $address[\'address_1\'],\r\n                        \'address_2\'      => $address[\'address_2\'],\r\n                        \'postcode\'       => $address[\'postcode\'],\r\n                        \'city\'           => $address[\'city\'],\r\n                        \'zone_id\'        => $address[\'zone_id\'],\r\n                        \'zone\'           => $zone,\r\n                        \'zone_code\'      => $zone_code,\r\n                        \'country_id\'     => $address[\'country_id\'],\r\n                        \'country\'        => $country,\r\n                        \'iso_code_2\'     => $iso_code_2,\r\n                        \'iso_code_3\'     => $iso_code_3\r\n                    );\r\n\r\n                    $find = array();\r\n                    $replace = array();\r\n\r\n                    foreach(array_keys($address_data) as $key) {\r\n                        $find[$key] = \'{\'.$key.\'}\';\r\n                        $replace[$key] =  $address_data[$key];\r\n                    }\r\n\r\n                    if (isset($address[\'custom_field\']) && is_array($address[\'custom_field\'])) {\r\n                        foreach ($address[\'custom_field\'] as $custom_field_id => $custom_field) {\r\n                            $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                            $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : \'\';\r\n                        }\r\n                    }\r\n\r\n                    if (!$address_format) {\r\n                        $address_format = \'{firstname} {lastname}\' . \"\\n\" . \'{company}\' . \"\\n\" . \'{address_1}\' . \"\\n\" . \'{address_2}\' . \"\\n\" . \'{city} {postcode}\' . \"\\n\" . \'{zone}\' . \"\\n\" . \'{country}\';\r\n                    }\r\n\r\n                    $template->data[\'address\'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \'<br />\', preg_replace(array(\"/\\s\\s+/\", \"/\\r\\r+/\", \"/\\n\\n+/\"), \'<br />\', trim(str_replace($find, $replace, $address_format))));\r\n                    $template->data[\'address_zone\'] = $zone;\r\n                    $template->data[\'address_country\'] = $country;\r\n                }\r\n            }\r\n\r\n            $template->data[\'customer_group\'] = $customer_group_info[\'name\'];\r\n\r\n            if (defined(\'HTTP_ADMIN\')) {\r\n                $admin_url = HTTP_ADMIN;\r\n            } elseif ($this->config->get(\'config_ssl\')) {\r\n                $admin_url = $this->config->get(\'config_ssl\') . \'admin/\';\r\n            } else {\r\n                $admin_url = $this->config->get(\'config_url\') . \'admin/\';\r\n            }\r\n\r\n            if ($customer_group_info[\'approval\']) {\r\n                $template->data[\'customer_link\'] = $admin_url . \'index.php?route=customer/customer_approval&filter_email=\' . $customer_info[\'email\'];\r\n\r\n                $template->data[\'text_register_subject_admin\'] = $template->data[\'text_register_approve_subject_admin\'];\r\n\r\n                $template->data[\'text_admin_heading\'] = $template->data[\'text_customer_approve\'];\r\n\r\n                $template->data[\'status\'] = $this->language->get(\'text_admin_approve\');\r\n            } else {\r\n                $template->data[\'customer_link\'] = $admin_url . \'index.php?route=customer/customer/edit&customer_id=\' . $customer_info[\'customer_id\'];\r\n\r\n                $template->data[\'text_register_subject_admin\'] = $template->data[\'text_register_subject_admin\'];\r\n\r\n                $template->data[\'text_admin_heading\'] = $template->data[\'text_new_customer\'];\r\n\r\n                $template->data[\'status\'] = $this->language->get($customer_info[\'status\'] ? \'text_enabled\' : \'text_disabled\');\r\n            }\r\n\r\n            $template->data[\'text_customer_link\'] = $template->data[\'text_customer_link\'];\r\n\r\n            if (isset($template->data[\'button_customer_link\']) && $template->data[\'button_customer_link\'] != \'button_customer_link\') {\r\n                $template->data[\'customer_link_text\'] =  $template->data[\'button_customer_link\'];\r\n            } else {\r\n                $template->data[\'customer_link_text\'] =  $template->data[\'customer_link\'];\r\n            }\r\n		    // Prepared mail: customer.register_admin\r\n		}\r\n	]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[// Send mail: customer.register_admin\r\n			if ($template && $template->check()) {\r\n			    $template->build();\r\n			    $template->fetch();\r\n			    $template->hook($mail);\r\n            }\r\n\r\n			$mail->send();\r\n\r\n			$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/register_alert\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/register_alert\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/register_alert\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/information/contact.php\" email_template=\"information.contact\">\r\n  <operation>\r\n    <search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n    <add position=\"before\"><![CDATA[			// Prepare mail: information.contact\r\n          $this->load->model(\'extension/module/emailtemplate\');\r\n\r\n          $template_load = array(\r\n            \'key\' => \'information.contact\',\r\n            \'email\' => $this->request->post[\'email\']\r\n          );\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n				//$template->addData($this->request->post);\r\n\r\n				$template->data[\'name\'] = html_entity_decode($this->request->post[\'name\'], ENT_QUOTES, \'UTF-8\');\r\n\r\n				$template->data[\'email\'] = $this->request->post[\'email\'];\r\n\r\n				if (!empty($this->request->post[\'enquiry\'])) {\r\n				  $template->data[\'enquiry\'] = html_entity_decode(str_replace(\"\\n\", \"<br />\", $this->request->post[\'enquiry\']), ENT_QUOTES, \'UTF-8\');\r\n				}\r\n\r\n				if (isset($template->data[\'text_ip\'])) {\r\n                    $template->data[\'text_ip\'] = sprintf($template->data[\'text_ip\'], $this->request->server[\'REMOTE_ADDR\']);\r\n                }\r\n\r\n				if (!empty($customer_info)) {\r\n				  $template->data[\'customer\'] = $customer_info;\r\n				}\r\n\r\n				if (defined(\'HTTP_ADMIN\')) {\r\n					$admin_url = HTTP_ADMIN;\r\n				} else {\r\n					$admin_url = HTTPS_SERVER . \'admin/\';\r\n				}\r\n\r\n				if (!empty($customer_info[\'customer_id\'])) {\r\n				  $template->data[\'admin_customer_url\'] = $admin_url . \'index.php?route=customer/customer/edit&customer_id=\' . $customer_info[\'customer_id\'];\r\n				}\r\n                // Prepared mail: information.contact\r\n    ]]></add>\r\n  </operation>\r\n  <operation>\r\n    <search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n    <add position=\"replace\"><![CDATA[// Send mail: information.contact\r\n			    if ($template && $template->check()) {\r\n			      $mail->setReplyTo($template->data[\'email\'], $template->data[\'name\']);\r\n\r\n			      $template->build();\r\n			      $template->hook($mail);\r\n\r\n                  $mail->send();\r\n\r\n                  $this->model_extension_module_emailtemplate->sent();\r\n                }\r\n            }]]></add>\r\n  </operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/information/contact.php\" email_template=\"information.contact_customer\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$this->response->redirect($this->url->link(\'information/contact/success\']]></search>\r\n		<add position=\"before\"><![CDATA[			// Prepare mail: information.contact_customer\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\r\n			    \'key\' => \'information.contact_customer\',\r\n			    \'email\' => $this->request->post[\'email\']\r\n            );\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n			if ($template) {\r\n				//$template->addData($this->request->post);\r\n\r\n				$template->data[\'name\'] = html_entity_decode($this->request->post[\'name\'], ENT_QUOTES, \'UTF-8\');\r\n\r\n				$template->data[\'email\'] = $this->request->post[\'email\'];\r\n\r\n				if (!empty($this->request->post[\'enquiry\'])) {\r\n					$template->data[\'enquiry\'] = html_entity_decode(str_replace(\"\\n\", \"<br />\", $this->request->post[\'enquiry\']), ENT_QUOTES, \'UTF-8\');\r\n				}\r\n\r\n				if (!empty($customer_info)) {\r\n					$template->data[\'customer\'] = $customer_info;\r\n				}\r\n				// Prepared mail: information.contact_customer\r\n\r\n				// Send mail: information.contact_customer\r\n                if ($template && $template->check()) {\r\n                	$template->build();\r\n                	$template->hook($mail);\r\n\r\n					$mail->send();\r\n\r\n					$this->model_extension_module_emailtemplate->sent();\r\n				}\r\n			}\r\n		]]></add>\r\n	</operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/journal3/form.php\" error=\"skip\">\n    <operation>\n        <search index=\"0\"><![CDATA[$params = array(]]></search>\n        <add position=\"after\"><![CDATA[					\'emailtemplate_key\' => \'journal.form.\' . $this->module_id,\n					\'email_data\' => $email_data,]]></add>\n    </operation>\n    <operation>\n        <search index=\"0\"><![CDATA[$this->load->controller(\'journal3/mail/send\', $params);]]></search>\n        <add position=\"after\"><![CDATA[\n				// Admin mail\n				$admin_template_key = \'journal.form_admin.\' . $this->module_id;\n				$admin_template = $this->model_extension_module_emailtemplate->load($admin_template_key);\n\n				if ($admin_template) {\n					$params[\'emailtemplate_key\'] = $admin_template_key;\n\n					$this->load->controller(\'journal3/mail/send\', $params);\n				}]]></add>\n    </operation>\n</file>\n\n<file path=\"catalog/controller/journal3/mail.php\" error=\"skip\">\n<operation>\n    <search index=\"0\"><![CDATA[$mail->setTo(]]></search>\n    <ignoreif><![CDATA[$this->load->model(\'extension/module/emailtemplate\');]]></ignoreif>\n    <add position=\"before\"><![CDATA[        if (!empty($data[\'emailtemplate_key\'])) {\n            $this->load->model(\'extension/module/emailtemplate\');\n\n            if (isset($data[\'email_data\'])) {\n                $template_data = $data[\'email_data\'];\n            } else {\n                $template_data = $data;\n            }\n\n            $template = $this->model_extension_module_emailtemplate->load($data[\'emailtemplate_key\'], $template_data);\n\n            if (!$template) {\n                // Remove key .index\n                $emailtemplate_key = preg_replace(\'/.[0-9]*$/\', \'\', $data[\'emailtemplate_key\']);\n\n                if ($emailtemplate_key && $emailtemplate_key != $data[\'emailtemplate_key\']) {\n                    $template = $this->model_extension_module_emailtemplate->load($emailtemplate_key, $template_data);\n                }\n            }\n        }\n        ]]></add>\n</operation>\n<operation>\n    <search index=\"0\"><![CDATA[$mail->send();]]></search>\n    <ignoreif><![CDATA[$this->model_extension_module_emailtemplate->sent();]]></ignoreif>\n    <add position=\"replace\"><![CDATA[\n        if (!empty($data[\'emailtemplate_key\']) && $template) {\n    			$template->hook($mail);\n    		}\n\n        $mail->send();\n\n        if (!empty($data[\'emailtemplate_key\']) && $template) {\n            $this->model_extension_module_emailtemplate->sent();\n        }\n        ]]></add>\n</operation>\n</file>\n\n\n<file path=\"catalog/controller/journal3/newsletter.php\" error=\"skip\">\n    <operation>\n        <search index=\"0\"><![CDATA[$this->load->controller(\'journal3/mail/send\', array(]]></search>\n        <add position=\"after\"><![CDATA[					\'emailtemplate_key\' => \'journal.newsletter.\' . $this->module_id,\n    \'subscribed\' => 1,]]></add>\n    </operation>\n    <operation>\n        <search index=\"1\"><![CDATA[$this->load->controller(\'journal3/mail/send\', array(]]></search>\n        <add position=\"after\"><![CDATA[					\'emailtemplate_key\' => \'journal.newsletter_admin.\' . $this->module_id,\n    \'subscribed\' => 1,]]></add>\n    </operation>\n    <operation>\n        <search index=\"2\"><![CDATA[$this->load->controller(\'journal3/mail/send\', array(]]></search>\n        <add position=\"after\"><![CDATA[					\'emailtemplate_key\' => \'journal.newsletter.\' . $this->module_id,\n    \'subscribed\' => 0,]]></add>\n    </operation>\n    <operation>\n        <search index=\"3\"><![CDATA[$this->load->controller(\'journal3/mail/send\', array(]]></search>\n        <add position=\"after\"><![CDATA[					\'emailtemplate_key\' => \'journal.newsletter_admin.\' . $this->module_id,\n    \'subscribed\' => 0,]]></add>\n    </operation>\n</file>\n\n<file path=\"catalog/controller/journal3/mail.php\" error=\"skip\">\n<operation>\n    <search index=\"0\"><![CDATA[$mail->setTo(]]></search>\n    <ignoreif><![CDATA[$this->load->model(\'extension/module/emailtemplate\');]]></ignoreif>\n    <add position=\"before\"><![CDATA[        if (!empty($data[\'emailtemplate_key\'])) {\n            $this->load->model(\'extension/module/emailtemplate\');\n\n            $template = $this->model_extension_module_emailtemplate->load($data[\'emailtemplate_key\'], $data);\n\n            if (!$template) {\n                // Remove key .index\n                $emailtemplate_key = preg_replace(\'/.[0-9]*$/\', \'\', $data[\'emailtemplate_key\']);\n\n                if ($emailtemplate_key && $emailtemplate_key != $data[\'emailtemplate_key\']) {\n                    $template = $this->model_extension_module_emailtemplate->load($emailtemplate_key, $data);\n                }\n            }\n        }\n        ]]></add>\n</operation>\n<operation>\n    <search index=\"0\"><![CDATA[$mail->send();]]></search>\n    <ignoreif><![CDATA[$this->model_extension_module_emailtemplate->sent();]]></ignoreif>\n    <add position=\"replace\"><![CDATA[\n        if (!empty($data[\'emailtemplate_key\']) && $template) {\n            $template->hook($mail);\n        }\n\n        $mail->send();\n\n        if (!empty($data[\'emailtemplate_key\']) && $template) {\n            $this->model_extension_module_emailtemplate->sent();\n        }\n        ]]></add>\n</operation>\n</file>\n\n\n<file path=\"catalog/controller/mail/order.php\" email_template=\"order.admin\">\r\n    <operation>\r\n        <search index=\"1\"><![CDATA[$data[\'products\'][] = array(]]></search>\r\n        <add position=\"after\"><![CDATA[				\'product_id\'  => $order_product[\'product_id\'],\r\n				\'order_product_id\'  => $order_product[\'order_product_id\'],]]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"1\"><![CDATA[\'name\'  => $order_option[\'name\'],]]></search>\r\n        <add position=\"before\"><![CDATA[					\'order_option_id\'  => $order_option[\'order_option_id\'],]]></add>\r\n    </operation>\r\n    <operation>\r\n		<search index=\"2\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n			// Prepare mail: order.admin\r\n			$this->load->language(\'product/product\'); // required for stock status\r\n			$this->load->language(\'mail/order_alert\');\r\n			$this->load->language(\'extension/module/emailtemplate/order\');\r\n\r\n			$this->load->model(\'tool/image\');\r\n            $this->load->model(\'catalog/product\');\r\n            $this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\r\n				\'key\' => \'order.admin\',\r\n				\'customer_id\' => $order_info[\'customer_id\'],\r\n				\'customer_group_id\' => $order_info[\'customer_group_id\'],\r\n				\'language_id\' => $order_info[\'language_id\'],\r\n				\'order_status_id\' => $order_status_id,\r\n				\'store_id\' => $order_info[\'store_id\'],\r\n                \'payment_method\' => $order_info[\'payment_code\'],\r\n                \'shipping_method\' => $order_info[\'shipping_code\']\r\n			);\r\n\r\n			$template_filter = array();\r\n\r\n			if (!empty($order_info[\'customer_id\']) && !isset($total_customer_orders)) {\r\n				$total_customer_orders_query = $this->db->query(\"SELECT count(1) as total FROM `\" . DB_PREFIX . \"order` WHERE customer_id = \'\" . (int)$order_info[\'customer_id\'] . \"\'\");\r\n\r\n				if ($total_customer_orders_query->row) {\r\n					$total_customer_orders = $total_customer_orders_query->row[\'total\'];\r\n\r\n					$template_filter[\'total_customer_orders\'] = $total_customer_orders;\r\n				}\r\n			}\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load, $data, $template_filter);\r\n\r\n            if ($template) {\r\n                $template->addData($order_info);\r\n\r\n                $template->data[\'total_customer_orders\'] = isset($total_customer_orders) ? $total_customer_orders : 0;\r\n\r\n                $template->data[\'date_added\'] = date($this->language->get(\'date_format_short\'), strtotime($order_info[\'date_added\']));\r\n\r\n                $template->data[\'date_modified\'] = date($this->language->get(\'date_format_short\'), strtotime($order_info[\'date_modified\']));\r\n\r\n                if ($order_info[\'invoice_no\']) {\r\n                    $template->data[\'invoice_no\'] = $order_info[\'invoice_prefix\'] . $order_info[\'invoice_no\'];\r\n                } else {\r\n                    $template->data[\'invoice_no\'] = \'\';\r\n                }\r\n\r\n                // Address\r\n                foreach(array(\'payment\', \'shipping\') as $var) {\r\n                    if ($order_info[$var . \'_address_format\']) {\r\n                        $format = $order_info[$var . \'_address_format\'];\r\n                    } else {\r\n                        $format = \'{firstname} {lastname}\' . \"\\n\" . \'{company}\' . \"\\n\" . \'{address_1}\' . \"\\n\" . \'{address_2}\' . \"\\n\" . \'{city} {postcode}\' . \"\\n\" . \'{zone}\' . \"\\n\" . \'{country}\';\r\n                    }\r\n\r\n                    $find = array(\r\n                        \'{firstname}\',\r\n                        \'{lastname}\',\r\n                        \'{company}\',\r\n                        \'{address_1}\',\r\n                        \'{address_2}\',\r\n                        \'{city}\',\r\n                        \'{postcode}\',\r\n                        \'{zone}\',\r\n                        \'{zone_code}\',\r\n                        \'{country}\'\r\n                    );\r\n\r\n                    $replace = array(\r\n                        \'firstname\' => $order_info[$var . \'_firstname\'],\r\n                        \'lastname\'  => $order_info[$var . \'_lastname\'],\r\n                        \'company\'   => $order_info[$var . \'_company\'],\r\n                        \'address_1\' => $order_info[$var . \'_address_1\'],\r\n                        \'address_2\' => $order_info[$var . \'_address_2\'],\r\n                        \'city\'      => $order_info[$var . \'_city\'],\r\n                        \'postcode\'  => $order_info[$var . \'_postcode\'],\r\n                        \'zone\'      => $order_info[$var . \'_zone\'],\r\n                        \'zone_code\' => $order_info[$var . \'_zone_code\'],\r\n                        \'country\'   => $order_info[$var . \'_country\']\r\n                    );\r\n\r\n                    if (isset($order_info[\'custom_field\'])) {\r\n                        foreach ($order_info[\'custom_field\'] as $custom_field_id => $custom_field) {\r\n                            $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                            $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : \'\';\r\n                        }\r\n                    }\r\n\r\n                    if (!empty($order_info[$var . \'_custom_field\']) && is_array($order_info[$var . \'_custom_field\'])) {\r\n                        foreach ($order_info[$var . \'_custom_field\'] as $custom_field_id => $custom_field) {\r\n                            $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                            $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : $custom_field;\r\n                        }\r\n                    }\r\n\r\n                    $template->data[$var . \'_address\'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \'<br />\', preg_replace(array(\"/\\s\\s+/\", \"/\\r\\r+/\", \"/\\n\\n+/\"), \'<br />\', trim(str_replace($find, $replace, $format))));\r\n                }\r\n\r\n                if (!empty($order_info[\'customer_group_id\'])) {\r\n                    $this->load->model(\'account/customer_group\');\r\n\r\n                    $customer_group = $this->model_account_customer_group->getCustomerGroup($order_info[\'customer_group_id\']);\r\n\r\n                    if ($customer_group) {\r\n                        $template->data[\'customer_group\'] = array(\r\n                            \'name\' => $customer_group[\'name\'],\r\n                            \'description\' => $customer_group[\'description\']\r\n                        );\r\n                    }\r\n                }\r\n\r\n                if (!empty($order_info[\'affiliate_id\']) && file_exists(DIR_APPLICATION . \'model/account/affiliate.php\')) {\r\n                    $this->load->model(\'account/affiliate\');\r\n\r\n                    $affiliate_info = $this->model_account_affiliate->getAffiliate($order_info[\'affiliate_id\']);\r\n\r\n                    if ($affiliate_info) {\r\n                        $template->data[\'affiliate\'] = $affiliate_info;\r\n                    }\r\n                }\r\n\r\n                // Custom fields\r\n                if (!empty($order_info[\'custom_field\']) || !empty($order_info[\'payment_custom_field\'])) {\r\n                    $this->load->model(\'account/custom_field\');\r\n\r\n                    // Cleanup\r\n					foreach(array(\'custom_field\', \'payment_custom_field\', \'shipping_custom_field\') as $var) {\r\n						if (isset($template->data[$var])) {\r\n							unset($template->data[$var]);\r\n						}\r\n					}\r\n\r\n                    if (!empty($order_info[\'customer_group_id\'])) {\r\n                        $customer_group_id = $order_info[\'customer_group_id\'];\r\n                    } else {\r\n                        $customer_group_id = $this->config->get(\'config_customer_group_id\');\r\n                    }\r\n\r\n                    $custom_fields = $this->model_account_custom_field->getCustomFields($customer_group_id);\r\n\r\n                    foreach ($custom_fields as $custom_field) {\r\n                        if (isset($order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_name\'] = $custom_field[\'name\'];\r\n\r\n                            if ($custom_field[\'custom_field_value\']) {\r\n                                foreach ($custom_field[\'custom_field_value\'] as $custom_field_value) {\r\n                                    if (is_array($order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                        if (in_array($custom_field_value[\'custom_field_value_id\'], $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value_\' . $custom_field_value[\'custom_field_value_id\']] = $custom_field_value[\'name\'];\r\n                                        }\r\n                                    } else {\r\n                                        if ($custom_field_value[\'custom_field_value_id\'] == $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']]) {\r\n                                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $custom_field_value[\'name\'];\r\n                                        }\r\n                                    }\r\n                                }\r\n                            } else {\r\n                                $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']];\r\n                            }\r\n                        } elseif (isset($order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_name\'] = $custom_field[\'name\'];\r\n\r\n                            if ($custom_field[\'custom_field_value\']) {\r\n                                foreach ($custom_field[\'custom_field_value\'] as $custom_field_value) {\r\n                                    if (is_array($order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                        if (in_array($custom_field_value[\'custom_field_value_id\'], $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value_\' . $custom_field_value[\'custom_field_value_id\']] = $custom_field_value[\'name\'];\r\n                                        }\r\n                                    } else {\r\n                                        if ($custom_field_value[\'custom_field_value_id\'] == $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']]) {\r\n                                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $custom_field_value[\'name\'];\r\n                                        }\r\n                                    }\r\n                                }\r\n                            } else {\r\n                                $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']];\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                $order_status_query = $this->db->query(\"SELECT `name` FROM \" . DB_PREFIX . \"order_status WHERE order_status_id = \'\" . (int)$order_status_id . \"\' AND language_id = \'\" . (int)$order_info[\'language_id\'] . \"\' LIMIT 1\");\r\n\r\n                if ($order_status_query->row) {\r\n                    $order_status = $order_status_query->row[\'name\'];\r\n\r\n                    $template->data[\'order_status\'] = $order_status;\r\n                }\r\n\r\n                    if ($this->config->get(\'config_processing_status\') && in_array($order_status_id, $this->config->get(\'config_processing_status\'))) {\r\n                        $template->data[\'order_processing_status\'] = true;\r\n                    } elseif ($this->config->get(\'config_complete_status\') && in_array($order_status_id, $this->config->get(\'config_complete_status\'))) {\r\n                        $template->data[\'order_complete_status\'] = true;\r\n                    }\r\n\r\n                $template->data[\'date_added\'] = date($this->language->get(\'date_format_short\'), strtotime($order_info[\'date_added\']));\r\n\r\n                if (defined(\'HTTP_ADMIN\')) {\r\n                    $admin_url = HTTP_ADMIN;\r\n                } elseif (!empty($order_info[\'store_ssl\'])) {\r\n                    $admin_url = $order_info[\'store_ssl\'] . \'admin/\';\r\n                } else {\r\n                    $admin_url = $order_info[\'store_url\'] . \'admin/\';\r\n                }\r\n\r\n                $template->data[\'admin_order_link\'] = $admin_url . \'index.php?route=sale/order/info&order_id=\' . $order_info[\'order_id\'];\r\n\r\n                if ($this->language->get(\'button_order_link\') && $this->language->get(\'button_order_link\') != \'button_order_link\') {\r\n                    $template->data[\'admin_order_link_text\'] =  $this->language->get(\'button_order_link\');\r\n                } else {\r\n                    $template->data[\'admin_order_link_text\'] =  $template->data[\'admin_order_link\'];\r\n                }\r\n\r\n                if (!empty($order_info[\'weight\'])) {\r\n                    $template->data[\'order_weight\'] = $this->weight->format($order_info[\'weight\'], $this->config->get(\'config_weight_class_id\'), $this->language->get(\'decimal_point\'), $this->language->get(\'thousand_point\'));\r\n                }\r\n\r\n                $template->data[\'order_comment\'] = nl2br($order_info[\'comment\']);\r\n\r\n                if ($order_info[\'comment\'] != $comment) {\r\n                    $template->data[\'comment\'] = nl2br($order_info[\'comment\']);\r\n\r\n                    $template->data[\'instruction\'] = nl2br($comment);\r\n                } else {\r\n                    $template->data[\'comment\'] = nl2br($comment);\r\n\r\n                    $template->data[\'instruction\'] = \'\';\r\n                }\r\n\r\n                $template->data[\'order_total\'] = $this->currency->format($order_info[\'total\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']);\r\n\r\n                $products_stock = array();\r\n\r\n                if (!empty($template->data[\'config\'][\'order_products\'][\'option_length\'])) {\r\n                    $option_length = $template->data[\'config\'][\'order_products\'][\'option_length\'];\r\n                } else {\r\n                    $option_length = 120;\r\n                }\r\n\r\n                // Add extra data to products array\r\n                $template->data[\'products\'] = $data[\'products\'];\r\n\r\n                foreach ($template->data[\'products\'] as $i => $product) {\r\n                    $order_product = false;\r\n                    foreach ($order_products as $row) {\r\n                        if ($product[\'order_product_id\'] == $row[\'order_product_id\']) {\r\n                            $order_product = $row;\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    $product_data = $this->model_catalog_product->getProduct($order_product[\'product_id\']);\r\n\r\n                    if ($product_data) {\r\n                        if ($product[\'option\']) {\r\n                            $order_options = $this->model_checkout_order->getOrderOptions($order_info[\'order_id\'], $order_product[\'order_product_id\']);\r\n\r\n                            foreach ($product[\'option\'] as $ii => $product_option) {\r\n                                $order_option = false;\r\n                                foreach ($order_options as $order_option) {\r\n                                    if ($order_option[\'order_option_id\'] == $product_option[\'order_option_id\']) {\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                                if ($order_option && $order_option[\'type\'] != \'file\') {\r\n                                    $value = $order_option[\'value\'];\r\n                                    $template->data[\'products\'][$i][\'option\'][$ii][\'value\'] = utf8_strlen($value) > $option_length ? utf8_substr($value, 0, $option_length) . \'..\' : $value;\r\n                                }\r\n                            }\r\n\r\n                            $product_data[\'option_value\'] = array();\r\n\r\n                            $order_option_query = $this->db->query(\"SELECT oo.* FROM \" . DB_PREFIX . \"order_option oo WHERE oo.order_product_id = \'\" . (int)$product[\'order_product_id\'] . \"\' AND oo.order_id = \'\" . (int)$order_info[\'order_id\'] . \"\'\");\r\n\r\n                            if ($order_option_query->rows) {\r\n                                foreach ($order_option_query->rows as $order_option) {\r\n                                    $order_option_value_query = $this->db->query(\"SELECT pov.*, ov.image FROM \" . DB_PREFIX . \"product_option_value pov LEFT JOIN \" . DB_PREFIX . \"option_value ov ON (pov.option_value_id = ov.option_value_id) WHERE pov.product_option_value_id = \'\" . (int)$order_option[\'product_option_value_id\'] . \"\'\");\r\n\r\n                                    if ($order_option_value_query->rows) {\r\n                                        foreach ($order_option_value_query->rows as $order_option_value) {\r\n                                            $product_data[\'option_value\'][] = array(\r\n                                                \'order_option_id\' => $order_option[\'order_option_id\'],\r\n                                                \'product_option_value_id\' => $order_option[\'product_option_value_id\'],\r\n                                                \'type\' => $order_option[\'type\'],\r\n                                                \'image\' => $order_option_value[\'image\'],\r\n                                                \'price\' => $order_option_value[\'price\'],\r\n                                                \'price_prefix\' => $order_option_value[\'price_prefix\'],\r\n                                                \'stock_quantity\' => $order_option_value[\'quantity\'],\r\n                                                \'value\' => $order_option[\'value\']\r\n                                            );\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        $image = \'\';\r\n\r\n                        if (!empty($template->data[\'config\'][\'order_products\'][\'image\'])) {\r\n                            $image = $product_data[\'image\'];\r\n\r\n                            if (!empty($product_data[\'option_value\']) && !empty($template->data[\'config\'][\'order_products\'][\'option_image\'])) {\r\n                                foreach($product_data[\'option_value\'] as $product_option_value) {\r\n                                    if ($product_option_value[\'image\']) {\r\n                                        $image = $product_option_value[\'image\'];\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            if ($image) {\r\n                                $image_width = isset($template->data[\'config\'][\'order_products\'][\'image_width\']) ? $template->data[\'config\'][\'order_products\'][\'image_width\']: 100;\r\n                                $image_height = isset($template->data[\'config\'][\'order_products\'][\'image_height\']) ? $template->data[\'config\'][\'order_products\'][\'image_height\']: 100;\r\n\r\n                                if ($image_width && $image_height) {\r\n                                    $image = $this->model_tool_image->resize($image, $image_width, $image_height);\r\n                                    if (substr($image, 0, 4) != \'http\') {\r\n                                        $image = $order_info[\'store_url\'] . ltrim($image, \'/\');\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        $url = $this->url->link(\'product/product\', \'product_id=\'.$order_product[\'product_id\']);\r\n\r\n                        if (!empty($template->data[\'config\'][\'order_products\'][\'admin_stock\'])) {\r\n                            if (!isset($products_stock[$order_product[\'product_id\']][\'stock_quantity\'])) {\r\n                                $products_stock[$order_product[\'product_id\']][\'stock_quantity\'] = (int)$product_data[\'quantity\'];\r\n                            }\r\n\r\n                            if ($product_data[\'subtract\']) {\r\n                                $products_stock[$order_product[\'product_id\']][\'stock_quantity\'] -= (int)$product[\'quantity\'];\r\n                            }\r\n                        }\r\n\r\n                        if (!empty($product_data[\'option_value\']) && $template->data[\'products\'][$i][\'option\']) {\r\n                            foreach ($product_data[\'option_value\'] as $product_option_value) {\r\n                                if ($product_option_value[\'stock_quantity\']) {\r\n                                    foreach($template->data[\'products\'][$i][\'option\'] as $ii => $product_option) {\r\n                                        if ($product_option_value[\'order_option_id\'] == $product_option[\'order_option_id\']) {\r\n                                            if ($product_option_value[\'type\'] != \'file\') {\r\n                                                $value = $product_option_value[\'value\'];\r\n                                            } else {\r\n                                                $value = utf8_substr($product_option_value[\'value\'], 0, utf8_strrpos($product_option_value[\'value\'], \'.\'));\r\n                                            }\r\n\r\n                                            $template->data[\'products\'][$i][\'option\'][$ii] = array_merge($template->data[\'products\'][$i][\'option\'][$ii], array(\r\n                                                \'value\' => utf8_strlen($value) > $option_length ? utf8_substr($value, 0, $option_length) . \'..\' : $value,\r\n                                                \'price\' => (float)$product_option_value[\'price\'] ? $this->currency->format($this->tax->calculate($product_option_value[\'price\'], $product_data[\'tax_class_id\'], $this->config->get(\'config_tax\') ? \'P\' : false), $this->session->data[\'currency\']) : 0,\r\n                                                \'price_value\' => (float)$product_option_value[\'price\'],\r\n                                                \'price_prefix\' => isset($product_option_value[\'price_prefix\']) ? $product_option_value[\'price_prefix\'] : \'\',\r\n                                                \'stock_quantity\' => isset($product_option_value[\'quantity\']) ? ((int)$product_option_value[\'quantity\'] - (int)$product[\'quantity\']) : \'\',\r\n                                                \'stock_subtract\' => isset($product_option_value[\'subtract\']) ? $product_option_value[\'subtract\'] : \'\'\r\n                                            ));\r\n\r\n                                            break 2;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if ($product_data[\'quantity\'] <= 0) {\r\n                            $stock_status = $product_data[\'stock_status\'];\r\n                        } elseif ($this->config->get(\'config_stock_display\')) {\r\n                            $stock_status = $product_data[\'quantity\'];\r\n                        } else {\r\n                            $stock_status = $this->language->get(\'text_instock\');\r\n                        }\r\n\r\n                        $template->data[\'products\'][$i] = array_merge($template->data[\'products\'][$i], array(\r\n                            \'product_id\' => $product_data[\'product_id\'],\r\n                            \'url\' => $url,\r\n                            \'image\' => !empty($image) ? $image : \'\',\r\n                            \'weight\' => ($product_data[\'weight\'] > 0) ? $this->weight->format($product_data[\'weight\'], $product_data[\'weight_class_id\']) : 0,\r\n                            \'price\'    => $this->currency->format($order_product[\'price\'] + ($this->config->get(\'config_tax\') ? $order_product[\'tax\'] : 0), $order_info[\'currency_code\'], $order_info[\'currency_value\']),\r\n                            \'manufacturer\' => $product_data[\'manufacturer\'],\r\n                            \'stock_status\' => $stock_status\r\n                        ));\r\n\r\n                        if (!empty($template->data[\'config\'][\'order_products\'][\'model\'])) {\r\n                            $template->data[\'products\'][$i][\'model\'] = $product_data[\'model\'];\r\n                        } elseif (isset($template->data[\'products\'][$i][\'model\'])) {\r\n                            unset($template->data[\'products\'][$i][\'model\']);\r\n                        }\r\n\r\n                        if (!empty($template->data[\'config\'][\'order_products\'][\'sku\'])) {\r\n                            $template->data[\'products\'][$i][\'sku\'] = $product_data[\'sku\'];\r\n                        } elseif (isset($template->data[\'products\'][$i][\'sku\'])) {\r\n                            unset($template->data[\'products\'][$i][\'sku\']);\r\n                        }\r\n\r\n                        if (!empty($template->data[\'config\'][\'order_products\'][\'description\']) && $product_data[\'description\']) {\r\n                            $template->data[\'products\'][$i][\'description\'] = utf8_substr(strip_tags(html_entity_decode($product_data[\'description\'], ENT_QUOTES, \'UTF-8\')), 0, 200) . \'..\';\r\n                        }\r\n                    }\r\n                }\r\n\r\n                // Products Stock\r\n                if (!empty($template->data[\'config\'][\'order_products\'][\'admin_stock\'])) {\r\n                    foreach ($template->data[\'products\'] as $i => $product) {\r\n                        if (isset($products_stock[$product[\'product_id\']][\'stock_quantity\'])) {\r\n                            $template->data[\'products\'][$i][\'stock_quantity\'] = $products_stock[$product[\'product_id\']][\'stock_quantity\'];\r\n                        }\r\n                    }\r\n                }\r\n\r\n                // Vouchers\r\n                $template->data[\'vouchers\'] = array();\r\n\r\n                $order_vouchers = $this->model_checkout_order->getOrderVouchers($order_info[\'order_id\']);\r\n\r\n                foreach ($order_vouchers as $order_voucher) {\r\n                    $template->data[\'vouchers\'][] = array(\r\n                        \'description\' => $order_voucher[\'description\'],\r\n                        \'amount\'      => $this->currency->format($order_voucher[\'amount\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']),\r\n                    );\r\n                }\r\n\r\n                // Order Totals\r\n                $template->data[\'totals\'] = array();\r\n\r\n                $order_totals = $this->model_checkout_order->getOrderTotals($order_info[\'order_id\']);\r\n\r\n                foreach ($order_totals as $order_total) {\r\n                    $template->data[\'totals\'][] = array(\r\n                        \'title\' => $order_total[\'title\'],\r\n                        \'text\'  => !empty($order_total[\'text\']) ? $order_total[\'text\'] : $this->currency->format($order_total[\'value\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']),\r\n                    );\r\n                }\r\n\r\n                $template->data[\'order_subject_products\'] = \'\';\r\n\r\n                if (!empty($template->data[\'products\'])) {\r\n                    foreach ($template->data[\'products\'] as $order_product) {\r\n                        if (strpos($template->data[\'order_subject_products\'], $order_product[\'name\']) === false) {\r\n                            $template->data[\'order_subject_products\'] .= ($template->data[\'order_subject_products\'] ? \', \' : \'\') . strip_tags($order_product[\'name\']);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!empty($template->data[\'vouchers\'])) {\r\n                    foreach ($template->data[\'vouchers\'] as $order_voucher) {\r\n                        if (strpos($template->data[\'order_subject_products\'], $order_voucher[\'description\']) === false) {\r\n                            $template->data[\'order_subject_products\'] .= ($template->data[\'order_subject_products\'] ? \', \' : \'\') . strip_tags($order_voucher[\'description\']);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if ($template->data[\'order_subject_products\']) {\r\n                    $template->data[\'order_subject_products\'] = trim(html_entity_decode($template->data[\'order_subject_products\'], ENT_QUOTES, \'UTF-8\'));\r\n\r\n                    $length = 32;\r\n\r\n                    if (strlen($template->data[\'order_subject_products\']) > $length) {\r\n                        $template->data[\'order_subject_products\'] = substr($template->data[\'order_subject_products\'], 0, strrpos(substr($template->data[\'order_subject_products\'], 0, $length), \' \')) . \'...\';\r\n                    }\r\n                }\r\n			    // Prepared mail: order.admin\r\n            }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"2\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[// Send mail: order.admin\r\n			if ($template && $template->check()) {\r\n			    $template->build();\r\n			    $template->hook($mail);\r\n            }\r\n\r\n			$mail->send();\r\n\r\n			$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/order_alert\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/order_alert\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/order_alert\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/mail/order.php\" email_template=\"order.customer\">\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[$data[\'products\'][] = array(]]></search>\r\n        <add position=\"after\"><![CDATA[				\'product_id\'  => $order_product[\'product_id\'],\r\n				\'order_product_id\'  => $order_product[\'order_product_id\'],]]></add>\r\n    </operation>\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[\'name\'  => $order_option[\'name\'],]]></search>\r\n        <add position=\"before\"><![CDATA[					\'order_option_id\'  => $order_option[\'order_option_id\'],]]></add>\r\n    </operation>\r\n    <operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n		// Prepare mail: order.customer\r\n		$language->load(\'product/product\'); // required for stock status\r\n		$language->load(\'extension/module/emailtemplate/order\');\r\n\r\n		$this->load->model(\'tool/image\');\r\n		$this->load->model(\'catalog/product\');\r\n		$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n		$template_load = array(\r\n			\'key\' => \'order.customer\',\r\n			\'customer_id\' => $order_info[\'customer_id\'],\r\n            \'customer_group_id\' => $order_info[\'customer_group_id\'],\r\n            \'language_id\' => $order_info[\'language_id\'],\r\n            \'order_status_id\' => $order_status_id,\r\n            \'store_id\' => $order_info[\'store_id\'],\r\n            \'payment_method\' => $order_info[\'payment_code\'],\r\n            \'shipping_method\' => $order_info[\'shipping_code\']\r\n		);\r\n\r\n		$template_filter = array();\r\n\r\n		if (!empty($order_info[\'customer_id\']) && !isset($total_customer_orders)) {\r\n			$total_customer_orders_query = $this->db->query(\"SELECT count(1) as total FROM `\" . DB_PREFIX . \"order` WHERE customer_id = \'\" . (int)$order_info[\'customer_id\'] . \"\'\");\r\n\r\n			if ($total_customer_orders_query->row) {\r\n				$total_customer_orders = $total_customer_orders_query->row[\'total\'];\r\n				$template_filter[\'total_customer_orders\'] = $total_customer_orders;\r\n			}\r\n		}\r\n\r\n		$template = $this->model_extension_module_emailtemplate->load($template_load, $data, $template_filter);\r\n\r\n        if ($template) {\r\n            $template->addData($order_info);\r\n\r\n            if (!empty($order_info[\'customer_group_id\'])) {\r\n                $this->load->model(\'account/customer_group\');\r\n\r\n                $customer_group = $this->model_account_customer_group->getCustomerGroup($order_info[\'customer_group_id\']);\r\n\r\n                if ($customer_group) {\r\n                    $template->data[\'customer_group\'] = array(\r\n                        \'name\' => $customer_group[\'name\'],\r\n                        \'description\' => $customer_group[\'description\']\r\n                    );\r\n                }\r\n            }\r\n\r\n            if (!empty($order_info[\'affiliate_id\']) && file_exists(DIR_APPLICATION . \'model/account/affiliate.php\')) {\r\n                $this->load->model(\'account/affiliate\');\r\n\r\n                $affiliate_info = $this->model_account_affiliate->getAffiliate($order_info[\'affiliate_id\']);\r\n\r\n                if ($affiliate_info) {\r\n                    $template->data[\'affiliate\'] = $affiliate_info;\r\n                }\r\n            }\r\n\r\n            // Custom fields\r\n            if (!empty($order_info[\'custom_field\']) || !empty($order_info[\'payment_custom_field\'])) {\r\n                $this->load->model(\'account/custom_field\');\r\n\r\n                // Cleanup\r\n                foreach(array(\'custom_field\', \'payment_custom_field\', \'shipping_custom_field\') as $var) {\r\n                    if (isset($template->data[$var])) {\r\n                        unset($template->data[$var]);\r\n                    }\r\n                }\r\n\r\n                if (!empty($order_info[\'customer_group_id\'])) {\r\n                    $customer_group_id = $order_info[\'customer_group_id\'];\r\n                } else {\r\n                    $customer_group_id = $this->config->get(\'config_customer_group_id\');\r\n                }\r\n\r\n                $custom_fields = $this->model_account_custom_field->getCustomFields($customer_group_id);\r\n\r\n                foreach ($custom_fields as $custom_field) {\r\n                    if (isset($order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_name\'] = $custom_field[\'name\'];\r\n\r\n                        if ($custom_field[\'custom_field_value\']) {\r\n                            foreach ($custom_field[\'custom_field_value\'] as $custom_field_value) {\r\n                                if (is_array($order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                    if (in_array($custom_field_value[\'custom_field_value_id\'], $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value_\' . $custom_field_value[\'custom_field_value_id\']] = $custom_field_value[\'name\'];\r\n                                    }\r\n                                } else {\r\n                                    if ($custom_field_value[\'custom_field_value_id\'] == $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']]) {\r\n                                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $custom_field_value[\'name\'];\r\n                                    }\r\n                                }\r\n                            }\r\n                        } else {\r\n                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']];\r\n                        }\r\n                    } elseif (isset($order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_name\'] = $custom_field[\'name\'];\r\n\r\n                        if ($custom_field[\'custom_field_value\']) {\r\n                            foreach ($custom_field[\'custom_field_value\'] as $custom_field_value) {\r\n                                if (is_array($order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                    if (in_array($custom_field_value[\'custom_field_value_id\'], $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value_\' . $custom_field_value[\'custom_field_value_id\']] = $custom_field_value[\'name\'];\r\n                                    }\r\n                                } else {\r\n                                    if ($custom_field_value[\'custom_field_value_id\'] == $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']]) {\r\n                                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $custom_field_value[\'name\'];\r\n                                    }\r\n                                }\r\n                            }\r\n                        } else {\r\n                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']];\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            // Address\r\n            foreach(array(\'payment\', \'shipping\') as $var) {\r\n                if ($order_info[$var . \'_address_format\']) {\r\n                    $format = $order_info[$var . \'_address_format\'];\r\n                } else {\r\n                    $format = \'{firstname} {lastname}\' . \"\\n\" . \'{company}\' . \"\\n\" . \'{address_1}\' . \"\\n\" . \'{address_2}\' . \"\\n\" . \'{city} {postcode}\' . \"\\n\" . \'{zone}\' . \"\\n\" . \'{country}\';\r\n                }\r\n\r\n                $find = array(\r\n                    \'{firstname}\',\r\n                    \'{lastname}\',\r\n                    \'{company}\',\r\n                    \'{address_1}\',\r\n                    \'{address_2}\',\r\n                    \'{city}\',\r\n                    \'{postcode}\',\r\n                    \'{zone}\',\r\n                    \'{zone_code}\',\r\n                    \'{country}\'\r\n                );\r\n\r\n                $replace = array(\r\n                    \'firstname\' => $order_info[$var . \'_firstname\'],\r\n                    \'lastname\'  => $order_info[$var . \'_lastname\'],\r\n                    \'company\'   => $order_info[$var . \'_company\'],\r\n                    \'address_1\' => $order_info[$var . \'_address_1\'],\r\n                    \'address_2\' => $order_info[$var . \'_address_2\'],\r\n                    \'city\'      => $order_info[$var . \'_city\'],\r\n                    \'postcode\'  => $order_info[$var . \'_postcode\'],\r\n                    \'zone\'      => $order_info[$var . \'_zone\'],\r\n                    \'zone_code\' => $order_info[$var . \'_zone_code\'],\r\n                    \'country\'   => $order_info[$var . \'_country\']\r\n                );\r\n\r\n                if (isset($order_info[\'custom_field\'])) {\r\n                    foreach ($order_info[\'custom_field\'] as $custom_field_id => $custom_field) {\r\n                        $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                        $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : \'\';\r\n                    }\r\n                }\r\n\r\n                if (!empty($order_info[$var . \'_custom_field\']) && is_array($order_info[$var . \'_custom_field\'])) {\r\n                    foreach ($order_info[$var . \'_custom_field\'] as $custom_field_id => $custom_field) {\r\n                        $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                        $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : $custom_field;\r\n                    }\r\n                }\r\n\r\n                $template->data[$var . \'_address\'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \'<br />\', preg_replace(array(\"/\\s\\s+/\", \"/\\r\\r+/\", \"/\\n\\n+/\"), \'<br />\', trim(str_replace($find, $replace, $format))));\r\n            }\r\n\r\n            $order_status_query = $this->db->query(\"SELECT `name` FROM \" . DB_PREFIX . \"order_status WHERE order_status_id = \'\" . (int)$order_status_id . \"\' AND language_id = \'\" . (int)$order_info[\'language_id\'] . \"\' LIMIT 1\");\r\n\r\n            if ($order_status_query->row) {\r\n                $order_status = $order_status_query->row[\'name\'];\r\n\r\n                $template->data[\'order_status\'] = $order_status;\r\n            }\r\n\r\n            if ($this->config->get(\'config_processing_status\') && in_array($order_status_id, $this->config->get(\'config_processing_status\'))) {\r\n                $template->data[\'order_processing_status\'] = true;\r\n            } elseif ($this->config->get(\'config_complete_status\') && in_array($order_status_id, $this->config->get(\'config_complete_status\'))) {\r\n                $template->data[\'order_complete_status\'] = true;\r\n            }\r\n\r\n            $template->data[\'total_customer_orders\'] = isset($total_customer_orders) ? $total_customer_orders : 0;\r\n\r\n            $products_stock = array();\r\n\r\n            if (!empty($template->data[\'config\'][\'order_products\'][\'option_length\'])) {\r\n                $option_length = $template->data[\'config\'][\'order_products\'][\'option_length\'];\r\n            } else {\r\n                $option_length = 120;\r\n            }\r\n\r\n            // Add extra data to products array\r\n            $template->data[\'products\'] = $data[\'products\'];\r\n\r\n            foreach ($template->data[\'products\'] as $i => $product) {\r\n                $order_product = false;\r\n                foreach ($order_products as $row) {\r\n                    if ($product[\'order_product_id\'] == $row[\'order_product_id\']) {\r\n                        $order_product = $row;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                $product_data = $this->model_catalog_product->getProduct($order_product[\'product_id\']);\r\n\r\n                if ($product_data) {\r\n                    if ($product[\'option\']) {\r\n                        $order_options = $this->model_checkout_order->getOrderOptions($order_info[\'order_id\'], $order_product[\'order_product_id\']);\r\n\r\n                        foreach ($product[\'option\'] as $ii => $product_option) {\r\n                            $order_option = false;\r\n                            foreach ($order_options as $order_option) {\r\n                                if ($order_option[\'order_option_id\'] == $product_option[\'order_option_id\']) {\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            if ($order_option && $order_option[\'type\'] != \'file\') {\r\n                                $value = $order_option[\'value\'];\r\n                                $template->data[\'products\'][$i][\'option\'][$ii][\'value\'] = utf8_strlen($value) > $option_length ? utf8_substr($value, 0, $option_length) . \'..\' : $value;\r\n                            }\r\n                        }\r\n\r\n                        $product_data[\'option_value\'] = array();\r\n\r\n                        $order_option_query = $this->db->query(\"SELECT oo.* FROM \" . DB_PREFIX . \"order_option oo WHERE oo.order_product_id = \'\" . (int)$product[\'order_product_id\'] . \"\' AND oo.order_id = \'\" . (int)$order_info[\'order_id\'] . \"\'\");\r\n\r\n                        if ($order_option_query->rows) {\r\n                            foreach ($order_option_query->rows as $order_option) {\r\n                                $order_option_value_query = $this->db->query(\"SELECT pov.*, ov.image FROM \" . DB_PREFIX . \"product_option_value pov LEFT JOIN \" . DB_PREFIX . \"option_value ov ON (pov.option_value_id = ov.option_value_id) WHERE pov.product_option_value_id = \'\" . (int)$order_option[\'product_option_value_id\'] . \"\'\");\r\n\r\n                                if ($order_option_value_query->rows) {\r\n                                    foreach ($order_option_value_query->rows as $order_option_value) {\r\n                                        $product_data[\'option_value\'][] = array(\r\n                                            \'order_option_id\' => $order_option[\'order_option_id\'],\r\n                                            \'product_option_value_id\' => $order_option[\'product_option_value_id\'],\r\n                                            \'type\' => $order_option[\'type\'],\r\n                                            \'image\' => $order_option_value[\'image\'],\r\n                                            \'price\' => $order_option_value[\'price\'],\r\n                                            \'price_prefix\' => $order_option_value[\'price_prefix\'],\r\n                                            //\'stock_quantity\' => $order_option_value[\'quantity\'],\r\n                                            \'value\' => $order_option[\'value\']\r\n                                        );\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    $image = \'\';\r\n\r\n                    if (!empty($template->data[\'config\'][\'order_products\'][\'image\'])) {\r\n                        $image = $product_data[\'image\'];\r\n\r\n                        if (!empty($product_data[\'option_value\']) && !empty($template->data[\'config\'][\'order_products\'][\'option_image\'])) {\r\n                            foreach($product_data[\'option_value\'] as $product_option_value) {\r\n                                if ($product_option_value[\'image\']) {\r\n                                    $image = $product_option_value[\'image\'];\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        if ($image) {\r\n                            $image_width = isset($template->data[\'config\'][\'order_products\'][\'image_width\']) ? $template->data[\'config\'][\'order_products\'][\'image_width\']: 100;\r\n                            $image_height = isset($template->data[\'config\'][\'order_products\'][\'image_height\']) ? $template->data[\'config\'][\'order_products\'][\'image_height\']: 100;\r\n\r\n                            if ($image_width && $image_height) {\r\n                                $image = $this->model_tool_image->resize($image, $image_width, $image_height);\r\n                                if (substr($image, 0, 4) != \'http\') {\r\n                                    $image = $order_info[\'store_url\'] . ltrim($image, \'/\');\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    $url = $this->url->link(\'product/product\', \'product_id=\'.$order_product[\'product_id\']);\r\n\r\n                    // Products Stock\r\n                    /*if (!isset($products_stock[$order_product[\'product_id\']][\'stock_quantity\'])) {\r\n                        $products_stock[$order_product[\'product_id\']][\'stock_quantity\'] = (int)$product_data[\'quantity\'];\r\n                    }\r\n\r\n                    if ($product_data[\'subtract\']) {\r\n                        $products_stock[$order_product[\'product_id\']][\'stock_quantity\'] -= (int)$product[\'quantity\'];\r\n                    }*/\r\n\r\n                    if ($product_data[\'quantity\'] <= 0) {\r\n                        $stock_status = $product_data[\'stock_status\'];\r\n                    } elseif ($this->config->get(\'config_stock_display\')) {\r\n                        $stock_status = $product_data[\'quantity\'];\r\n                    } else {\r\n                        $stock_status = $this->language->get(\'text_instock\');\r\n                    }\r\n\r\n                    $template->data[\'products\'][$i] = array_merge($template->data[\'products\'][$i], array(\r\n                        \'url\' => $url,\r\n                        \'image\' => !empty($image) ? $image : \'\',\r\n                        \'weight\' => ($product_data[\'weight\'] > 0) ? $this->weight->format($product_data[\'weight\'], $product_data[\'weight_class_id\']) : 0,\r\n                        \'manufacturer\' => $product_data[\'manufacturer\'],\r\n                        \'stock_status\' => $stock_status\r\n                    ));\r\n\r\n                    if (!empty($template->data[\'config\'][\'order_products\'][\'description\']) && $product_data[\'description\']) {\r\n                        $template->data[\'products\'][$i][\'description\'] = utf8_substr(strip_tags(html_entity_decode($product_data[\'description\'], ENT_QUOTES, \'UTF-8\')), 0, 200) . \'..\';\r\n                    }\r\n\r\n                    if (!empty($template->data[\'config\'][\'order_products\'][\'model\'])) {\r\n                        $template->data[\'products\'][$i][\'model\'] = $product_data[\'model\'];\r\n                    } elseif (isset($template->data[\'products\'][$i][\'model\'])) {\r\n                        unset($template->data[\'products\'][$i][\'model\']);\r\n                    }\r\n\r\n                    if (!empty($template->data[\'config\'][\'order_products\'][\'sku\'])) {\r\n                        $template->data[\'products\'][$i][\'sku\'] = $product_data[\'sku\'];\r\n                    } elseif (isset($template->data[\'products\'][$i][\'sku\'])) {\r\n                        unset($template->data[\'products\'][$i][\'sku\']);\r\n                    }\r\n\r\n                    if (!empty($template->data[\'config\'][\'order_products\'][\'rating\'])) {\r\n                        $template->data[\'products\'][$i][\'rating\'] = $product_data[\'rating\'];\r\n                        $template->data[\'products\'][$i][\'reviews\'] = $product_data[\'reviews\'];\r\n                    }\r\n                }\r\n            }\r\n\r\n            // Products Stock\r\n            /*foreach ($template->data[\'products\'] as $i => $product) {\r\n                if (isset($products_stock[$product[\'product_id\']][\'stock_quantity\'])) {\r\n                    $template->data[\'products\'][$i][\'stock_quantity\'] = $products_stock[$product[\'product_id\']][\'stock_quantity\'];\r\n                }\r\n            }*/\r\n\r\n            $template->data[\'order_comment\'] = nl2br($order_info[\'comment\']);\r\n\r\n            if ($order_info[\'comment\'] != $comment) {\r\n                $template->data[\'comment\'] = nl2br($order_info[\'comment\']);\r\n\r\n                $template->data[\'instruction\'] = nl2br($comment);\r\n            } else {\r\n                $template->data[\'comment\'] = nl2br($comment);\r\n\r\n                $template->data[\'instruction\'] = \'\';\r\n            }\r\n\r\n            $template->data[\'date_added\'] = date($this->language->get(\'date_format_short\'), strtotime($order_info[\'date_added\']));\r\n\r\n            $template->data[\'date_modified\'] = date($this->language->get(\'date_format_short\'), strtotime($order_info[\'date_modified\']));\r\n\r\n            if ($order_info[\'invoice_no\']) {\r\n                $template->data[\'invoice_no\'] = $order_info[\'invoice_prefix\'] . $order_info[\'invoice_no\'];\r\n            } else {\r\n                $template->data[\'invoice_no\'] = \'\';\r\n            }\r\n\r\n            $template->data[\'order_total\'] = $this->currency->format($order_info[\'total\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']);\r\n\r\n            $template->data[\'order_subject_products\'] = \'\';\r\n\r\n            if (!empty($template->data[\'products\'])) {\r\n                foreach ($template->data[\'products\'] as $order_product) {\r\n                    if (strpos($template->data[\'order_subject_products\'], $order_product[\'name\']) === false) {\r\n                        $template->data[\'order_subject_products\'] .= ($template->data[\'order_subject_products\'] ? \', \' : \'\') . strip_tags($order_product[\'name\']);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (!empty($template->data[\'vouchers\'])) {\r\n                foreach ($template->data[\'vouchers\'] as $order_voucher) {\r\n                    if (strpos($template->data[\'order_subject_products\'], $order_voucher[\'description\']) === false) {\r\n                        $template->data[\'order_subject_products\'] .= ($template->data[\'order_subject_products\'] ? \', \' : \'\') . strip_tags($order_voucher[\'description\']);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if ($template->data[\'order_subject_products\']) {\r\n                $template->data[\'order_subject_products\'] = trim(html_entity_decode($template->data[\'order_subject_products\'], ENT_QUOTES, \'UTF-8\'));\r\n\r\n                $length = 32;\r\n\r\n                if (strlen($template->data[\'order_subject_products\']) > $length) {\r\n                    $template->data[\'order_subject_products\'] = substr($template->data[\'order_subject_products\'], 0, strrpos(substr($template->data[\'order_subject_products\'], 0, $length), \' \')) . \'...\';\r\n                }\r\n            }\r\n\r\n            if ($order_info[\'customer_id\']) {\r\n                $template->data[\'order_link\'] = $order_info[\'store_url\'] . \'index.php?route=account/order/info&order_id=\' . $order_info[\'order_id\'];\r\n\r\n                if ($this->language->get(\'button_order_link\') && $this->language->get(\'button_order_link\') != \'button_order_link\') {\r\n                    $template->data[\'order_link_text\'] = $this->language->get(\'button_order_link\');\r\n                } else {\r\n                    $template->data[\'order_link_text\'] = $order_info[\'store_url\'] . \'index.php?route=account/order/info&order_id=\' . $order_info[\'order_id\'];\r\n                }\r\n            }\r\n\r\n            if ($download_status) {\r\n                $template->data[\'download_link\'] = $order_info[\'store_url\'] . \'index.php?route=account/download\';\r\n\r\n                if ($this->language->get(\'button_download_link\') && $this->language->get(\'button_download_link\') != \'button_download_link\') {\r\n                    $template->data[\'download_link_text\'] = $this->language->get(\'button_download_link\');\r\n                } else {\r\n                    $template->data[\'download_link_text\'] = $template->data[\'download_link\'];\r\n                }\r\n            }\r\n		    // Prepared mail: order.customer\r\n		}\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[\r\n		// Send mail: order.customer\r\n		if ($template && $template->check()) {\r\n		    $template->build();\r\n		    $template->hook($mail);\r\n        }\r\n\r\n		$mail->send();\r\n\r\n		$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/order_add\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/order_add\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/order_add\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/mail/order.php\" email_template=\"order.update\">\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"after\"><![CDATA[\r\n		// Prepare mail: order.update\r\n		$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n		$language->load(\'extension/module/emailtemplate/order\');\r\n\r\n		$template_load = array(\r\n			\'key\' => \'order.update\',\r\n			\'customer_id\' => $order_info[\'customer_id\'],\r\n            \'customer_group_id\' => $order_info[\'customer_group_id\'],\r\n            \'language_id\' => $order_info[\'language_id\'],\r\n            \'order_status_id\' => $order_status_id,\r\n            \'store_id\' => $order_info[\'store_id\'],\r\n            \'payment_method\' => $order_info[\'payment_code\'],\r\n            \'shipping_method\' => $order_info[\'shipping_code\']\r\n		);\r\n\r\n		if (!empty($this->request->post[\'emailtemplate_id\'])) {\r\n			$template_load[\'emailtemplate_id\'] = $this->request->post[\'emailtemplate_id\'];\r\n		}\r\n\r\n		$template_filter = array();\r\n\r\n		if (!empty($order_info[\'customer_id\']) && !isset($total_customer_orders)) {\r\n			$total_customer_orders_query = $this->db->query(\"SELECT count(1) as total FROM `\" . DB_PREFIX . \"order` WHERE customer_id = \'\" . (int)$order_info[\'customer_id\'] . \"\'\");\r\n\r\n			if ($total_customer_orders_query->row) {\r\n				$total_customer_orders = $total_customer_orders_query->row[\'total\'];\r\n				$template_filter[\'total_customer_orders\'] = $total_customer_orders;\r\n			}\r\n		}\r\n\r\n		$template = $this->model_extension_module_emailtemplate->load($template_load, $data, $template_filter);\r\n\r\n        if ($template) {\r\n            $template->addData($order_info);\r\n\r\n            if (!empty($order_info[\'customer_group_id\'])) {\r\n                $this->load->model(\'account/customer_group\');\r\n\r\n                $customer_group = $this->model_account_customer_group->getCustomerGroup($order_info[\'customer_group_id\']);\r\n\r\n				if ($customer_group) {\r\n					$template->data[\'customer_group\'] = array(\r\n						\'name\' => $customer_group[\'name\'],\r\n						\'description\' => $customer_group[\'description\']\r\n					);\r\n				}\r\n            }\r\n\r\n            if (!empty($order_info[\'affiliate_id\']) && file_exists(DIR_APPLICATION . \'model/account/affiliate.php\')) {\r\n                $this->load->model(\'account/affiliate\');\r\n\r\n                $template->data[\'affiliate\'] = $this->model_account_affiliate->getAffiliate($order_info[\'affiliate_id\']);\r\n            }\r\n\r\n            $template->data[\'order_status\'] = $data[\'order_status\'];\r\n\r\n            $template->data[\'order_status_id\'] = $order_status_id;\r\n\r\n            $template->data[\'total_customer_orders\'] = isset($total_customer_orders) ? $total_customer_orders : 0;\r\n\r\n            $template->data[\'date_added\'] = date($this->language->get(\'date_format_short\'), strtotime($order_info[\'date_added\']));\r\n\r\n            $template->data[\'date_modified\'] = date($this->language->get(\'date_format_short\'), strtotime($order_info[\'date_modified\']));\r\n\r\n            $template->data[\'date_relative_hours\'] = floor((time() - strtotime($order_info[\'date_added\'])) / 3600);\r\n\r\n            if ($order_info[\'invoice_no\']) {\r\n                $template->data[\'invoice_no\'] = $order_info[\'invoice_prefix\'] . $order_info[\'invoice_no\'];\r\n            } else {\r\n                $template->data[\'invoice_no\'] = \'\';\r\n            }\r\n\r\n            if ($order_info[\'order_status_id\'] != $order_status_id){\r\n                $template->data[\'prev_order_status_id\'] = $order_info[\'order_status_id\'];\r\n            }\r\n\r\n            $template->data[\'order_total\'] = $this->currency->format($order_info[\'total\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']);\r\n\r\n            $comment = html_entity_decode($comment, ENT_QUOTES, \'UTF-8\');\r\n\r\n            $template->data[\'comment\'] = (trim(strip_tags($comment)) != \'\') ? $comment : \'\';\r\n\r\n            if ($order_info[\'comment\']) {\r\n                $template->data[\'order_comment\'] = nl2br($order_info[\'comment\']);\r\n            }\r\n\r\n            if ($order_info[\'comment\'] != $comment) {\r\n                $template->data[\'instruction\'] = nl2br($comment);\r\n            } else {\r\n                $template->data[\'instruction\'] = \'\';\r\n            }\r\n\r\n            if ($order_info[\'customer_id\']) {\r\n                $template->data[\'order_link\'] = $order_info[\'store_url\'] . \'index.php?route=account/order/info&order_id=\' . $order_info[\'order_id\'];\r\n\r\n                if (!empty($template->data[\'button_order_link\'])) {\r\n                    $template->data[\'order_link_text\'] = $template->data[\'button_order_link\'];\r\n                } else {\r\n                    $template->data[\'order_link_text\'] = $template->data[\'order_link\'];\r\n                }\r\n            }\r\n\r\n            // Custom fields\r\n            if (!empty($order_info[\'custom_field\']) || !empty($order_info[\'payment_custom_field\'])) {\r\n                $this->load->model(\'account/custom_field\');\r\n\r\n				// Cleanup\r\n				foreach(array(\'custom_field\', \'payment_custom_field\', \'shipping_custom_field\') as $var) {\r\n					if (isset($template->data[$var])) {\r\n						unset($template->data[$var]);\r\n					}\r\n				}\r\n\r\n                if (!empty($order_info[\'customer_group_id\'])) {\r\n                    $customer_group_id = $order_info[\'customer_group_id\'];\r\n                } else {\r\n                    $customer_group_id = $this->config->get(\'config_customer_group_id\');\r\n                }\r\n\r\n                $custom_fields = $this->model_account_custom_field->getCustomFields($customer_group_id);\r\n\r\n                foreach ($custom_fields as $custom_field) {\r\n                    if (isset($order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_name\'] = $custom_field[\'name\'];\r\n\r\n                        if ($custom_field[\'custom_field_value\']) {\r\n                            foreach ($custom_field[\'custom_field_value\'] as $custom_field_value) {\r\n                                if (is_array($order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                    if (in_array($custom_field_value[\'custom_field_value_id\'], $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value_\' . $custom_field_value[\'custom_field_value_id\']] = $custom_field_value[\'name\'];\r\n                                    }\r\n                                } else {\r\n                                    if ($custom_field_value[\'custom_field_value_id\'] == $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']]) {\r\n                                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $custom_field_value[\'name\'];\r\n                                    }\r\n                                }\r\n                            }\r\n                        } else {\r\n                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $order_info[\'payment_custom_field\'][$custom_field[\'custom_field_id\']];\r\n                        }\r\n                    } elseif (isset($order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_name\'] = $custom_field[\'name\'];\r\n\r\n                        if ($custom_field[\'custom_field_value\']) {\r\n                            foreach ($custom_field[\'custom_field_value\'] as $custom_field_value) {\r\n                                if (is_array($order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                    if (in_array($custom_field_value[\'custom_field_value_id\'], $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']])) {\r\n                                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value_\' . $custom_field_value[\'custom_field_value_id\']] = $custom_field_value[\'name\'];\r\n                                    }\r\n                                } else {\r\n                                    if ($custom_field_value[\'custom_field_value_id\'] == $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']]) {\r\n                                        $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $custom_field_value[\'name\'];\r\n                                    }\r\n                                }\r\n                            }\r\n                        } else {\r\n                            $template->data[\'custom_field_\' . $custom_field[\'custom_field_id\'] . \'_value\'] = $order_info[\'custom_field\'][$custom_field[\'custom_field_id\']];\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n			// Address\r\n            foreach(array(\'payment\', \'shipping\') as $var) {\r\n                if ($order_info[$var . \'_address_format\']) {\r\n                    $format = $order_info[$var . \'_address_format\'];\r\n                } else {\r\n                    $format = \'{firstname} {lastname}\' . \"\\n\" . \'{company}\' . \"\\n\" . \'{address_1}\' . \"\\n\" . \'{address_2}\' . \"\\n\" . \'{city} {postcode}\' . \"\\n\" . \'{zone}\' . \"\\n\" . \'{country}\';\r\n                }\r\n\r\n                $find = array(\r\n                    \'{firstname}\',\r\n                    \'{lastname}\',\r\n                    \'{company}\',\r\n                    \'{address_1}\',\r\n                    \'{address_2}\',\r\n                    \'{city}\',\r\n                    \'{postcode}\',\r\n                    \'{zone}\',\r\n                    \'{zone_code}\',\r\n                    \'{country}\'\r\n                );\r\n\r\n                $replace = array(\r\n                    \'firstname\' => $order_info[$var . \'_firstname\'],\r\n                    \'lastname\'  => $order_info[$var . \'_lastname\'],\r\n                    \'company\'   => $order_info[$var . \'_company\'],\r\n                    \'address_1\' => $order_info[$var . \'_address_1\'],\r\n                    \'address_2\' => $order_info[$var . \'_address_2\'],\r\n                    \'city\'      => $order_info[$var . \'_city\'],\r\n                    \'postcode\'  => $order_info[$var . \'_postcode\'],\r\n                    \'zone\'      => $order_info[$var . \'_zone\'],\r\n                    \'zone_code\' => $order_info[$var . \'_zone_code\'],\r\n                    \'country\'   => $order_info[$var . \'_country\']\r\n                );\r\n\r\n                if (isset($order_info[\'custom_field\'])) {\r\n                    foreach ($order_info[\'custom_field\'] as $custom_field_id => $custom_field) {\r\n                        $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                        $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : \'\';\r\n                    }\r\n                }\r\n\r\n                if (!empty($order_info[$var . \'_custom_field\']) && is_array($order_info[$var . \'_custom_field\'])) {\r\n                    foreach ($order_info[$var . \'_custom_field\'] as $custom_field_id => $custom_field) {\r\n                        $find[] = \'{custom_field_\' . $custom_field_id . \'}\';\r\n                        $replace[] = isset($custom_field[\'value\']) ? $custom_field[\'value\'] : $custom_field;\r\n                    }\r\n                }\r\n\r\n                $template->data[$var . \'_address\'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \'<br />\', preg_replace(array(\"/\\s\\s+/\", \"/\\r\\r+/\", \"/\\n\\n+/\"), \'<br />\', trim(str_replace($find, $replace, $format))));\r\n            }\r\n\r\n            $template->data[\'products\'] = array();\r\n\r\n			$order_product_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"order_product WHERE order_id = \'\" . (int)$order_info[\'order_id\'] . \"\'\");\r\n\r\n			$this->load->model(\'tool/image\');\r\n			$this->load->model(\'tool/upload\');\r\n			$this->load->model(\'catalog/product\');\r\n\r\n			foreach ($order_product_query->rows as $product) {\r\n				$product_data = $this->model_catalog_product->getProduct($product[\'product_id\']);\r\n\r\n				$option_data = array();\r\n\r\n				$order_option_query = $this->db->query(\"SELECT oo.*, pov.* FROM \" . DB_PREFIX . \"order_option oo LEFT JOIN \" . DB_PREFIX . \"product_option_value pov ON (pov.product_option_value_id = oo.product_option_value_id) WHERE oo.order_id = \'\" . (int)$order_info[\'order_id\'] . \"\' AND oo.order_product_id = \'\" . (int)$product[\'order_product_id\'] . \"\'\");\r\n\r\n				foreach ($order_option_query->rows as $option) {\r\n					if ($option[\'type\'] != \'file\') {\r\n						$value = $option[\'value\'];\r\n					} else {\r\n						$upload_info = $this->model_tool_upload->getUploadByCode($option[\'value\']);\r\n\r\n						if ($upload_info) {\r\n							$value = $upload_info[\'name\'];\r\n						} else {\r\n							$value = \'\';\r\n						}\r\n					}\r\n\r\n					if ((($this->config->get(\'config_customer_price\') && $this->customer->isLogged()) || !$this->config->get(\'config_customer_price\')) && (float)$option[\'price\']) {\r\n						$price = $this->currency->format($this->tax->calculate($option[\'price\'], $product_data[\'tax_class_id\'], $this->config->get(\'config_tax\') ? \'P\' : false), $this->session->data[\'currency\']);\r\n					} else {\r\n						$price = 0;\r\n					}\r\n\r\n					$option_data[] = array(\r\n						\'name\'  => $option[\'name\'],\r\n						\'price\' => $price,\r\n						\'price_prefix\' => isset($option[\'price_prefix\']) ? $option[\'price_prefix\'] : \'\',\r\n						\'value\' => (utf8_strlen($value) > 120 ? utf8_substr($value, 0, 120) . \'..\' : $value)\r\n					);\r\n				}\r\n\r\n				if (isset($product_data[\'image\'])) {\r\n					$image_width = isset($template->data[\'config\'][\'order_products\'][\'image_width\']) ? $template->data[\'config\'][\'order_products\'][\'image_width\']: 100;\r\n					$image_height = isset($template->data[\'config\'][\'order_products\'][\'image_height\']) ? $template->data[\'config\'][\'order_products\'][\'image_height\']: 100;\r\n\r\n					if ($image_width && $image_height) {\r\n						$image = $this->model_tool_image->resize($product_data[\'image\'], $image_width, $image_height);\r\n\r\n						if (substr($image, 0, 4) != \'http\') {\r\n							$image = $order_info[\'store_url\'] . ltrim($image, \'/\');\r\n						}\r\n					}\r\n				} else {\r\n					$image = \'\';\r\n				}\r\n\r\n				$url = $this->url->link(\'product/product\', \'product_id=\'.$product[\'product_id\'], true);\r\n\r\n				$template->data[\'products\'][] = array(\r\n					\'product_id\'       => $product_data[\'product_id\'],\r\n					\'url\'     		   => $url,\r\n					\'image\'     	   => $image,\r\n					\'weight\'		   => ($product_data[\'weight\'] > 0) ? $this->weight->format($product_data[\'weight\'], $product_data[\'weight_class_id\']) : 0,\r\n					\'description\'      => utf8_substr(strip_tags(html_entity_decode($product_data[\'description\'], ENT_QUOTES, \'UTF-8\')), 0, 200) . \'..\',\r\n					\'manufacturer\'     => $product_data[\'manufacturer\'],\r\n					\'sku\'              => $product_data[\'sku\'],\r\n					\'stock_status\'     => $product_data[\'stock_status\'],\r\n					\'name\'     => $product[\'name\'],\r\n					\'model\'    => $product[\'model\'],\r\n					\'option\'   => $option_data,\r\n					\'quantity\' => $product[\'quantity\'],\r\n					\'price\'    => $this->currency->format($product[\'price\'] + ($this->config->get(\'config_tax\') ? $product[\'tax\'] : 0), $order_info[\'currency_code\'], $order_info[\'currency_value\']),\r\n					\'total\'    => $this->currency->format($product[\'total\'] + ($this->config->get(\'config_tax\') ? ($product[\'tax\'] * $product[\'quantity\']) : 0), $order_info[\'currency_code\'], $order_info[\'currency_value\'])\r\n				);\r\n			}\r\n\r\n			$template->data[\'vouchers\'] = array();\r\n\r\n			$order_voucher_query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"order_voucher` WHERE order_id = \" . (int)$order_info[\'order_id\']);\r\n\r\n			foreach ($order_voucher_query->rows as $voucher) {\r\n				$template->data[\'vouchers\'][] = array(\r\n					\'description\' => $voucher[\'description\'],\r\n					\'amount\'      => $this->currency->format($voucher[\'amount\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']),\r\n				);\r\n			}\r\n\r\n			$order_total_query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"order_total` WHERE order_id = \'\" . (int)$order_info[\'order_id\'] . \"\' ORDER BY sort_order ASC\");\r\n\r\n			foreach ($order_total_query->rows as $total) {\r\n				$template->data[\'totals\'][] = array(\r\n					\'title\' => $total[\'title\'],\r\n					\'text\'  => !empty($total[\'text\']) ? $total[\'text\'] : $this->currency->format($total[\'value\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']),\r\n				);\r\n			}\r\n		    // Prepared mail: order.update\r\n        }\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"1\"><![CDATA[$mail->send();]]></search>\r\n        <ignoreif><![CDATA[// Send mail: order.update]]></ignoreif>\r\n		<add position=\"replace\"><![CDATA[// Send mail: order.update\r\n		if ($template && $template->check()) {\r\n		    $template->build();\r\n		    $template->hook($mail);\r\n        }\r\n\r\n		$mail->send();\r\n\r\n		$this->model_extension_module_emailtemplate->sent();]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[$mail->setHtml($this->load->view(\'mail/order_edit\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/order_edit\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/order_edit\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\r\n<file path=\"admin/controller/sale/order.php\" email_template=\"order.update\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$data[\'text_ip_add\'] = ]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n		$this->load->language(\'extension/module/emailtemplate/order\');\r\n\r\n		$data[\'user_token\'] = $this->session->data[\'user_token\'];\r\n\r\n		$data[\'entry_template\'] = $this->language->get(\'entry_template\');\r\n		$data[\'entry_order_summary\'] = $this->language->get(\'entry_order_summary\');\r\n\r\n		$data[\'text_select\'] = $this->language->get(\'text_select\');\r\n\r\n		$data[\'warning_template_content\'] = $this->language->get(\'warning_template_content\');\r\n\r\n		$data[\'language_id\'] = $order_info[\'language_id\'];\r\n		$data[\'store_id\'] = $order_info[\'store_id\'];\r\n\r\n		$this->load->model(\'localisation/language\');\r\n		$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n		$templates = $this->model_extension_module_emailtemplate->getTemplates(array(\r\n			\'emailtemplate_key\' => \'order.update\',\r\n			\'sort\' => \'default\',\r\n			\'order\' => \'ASC\'\r\n		));\r\n\r\n		$data[\'template_options\'] = array();\r\n\r\n		// Select most appropriate template matching most conditions\r\n			$keys = array(\r\n			\'store_id\' => $order_info[\'store_id\'],\r\n			\'language_id\' => $order_info[\'language_id\'],\r\n			\'customer_group_id\' => $order_info[\'customer_group_id\'],\r\n			\'order_status_id\' => $order_info[\'order_status_id\'],\r\n			\'payment_method\' => $order_info[\'payment_code\'],\r\n			\'shipping_method\' => $order_info[\'shipping_code\'],\r\n		);\r\n\r\n		// Give all templates a \'power\'\r\n		$i = 0;\r\n		foreach ($templates as $template) {\r\n			$i++;\r\n			$data[\'template_options\'][$i] = array(\r\n				\'value\' => $template[\'emailtemplate_id\'],\r\n				\'label\' => $template[\'emailtemplate_label\'] . (!empty($template[\'emailtemplate_default\']) ? \' (\' . strip_tags($this->language->get(\'text_default\')) . \')\': \'\'),\r\n				\'order_status_id\' => $template[\'order_status_id\'],\r\n				\'selected\' => false,\r\n				\'power\' => 0,\r\n			);\r\n\r\n			foreach ($keys as $_key => $_value) {\r\n				$data[\'template_options\'][$i][\'power\'] = $data[\'template_options\'][$i][\'power\'] << 1;\r\n\r\n				if (isset($template[$_key]) && $template[$_key] !== \'\' && $template[$_key] == $_value) {\r\n					$data[\'template_options\'][$i][\'power\'] += 1;\r\n				}\r\n			}\r\n		}\r\n\r\n		// Select template with max \'power\'\r\n		if (count($data[\'template_options\']) > 1) {\r\n			$templates_option_power = 0;\r\n\r\n			foreach ($data[\'template_options\'] as $i => $templates_option) {\r\n				if ($templates_option[\'power\'] > $templates_option_power) {\r\n					$templates_option_selected = $i;\r\n				}\r\n				unset($data[\'template_options\'][$i][\'power\']);\r\n			}\r\n\r\n			if (isset($templates_option_selected)) {\r\n				$data[\'template_options\'][$templates_option_selected][\'selected\'] = true;\r\n			}\r\n		}\r\n\r\n        $data[\'summernote_language\'] = $this->language->get(\'summernote\');\r\n        if ($data[\'summernote_language\'] == \'summernote\') $data[\'summernote_language\'] = \'en\';\r\n\r\n		$this->document->addScript(\'view/javascript/summernote/summernote.js\');\r\n		$this->document->addScript(\'view/javascript/summernote/opencart.js\');\r\n		$this->document->addStyle(\'view/javascript/summernote/summernote.css\');\r\n]]></add>\r\n	</operation>\r\n	<operation error=\"skip\">\r\n		<search><![CDATA[nl2br($result[\'comment\'])]]></search>\r\n		<add position=\"replace\"><![CDATA[html_entity_decode($result[\'comment\'], ENT_QUOTES, \'UTF-8\')]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search><![CDATA[nl2br($order_info[\'comment\'])]]></search>\r\n        <add position=\"replace\"><![CDATA[html_entity_decode($order_info[\'comment\'], ENT_QUOTES, \'UTF-8\')]]></add>\r\n    </operation>\r\n	<operation>\r\n		<search><![CDATA[$data[\'vouchers\'][] = array(]]></search>\r\n		<add position=\"after\"><![CDATA[					\'voucher_id\'  => $voucher[\'voucher_id\'],]]></add>\r\n	</operation>\r\n</file>\r\n\r\n<file path=\"admin/view/template/sale/order_info.twig\" email_template=\"order.update\">\r\n    <operation>\r\n        <search index=\"0\"><![CDATA[id=\"input-comment\" class=\"form-control]]></search>\r\n        <add position=\"replace\"><![CDATA[data-toggle=\"summernote\"  data-lang=\"{{ summernote_language }}\" id=\"input-comment\" class=\"form-control summernote]]></add>\r\n    </operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[id=\"input-notify\"]]></search>\r\n		<add position=\"after\"><![CDATA[                    </div>\r\n                  </div>\r\n                </div>\r\n                <div class=\"form-group form-group-notify\" style=\"display:none\">\r\n                  <label class=\"col-sm-2 control-label\" for=\"input-templates\">{{ entry_template }}</label>\r\n                  <div class=\"col-sm-10\">\r\n                    <select id=\"input-templates\" name=\"emailtemplate_id\" class=\"form-control\">\r\n                      <option value=\"\">{{ text_select }}</option>\r\n                      {% for item in template_options %}\r\n                        <option value=\"{{ item.value }}\" data-order-status=\"{{ item.order_status_id }}\"{{ (item.selected or template_options|length == 1) ? \' selected=\"selected\"\' }}>{{ item.label }}</option>\r\n                      {% endfor %}\r\n                    </select>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"form-group form-group-notify\" style=\"display:none\">\r\n                  <label class=\"col-sm-2 control-label\" for=\"input-order-summary\">{{ entry_order_summary }}</label>\r\n                  <div class=\"col-sm-10\">\r\n                      <div class=\"btn-group btn-group-toggle\" data-toggle=\"buttons\">\r\n                        <label class=\"btn btn-default\">\r\n                          <input type=\"radio\" name=\"order_summary\" value=\"1\"> {{ text_yes }}\r\n                        </label>\r\n                        <label class=\"btn btn-default\">\r\n                          <input type=\"radio\" name=\"order_summary\" value=\"0\"> {{ text_no }}\r\n                        </label>\r\n                      </div>\r\n\r\n                      <div class=\"form-group-order-summary\" style=\"display:none\">\r\n                        <hr />\r\n                        {% for product in products %}\r\n                        <div class=\"checkbox\"><label>\r\n                            <input type=\"checkbox\" name=\"order_summary_products[]\" value=\"{{ product.product_id }}\" checked=\"checked\" />\r\n                            {{ product.name }}\r\n                            {% for option in product.option %}\r\n                            <br />\r\n                            {% if option.type != \'file\' %}\r\n                            &nbsp;<small> - {{ option.name }}: {{ option.value }}</small>\r\n                            {% else %}\r\n                            &nbsp;<small> - {{ option.name }}: <a href=\"{{ option.href }}\">{{ option.value }}</a></small>\r\n                            {% endif %}\r\n                            {% endfor %}\r\n                          </label></div>\r\n                        {% endfor %}\r\n                        {% for voucher in vouchers %}\r\n                        <div class=\"checkbox\"><label>\r\n                            <input type=\"checkbox\" name=\"order_summary_vouchers[]\" value=\"{{ voucher.voucher_id }}\" checked=\"checked\" />\r\n                            {{ voucher.description }}\r\n                          </label>\r\n                        </div>\r\n                        {% endfor %}\r\n                      ]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$(\'#button-history\').on(\'click\', function() {]]></search>\r\n		<add position=\"after\"><![CDATA[  if (typeof CKEDITOR !== \"undefined\" && (CKEDITOR.instances[\"input-comment\"] || CKEDITOR.instances[\"comment\"])) {\r\n  	  if (CKEDITOR.instances[\"input-comment\"]) {\r\n		  CKEDITOR.instances[\"input-comment\"].updateElement();\r\n	  } else {\r\n		  CKEDITOR.instances[\"comment\"].updateElement();\r\n	  }\r\n  }\r\n\r\n  if ($(\"textarea[name=\'comment\']\").val().replace(/(<([^>]+)>)/ig,\"\") == \'\') {\r\n    $(\"textarea[name=\'comment\']\").val(\'\');\r\n  }]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search><![CDATA[\'&comment=\' +]]></search>\r\n		<add position=\"replace\"><![CDATA[($(\'input[name=\\\'order_summary\\\']:checked\').length ? (\'&order_summary=\' + $(\'input[name=\\\'order_summary\\\']:checked\').val()) : \'\') + (\'&order_summary_products=\' + $(\'input[name=\\\'order_summary_products[]\\\']:checked\').map(function() { return $(this).val(); }).toArray()) + (\'&order_summary_vouchers=\' + $(\'input[name=\\\'order_summary_vouchers[]\\\']:checked\').map(function() { return $(this).val(); }).toArray()) + \'&emailtemplate_id=\' + encodeURIComponent($(\'select[name=\\\'emailtemplate_id\\\']\').val()) + \'&comment=\' +]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search><![CDATA[$(\'textarea[name=\\\'comment\\\']\').val(\'\');]]></search>\r\n		<add position=\"after\"><![CDATA[\r\n			if (typeof CKEDITOR !== \"undefined\" && (CKEDITOR.instances[\"input-comment\"] || CKEDITOR.instances[\"comment\"])) {\r\n			  if (CKEDITOR.instances[\"input-comment\"]) {\r\n				  CKEDITOR.instances[\"input-comment\"].setData(\'\');\r\n			  } else {\r\n				  CKEDITOR.instances[\"comment\"].setData(\'\');\r\n			  }\r\n	        } else if ($.fn.summernote) {\r\n				$(\'textarea[name=\\\'comment\\\']\').summernote(\'reset\');\r\n			}\r\n\r\n			$(\'input[name=notify]\').prop(\'checked\', false).parent().removeClass(\'active\');\r\n			$(\'input[name=notify][value=\"0\"]\').parent().addClass(\'active\');\r\n\r\n			$(\'.form-group-notify\').hide().each(function(){\r\n              $(this).find(\'input[type=radio][value!=\"0\"]\').prop(\'checked\', false).parent().removeClass(\'active\');\r\n			  $(this).find(\'input[type=radio][value=\"0\"]\').prop(\'checked\', true).change().parent().addClass(\'active\');\r\n			});\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[{{ footer }}]]></search>\r\n		<add position=\"before\"><![CDATA[\r\n<script type=\"text/javascript\"><!--\r\n(function($){\r\n  $(document).ready(function(){\r\n    var $comment = $(\'textarea[name=comment]\');\r\n\r\n    function fetchTemplateComment(id, callback) {\r\n    	if (!id) return false;\r\n\r\n		if (typeof CKEDITOR !== \"undefined\" && (CKEDITOR.instances[\"input-comment\"] || CKEDITOR.instances[\"comment\"])) {\r\n			var editorName = CKEDITOR.instances[\"input-comment\"] ? \'input-comment\' : \'comment\';\r\n			CKEDITOR.instances[editorName].setData(\'\');\r\n			CKEDITOR.instances[editorName].setReadOnly(true);\r\n		} else if ($.fn.summernote) {\r\n			$comment.summernote(\'code\', \'\');\r\n			$comment.summernote(\'disable\');\r\n		} else {\r\n			$comment.val(\'\');\r\n		}\r\n\r\n        $.ajax({\r\n            url: \'index.php?route=extension/module/emailtemplate/fetch_template&output=comment&user_token={{ user_token }}\',\r\n            type: \'get\',\r\n            data: \'emailtemplate_id=\' + id + \'&store_id={{ store_id }}\' + \'&language_id={{ language_id }}\' + \'&order_id={{ order_id }}\' + \'&order_status_id=\' + $(\'#input-order-status\').val(),\r\n            dataType: \'html\',\r\n            success: function(html) {\r\n                if (html) {\r\n                    $comment.val(html);\r\n\r\n					if (typeof CKEDITOR !== \"undefined\" && (CKEDITOR.instances[\"input-comment\"] || CKEDITOR.instances[\"comment\"])) {\r\n						var editorName = CKEDITOR.instances[\"input-comment\"] ? \'input-comment\' : \'comment\';\r\n						CKEDITOR.instances[editorName].setData(html);\r\n						CKEDITOR.instances[editorName].setReadOnly(false);\r\n					} else if ($.fn.summernote) {\r\n						$comment.summernote(\'code\', html);\r\n						$comment.summernote(\'enable\');\r\n					}\r\n\r\n                    if (callback) callback();\r\n                }\r\n            },\r\n            error: function(xhr, ajaxOptions, thrownError) {\r\n                console.log(thrownError + \"\\r\\n\" + xhr.statusText + \"\\r\\n\" + xhr.responseText);\r\n            }\r\n        })\r\n    }\r\n\r\n    var $notify_group = $(\'.form-group-notify\');\r\n	var $notify_checkbox = $(\'#input-notify\');\r\n    var $order_status = $(\'#input-order-status\');\r\n    var $template_options = $(\'#input-templates\');\r\n\r\n    $notify_checkbox.on(\'change\', function(){\r\n      if ($notify_checkbox.is(\':checked\')) {\r\n        $notify_group.show();\r\n\r\n        if ($order_status.val()) {\r\n          $order_status.trigger(\'change\');\r\n        }\r\n      } else {\r\n        $notify_group.hide();\r\n      }\r\n    });\r\n\r\n    $order_status.on(\'change\', function(){\r\n      var $template_option = $template_options.find(\'option[data-order-status=\"\' + $order_status.val() + \'\"]:eq(0)\');\r\n      // Select default template\r\n      if ($template_option.length == 0) {\r\n        $template_option = $template_options.find(\':nth-child(2)\');\r\n      }\r\n\r\n      var emailtemplate_id = $template_option.val()\r\n\r\n      if ($notify_checkbox.is(\':checked\')) {\r\n        fetchTemplateComment(emailtemplate_id, function () {\r\n          $template_option.prop(\'selected\', true);\r\n        });\r\n      } else {\r\n        $template_options.val(\'\');\r\n      }\r\n    });\r\n\r\n    $(\'input[name=order_summary]\').on(\'change\', function(){\r\n      $(\'.form-group-order-summary\').toggle($(this).val() == 1 ? true : false);\r\n    });\r\n\r\n    $template_options.on(\'change\', function() {\r\n        var id = $(this).val();\r\n        if (!id) {\r\n          $comment.val(\'\')\r\n        } else {\r\n          if ($comment.val() != \'\' && $comment.val() != \'<p><br></p>\' && !confirm(\"{{ warning_template_content }}\")) {\r\n            $(this).val($.data(this, \'current\'));\r\n            return false;\r\n          }\r\n          $.data(this, \'current\', $(this).val());\r\n          fetchTemplateComment(id);\r\n        }\r\n    });\r\n  });\r\n})(jQuery);\r\n//--></script>]]></add>\r\n	</operation>\r\n</file>\r\n\n\n<file path=\"catalog/controller/extension/total/voucher.php\" email_template=\"order.voucher\">\r\n	<operation>\r\n	    <search index=\"0\"><![CDATA[$data[\'message\'] = ]]></search>\r\n	    <add position=\"after\"><![CDATA[\r\n	    			// Prepare mail: order.voucher\r\n					$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n					$template_load = array(\r\n					    \'key\' => \'order.voucher\',\r\n					    \'customer_id\' => $order_info[\'customer_id\'],\r\n					    \'customer_group_id\' => $order_info[\'customer_group_id\'],\r\n					    \'language_id\' => $order_info[\'language_id\'],\r\n					    \'store_id\' => $order_info[\'store_id\'],\r\n                        \'payment_method\' => $order_info[\'payment_code\'],\r\n                        \'shipping_method\' => $order_info[\'shipping_code\']\r\n                    );\r\n\r\n					$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n                    if ($template) {\r\n                        $template->addData($voucher);\r\n\r\n                        $template_data = $data;\r\n                        unset($template_data[\'store_name\']);\r\n                        unset($template_data[\'store_url\']);\r\n                        $template->addData($template_data);\r\n\r\n                        $template->addData($order_info, \'order\');\r\n\r\n                        $template->data[\'store_id\'] = $order_info[\'store_id\'];\r\n\r\n                        $template->data[\'language_id\'] = $order_info[\'language_id\'];\r\n\r\n                        $template->data[\'amount\'] = $this->currency->format($voucher[\'amount\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']);\r\n\r\n                        $template->data[\'order_total\'] = $this->currency->format($order_info[\'total\'], $order_info[\'currency_code\'], $order_info[\'currency_value\']);\r\n\r\n                        if ($voucher[\'image\'] && file_exists(DIR_IMAGE . $voucher[\'image\'])) {\r\n                            $template->data[\'image\'] = $template->data[\'store_url\'] . \'image/\' . $voucher[\'image\'];\r\n\r\n                            list($template->data[\'image_width\'], $template->data[\'image_height\']) = getimagesize(DIR_IMAGE . $voucher[\'image\']);\r\n                        }\r\n\r\n                        $template->data[\'text_heading\'] = sprintf($template->data[\'text_heading\'], $template->data[\'store_name\']);\r\n                        $template->data[\'text_subject\'] = sprintf($template->data[\'text_subject\'], html_entity_decode($template->data[\'store_name\'], ENT_QUOTES, \'UTF-8\'));\r\n\r\n                        $template->data[\'text_greeting\'] = sprintf($this->language->get(\'text_greeting\'), $this->currency->format($voucher_info[\'amount\'], $this->config->get(\'config_currency\')));\r\n						$template->data[\'text_from\'] = sprintf($this->language->get(\'text_from\'), $voucher_info[\'from_name\']);\r\n\r\n                        $template->data[\'voucher_url\'] = $template->data[\'store_url\'];\r\n\r\n                        if (!empty($template->data[\'button_voucher_url\'])) {\r\n                            $template->data[\'voucher_url_text\'] = $template->data[\'button_voucher_url\'];\r\n                        } else {\r\n                            $template->data[\'voucher_url_text\'] = $template->data[\'voucher_url\'];\r\n                        }\r\n					    // Prepared mail: order.voucher\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n	    <search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n	    <add position=\"replace\"><![CDATA[// Send mail: order.voucher\r\n                        if ($template && $template->check()) {\r\n                        	$template->build();\r\n                        	$template->hook($mail);\r\n\r\n                        	$mail->send();\r\n\r\n                        	$this->model_extension_module_emailtemplate->sent();\r\n						}\r\n                    }]]></add>\r\n	</operation>\r\n    <operation error=\"skip\">\r\n        <search index=\"0\"><![CDATA[$mail->setHtml($this->load->view(\'mail/voucher\', $data));]]></search>\r\n        <ignoreif><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/voucher\', $data));]]></ignoreif>\r\n        <add position=\"replace\"><![CDATA[if (empty($template)) $mail->setHtml($this->load->view(\'mail/voucher\', $data));]]></add>\r\n    </operation>\r\n</file>\r\n\n\n<file path=\"catalog/model/catalog/review.php\" email_template=\"product.review\">\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail = new Mail(]]></search>\r\n		<add position=\"before\"><![CDATA[			// Prepare mail: product.review\r\n			$this->load->model(\'extension/module/emailtemplate\');\r\n\r\n			$template_load = array(\'key\' => \'product.review\');\r\n\r\n			$template = $this->model_extension_module_emailtemplate->load($template_load);\r\n\r\n            if ($template) {\r\n                $template->addData($data, \'review\');\r\n\r\n                $template->addData($product_info, \'product\');\r\n\r\n                if (defined(\'HTTP_ADMIN\')) {\r\n                    $admin_url = HTTP_ADMIN;\r\n                } elseif ($this->config->get(\'config_ssl\')) {\r\n                    $admin_url = $this->config->get(\'config_ssl\') . \'admin/\';\r\n                } else {\r\n                    $admin_url = $this->config->get(\'config_url\') . \'admin/\';\r\n                }\r\n\r\n                $template->data[\'review_approve\'] = $admin_url . \'index.php?route=catalog/review/edit&review_id=\' . $review_id;\r\n\r\n				if ($this->language->get(\'button_review_approve\') && $this->language->get(\'button_review_approve\') != \'button_review_approve\') {\r\n					$template->data[\'review_approve_text\'] =  $this->language->get(\'button_review_approve\');\r\n				} else {\r\n					$template->data[\'review_approve_text\'] =  $template->data[\'review_approve\'];\r\n				}\r\n\r\n                $template->data[\'customer_link\'] = $admin_url . \'index.php?route=customer/customer/edit&filter_name=\' . urlencode($data[\'name\']);\r\n\r\n                if ($this->language->get(\'button_customer_link\') && $this->language->get(\'button_customer_link\') != \'button_customer_link\') {\r\n                    $template->data[\'customer_link_text\'] =  $this->language->get(\'button_customer_link\');\r\n                } else {\r\n                    $template->data[\'customer_link_text\'] =  $template->data[\'customer_link\'];\r\n                }\r\n\r\n				$template->data[\'product_link\'] = $this->url->link(\'product/product\', \'product_id=\' . $product_id);\r\n			    // Prepared mail: product.review\r\n		]]></add>\r\n	</operation>\r\n	<operation>\r\n		<search index=\"0\"><![CDATA[$mail->send();]]></search>\r\n		<add position=\"replace\"><![CDATA[// Send mail: product.review\r\n			    if ($template && $template->check()) {\r\n			    	$template->build();\r\n			    	$template->hook($mail);\r\n\r\n					if ($this->customer && $this->customer->isLogged()) {\r\n						$mail->setReplyTo($this->customer->getEmail());\r\n					}\r\n\r\n					$mail->send();\r\n\r\n					$this->model_extension_module_emailtemplate->sent();\r\n                }\r\n            }]]></add>\r\n	</operation>\r\n</file>\r\n\n</modification>', 1, '2022-04-02 12:16:08');
