Реализация Promo Top Bar NAT для OpenCart 4.0.x (PSR-4, Events, Gatekeeper V5 Final, Anti-Zombie)
This commit is contained in:
commit
364505782a
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?php
|
||||||
|
$_['heading_title'] = '<b><i class="fa fa-space-shuttle fa-rotate-270" style="color: #ec741c; margin-right: 3px; vertical-align: -1px;"></i>Promo Top Bar [NAT]:</b> Upper promotional info-banner, information bar above header, marquee and top-banner';
|
||||||
|
$_['heading_title_raw'] = 'Promo Top Bar [NAT]';
|
||||||
|
$_['text_extension'] = 'Extensions';
|
||||||
|
$_['text_success'] = 'Success: You have modified Promo Top Bar [NAT] settings!';
|
||||||
|
$_['text_edit'] = 'Edit Promo Top Bar [NAT]';
|
||||||
|
$_['text_enabled'] = 'Enabled';
|
||||||
|
$_['text_disabled'] = 'Disabled';
|
||||||
|
$_['text_yes'] = 'Yes';
|
||||||
|
$_['text_no'] = 'No';
|
||||||
|
$_['text_home'] = 'Home';
|
||||||
|
|
||||||
|
// Tabs
|
||||||
|
$_['tab_general'] = 'General';
|
||||||
|
$_['tab_slider'] = 'Slider';
|
||||||
|
$_['tab_content'] = 'Content (Slides)';
|
||||||
|
$_['tab_info'] = 'Information';
|
||||||
|
|
||||||
|
// Fields: General
|
||||||
|
$_['entry_status'] = 'Status';
|
||||||
|
$_['help_status'] = 'Enable or disable the promotional bar visibility on the frontend.';
|
||||||
|
$_['entry_layout'] = 'Layout Position';
|
||||||
|
$_['help_layout'] = 'Standard (Relative) - pushes content down (recommended for LCP/CLS indicators). Sticky (Fixed) - remains stuck at the top of the viewport on scroll.';
|
||||||
|
$_['text_layout_standard'] = 'Standard (Push content)';
|
||||||
|
$_['text_layout_sticky'] = 'Sticky (Fixed at top)';
|
||||||
|
$_['entry_show_close'] = 'Close Button (X)';
|
||||||
|
$_['help_show_close'] = 'Show or hide the banner close button.';
|
||||||
|
$_['entry_cookie_expiry'] = 'Cookie Expiry (days)';
|
||||||
|
$_['help_cookie_expiry'] = 'Number of days to keep the bar hidden after close. 0 - reset on session close (new browser session).';
|
||||||
|
$_['entry_show_desktop'] = 'Show on Desktop';
|
||||||
|
$_['help_show_desktop'] = 'Show on screens with width >= 768px.';
|
||||||
|
$_['entry_show_mobile'] = 'Show on Mobile';
|
||||||
|
$_['help_show_mobile'] = 'Show on screens with width < 768px.';
|
||||||
|
$_['entry_height'] = 'Bar Height (px / auto)';
|
||||||
|
$_['help_height'] = 'Leave empty for automatic height adjustment (auto) based on content.';
|
||||||
|
$_['entry_padding_top'] = 'Internal Padding Top (px)';
|
||||||
|
$_['help_padding_top'] = 'Padding between the top edge and content.';
|
||||||
|
$_['entry_padding_bottom'] = 'Internal Padding Bottom (px)';
|
||||||
|
$_['help_padding_bottom'] = 'Padding between content and the bottom edge.';
|
||||||
|
$_['entry_license'] = 'License Key:';
|
||||||
|
$_['help_license'] = 'Enter the license key received upon purchase.';
|
||||||
|
$_['text_license_status'] = 'License Status';
|
||||||
|
$_['text_license_active'] = 'License Active';
|
||||||
|
$_['text_license_missing'] = 'Inactive (Enter key)';
|
||||||
|
|
||||||
|
// Fields: Slider
|
||||||
|
$_['entry_slider_autoplay'] = 'Autoplay Slides';
|
||||||
|
$_['help_slider_autoplay'] = 'Enable automatic transitions for slides (if more than one is added).';
|
||||||
|
$_['entry_slider_speed'] = 'Autoplay Speed (ms)';
|
||||||
|
$_['help_slider_speed'] = 'Slide interval duration in milliseconds (default is 3000).';
|
||||||
|
$_['entry_slider_arrows'] = 'Show Navigation Arrows';
|
||||||
|
$_['help_slider_arrows'] = 'Display "Prev/Next" arrows on desktop screens.';
|
||||||
|
$_['entry_slider_dots'] = 'Show Pagination Dots';
|
||||||
|
$_['help_slider_dots'] = 'Display pagination dot markers below the text.';
|
||||||
|
|
||||||
|
// Fields: Slides
|
||||||
|
$_['entry_bg_type'] = 'Background Type';
|
||||||
|
$_['text_bg_color'] = 'Background Color';
|
||||||
|
$_['text_bg_pattern'] = 'Background Image/Pattern';
|
||||||
|
$_['entry_bg_color'] = 'Background Color';
|
||||||
|
$_['entry_bg_pattern'] = 'Background Pattern';
|
||||||
|
$_['entry_icon_left'] = 'Left Icon/Image';
|
||||||
|
$_['entry_icon_right'] = 'Right Icon/Image';
|
||||||
|
$_['entry_text'] = 'Slide Text';
|
||||||
|
$_['help_text'] = 'Supports HTML tags like <b>, <span>, emojis, etc.';
|
||||||
|
$_['entry_btn_text'] = 'Button Text (CTA)';
|
||||||
|
$_['help_btn_text'] = 'If left blank, the button will not be displayed.';
|
||||||
|
$_['entry_btn_link'] = 'Button Link (URL)';
|
||||||
|
$_['entry_btn_bg'] = 'Button Background Color';
|
||||||
|
$_['entry_btn_color'] = 'Button Text Color';
|
||||||
|
$_['entry_text_after_btn'] = 'Text After Button';
|
||||||
|
$_['entry_full_slide_link'] = 'Make Entire Slide Clickable';
|
||||||
|
$_['help_full_slide_link'] = 'The entire promotional banner container becomes a hyperlink using the button URL.';
|
||||||
|
$_['entry_text_color'] = 'Slide Text Color';
|
||||||
|
$_['help_text_color'] = 'Override the standard text color for this slide.';
|
||||||
|
$_['entry_mobile_text'] = 'Mobile Text';
|
||||||
|
$_['help_mobile_text'] = 'Optional. Shorter text version shown only on mobile screens < 768px (main text is hidden).';
|
||||||
|
$_['entry_sort_order'] = 'Sort Order';
|
||||||
|
$_['entry_slide_status'] = 'Status';
|
||||||
|
|
||||||
|
// Buttons
|
||||||
|
$_['button_save'] = 'Save';
|
||||||
|
$_['button_back'] = 'Back';
|
||||||
|
$_['button_slide_add'] = 'Add Slide';
|
||||||
|
$_['button_remove'] = 'Remove';
|
||||||
|
|
||||||
|
// Errors
|
||||||
|
$_['error_permission'] = 'Warning: You do not have permission to modify Promo Top Bar [NAT]!';
|
||||||
|
$_['error_invalid_license'] = 'Warning: Invalid license key for your domain!';
|
||||||
|
$_['error_license_required'] = 'Warning: License key is required to activate the module!';
|
||||||
|
// Additional
|
||||||
|
$_['entry_menu_position'] = 'Display in Admin Menu';
|
||||||
|
$_['text_menu_module_only'] = 'Extensions List Only';
|
||||||
|
$_['text_menu_header'] = 'In Header Menu';
|
||||||
|
$_['text_menu_sidebar'] = 'In Sidebar Menu';
|
||||||
|
$_['text_menu_both'] = 'Everywhere (Header & Sidebar)';
|
||||||
|
$_['text_display_method'] = 'Module Display Method';
|
||||||
|
$_['text_display_everywhere'] = 'Display everywhere automatically (recommended)';
|
||||||
|
$_['text_display_layout'] = 'Display via OpenCart layouts';
|
||||||
|
$_['text_license_warning'] = 'License key is not activated or invalid';
|
||||||
|
$_['text_license_unlock_desc']= 'To unlock access to the promo bar builder, settings, and statistics of the Promo Top Bar [NAT] module, please specify a correct license key above and save the settings.';
|
||||||
|
$_['text_tab_stats'] = 'Statistics';
|
||||||
|
$_['text_tab_info'] = 'Information';
|
||||||
|
$_['text_info_ecosystem'] = 'Ecosystem of Extensions [NAT]';
|
||||||
|
$_['text_developer_profile'] = 'Profile on OpenCartForum';
|
||||||
|
$_['text_developer_profile_com'] = 'Profile on OpenCart.com';
|
||||||
|
$_['text_lead_contact'] = 'Contact (Email / Phone)';
|
||||||
|
$_['text_lead_date'] = 'Subscribed Date';
|
||||||
|
$_['text_leads_title'] = 'Captured Leads (Email / Contacts)';
|
||||||
|
$_['text_leads_empty'] = 'No leads captured yet.';
|
||||||
|
$_['text_export_leads'] = 'Export Leads to CSV';
|
||||||
|
$_['text_confirm_delete_lead']= 'Are you sure you want to delete this lead?';
|
||||||
|
$_['text_slide_layout'] = 'Slide Bar Position';
|
||||||
|
$_['text_link_product'] = 'Product...';
|
||||||
|
$_['text_link_manufacturer'] = 'Manufacturer...';
|
||||||
|
$_['text_link_brand_list'] = 'Manufacturers (Brands List)';
|
||||||
|
$_['text_select_brand'] = '-- Select Brand --';
|
||||||
|
$_['text_select_product'] = 'Type product name...';
|
||||||
|
$_['entry_exclude_pages'] = 'Exclusion Pages';
|
||||||
|
$_['help_exclude_pages'] = 'Specify system routes (e.g. checkout/checkout) or exact URLs (e.g. /custom-page) where the promo bar should not be shown.';
|
||||||
|
// Styling settings
|
||||||
|
$_['entry_font_size'] = 'Font Size';
|
||||||
|
$_['entry_font_weight'] = 'Font Weight';
|
||||||
|
$_['entry_font_family'] = 'Font Family';
|
||||||
|
$_['entry_custom_css'] = 'Custom CSS Styles (inline)';
|
||||||
|
$_['entry_padding'] = 'Internal Padding';
|
||||||
|
$_['entry_border_radius'] = 'Border Radius';
|
||||||
|
$_['text_default'] = 'Default';
|
||||||
|
|
||||||
|
// Ecosystem tab information
|
||||||
|
$_['text_info_title_catalog_optimizer'] = 'Catalog Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_catalog_optimizer'] = 'Hide empty categories/brands + SEO sorting (in-stock first) + DB garbage cleanup.';
|
||||||
|
$_['text_info_title_database_optimizer'] = 'Database Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_database_optimizer'] = 'Intelligent database garbage collection, system log management, and adding critical indexes for site speedup.';
|
||||||
|
$_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_image_optimizer'] = 'Original image compression to WebP + Mass cleanup of unused images on the server.';
|
||||||
|
$_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT] <span class="label label-warning" style="font-size: 10px; padding: 2px 6px; vertical-align: middle;">Current module</span>';
|
||||||
|
$_['text_info_desc_domain_scanner'] = 'Search and clean external links and HTTP images in DB and theme files. Perfect for HTTPS migration or parsing cleanup.';
|
||||||
|
$_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date';
|
||||||
|
$_['text_info_desc_new_arrivals'] = 'Automatic SEO page for new arrivals. Displays items strictly by actual added date. Sliders, grids, and smart date archive sidebar.';
|
||||||
|
$_['text_info_title_poll_widget'] = 'Poll Widget [NAT]';
|
||||||
|
$_['text_info_desc_poll_widget'] = 'Create polls and voting widgets with a visual design builder, detailed statistics, and fraud protection.';
|
||||||
|
$_['text_info_title_easy_import_export'] = 'Easy Import/Export [NAT]';
|
||||||
|
$_['text_info_desc_easy_import_export'] = 'Fast import/export of prices, stocks and products from XLS/XLSX/CSV/XML/JSON. Field mapping, Cron jobs and URL support.';
|
||||||
|
$_['text_info_title_admin_tools'] = 'Admin Tools [NAT]';
|
||||||
|
$_['text_info_desc_admin_tools'] = 'Handy administrator tools: login as customer, admin customization, user permissions management, and hiding unnecessary menu items.';
|
||||||
|
$_['text_info_title_order_utm'] = 'Order UTM Tracker [NAT]';
|
||||||
|
$_['text_info_desc_order_utm'] = 'Automatic tracking of UTM tags during checkout. Saves the traffic source, campaign, keywords, and displays this data in order details to analyze advertising effectiveness.';
|
||||||
|
$_['text_info_copyright'] = '© %s NAT (info@nat.od.ua). All rights reserved.';
|
||||||
|
$_['text_developer_page'] = 'Our Profile on OpenCartForum';
|
||||||
|
|
||||||
|
$_['text_success_reset'] = 'Statistics successfully cleared!';
|
||||||
|
$_['text_success_delete_lead'] = 'Lead successfully deleted!';
|
||||||
|
$_['text_slide_prefix'] = 'Slide #';
|
||||||
|
$_['text_block_text_prefix'] = 'Text: "';
|
||||||
|
$_['text_csv_slide_id'] = 'Slide ID';
|
||||||
|
$_['text_csv_slide_title'] = 'Slide Title';
|
||||||
|
$_['text_csv_views'] = 'Views';
|
||||||
|
$_['text_csv_clicks'] = 'Clicks';
|
||||||
|
$_['text_csv_closes'] = 'Closes';
|
||||||
|
$_['text_csv_ctr'] = 'CTR';
|
||||||
|
|
||||||
|
// Constructor block strings
|
||||||
|
$_['text_block_subscribe_placeholder_label'] = 'Input Placeholder';
|
||||||
|
$_['text_block_subscribe_placeholder_help'] = 'Enter Email or Telegram...';
|
||||||
|
$_['text_block_subscribe_button_text_label'] = 'Subscription Button Text';
|
||||||
|
$_['text_block_subscribe_button_text_help'] = 'Subscribe';
|
||||||
|
$_['text_block_subscribe_success_msg_label'] = 'Success Message';
|
||||||
|
$_['text_block_subscribe_success_msg_help'] = 'Thank you for subscribing!';
|
||||||
|
$_['text_block_styling_legend'] = 'Styling and Layout';
|
||||||
|
$_['text_block_color_input_bg'] = 'Input Background Color';
|
||||||
|
$_['text_block_color_input_text'] = 'Input Text Color';
|
||||||
|
$_['text_block_color_button_bg'] = 'Button Background Color';
|
||||||
|
$_['text_block_color_button_text'] = 'Button Text Color';
|
||||||
|
$_['text_block_coupon_code_label'] = 'Coupon Code (Latin only, e.g. SALE10)';
|
||||||
|
$_['text_block_coupon_code_help'] = 'SALE10';
|
||||||
|
$_['text_block_coupon_text_label'] = 'Display Text (e.g. Promo: SALE10)';
|
||||||
|
$_['text_block_coupon_text_help'] = 'Promo: SALE10';
|
||||||
|
$_['text_block_coupon_tooltip_label'] = 'Tooltip Text on Copy';
|
||||||
|
$_['text_block_coupon_tooltip_help'] = 'Copied!';
|
||||||
|
$_['text_block_color_coupon_bg'] = 'Coupon Background Color';
|
||||||
|
$_['text_block_color_coupon_text'] = 'Coupon Text Color';
|
||||||
|
$_['text_block_color_coupon_border'] = 'Coupon Border Color';
|
||||||
|
$_['text_block_activity_text_label'] = 'Activity Text Template ({count} replaces with count)';
|
||||||
|
$_['text_block_activity_text_help'] = 'Active buyers checking this page: {count}!';
|
||||||
|
$_['text_block_activity_min_label'] = 'Min. Count';
|
||||||
|
$_['text_block_activity_max_label'] = 'Max. Count';
|
||||||
|
$_['text_block_activity_icon_label'] = 'Activity Icon';
|
||||||
|
$_['text_block_activity_icon_fire'] = 'Fire (Hot)';
|
||||||
|
$_['text_block_activity_icon_eye'] = 'Eye (Views)';
|
||||||
|
$_['text_block_activity_icon_cart'] = 'Cart (Purchases)';
|
||||||
|
$_['text_block_activity_icon_users'] = 'People (Buyers)';
|
||||||
|
$_['text_block_color_text'] = 'Text Color';
|
||||||
|
$_['text_block_anim_icon_type_label'] = 'Animated Icon Type';
|
||||||
|
$_['text_block_anim_icon_type_bell'] = 'Bell (Notification)';
|
||||||
|
$_['text_block_anim_icon_type_gift'] = 'Gift (Promo)';
|
||||||
|
$_['text_block_anim_icon_type_tag'] = 'Tag (Discount)';
|
||||||
|
$_['text_block_anim_icon_type_fire'] = 'Fire (Hot)';
|
||||||
|
$_['text_block_anim_icon_type_cart'] = 'Cart (Shopping)';
|
||||||
|
$_['text_block_anim_icon_size_label'] = 'Icon Size (px)';
|
||||||
|
$_['text_block_color_icon'] = 'Icon Color';
|
||||||
|
$_['text_block_product_select_label'] = 'Select Product (autocomplete)';
|
||||||
|
$_['text_block_product_select_help'] = 'Type product name...';
|
||||||
|
$_['text_block_product_show_image'] = 'Show Image';
|
||||||
|
$_['text_block_product_show_price'] = 'Show Price';
|
||||||
|
$_['text_block_product_show_button'] = 'Show Buy Button';
|
||||||
|
$_['text_block_product_button_text_label'] = 'Button Text';
|
||||||
|
$_['text_block_product_button_text_help'] = 'Buy / Details';
|
||||||
|
$_['text_block_color_product_btn_bg'] = 'Button Background';
|
||||||
|
$_['text_block_color_product_btn_text'] = 'Button Text Color';
|
||||||
|
$_['error_duplicate_block_type'] = 'Error: You cannot duplicate blocks of this type';
|
||||||
|
$_['text_success_duplicate_block'] = 'Block duplicated successfully!';
|
||||||
|
$_['text_inherit_default'] = 'Default (Inherit)';
|
||||||
|
$_['text_select_slide_placeholder'] = 'Select a slide from the left list';
|
||||||
|
$_['text_empty_slide_placeholder'] = 'Empty slide (add blocks)';
|
||||||
|
$_['text_no_custom_colors'] = 'No custom colors';
|
||||||
|
$_['text_saved_auto'] = 'Settings saved automatically';
|
||||||
|
|
||||||
|
// Slide targeting translations
|
||||||
|
$_['text_slide_customer_groups_label'] = 'Limit Display by Customer Groups:';
|
||||||
|
$_['text_slide_customer_groups_help'] = 'If no group is selected, the banner is shown to all customers.';
|
||||||
|
$_['text_slide_visitor_type_label'] = 'Visitor Type:';
|
||||||
|
$_['text_slide_visitor_type_all'] = 'All Visitors (default)';
|
||||||
|
$_['text_slide_visitor_type_new'] = 'Only New Visitors';
|
||||||
|
$_['text_slide_visitor_type_returning'] = 'Only Returning Visitors';
|
||||||
|
$_['text_slide_stores_label'] = 'Limit Display by Stores:';
|
||||||
|
$_['text_slide_stores_help'] = 'If no store is selected, the banner is shown in all stores.';
|
||||||
|
$_['text_slide_utm_campaign_label'] = 'UTM Campaign Targeting (utm_campaign):';
|
||||||
|
$_['text_slide_utm_campaign_placeholder'] = 'e.g. sale2026, blackfriday';
|
||||||
|
$_['text_slide_utm_campaign_help'] = 'Show banner only when landing with specific UTM Campaign values (comma-separated).';
|
||||||
|
$_['text_slide_referer_label'] = 'Referrer Source (Referer):';
|
||||||
|
$_['text_slide_referer_all'] = 'All Sources (default)';
|
||||||
|
$_['text_slide_referer_direct'] = 'Direct Hits (Direct)';
|
||||||
|
$_['text_slide_referer_search'] = 'Search Engines (Google, Bing...)';
|
||||||
|
$_['text_slide_referer_social'] = 'Social Networks (Facebook, Instagram, Telegram...)';
|
||||||
|
$_['text_slide_referer_help'] = 'Show banner only to users arriving from selected referrer sources.';
|
||||||
|
$_['text_slide_days_label'] = 'Limit Display by Weekdays:';
|
||||||
|
$_['text_day_mon'] = 'Mon';
|
||||||
|
$_['text_day_tue'] = 'Tue';
|
||||||
|
$_['text_day_wed'] = 'Wed';
|
||||||
|
$_['text_day_thu'] = 'Thu';
|
||||||
|
$_['text_day_fri'] = 'Fri';
|
||||||
|
$_['text_day_sat'] = 'Sat';
|
||||||
|
$_['text_day_sun'] = 'Sun';
|
||||||
|
$_['text_slide_days_help'] = 'If no day is selected, the banner is shown on all days of the week.';
|
||||||
|
$_['text_slide_time_label'] = 'Limit Display by Time of Day:';
|
||||||
|
$_['text_time_from'] = 'From';
|
||||||
|
$_['text_time_to'] = 'To';
|
||||||
|
$_['text_slide_time_help'] = 'Show banner only during selected time interval (e.g. from 09:00 to 18:00).';
|
||||||
|
$_['text_slide_cart_min_label'] = 'Limit by Cart Total (Minimum):';
|
||||||
|
$_['text_slide_cart_max_label'] = 'Limit by Cart Total (Maximum):';
|
||||||
|
$_['text_slide_cart_max_help'] = 'Specify amount to hide the banner once the limit is reached.';
|
||||||
|
$_['text_slide_cart_products_label'] = 'Targeting by Products in Cart (comma-separated IDs):';
|
||||||
|
$_['text_slide_cart_products_placeholder'] = 'e.g. 42, 30';
|
||||||
|
$_['text_slide_cart_products_help'] = 'Show banner only if buyer's cart contains products with specified IDs (comma-separated).';
|
||||||
|
$_['text_slide_weather_label'] = 'Targeting by Weather (Beta):';
|
||||||
|
$_['text_slide_weather_off'] = 'Disabled (show always)';
|
||||||
|
$_['text_slide_weather_snow'] = 'It is snowing, heavy frost / winter weather';
|
||||||
|
$_['text_slide_weather_rain'] = 'It is raining, thunderstorm / autumn weather';
|
||||||
|
$_['text_slide_weather_sun'] = 'Sun is shining, hot / summer weather';
|
||||||
|
$_['text_slide_weather_help'] = 'Weather targeting is based on buyer's IP address (uses external API, may have margin of error).';
|
||||||
|
$_['text_slide_device_label'] = 'Targeting by Devices:';
|
||||||
|
$_['text_slide_device_all'] = 'All Devices (default)';
|
||||||
|
$_['text_slide_device_desktop'] = 'Only Desktops (Desktop)';
|
||||||
|
$_['text_slide_device_mobile'] = 'Only Mobiles (Mobile)';
|
||||||
|
$_['text_slide_os_label'] = 'Targeting by Operating Systems:';
|
||||||
|
$_['text_slide_os_all'] = 'All OS (default)';
|
||||||
|
$_['text_slide_os_ios'] = 'Only iOS (iPhone, iPad)';
|
||||||
|
$_['text_slide_os_android'] = 'Only Android';
|
||||||
|
$_['text_slide_sort_order_label'] = 'Sort Order:';
|
||||||
|
$_['text_slide_language_all'] = 'All Languages (default)';
|
||||||
|
|
||||||
|
$_['text_block_shipping_text_before_label'] = 'Text BEFORE reaching threshold ({diff} replaces with diff)';
|
||||||
|
$_['text_block_shipping_text_before_help'] = 'Only {diff} left for free shipping!';
|
||||||
|
$_['text_block_shipping_text_after_label'] = 'Text AFTER reaching threshold';
|
||||||
|
$_['text_block_shipping_text_after_help'] = 'Free shipping is active!';
|
||||||
|
|
||||||
|
|
||||||
|
// --- NAT Unified License Card ---
|
||||||
|
$_['text_nat_series_badge'] = '[NAT] Series Module';
|
||||||
|
$_['text_nat_license_title'] = 'License Activation';
|
||||||
|
$_['text_nat_domain_label'] = 'Your domain:';
|
||||||
|
$_['text_nat_copy_domain'] = 'Copy';
|
||||||
|
$_['text_nat_copy_done'] = 'Copied!';
|
||||||
|
$_['text_nat_license_label'] = 'License Key:';
|
||||||
|
$_['text_nat_btn_activate'] = 'Activate';
|
||||||
|
$_['text_nat_bot_title'] = 'Get key via Telegram bot';
|
||||||
|
$_['text_nat_bot_btn'] = 'Get key via Telegram Bot';
|
||||||
|
$_['text_nat_free_label'] = 'Free / promo module:';
|
||||||
|
$_['text_nat_free_desc'] = 'Key generation in the Telegram bot is instant, 24/7. Just provide your OpenCart/ocStore version and your domain (or test subdomain).';
|
||||||
|
$_['text_nat_paid_label'] = 'Commercial module:';
|
||||||
|
$_['text_nat_paid_desc'] = 'The license key will be issued after order verification (when the author is online). Please provide: the marketplace where you purchased, order ID, OpenCart version, and your domain.';
|
||||||
|
$_['text_nat_alt_contact'] = 'Alternative contact methods:';
|
||||||
|
$_['text_nat_contact_tg'] = 'Telegram';
|
||||||
|
$_['text_nat_contact_forum'] = 'Forum';
|
||||||
|
|
||||||
|
|
||||||
|
// Вкладка «О модуле»
|
||||||
|
$_['tab_nat_info'] = 'About Module';
|
||||||
|
$_['text_nat_author'] = 'Author / Developer:';
|
||||||
|
$_['text_nat_support'] = 'Support:';
|
||||||
|
$_['text_nat_tg_channel'] = 'Support Telegram Bot:';
|
||||||
|
$_['text_nat_dev_profile'] = 'Forum Profile:';
|
||||||
|
$_['text_nat_site'] = 'Official Website:';
|
||||||
|
$_['text_nat_version_badge']= 'Official Version 3.0 ai';
|
||||||
|
|
||||||
|
// --- Лицензирование NAT (Стандарт V5 Final) ---
|
||||||
|
$_['nat_gk_title'] = 'Module Activation';
|
||||||
|
$_['text_nat_enter_key'] = 'Enter license key:';
|
||||||
|
$_['button_nat_activate'] = 'Activate';
|
||||||
|
$_['text_nat_rule_domain'] = '1 purchase = 1 domain';
|
||||||
|
$_['text_nat_contacts_title'] = 'Get key and support:';
|
||||||
|
$_['placeholder_license'] = 'XXXX - XXXX - XXXX - XXXX';
|
||||||
|
|
||||||
|
$_['text_nat_rules_title'] = 'License terms:';
|
||||||
|
$_['text_nat_rules_desc'] = '1 purchase = 1 domain. Key is bound to the primary domain without www prefix.';
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?php
|
||||||
|
$_['heading_title'] = '<b><i class="fa fa-space-shuttle fa-rotate-270" style="color: #ec741c; margin-right: 3px; vertical-align: -1px;"></i>Promo Top Bar [NAT]:</b> Верхний рекламный инфо-баннер, информационная полоса над шапкой, бегущая строка и топ-баннер';
|
||||||
|
$_['heading_title_raw'] = 'Promo Top Bar [NAT]';
|
||||||
|
$_['text_extension'] = 'Расширения';
|
||||||
|
$_['text_success'] = 'Настройки модуля успешно сохранены!';
|
||||||
|
$_['text_edit'] = 'Редактирование модуля Promo Top Bar [NAT]';
|
||||||
|
$_['text_enabled'] = 'Включено';
|
||||||
|
$_['text_disabled'] = 'Выключено';
|
||||||
|
$_['text_yes'] = 'Да';
|
||||||
|
$_['text_no'] = 'Нет';
|
||||||
|
$_['text_home'] = 'Главная';
|
||||||
|
|
||||||
|
// Вкладки
|
||||||
|
$_['tab_general'] = 'Основные';
|
||||||
|
$_['tab_slider'] = 'Слайдер';
|
||||||
|
$_['tab_content'] = 'Контент (Слайды)';
|
||||||
|
$_['tab_info'] = 'Информация';
|
||||||
|
|
||||||
|
// Поля: Основные
|
||||||
|
$_['entry_status'] = 'Статус модуля';
|
||||||
|
$_['help_status'] = 'Включить или выключить отображение промо-полосы на фронтенде.';
|
||||||
|
$_['entry_layout'] = 'Расположение полосы';
|
||||||
|
$_['help_layout'] = 'Standard (Relative) — сдвигает контент сайта вниз (рекомендуется для LCP/CLS). Sticky (Fixed) — полоса залипает вверху при скролле.';
|
||||||
|
$_['text_layout_standard'] = 'Standard (Сдвигает контент)';
|
||||||
|
$_['text_layout_sticky'] = 'Sticky (Залипает вверху)';
|
||||||
|
$_['entry_show_close'] = 'Кнопка закрытия (Крестик)';
|
||||||
|
$_['help_show_close'] = 'Показывать ли кнопку закрытия баннера.';
|
||||||
|
$_['entry_cookie_expiry'] = 'Срок действия Cookie (в днях)';
|
||||||
|
$_['help_cookie_expiry'] = 'Через сколько дней после закрытия полоса снова покажется. 0 — сброс при закрытии вкладки (до конца сессии).';
|
||||||
|
$_['entry_show_desktop'] = 'Показывать на ПК';
|
||||||
|
$_['help_show_desktop'] = 'Показывать на экранах шириной >= 768px.';
|
||||||
|
$_['entry_show_mobile'] = 'Показывать на мобильных';
|
||||||
|
$_['help_show_mobile'] = 'Показывать на экранах шириной < 768px.';
|
||||||
|
$_['entry_height'] = 'Высота полосы (px / auto)';
|
||||||
|
$_['help_height'] = 'Оставьте пустым для автоматической высоты (auto) под контент.';
|
||||||
|
$_['entry_padding_top'] = 'Внутренний отступ сверху (px)';
|
||||||
|
$_['help_padding_top'] = 'Отступ от верхнего края полосы до контента.';
|
||||||
|
$_['entry_padding_bottom'] = 'Внутренний отступ снизу (px)';
|
||||||
|
$_['help_padding_bottom'] = 'Отступ от контента до нижнего края полосы.';
|
||||||
|
$_['entry_license'] = 'Лицензионный ключ:';
|
||||||
|
$_['help_license'] = 'Введите ключ, полученный при покупке модуля.';
|
||||||
|
$_['text_license_status'] = 'Статус лицензии';
|
||||||
|
$_['text_license_active'] = 'Лицензия активна';
|
||||||
|
$_['text_license_missing'] = 'Не активирована (введите ключ)';
|
||||||
|
|
||||||
|
// Поля: Слайдер
|
||||||
|
$_['entry_slider_autoplay'] = 'Автопрокрутка слайдов';
|
||||||
|
$_['help_slider_autoplay'] = 'Автоматическое переключение слайдов (если их больше одного).';
|
||||||
|
$_['entry_slider_speed'] = 'Скорость автопрокрутки (мс)';
|
||||||
|
$_['help_slider_speed'] = 'Интервал смены слайдов в миллисекундах (по умолчанию 3000).';
|
||||||
|
$_['entry_slider_arrows'] = 'Стрелки навигации';
|
||||||
|
$_['help_slider_arrows'] = 'Показывать стрелки "Вперед/Назад" на десктопах.';
|
||||||
|
$_['entry_slider_dots'] = 'Точки пагинации';
|
||||||
|
$_['help_slider_dots'] = 'Показывать индикаторы-точки под текстом.';
|
||||||
|
|
||||||
|
// Поля: Слайды
|
||||||
|
$_['entry_bg_type'] = 'Тип фона';
|
||||||
|
$_['text_bg_color'] = 'Цвет фона';
|
||||||
|
$_['text_bg_pattern'] = 'Изображение-паттерн';
|
||||||
|
$_['entry_bg_color'] = 'Цвет фона';
|
||||||
|
$_['entry_bg_pattern'] = 'Паттерн фона';
|
||||||
|
$_['entry_icon_left'] = 'Левая иконка/картинка';
|
||||||
|
$_['entry_icon_right'] = 'Правая иконка/картинка';
|
||||||
|
$_['entry_text'] = 'Текст слайда';
|
||||||
|
$_['help_text'] = 'Поддерживает HTML-теги <b>, <span>, emoji и т.д.';
|
||||||
|
$_['entry_btn_text'] = 'Текст кнопки (CTA)';
|
||||||
|
$_['help_btn_text'] = 'Если оставить пустым, кнопка не будет выводиться.';
|
||||||
|
$_['entry_btn_link'] = 'Ссылка кнопки (URL)';
|
||||||
|
$_['entry_btn_bg'] = 'Цвет фона кнопки';
|
||||||
|
$_['entry_btn_color'] = 'Цвет текста кнопки';
|
||||||
|
$_['entry_text_after_btn'] = 'Текст после кнопки';
|
||||||
|
$_['entry_full_slide_link'] = 'Сделать весь слайд ссылкой';
|
||||||
|
$_['help_full_slide_link'] = 'Весь промо-баннер станет кликабельным со ссылкой кнопки.';
|
||||||
|
$_['entry_text_color'] = 'Цвет текста слайда';
|
||||||
|
$_['help_text_color'] = 'Переопределить стандартный цвет текста для этого слайда.';
|
||||||
|
$_['entry_mobile_text'] = 'Текст для мобильных';
|
||||||
|
$_['help_mobile_text'] = 'Опционально. Короткий текст, который покажется на экранах < 768px (основной скроется).';
|
||||||
|
$_['entry_sort_order'] = 'Порядок сортировки';
|
||||||
|
$_['entry_slide_status'] = 'Статус';
|
||||||
|
|
||||||
|
// Кнопки
|
||||||
|
$_['button_save'] = 'Сохранить';
|
||||||
|
$_['button_back'] = 'Назад';
|
||||||
|
$_['button_slide_add'] = 'Добавить слайд';
|
||||||
|
$_['button_remove'] = 'Удалить';
|
||||||
|
|
||||||
|
// Ошибки
|
||||||
|
$_['error_permission'] = 'Внимание! У вас нет прав для изменения модуля Promo Top Bar [NAT]!';
|
||||||
|
$_['error_invalid_license'] = 'Внимание! Введен неверный лицензионный ключ модуля для вашего домена!';
|
||||||
|
$_['error_license_required'] = 'Внимание! Для работы модуля необходимо ввести лицензионный ключ!';
|
||||||
|
// Дополнительно
|
||||||
|
$_['entry_menu_position'] = 'Отображение в меню';
|
||||||
|
$_['text_menu_module_only'] = 'Только в Дополнениях';
|
||||||
|
$_['text_menu_header'] = 'В меню в шапке';
|
||||||
|
$_['text_menu_sidebar'] = 'В боковом меню';
|
||||||
|
$_['text_menu_both'] = 'Везде (в шапке и боковом)';
|
||||||
|
$_['text_display_method'] = 'Способ вывода модуля на сайте';
|
||||||
|
$_['text_display_everywhere'] = 'Выводить везде автоматически (рекомендуется)';
|
||||||
|
$_['text_display_layout'] = 'Выводить через макеты OpenCart';
|
||||||
|
$_['text_license_warning'] = 'Лицензионный ключ не активирован или неверный';
|
||||||
|
$_['text_license_unlock_desc']= 'Для разблокировки доступа к конструктору промо-полос, настройкам и статистике модуля Promo Top Bar [NAT], пожалуйста, укажите корректный лицензионный ключ выше и сохраните настройки.';
|
||||||
|
$_['text_tab_stats'] = 'Статистика';
|
||||||
|
$_['text_tab_info'] = 'Информация';
|
||||||
|
$_['text_info_ecosystem'] = 'Экосистема расширений [NAT]';
|
||||||
|
$_['text_developer_profile'] = 'Профиль на OpenCartForum';
|
||||||
|
$_['text_developer_profile_com'] = 'Профиль на OpenCart.com';
|
||||||
|
$_['text_lead_contact'] = 'Контакт (Email / Телефон)';
|
||||||
|
$_['text_lead_date'] = 'Дата подписки';
|
||||||
|
$_['text_leads_title'] = 'Сбор лидов (Email / Контакты)';
|
||||||
|
$_['text_leads_empty'] = 'Лидов пока нет.';
|
||||||
|
$_['text_export_leads'] = 'Экспорт лидов в CSV';
|
||||||
|
$_['text_confirm_delete_lead']= 'Вы действительно хотите удалить этот лид?';
|
||||||
|
$_['text_slide_layout'] = 'Расположение полосы слайда';
|
||||||
|
$_['text_link_product'] = 'Товар...';
|
||||||
|
$_['text_link_manufacturer'] = 'Производитель...';
|
||||||
|
$_['text_link_brand_list'] = 'Производители (список брендов)';
|
||||||
|
$_['text_select_brand'] = '-- Выберите бренд --';
|
||||||
|
$_['text_select_product'] = 'Введите название товара...';
|
||||||
|
$_['entry_exclude_pages'] = 'Исключения страниц';
|
||||||
|
$_['help_exclude_pages'] = 'Укажите системные пути (например, checkout/checkout) или точные URL (например, /custom-page), на которых не нужно показывать промо-панель.';
|
||||||
|
// Styling settings
|
||||||
|
$_['entry_font_size'] = 'Размер шрифта';
|
||||||
|
$_['entry_font_weight'] = 'Начертание';
|
||||||
|
$_['entry_font_family'] = 'Шрифт';
|
||||||
|
$_['entry_custom_css'] = 'Кастомный CSS стили (inline)';
|
||||||
|
$_['entry_padding'] = 'Внутренние отступы';
|
||||||
|
$_['entry_border_radius'] = 'Скругление углов';
|
||||||
|
$_['text_default'] = 'По умолчанию';
|
||||||
|
|
||||||
|
// Ecosystem tab information
|
||||||
|
$_['text_info_title_catalog_optimizer'] = 'Catalog Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_catalog_optimizer'] = 'Скрытие пустых категорий/брендов + SEO сортировка (сначала в наличии) + очистка мусора в БД.';
|
||||||
|
$_['text_info_title_database_optimizer'] = 'Database Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_database_optimizer'] = 'Интеллектуальная очистка мусора в БД, управление системными логами и добавление критических индексов для ускорения сайта.';
|
||||||
|
$_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_image_optimizer'] = 'Сжатие оригинальных изображений в WebP + массовая очистка неиспользуемых картинок на сервере.';
|
||||||
|
$_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT] <span class="label label-warning" style="font-size: 10px; padding: 2px 6px; vertical-align: middle;">Текущий модуль</span>';
|
||||||
|
$_['text_info_desc_domain_scanner'] = 'Поиск и очистка внешних ссылок и картинок по HTTP в БД и файлах темы. Идеально для перехода на HTTPS или очистки после парсинга.';
|
||||||
|
$_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date';
|
||||||
|
$_['text_info_desc_new_arrivals'] = 'Автоматическая SEO страница для новинок. Выводит товары строго по реальной дате добавления. Слайдеры, сетки и умный сайдбар архива дат.';
|
||||||
|
$_['text_info_title_poll_widget'] = 'Poll Widget [NAT]';
|
||||||
|
$_['text_info_desc_poll_widget'] = 'Создание опросов и виджетов голосования с визуальным конструктором дизайна, детальной статистикой и защитой от накруток.';
|
||||||
|
$_['text_info_title_easy_import_export'] = 'Easy Import/Export [NAT]';
|
||||||
|
$_['text_info_desc_easy_import_export'] = 'Быстрый импорт/экспорт цен, остатков и товаров из XLS/XLSX/CSV/XML/JSON. Маппинг полей, Cron и поддержка URL.';
|
||||||
|
$_['text_info_title_admin_tools'] = 'Admin Tools [NAT]';
|
||||||
|
$_['text_info_desc_admin_tools'] = 'Удобные инструменты администратора: вход под клиентом, кастомизация админки, управление правами пользователей и скрытие пунктов меню.';
|
||||||
|
$_['text_info_title_order_utm'] = 'Order UTM Tracker [NAT]';
|
||||||
|
$_['text_info_desc_order_utm'] = 'Автоматическое отслеживание UTM-меток при оформлении заказа. Сохраняет источник трафика, кампанию, ключевые слова и выводит в детали заказа для анализа эффективности рекламы.';
|
||||||
|
$_['text_info_copyright'] = '© %s NAT (info@nat.od.ua). Все права защищены.';
|
||||||
|
$_['text_developer_page'] = 'Наша страница на OpenCartForum';
|
||||||
|
|
||||||
|
$_['text_success_reset'] = 'Статистика успешно очищена!';
|
||||||
|
$_['text_success_delete_lead'] = 'Лид успешно удален!';
|
||||||
|
$_['text_slide_prefix'] = 'Слайд #';
|
||||||
|
$_['text_block_text_prefix'] = 'Текст: "';
|
||||||
|
$_['text_csv_slide_id'] = 'Slide ID';
|
||||||
|
$_['text_csv_slide_title'] = 'Название слайда';
|
||||||
|
$_['text_csv_views'] = 'Просмотры';
|
||||||
|
$_['text_csv_clicks'] = 'Клики';
|
||||||
|
$_['text_csv_closes'] = 'Закрытия';
|
||||||
|
$_['text_csv_ctr'] = 'CTR';
|
||||||
|
|
||||||
|
// Constructor block strings
|
||||||
|
$_['text_block_subscribe_placeholder_label'] = 'Подсказка в инпуте (Placeholder)';
|
||||||
|
$_['text_block_subscribe_placeholder_help'] = 'Введите Email или Telegram...';
|
||||||
|
$_['text_block_subscribe_button_text_label'] = 'Текст на кнопке подписки';
|
||||||
|
$_['text_block_subscribe_button_text_help'] = 'Подписаться';
|
||||||
|
$_['text_block_subscribe_success_msg_label'] = 'Сообщение об успешной отправке';
|
||||||
|
$_['text_block_subscribe_success_msg_help'] = 'Спасибо за подписку!';
|
||||||
|
$_['text_block_styling_legend'] = 'Стилизация и оформление';
|
||||||
|
$_['text_block_color_input_bg'] = 'Цвет фона инпута';
|
||||||
|
$_['text_block_color_input_text'] = 'Цвет текста инпута';
|
||||||
|
$_['text_block_color_button_bg'] = 'Цвет фона кнопки';
|
||||||
|
$_['text_block_color_button_text'] = 'Цвет текста кнопки';
|
||||||
|
$_['text_block_coupon_code_label'] = 'Код промокода (Только латиница, пример: SALE10)';
|
||||||
|
$_['text_block_coupon_code_help'] = 'SALE10';
|
||||||
|
$_['text_block_coupon_text_label'] = 'Отображаемый текст (Пример: Промокод: SALE10)';
|
||||||
|
$_['text_block_coupon_text_help'] = 'Промокод: SALE10';
|
||||||
|
$_['text_block_coupon_tooltip_label'] = 'Подсказка при копировании';
|
||||||
|
$_['text_block_coupon_tooltip_help'] = 'Скопировано!';
|
||||||
|
$_['text_block_color_coupon_bg'] = 'Цвет фона купона';
|
||||||
|
$_['text_block_color_coupon_text'] = 'Цвет текста купона';
|
||||||
|
$_['text_block_color_coupon_border'] = 'Цвет рамки купона';
|
||||||
|
$_['text_block_activity_text_label'] = 'Шаблон текста ({count} заменится на число)';
|
||||||
|
$_['text_block_activity_text_help'] = 'Акцию сегодня посмотрели уже {count} человек!';
|
||||||
|
$_['text_block_activity_min_label'] = 'Мин. число';
|
||||||
|
$_['text_block_activity_max_label'] = 'Макс. число';
|
||||||
|
$_['text_block_activity_icon_label'] = 'Иконка';
|
||||||
|
$_['text_block_activity_icon_fire'] = 'Огонь (Hot)';
|
||||||
|
$_['text_block_activity_icon_eye'] = 'Глаз (Просмотры)';
|
||||||
|
$_['text_block_activity_icon_cart'] = 'Корзина (Покупки)';
|
||||||
|
$_['text_block_activity_icon_users'] = 'Люди (Покупатели)';
|
||||||
|
$_['text_block_color_text'] = 'Цвет текста';
|
||||||
|
$_['text_block_anim_icon_type_label'] = 'Выберите анимированную иконку';
|
||||||
|
$_['text_block_anim_icon_type_bell'] = 'Колокольчик (Уведомление)';
|
||||||
|
$_['text_block_anim_icon_type_gift'] = 'Подарок (Акция)';
|
||||||
|
$_['text_block_anim_icon_type_tag'] = 'Бирка (Промо)';
|
||||||
|
$_['text_block_anim_icon_type_fire'] = 'Огонь (Хит)';
|
||||||
|
$_['text_block_anim_icon_type_cart'] = 'Корзина (Покупка)';
|
||||||
|
$_['text_block_anim_icon_size_label'] = 'Размер иконки в px';
|
||||||
|
$_['text_block_color_icon'] = 'Цвет иконки';
|
||||||
|
$_['text_block_product_select_label'] = 'Выбор товара (автокомплит)';
|
||||||
|
$_['text_block_product_select_help'] = 'Начните вводить название...';
|
||||||
|
$_['text_block_product_show_image'] = 'Показывать изображение';
|
||||||
|
$_['text_block_product_show_price'] = 'Показывать цену';
|
||||||
|
$_['text_block_product_show_button'] = 'Показывать кнопку';
|
||||||
|
$_['text_block_product_button_text_label'] = 'Текст на кнопке';
|
||||||
|
$_['text_block_product_button_text_help'] = 'Купить / Подробнее';
|
||||||
|
$_['text_block_color_product_btn_bg'] = 'Цвет кнопки';
|
||||||
|
$_['text_block_color_product_btn_text'] = 'Цвет текста на кнопке';
|
||||||
|
$_['error_duplicate_block_type'] = 'Ошибка: Нельзя дублировать блоки этого типа';
|
||||||
|
$_['text_success_duplicate_block'] = 'Блок успешно продублирован!';
|
||||||
|
$_['text_inherit_default'] = 'По умолчанию (Наследовать)';
|
||||||
|
$_['text_select_slide_placeholder'] = 'Выберите слайд из списка слева';
|
||||||
|
$_['text_empty_slide_placeholder'] = 'Пустой слайд (добавьте блоки)';
|
||||||
|
$_['text_no_custom_colors'] = 'Нет кастомных цветов';
|
||||||
|
$_['text_saved_auto'] = 'Настройки сохранены автоматически';
|
||||||
|
|
||||||
|
// Slide targeting translations
|
||||||
|
$_['text_slide_customer_groups_label'] = 'Ограничить показ для групп клиентов:';
|
||||||
|
$_['text_slide_customer_groups_help'] = 'Если ни одна группа не выбрана, баннер показывается всем покупателям.';
|
||||||
|
$_['text_slide_visitor_type_label'] = 'Тип посетителя:';
|
||||||
|
$_['text_slide_visitor_type_all'] = 'Все посетители (по умолчанию)';
|
||||||
|
$_['text_slide_visitor_type_new'] = 'Только новые посетители';
|
||||||
|
$_['text_slide_visitor_type_returning'] = 'Только вернувшиеся посетители';
|
||||||
|
$_['text_slide_stores_label'] = 'Ограничить показ для магазинов:';
|
||||||
|
$_['text_slide_stores_help'] = 'Если ни один магазин не выбран, баннер показывается во всех магазинах.';
|
||||||
|
$_['text_slide_utm_campaign_label'] = 'Таргетинг по UTM-кампании (utm_campaign):';
|
||||||
|
$_['text_slide_utm_campaign_placeholder'] = 'например: sale2026, blackfriday';
|
||||||
|
$_['text_slide_utm_campaign_help'] = 'Показывать баннер только при переходе по ссылке, содержащей указанные UTM-метки (через запятую).';
|
||||||
|
$_['text_slide_referer_label'] = 'Источник перехода (Referer):';
|
||||||
|
$_['text_slide_referer_all'] = 'Все источники (по умолчанию)';
|
||||||
|
$_['text_slide_referer_direct'] = 'Прямые переходы (Direct)';
|
||||||
|
$_['text_slide_referer_search'] = 'Поисковые системы (Google, Bing...)';
|
||||||
|
$_['text_slide_referer_social'] = 'Социальные сети (Facebook, Instagram, Telegram...)';
|
||||||
|
$_['text_slide_referer_help'] = 'Показывать баннер только пользователям, пришедшим из выбранных источников.';
|
||||||
|
$_['text_slide_days_label'] = 'Ограничение показа по дням недели:';
|
||||||
|
$_['text_day_mon'] = 'Пн';
|
||||||
|
$_['text_day_tue'] = 'Вт';
|
||||||
|
$_['text_day_wed'] = 'Ср';
|
||||||
|
$_['text_day_thu'] = 'Чт';
|
||||||
|
$_['text_day_fri'] = 'Пт';
|
||||||
|
$_['text_day_sat'] = 'Сб';
|
||||||
|
$_['text_day_sun'] = 'Вс';
|
||||||
|
$_['text_slide_days_help'] = 'Если ни один день не выбран, баннер показывается во все дни недели.';
|
||||||
|
$_['text_slide_time_label'] = 'Ограничение показа по времени суток:';
|
||||||
|
$_['text_time_from'] = 'С';
|
||||||
|
$_['text_time_to'] = 'По';
|
||||||
|
$_['text_slide_time_help'] = 'Показывать баннер только в выбранный диапазон времени (например: с 09:00 по 18:00).';
|
||||||
|
$_['text_slide_cart_min_label'] = 'Ограничение по сумме корзины (Минимум):';
|
||||||
|
$_['text_slide_cart_max_label'] = 'Ограничение по сумме корзины (Максимум):';
|
||||||
|
$_['text_slide_cart_max_help'] = 'Укажите сумму, чтобы скрыть баннер при достижении лимита.';
|
||||||
|
$_['text_slide_cart_products_label'] = 'Таргетинг по товарам в корзине (ID через запятую):';
|
||||||
|
$_['text_slide_cart_products_placeholder'] = 'например: 42, 30';
|
||||||
|
$_['text_slide_cart_products_help'] = 'Показывать баннер только если в корзине покупателя есть товары с указанными ID (через запятую).';
|
||||||
|
$_['text_slide_weather_label'] = 'Погодный таргетинг (Beta):';
|
||||||
|
$_['text_slide_weather_off'] = 'Выключен (по умолчанию)';
|
||||||
|
$_['text_slide_weather_snow'] = 'Показывать, если идет снег / холодно';
|
||||||
|
$_['text_slide_weather_rain'] = 'Показывать, если идет дождь / сыро';
|
||||||
|
$_['text_slide_weather_sun'] = 'Показывать, если солнечно / тепло';
|
||||||
|
$_['text_slide_weather_help'] = 'Экспериментальная функция (Beta). Определяет погоду по IP-адресу посетителя. Работает асинхронно через JS и сторонний API-сервис геолокации, возможны погрешности в точности.';
|
||||||
|
$_['text_slide_device_label'] = 'Таргетинг по устройствам:';
|
||||||
|
$_['text_slide_device_all'] = 'Все устройства (по умолчанию)';
|
||||||
|
$_['text_slide_device_desktop'] = 'Только десктопы (Desktop)';
|
||||||
|
$_['text_slide_device_mobile'] = 'Только мобильные (Mobile)';
|
||||||
|
$_['text_slide_os_label'] = 'Таргетинг по операционным системам:';
|
||||||
|
$_['text_slide_os_all'] = 'Все ОС (по умолчанию)';
|
||||||
|
$_['text_slide_os_ios'] = 'Только iOS (iPhone, iPad)';
|
||||||
|
$_['text_slide_os_android'] = 'Только Android';
|
||||||
|
$_['text_slide_sort_order_label'] = 'Порядок сортировки:';
|
||||||
|
$_['text_slide_language_all'] = 'Все языки (по умолчанию)';
|
||||||
|
|
||||||
|
$_['text_block_shipping_text_before_label'] = 'Текст ДО достижения порога ({diff} заменится на остаток)';
|
||||||
|
$_['text_block_shipping_text_before_help'] = 'До бесплатной доставки осталось {diff}!';
|
||||||
|
$_['text_block_shipping_text_after_label'] = 'Текст ПОСЛЕ достижения порога';
|
||||||
|
$_['text_block_shipping_text_after_help'] = 'Бесплатная доставка активна!';
|
||||||
|
|
||||||
|
|
||||||
|
// --- NAT Unified License Card ---
|
||||||
|
$_['text_nat_series_badge'] = 'Модуль серии [NAT]';
|
||||||
|
$_['text_nat_license_title'] = 'Активация лицензии';
|
||||||
|
$_['text_nat_domain_label'] = 'Ваш домен:';
|
||||||
|
$_['text_nat_copy_domain'] = 'Копировать';
|
||||||
|
$_['text_nat_copy_done'] = 'Скопировано!';
|
||||||
|
$_['text_nat_license_label'] = 'Лицензионный ключ:';
|
||||||
|
$_['text_nat_btn_activate'] = 'Активировать';
|
||||||
|
$_['text_nat_bot_title'] = 'Получить ключ через Telegram-бота';
|
||||||
|
$_['text_nat_bot_btn'] = 'Получить ключ в Telegram-боте';
|
||||||
|
$_['text_nat_free_label'] = 'Бесплатный / промо модуль:';
|
||||||
|
$_['text_nat_free_desc'] = 'Генерация ключа в Telegram-боте происходит мгновенно, 24/7. Достаточно указать версию OpenCart/ocStore и ваш домен (или тестовый поддомен).';
|
||||||
|
$_['text_nat_paid_label'] = 'Коммерческий модуль:';
|
||||||
|
$_['text_nat_paid_desc'] = 'Лицензионный ключ будет выдан после проверки информации о заказе (когда автор будет в сети). Укажите: площадку покупки, номер заказа (Order ID), версию OpenCart и домен.';
|
||||||
|
$_['text_nat_alt_contact'] = 'Альтернативные способы связи:';
|
||||||
|
$_['text_nat_contact_tg'] = 'Telegram';
|
||||||
|
$_['text_nat_contact_forum'] = 'Форум';
|
||||||
|
|
||||||
|
|
||||||
|
// Вкладка «О модуле»
|
||||||
|
$_['tab_nat_info'] = 'О модуле';
|
||||||
|
$_['text_nat_author'] = 'Автор / Разработчик:';
|
||||||
|
$_['text_nat_support'] = 'Поддержка:';
|
||||||
|
$_['text_nat_tg_channel'] = 'Telegram-бот поддержки:';
|
||||||
|
$_['text_nat_dev_profile'] = 'Профиль на форуме:';
|
||||||
|
$_['text_nat_site'] = 'Официальный сайт:';
|
||||||
|
$_['text_nat_version_badge']= 'Официальная версия 3.0 ai';
|
||||||
|
|
||||||
|
// --- Лицензирование NAT (Стандарт V5 Final) ---
|
||||||
|
$_['nat_gk_title'] = 'Активация модуля';
|
||||||
|
$_['text_nat_enter_key'] = 'Введите лицензионный ключ:';
|
||||||
|
$_['button_nat_activate'] = 'Активировать';
|
||||||
|
$_['text_nat_rule_domain'] = '1 покупка = 1 домен';
|
||||||
|
$_['text_nat_contacts_title'] = 'Получение ключа и поддержка:';
|
||||||
|
$_['placeholder_license'] = 'XXXX - XXXX - XXXX - XXXX';
|
||||||
|
|
||||||
|
$_['text_nat_rules_title'] = 'Условия лицензии:';
|
||||||
|
$_['text_nat_rules_desc'] = '1 покупка = 1 домен. Ключ привязывается к основному домену без префикса www.';
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?php
|
||||||
|
$_['heading_title'] = '<b><i class="fa fa-space-shuttle fa-rotate-270" style="color: #ec741c; margin-right: 3px; vertical-align: -1px;"></i>Promo Top Bar [NAT]:</b> Верхній рекламний інфо-баннер, інформаційна смуга над шапкою, рухомий рядок та топ-баннер';
|
||||||
|
$_['heading_title_raw'] = 'Promo Top Bar [NAT]';
|
||||||
|
$_['text_extension'] = 'Розширення';
|
||||||
|
$_['text_success'] = 'Налаштування модуля успішно збережено!';
|
||||||
|
$_['text_edit'] = 'Редагування модуля Promo Top Bar [NAT]';
|
||||||
|
$_['text_enabled'] = 'Увімкнено';
|
||||||
|
$_['text_disabled'] = 'Вимкнено';
|
||||||
|
$_['text_yes'] = 'Так';
|
||||||
|
$_['text_no'] = 'Ні';
|
||||||
|
$_['text_home'] = 'Головна';
|
||||||
|
|
||||||
|
// Вкладки
|
||||||
|
$_['tab_general'] = 'Основні';
|
||||||
|
$_['tab_slider'] = 'Слайдер';
|
||||||
|
$_['tab_content'] = 'Контент (Слайди)';
|
||||||
|
$_['tab_info'] = 'Інформація';
|
||||||
|
|
||||||
|
// Поля: Основні
|
||||||
|
$_['entry_status'] = 'Статус модуля';
|
||||||
|
$_['help_status'] = 'Увімкнути або вимкнути відображення промо-панелі на фронтенді.';
|
||||||
|
$_['entry_layout'] = 'Розташування панелі';
|
||||||
|
$_['help_layout'] = 'Standard (Relative) — зсуває контент сайту вниз (рекомендується для показників LCP/CLS). Sticky (Fixed) — панель залишається вгорі при прокручуванні.';
|
||||||
|
$_['text_layout_standard'] = 'Standard (Зсуває контент)';
|
||||||
|
$_['text_layout_sticky'] = 'Sticky (Залипає вгорі)';
|
||||||
|
$_['entry_show_close'] = 'Кнопка закриття (Хрестик)';
|
||||||
|
$_['help_show_close'] = 'Чи показувати кнопку закриття баннера.';
|
||||||
|
$_['entry_cookie_expiry'] = 'Термін дії Cookie (в днях)';
|
||||||
|
$_['help_cookie_expiry'] = 'Через скільки днів після закриття панель знову з\'явиться. 0 — скидання при закритті вкладки (до кінця сесії).';
|
||||||
|
$_['entry_show_desktop'] = 'Показувати на ПК';
|
||||||
|
$_['help_show_desktop'] = 'Показувати на екранах шириною >= 768px.';
|
||||||
|
$_['entry_show_mobile'] = 'Показувати на мобільних';
|
||||||
|
$_['help_show_mobile'] = 'Показувати на екранах шириною < 768px.';
|
||||||
|
$_['entry_height'] = 'Висота панелі (px / auto)';
|
||||||
|
$_['help_height'] = 'Залиште порожнім для автоматичної висоти (auto) під контент.';
|
||||||
|
$_['entry_padding_top'] = 'Внутрішній відступ зверху (px)';
|
||||||
|
$_['help_padding_top'] = 'Відступ від верхнього краю панелі до контенту.';
|
||||||
|
$_['entry_padding_bottom'] = 'Внутрішній відступ знизу (px)';
|
||||||
|
$_['help_padding_bottom'] = 'Відступ від контенту до нижнього краю панелі.';
|
||||||
|
$_['entry_license'] = 'Ліцензійний ключ:';
|
||||||
|
$_['help_license'] = 'Введіть ключ, отриманий при купівлі модуля.';
|
||||||
|
$_['text_license_status'] = 'Статус ліцензії';
|
||||||
|
$_['text_license_active'] = 'Ліцензія активна';
|
||||||
|
$_['text_license_missing'] = 'Не активована (введіть ключ)';
|
||||||
|
|
||||||
|
// Поля: Слайдер
|
||||||
|
$_['entry_slider_autoplay'] = 'Автопрокрутка слайдів';
|
||||||
|
$_['help_slider_autoplay'] = 'Автоматичне перемикання слайдів (якщо їх більше одного).';
|
||||||
|
$_['entry_slider_speed'] = 'Швидкість автопрокрутки (мс)';
|
||||||
|
$_['help_slider_speed'] = 'Інтервал зміни слайдів у мілісекундах (за замовчуванням 3000).';
|
||||||
|
$_['entry_slider_arrows'] = 'Стрілки навігації';
|
||||||
|
$_['help_slider_arrows'] = 'Показувати стрілки "Вперед/Назад" на десктопах.';
|
||||||
|
$_['entry_slider_dots'] = 'Точки пагінації';
|
||||||
|
$_['help_slider_dots'] = 'Показувати індикатори-точки під текстом.';
|
||||||
|
|
||||||
|
// Поля: Слайди
|
||||||
|
$_['entry_bg_type'] = 'Тип фону';
|
||||||
|
$_['text_bg_color'] = 'Колір фону';
|
||||||
|
$_['text_bg_pattern'] = 'Зображення-патерн';
|
||||||
|
$_['entry_bg_color'] = 'Колір фону';
|
||||||
|
$_['entry_bg_pattern'] = 'Патерн фону';
|
||||||
|
$_['entry_icon_left'] = 'Ліва іконка/зображення';
|
||||||
|
$_['entry_icon_right'] = 'Права іконка/зображення';
|
||||||
|
$_['entry_text'] = 'Текст слайда';
|
||||||
|
$_['help_text'] = 'Підтримує HTML-теги <b>, <span>, emoji тощо.';
|
||||||
|
$_['entry_btn_text'] = 'Текст кнопки (CTA)';
|
||||||
|
$_['help_btn_text'] = 'Якщо залишити порожнім, кнопка не виводитиметься.';
|
||||||
|
$_['entry_btn_link'] = 'Посилання кнопки (URL)';
|
||||||
|
$_['entry_btn_bg'] = 'Колір фону кнопки';
|
||||||
|
$_['entry_btn_color'] = 'Колір тексту кнопки';
|
||||||
|
$_['entry_text_after_btn'] = 'Текст після кнопки';
|
||||||
|
$_['entry_full_slide_link'] = 'Зробити весь слайд посиланням';
|
||||||
|
$_['help_full_slide_link'] = 'Весь промо-баннер стане клікабельним із посиланням з кнопки.';
|
||||||
|
$_['entry_text_color'] = 'Колір тексту слайда';
|
||||||
|
$_['help_text_color'] = 'Перевизначити стандартний колір тексту для цього слайда.';
|
||||||
|
$_['entry_mobile_text'] = 'Текст для мобільних';
|
||||||
|
$_['help_mobile_text'] = 'Опціонально. Короткий текст, який покажеться на екранах < 768px (основний сховається).';
|
||||||
|
$_['entry_sort_order'] = 'Порядок сортування';
|
||||||
|
$_['entry_slide_status'] = 'Статус';
|
||||||
|
|
||||||
|
// Кнопки
|
||||||
|
$_['button_save'] = 'Зберегти';
|
||||||
|
$_['button_back'] = 'Назад';
|
||||||
|
$_['button_slide_add'] = 'Додати слайд';
|
||||||
|
$_['button_remove'] = 'Видалити';
|
||||||
|
|
||||||
|
// Помилки
|
||||||
|
$_['error_permission'] = 'Увага! У вас немає прав для зміни модуля Promo Top Bar [NAT]!';
|
||||||
|
$_['error_invalid_license'] = 'Увага! Введено неправильний ліцензійний ключ модуля для вашого домену!';
|
||||||
|
$_['error_license_required'] = 'Увага! Для роботи модуля необхідно ввести ліцензійний ключ!';
|
||||||
|
// Додатково
|
||||||
|
$_['entry_menu_position'] = 'Відображення в меню';
|
||||||
|
$_['text_menu_module_only'] = 'Тільки в Доповненнях';
|
||||||
|
$_['text_menu_header'] = 'В меню в шапці';
|
||||||
|
$_['text_menu_sidebar'] = 'В бічному меню';
|
||||||
|
$_['text_menu_both'] = 'Усюди (в шапці та бічному)';
|
||||||
|
$_['text_display_method'] = 'Спосіб виведення модуля на сайті';
|
||||||
|
$_['text_display_everywhere'] = 'Виводити скрізь автоматично (рекомендується)';
|
||||||
|
$_['text_display_layout'] = 'Виводити через макети OpenCart';
|
||||||
|
$_['text_license_warning'] = 'Ліцензійний ключ не активований або невірний';
|
||||||
|
$_['text_license_unlock_desc']= 'Для розблокування доступу до конструктора промо-смуг, налаштувань та статистики модуля Promo Top Bar [NAT], будь ласка, вкажіть коректний ліцензійний ключ вище та збережіть налаштування.';
|
||||||
|
$_['text_tab_stats'] = 'Статистика';
|
||||||
|
$_['text_tab_info'] = 'Інформація';
|
||||||
|
$_['text_info_ecosystem'] = 'Екосистема розширень [NAT]';
|
||||||
|
$_['text_developer_profile'] = 'Профіль на OpenCartForum';
|
||||||
|
$_['text_developer_profile_com'] = 'Профіль на OpenCart.com';
|
||||||
|
$_['text_lead_contact'] = 'Контакт (Email / Телефон)';
|
||||||
|
$_['text_lead_date'] = 'Дата підписки';
|
||||||
|
$_['text_leads_title'] = 'Збір лідів (Email / Контакти)';
|
||||||
|
$_['text_leads_empty'] = 'Лідів поки немає.';
|
||||||
|
$_['text_export_leads'] = 'Експорт лідів у CSV';
|
||||||
|
$_['text_confirm_delete_lead']= 'Ви дійсно хочете видалити цей лід?';
|
||||||
|
$_['text_slide_layout'] = 'Розташування смуги слайда';
|
||||||
|
$_['text_link_product'] = 'Товар...';
|
||||||
|
$_['text_link_manufacturer'] = 'Виробник...';
|
||||||
|
$_['text_link_brand_list'] = 'Виробники (список брендів)';
|
||||||
|
$_['text_select_brand'] = '-- Виберіть бренд --';
|
||||||
|
$_['text_select_product'] = 'Введіть назву товару...';
|
||||||
|
$_['entry_exclude_pages'] = 'Виключення сторінок';
|
||||||
|
$_['help_exclude_pages'] = 'Вкажіть системні шляхи (наприклад, checkout/checkout) або точні URL (наприклад, /custom-page), на яких не потрібно показувати промо-панель.';
|
||||||
|
// Styling settings
|
||||||
|
$_['entry_font_size'] = 'Розмір шрифту';
|
||||||
|
$_['entry_font_weight'] = 'Насиченість';
|
||||||
|
$_['entry_font_family'] = 'Шрифт';
|
||||||
|
$_['entry_custom_css'] = 'Кастомні CSS стилі (inline)';
|
||||||
|
$_['entry_padding'] = 'Внутрішні відступи';
|
||||||
|
$_['entry_border_radius'] = 'Заокруглення кутів';
|
||||||
|
$_['text_default'] = 'За замовчуванням';
|
||||||
|
|
||||||
|
// Ecosystem tab information
|
||||||
|
$_['text_info_title_catalog_optimizer'] = 'Catalog Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_catalog_optimizer'] = 'Приховання порожніх категорій/брендів + SEO-сортування (спочатку в наявності) + очищення сміття в БД.';
|
||||||
|
$_['text_info_title_database_optimizer'] = 'Database Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_database_optimizer'] = 'Інтелектуальне очищення сміття в БД, управління системними логами та додавання критичних індексів для прискорення сайту.';
|
||||||
|
$_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]';
|
||||||
|
$_['text_info_desc_image_optimizer'] = 'Стиснення оригінальних зображень у WebP + масове очищення невикористовуваних картинок на сервері.';
|
||||||
|
$_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT] <span class="label label-warning" style="font-size: 10px; padding: 2px 6px; vertical-align: middle;">Поточний модуль</span>';
|
||||||
|
$_['text_info_desc_domain_scanner'] = 'Пошук та очищення зовнішніх посилань та зображень по HTTP в БД та файлах теми. Ідеально для переходу на HTTPS або очищення після парсингу.';
|
||||||
|
$_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date';
|
||||||
|
$_['text_info_desc_new_arrivals'] = 'Автоматична SEO-сторінка для новинок. Виводить товари строго за датою додавання. Слайдери, сітки та розумний сайдбар архіву дат.';
|
||||||
|
$_['text_info_title_poll_widget'] = 'Poll Widget [NAT]';
|
||||||
|
$_['text_info_desc_poll_widget'] = 'Створення опитувань та віджетів голосування з візуальним конструктором дизайну, детальної статистикою та захистом від накруток.';
|
||||||
|
$_['text_info_title_easy_import_export'] = 'Easy Import/Export [NAT]';
|
||||||
|
$_['text_info_desc_easy_import_export'] = 'Швидкий імпорт/експорт цін, залишків та товарів з XLS/XLSX/CSV/XML/JSON. Мапінг полів, Cron та підтримка URL.';
|
||||||
|
$_['text_info_title_admin_tools'] = 'Admin Tools [NAT]';
|
||||||
|
$_['text_info_desc_admin_tools'] = 'Зручні інструменти адміністратора: вхід під клієнтом, кастомізація адмінки, управління правами користувачів та приховання пунктів меню.';
|
||||||
|
$_['text_info_title_order_utm'] = 'Order UTM Tracker [NAT]';
|
||||||
|
$_['text_info_desc_order_utm'] = 'Автоматичне відстеження UTM-міток при оформленні замовлення. Зберігає джерело трафіку, кампанію, ключові слова та виводить в деталі замовлення для аналізу ефективності реклами.';
|
||||||
|
$_['text_info_copyright'] = '© %s NAT (info@nat.od.ua). Усі права захищені.';
|
||||||
|
$_['text_developer_page'] = 'Наша сторінка на OpenCartForum';
|
||||||
|
|
||||||
|
$_['text_success_reset'] = 'Статистику успішно очищено!';
|
||||||
|
$_['text_success_delete_lead'] = 'Лід успішно видалено!';
|
||||||
|
$_['text_slide_prefix'] = 'Слайд #';
|
||||||
|
$_['text_block_text_prefix'] = 'Текст: "';
|
||||||
|
$_['text_csv_slide_id'] = 'Slide ID';
|
||||||
|
$_['text_csv_slide_title'] = 'Назва слайда';
|
||||||
|
$_['text_csv_views'] = 'Перегляди';
|
||||||
|
$_['text_csv_clicks'] = 'Кліки';
|
||||||
|
$_['text_csv_closes'] = 'Закриття';
|
||||||
|
$_['text_csv_ctr'] = 'CTR';
|
||||||
|
|
||||||
|
// Constructor block strings
|
||||||
|
$_['text_block_subscribe_placeholder_label'] = 'Підказка в інпуті (Placeholder)';
|
||||||
|
$_['text_block_subscribe_placeholder_help'] = 'Введіть Email або Telegram...';
|
||||||
|
$_['text_block_subscribe_button_text_label'] = 'Текст на кнопке підписки';
|
||||||
|
$_['text_block_subscribe_button_text_help'] = 'Підписатися';
|
||||||
|
$_['text_block_subscribe_success_msg_label'] = 'Повідомлення про успішне відправлення';
|
||||||
|
$_['text_block_subscribe_success_msg_help'] = 'Дякуємо за підписку!';
|
||||||
|
$_['text_block_styling_legend'] = 'Стилізація та оформлення';
|
||||||
|
$_['text_block_color_input_bg'] = 'Колір фону інпута';
|
||||||
|
$_['text_block_color_input_text'] = 'Колір тексту інпута';
|
||||||
|
$_['text_block_color_button_bg'] = 'Колір фону кнопки';
|
||||||
|
$_['text_block_color_button_text'] = 'Колір тексту кнопки';
|
||||||
|
$_['text_block_coupon_code_label'] = 'Код промокоду (Тільки латиниця, наприклад: SALE10)';
|
||||||
|
$_['text_block_coupon_code_help'] = 'SALE10';
|
||||||
|
$_['text_block_coupon_text_label'] = 'Текст, що відображається (Наприклад: Промокод: SALE10)';
|
||||||
|
$_['text_block_coupon_text_help'] = 'Промокод: SALE10';
|
||||||
|
$_['text_block_coupon_tooltip_label'] = 'Підказка при копіюванні';
|
||||||
|
$_['text_block_coupon_tooltip_help'] = 'Скопійовано!';
|
||||||
|
$_['text_block_color_coupon_bg'] = 'Колір фону купона';
|
||||||
|
$_['text_block_color_coupon_text'] = 'Колір тексту купона';
|
||||||
|
$_['text_block_color_coupon_border'] = 'Колір рамки купона';
|
||||||
|
$_['text_block_activity_text_label'] = 'Шаблон тексту ({count} заміниться на число)';
|
||||||
|
$_['text_block_activity_text_help'] = 'Акцію сьогодні переглянули вже {count} осіб!';
|
||||||
|
$_['text_block_activity_min_label'] = 'Мін. число';
|
||||||
|
$_['text_block_activity_max_label'] = 'Макс. число';
|
||||||
|
$_['text_block_activity_icon_label'] = 'Іконка';
|
||||||
|
$_['text_block_activity_icon_fire'] = 'Вогонь (Hot)';
|
||||||
|
$_['text_block_activity_icon_eye'] = 'Око (Перегляди)';
|
||||||
|
$_['text_block_activity_icon_cart'] = 'Кошик (Покупки)';
|
||||||
|
$_['text_block_activity_icon_users'] = 'Люди (Покупці)';
|
||||||
|
$_['text_block_color_text'] = 'Колір тексту';
|
||||||
|
$_['text_block_anim_icon_type_label'] = 'Виберіть анімовану іконку';
|
||||||
|
$_['text_block_anim_icon_type_bell'] = 'Дзвоник (Сповіщення)';
|
||||||
|
$_['text_block_anim_icon_type_gift'] = 'Подарунок (Акція)';
|
||||||
|
$_['text_block_anim_icon_type_tag'] = 'Бірка (Промо)';
|
||||||
|
$_['text_block_anim_icon_type_fire'] = 'Вогонь (Хіт)';
|
||||||
|
$_['text_block_anim_icon_type_cart'] = 'Кошик (Купівля)';
|
||||||
|
$_['text_block_anim_icon_size_label'] = 'Розмір іконки в px';
|
||||||
|
$_['text_block_color_icon'] = 'Колір іконки';
|
||||||
|
$_['text_block_product_select_label'] = 'Вибір товару (автокомпліт)';
|
||||||
|
$_['text_block_product_select_help'] = 'Почніть вводити назву...';
|
||||||
|
$_['text_block_product_show_image'] = 'Показувати зображення';
|
||||||
|
$_['text_block_product_show_price'] = 'Показувати ціну';
|
||||||
|
$_['text_block_product_show_button'] = 'Показувати кнопку';
|
||||||
|
$_['text_block_product_button_text_label'] = 'Текст на кнопці';
|
||||||
|
$_['text_block_product_button_text_help'] = 'Купити / Детальніше';
|
||||||
|
$_['text_block_color_product_btn_bg'] = 'Колір кнопки';
|
||||||
|
$_['text_block_color_product_btn_text'] = 'Колір тексту на кнопці';
|
||||||
|
$_['error_duplicate_block_type'] = 'Помилка: Не можна дублювати блоки цього типу';
|
||||||
|
$_['text_success_duplicate_block'] = 'Блок успішно продубльовано!';
|
||||||
|
$_['text_inherit_default'] = 'За замовчуванням (Успадкувати)';
|
||||||
|
$_['text_select_slide_placeholder'] = 'Виберіть слайд зі списку ліворуч';
|
||||||
|
$_['text_empty_slide_placeholder'] = 'Порожній слайд (додайте блоки)';
|
||||||
|
$_['text_no_custom_colors'] = 'Немає кастомних кольорів';
|
||||||
|
$_['text_saved_auto'] = 'Налаштування збережено автоматично';
|
||||||
|
|
||||||
|
// Slide targeting translations
|
||||||
|
$_['text_slide_customer_groups_label'] = 'Обмежити показ для груп клієнтів:';
|
||||||
|
$_['text_slide_customer_groups_help'] = 'Якщо жодна група не вибрана, баннер показується всім покупцям.';
|
||||||
|
$_['text_slide_visitor_type_label'] = 'Тип відвідувача:';
|
||||||
|
$_['text_slide_visitor_type_all'] = 'Усі відвідувачі (за замовчуванням)';
|
||||||
|
$_['text_slide_visitor_type_new'] = 'Тільки нові відвідувачі';
|
||||||
|
$_['text_slide_visitor_type_returning'] = 'Тільки повернулися відвідувачі';
|
||||||
|
$_['text_slide_stores_label'] = 'Обмежити показ для магазинів:';
|
||||||
|
$_['text_slide_stores_help'] = 'Якщо жоден магазин не вибраний, баннер показується у всіх магазинах.';
|
||||||
|
$_['text_slide_utm_campaign_label'] = 'Таргетинг за UTM-кампанією (utm_campaign):';
|
||||||
|
$_['text_slide_utm_campaign_placeholder'] = 'наприклад: sale2026, blackfriday';
|
||||||
|
$_['text_slide_utm_campaign_help'] = 'Показувати баннер тільки при переході за посиланням, що містить вказані UTM-мітки (через кому).';
|
||||||
|
$_['text_slide_referer_label'] = 'Джерело переходу (Referer):';
|
||||||
|
$_['text_slide_referer_all'] = 'Усі джерела (за замовчуванням)';
|
||||||
|
$_['text_slide_referer_direct'] = 'Прямі переходи (Direct)';
|
||||||
|
$_['text_slide_referer_search'] = 'Пошукові системи (Google, Bing...)';
|
||||||
|
$_['text_slide_referer_social'] = 'Соціальні мережі (Facebook, Instagram, Telegram...)';
|
||||||
|
$_['text_slide_referer_help'] = 'Показувати баннер тільки користувачам, які прийшли з обраних джерел.';
|
||||||
|
$_['text_slide_days_label'] = 'Обмеження показу за днями тижня:';
|
||||||
|
$_['text_day_mon'] = 'Пн';
|
||||||
|
$_['text_day_tue'] = 'Вт';
|
||||||
|
$_['text_day_wed'] = 'Ср';
|
||||||
|
$_['text_day_thu'] = 'Чт';
|
||||||
|
$_['text_day_fri'] = 'Пт';
|
||||||
|
$_['text_day_sat'] = 'Сб';
|
||||||
|
$_['text_day_sun'] = 'Нд';
|
||||||
|
$_['text_slide_days_help'] = 'Якщо жоден день не вибраний, баннер показується у всі дні тижня.';
|
||||||
|
$_['text_slide_time_label'] = 'Обмеження показу за часом доби:';
|
||||||
|
$_['text_time_from'] = 'З';
|
||||||
|
$_['text_time_to'] = 'По';
|
||||||
|
$_['text_slide_time_help'] = 'Показувати баннер тільки в обраний діапазон часу (наприклад: з 09:00 по 18:00).';
|
||||||
|
$_['text_slide_cart_min_label'] = 'Обмеження за сумою кошика (Мінімум):';
|
||||||
|
$_['text_slide_cart_max_label'] = 'Обмеження за сумою кошика (Максимум):';
|
||||||
|
$_['text_slide_cart_max_help'] = 'Вкажіть суму, щоб приховати баннер при досягненні ліміту.';
|
||||||
|
$_['text_slide_cart_products_label'] = 'Таргетинг за товарами в кошику (ID через кому):';
|
||||||
|
$_['text_slide_cart_products_placeholder'] = 'наприклад: 42, 30';
|
||||||
|
$_['text_slide_cart_products_help'] = 'Показувати баннер тільки якщо в кошику покупця є товари з вказаними ID (через кому).';
|
||||||
|
$_['text_slide_weather_label'] = 'Таргетинг за погодою (Beta):';
|
||||||
|
$_['text_slide_weather_off'] = 'Вимкнено (показувати завжди)';
|
||||||
|
$_['text_slide_weather_snow'] = 'Йде сніг, сильний мороз / зимова погода';
|
||||||
|
$_['text_slide_weather_rain'] = 'Йде дощ, гроза / осіння погода';
|
||||||
|
$_['text_slide_weather_sun'] = 'Світить сонце, спекотно / літня погода';
|
||||||
|
$_['text_slide_weather_help'] = 'Таргетинг за погодою заснований на IP-адресі покупця (працює через стороннє API, може мати похибки).';
|
||||||
|
$_['text_slide_device_label'] = 'Таргетинг за пристроями:';
|
||||||
|
$_['text_slide_device_all'] = 'Усі пристрої (за замовчуванням)';
|
||||||
|
$_['text_slide_device_desktop'] = 'Тільки десктопи (Desktop)';
|
||||||
|
$_['text_slide_device_mobile'] = 'Тільки мобільні (Mobile)';
|
||||||
|
$_['text_slide_os_label'] = 'Таргетинг за операційними системами:';
|
||||||
|
$_['text_slide_os_all'] = 'Усі ОС (за замовчуванням)';
|
||||||
|
$_['text_slide_os_ios'] = 'Тільки iOS (iPhone, iPad)';
|
||||||
|
$_['text_slide_os_android'] = 'Тільки Android';
|
||||||
|
$_['text_slide_sort_order_label'] = 'Порядок сортування:';
|
||||||
|
$_['text_slide_language_all'] = 'Усі мови (за замовчуванням)';
|
||||||
|
|
||||||
|
$_['text_block_shipping_text_before_label'] = 'Текст ДО досягнення порога ({diff} заміниться на залишок)';
|
||||||
|
$_['text_block_shipping_text_before_help'] = 'До безкоштовної доставки залишилося {diff}!';
|
||||||
|
$_['text_block_shipping_text_after_label'] = 'Текст ПОСЛЯ досягнення порога';
|
||||||
|
$_['text_block_shipping_text_after_help'] = 'Безкоштовна доставка активна!';
|
||||||
|
|
||||||
|
|
||||||
|
// --- NAT Unified License Card ---
|
||||||
|
$_['text_nat_series_badge'] = 'Модуль серії [NAT]';
|
||||||
|
$_['text_nat_license_title'] = 'Активація ліцензії';
|
||||||
|
$_['text_nat_domain_label'] = 'Ваш домен:';
|
||||||
|
$_['text_nat_copy_domain'] = 'Копіювати';
|
||||||
|
$_['text_nat_copy_done'] = 'Скопійовано!';
|
||||||
|
$_['text_nat_license_label'] = 'Ліцензійний ключ:';
|
||||||
|
$_['text_nat_btn_activate'] = 'Активувати';
|
||||||
|
$_['text_nat_bot_title'] = 'Отримати ключ через Telegram-бота';
|
||||||
|
$_['text_nat_bot_btn'] = 'Отримати ключ у Telegram-боті';
|
||||||
|
$_['text_nat_free_label'] = 'Безкоштовний / промо модуль:';
|
||||||
|
$_['text_nat_free_desc'] = 'Генерація ключа в Telegram-боті відбувається миттєво, 24/7. Достатньо вказати версію OpenCart/ocStore та ваш домен (або тестовий піддомен).';
|
||||||
|
$_['text_nat_paid_label'] = 'Комерційний модуль:';
|
||||||
|
$_['text_nat_paid_desc'] = 'Ліцензійний ключ буде видано після перевірки інформації про замовлення (коли автор буде в мережі). Вкажіть: платформу покупки, номер замовлення (Order ID), версію OpenCart та домен.';
|
||||||
|
$_['text_nat_alt_contact'] = 'Альтернативні способи зв\'язку:';
|
||||||
|
$_['text_nat_contact_tg'] = 'Telegram';
|
||||||
|
$_['text_nat_contact_forum'] = 'Форум';
|
||||||
|
|
||||||
|
|
||||||
|
// Вкладка «О модуле»
|
||||||
|
$_['tab_nat_info'] = 'Про модуль';
|
||||||
|
$_['text_nat_author'] = 'Автор / Розробник:';
|
||||||
|
$_['text_nat_support'] = 'Підтримка:';
|
||||||
|
$_['text_nat_tg_channel'] = 'Telegram-бот підтримки:';
|
||||||
|
$_['text_nat_dev_profile'] = 'Профіль на форумі:';
|
||||||
|
$_['text_nat_site'] = 'Офіційний сайт:';
|
||||||
|
$_['text_nat_version_badge']= 'Офіційна версія 3.0 ai';
|
||||||
|
|
||||||
|
// --- Лицензирование NAT (Стандарт V5 Final) ---
|
||||||
|
$_['nat_gk_title'] = 'Активація модуля';
|
||||||
|
$_['text_nat_enter_key'] = 'Введіть ліцензійний ключ:';
|
||||||
|
$_['button_nat_activate'] = 'Активувати';
|
||||||
|
$_['text_nat_rule_domain'] = '1 покупка = 1 домен';
|
||||||
|
$_['text_nat_contacts_title'] = 'Отримання ключа та підтримка:';
|
||||||
|
$_['placeholder_license'] = 'XXXX - XXXX - XXXX - XXXX';
|
||||||
|
|
||||||
|
$_['text_nat_rules_title'] = 'Умови ліцензії:';
|
||||||
|
$_['text_nat_rules_desc'] = "1 покупка = 1 домен. Ключ прив'язується до основного домену без префікса www.";
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
namespace Opencart\Admin\Model\Extension\PromoTopBarNat\Module;
|
||||||
|
|
||||||
|
class PromoTopBarNat extends \Opencart\System\Engine\Model {
|
||||||
|
|
||||||
|
public function install(): void {
|
||||||
|
$this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "promo_top_bar_stats_nat` (
|
||||||
|
`stat_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`slide_id` VARCHAR(64) NOT NULL,
|
||||||
|
`action` VARCHAR(16) NOT NULL,
|
||||||
|
`date_added` DATE NOT NULL,
|
||||||
|
`count` INT(11) NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`stat_id`),
|
||||||
|
UNIQUE KEY `slide_action_date` (`slide_id`, `action`, `date_added`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
|
||||||
|
|
||||||
|
$this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "promo_top_bar_lead_nat` (
|
||||||
|
`lead_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`email` VARCHAR(150) NOT NULL,
|
||||||
|
`store_id` INT(11) NOT NULL DEFAULT 0,
|
||||||
|
`date_added` DATETIME NOT NULL,
|
||||||
|
PRIMARY KEY (`lead_id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
|
||||||
|
|
||||||
|
$chk_store_id = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "promo_top_bar_lead_nat` LIKE 'store_id'");
|
||||||
|
if (!$chk_store_id->num_rows) {
|
||||||
|
$this->db->query("ALTER TABLE `" . DB_PREFIX . "promo_top_bar_lead_nat` ADD `store_id` INT(11) NOT NULL DEFAULT 0 AFTER `email`");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function uninstall(): void {
|
||||||
|
$this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "promo_top_bar_stats_nat`");
|
||||||
|
$this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "promo_top_bar_lead_nat`");
|
||||||
|
$this->load->model('setting/setting');
|
||||||
|
$this->model_setting_setting->deleteSetting('module_promo_top_bar_nat');
|
||||||
|
$this->model_setting_setting->deleteSetting('nat_promo_top_bar_backup');
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,861 @@
|
||||||
|
<?php
|
||||||
|
namespace Opencart\Catalog\Controller\Extension\PromoTopBarNat\Module;
|
||||||
|
|
||||||
|
#[\AllowDynamicProperties]
|
||||||
|
class PromoTopBarNat extends \Opencart\System\Engine\Controller {
|
||||||
|
|
||||||
|
public function index($setting = null) {
|
||||||
|
// Check if module is enabled
|
||||||
|
if (!$this->config->get('module_promo_top_bar_nat_status')) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$display_method = $this->config->get('module_promo_top_bar_nat_display_method') ?: 'everywhere';
|
||||||
|
|
||||||
|
if ($setting === null) {
|
||||||
|
// Called from common/header (everywhere auto body hook)
|
||||||
|
if ($display_method !== 'everywhere') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check page exclusions
|
||||||
|
$exclude_pages_str = $this->config->get('module_promo_top_bar_nat_exclude_pages');
|
||||||
|
if (!empty($exclude_pages_str)) {
|
||||||
|
$exclude_pages = array_filter(array_map('trim', explode("\n", str_replace("\r", "", $exclude_pages_str))));
|
||||||
|
if (!empty($exclude_pages)) {
|
||||||
|
$current_route = isset($this->request->get['route']) ? trim($this->request->get['route']) : 'common/home';
|
||||||
|
$current_uri = isset($this->request->server['REQUEST_URI']) ? trim($this->request->server['REQUEST_URI']) : '';
|
||||||
|
|
||||||
|
foreach ($exclude_pages as $exclude) {
|
||||||
|
if (strcasecmp($current_route, $exclude) === 0) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
if ($current_uri !== '' && strpos($current_uri, $exclude) !== false) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Called from layout schemes
|
||||||
|
if ($display_method !== 'layout') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->load->language('extension/promo_top_bar_nat/module/promo_top_bar_nat');
|
||||||
|
|
||||||
|
// Validate license
|
||||||
|
$license_key = (string)$this->config->get('module_promo_top_bar_nat_license');
|
||||||
|
if (!$this->checkLicense($license_key)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->load->model('tool/image');
|
||||||
|
$this->load->model('catalog/product');
|
||||||
|
|
||||||
|
// Capture UTM Campaign and referer to session
|
||||||
|
if (isset($this->request->get['utm_campaign'])) {
|
||||||
|
$this->session->data['nat_promo_utm_campaign'] = trim($this->request->get['utm_campaign']);
|
||||||
|
}
|
||||||
|
if (!isset($this->session->data['nat_promo_referer'])) {
|
||||||
|
$this->session->data['nat_promo_referer'] = isset($this->request->server['HTTP_REFERER']) ? $this->request->server['HTTP_REFERER'] : 'direct';
|
||||||
|
}
|
||||||
|
|
||||||
|
$lang_id = (int)$this->config->get('config_language_id');
|
||||||
|
$server_url = $this->request->server['HTTPS'] ? HTTPS_SERVER : HTTP_SERVER;
|
||||||
|
|
||||||
|
// Fetch settings
|
||||||
|
$data['layout'] = $this->config->get('module_promo_top_bar_nat_layout') ?: 'standard';
|
||||||
|
$data['show_close'] = (int)$this->config->get('module_promo_top_bar_nat_show_close');
|
||||||
|
$data['cookie_expiry'] = (int)$this->config->get('module_promo_top_bar_nat_cookie_expiry');
|
||||||
|
$data['show_desktop'] = (int)$this->config->get('module_promo_top_bar_nat_show_desktop');
|
||||||
|
$data['show_mobile'] = (int)$this->config->get('module_promo_top_bar_nat_show_mobile');
|
||||||
|
$data['height'] = trim((string)$this->config->get('module_promo_top_bar_nat_height'));
|
||||||
|
$data['padding_top'] = (int)$this->config->get('module_promo_top_bar_nat_padding_top');
|
||||||
|
$data['padding_bottom'] = (int)$this->config->get('module_promo_top_bar_nat_padding_bottom');
|
||||||
|
$data['border_radius'] = trim((string)$this->config->get('module_promo_top_bar_nat_border_radius')) ?: '0px';
|
||||||
|
$data['shadow'] = trim((string)$this->config->get('module_promo_top_bar_nat_shadow')) ?: 'none';
|
||||||
|
$data['shadow_custom'] = trim((string)$this->config->get('module_promo_top_bar_nat_shadow_custom'));
|
||||||
|
|
||||||
|
// Slider config
|
||||||
|
$data['slider_autoplay'] = (int)$this->config->get('module_promo_top_bar_nat_slider_autoplay');
|
||||||
|
$data['slider_speed'] = (int)$this->config->get('module_promo_top_bar_nat_slider_speed') ?: 3000;
|
||||||
|
$data['slider_arrows'] = (int)$this->config->get('module_promo_top_bar_nat_slider_arrows');
|
||||||
|
$data['slider_dots'] = (int)$this->config->get('module_promo_top_bar_nat_slider_dots');
|
||||||
|
$data['slider_animation'] = trim((string)$this->config->get('module_promo_top_bar_nat_slider_animation')) ?: 'slide';
|
||||||
|
$data['ab_testing'] = (int)$this->config->get('module_promo_top_bar_nat_ab_testing');
|
||||||
|
|
||||||
|
$raw_slides = $this->config->get('module_promo_top_bar_nat_slides');
|
||||||
|
if (is_string($raw_slides)) {
|
||||||
|
$raw_slides = json_decode($raw_slides, true);
|
||||||
|
}
|
||||||
|
$data['oc4_sep'] = (defined('VERSION') && version_compare(VERSION, '4.0.2.0', '<')) ? '|' : '.';
|
||||||
|
$data['slides'] = [];
|
||||||
|
|
||||||
|
if (is_array($raw_slides)) {
|
||||||
|
// Sort slides
|
||||||
|
usort($raw_slides, function($a, $b) {
|
||||||
|
return (int)($a['sort_order'] ?? 0) - (int)($b['sort_order'] ?? 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach ($raw_slides as $slideIdx => $slide) {
|
||||||
|
// Skip disabled slides
|
||||||
|
if (empty($slide['status'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If any promotional product is out of stock/disabled, hide the entire slide
|
||||||
|
$hide_slide = false;
|
||||||
|
if (isset($slide['blocks']) && is_array($slide['blocks'])) {
|
||||||
|
foreach ($slide['blocks'] as $block) {
|
||||||
|
if ($block['type'] === 'product') {
|
||||||
|
$product_id = isset($block['product_id']) ? (int)$block['product_id'] : 0;
|
||||||
|
$product_info = $this->model_catalog_product->getProduct($product_id);
|
||||||
|
if (!$product_info || !$product_info['status'] || $product_info['quantity'] <= 0) {
|
||||||
|
$hide_slide = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($hide_slide) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Customer group targeting check
|
||||||
|
if (!empty($slide['customer_groups'])) {
|
||||||
|
$customer_group_id = $this->customer->isLogged() ? (int)$this->customer->getGroupId() : (int)$this->config->get('config_customer_group_id');
|
||||||
|
if (!in_array($customer_group_id, array_map('intval', $slide['customer_groups']), true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Visitor type targeting check (New vs Returning)
|
||||||
|
if (isset($slide['visitor_type']) && $slide['visitor_type'] !== 'all') {
|
||||||
|
$is_returning = isset($this->request->cookie['nat_promo_visited']);
|
||||||
|
if ($slide['visitor_type'] === 'new' && $is_returning) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($slide['visitor_type'] === 'returning' && !$is_returning) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store targeting check
|
||||||
|
if (!empty($slide['stores'])) {
|
||||||
|
$current_store_id = (int)$this->config->get('config_store_id');
|
||||||
|
if (!in_array($current_store_id, array_map('intval', $slide['stores']), true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// UTM Campaign targeting check
|
||||||
|
if (!empty($slide['utm_campaign'])) {
|
||||||
|
$current_utm = isset($this->session->data['nat_promo_utm_campaign']) ? $this->session->data['nat_promo_utm_campaign'] : '';
|
||||||
|
if (empty($current_utm) && isset($this->request->get['utm_campaign'])) {
|
||||||
|
$current_utm = $this->request->get['utm_campaign'];
|
||||||
|
}
|
||||||
|
$allowed_utms = array_map('trim', explode(',', strtolower($slide['utm_campaign'])));
|
||||||
|
if (!in_array(strtolower($current_utm), $allowed_utms, true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Referer targeting check
|
||||||
|
if (isset($slide['referer_source']) && $slide['referer_source'] !== 'all') {
|
||||||
|
$referer = isset($this->session->data['nat_promo_referer']) ? strtolower($this->session->data['nat_promo_referer']) : 'direct';
|
||||||
|
|
||||||
|
$is_social = false;
|
||||||
|
$is_search = false;
|
||||||
|
$is_direct = ($referer === 'direct' || empty($referer));
|
||||||
|
|
||||||
|
if (!$is_direct) {
|
||||||
|
$social_hosts = ['facebook.com', 'instagram.com', 't.co', 'twitter.com', 'linkedin.com', 'pinterest.com', 'vk.com', 'ok.ru', 'youtube.com', 'telegram.org', 't.me'];
|
||||||
|
foreach ($social_hosts as $host) {
|
||||||
|
if (strpos($referer, $host) !== false) {
|
||||||
|
$is_social = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$is_social) {
|
||||||
|
$search_hosts = ['google.', 'bing.com', 'yandex.', 'yahoo.com', 'duckduckgo.com', 'baidu.com', 'ask.com'];
|
||||||
|
foreach ($search_hosts as $host) {
|
||||||
|
if (strpos($referer, $host) !== false) {
|
||||||
|
$is_search = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($slide['referer_source'] === 'direct' && !$is_direct) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($slide['referer_source'] === 'social' && !$is_social) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($slide['referer_source'] === 'search' && !$is_search) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($slide['referer_source'] === 'custom') {
|
||||||
|
$custom_ref_str = isset($slide['referer_custom']) ? trim($slide['referer_custom']) : '';
|
||||||
|
if ($custom_ref_str !== '') {
|
||||||
|
$allowed_refs = array_filter(array_map('trim', explode(',', strtolower($custom_ref_str))));
|
||||||
|
$ref_match = false;
|
||||||
|
foreach ($allowed_refs as $allowed_ref) {
|
||||||
|
if (strpos($referer, $allowed_ref) !== false) {
|
||||||
|
$ref_match = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$ref_match) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Schedule targeting check
|
||||||
|
$now = time();
|
||||||
|
|
||||||
|
// 1. Day of week check
|
||||||
|
if (!empty($slide['schedule_days'])) {
|
||||||
|
$current_day = (int)date('w', $now); // 0 (Sunday) to 6 (Saturday)
|
||||||
|
if (!in_array($current_day, array_map('intval', $slide['schedule_days']), true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Time of day check
|
||||||
|
if (!empty($slide['schedule_time_start']) || !empty($slide['schedule_time_end'])) {
|
||||||
|
$current_time = date('H:i', $now);
|
||||||
|
$time_start = !empty($slide['schedule_time_start']) ? $slide['schedule_time_start'] : '00:00';
|
||||||
|
$time_end = !empty($slide['schedule_time_end']) ? $slide['schedule_time_end'] : '24:00';
|
||||||
|
|
||||||
|
if ($time_start <= $time_end) {
|
||||||
|
if ($current_time < $time_start || $current_time > $time_end) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($current_time < $time_start && $current_time > $time_end) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cart targeting check
|
||||||
|
if (!empty($slide['cart_total_min']) || !empty($slide['cart_total_max']) || !empty($slide['cart_products'])) {
|
||||||
|
$cart_total = (float)$this->cart->getTotal();
|
||||||
|
|
||||||
|
// 1. Min total check
|
||||||
|
if (!empty($slide['cart_total_min']) && $cart_total < (float)$slide['cart_total_min']) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Max total check
|
||||||
|
if (!empty($slide['cart_total_max']) && $cart_total > (float)$slide['cart_total_max']) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Products check
|
||||||
|
if (!empty($slide['cart_products'])) {
|
||||||
|
$allowed_pids = array_map('intval', explode(',', $slide['cart_products']));
|
||||||
|
$cart_products = $this->cart->getProducts();
|
||||||
|
$cart_pids = [];
|
||||||
|
foreach ($cart_products as $p) {
|
||||||
|
$cart_pids[] = (int)$p['product_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$has_product = false;
|
||||||
|
foreach ($allowed_pids as $pid) {
|
||||||
|
if (in_array($pid, $cart_pids, true)) {
|
||||||
|
$has_product = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$has_product) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Device & Browser targeting check
|
||||||
|
$user_agent = isset($this->request->server['HTTP_USER_AGENT']) ? $this->request->server['HTTP_USER_AGENT'] : '';
|
||||||
|
$user_agent_lower = strtolower($user_agent);
|
||||||
|
$is_mobile = (bool)preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i', $user_agent);
|
||||||
|
|
||||||
|
// 1. Check slide desktop/mobile visibility settings (show_desktop, show_mobile)
|
||||||
|
if (isset($slide['show_desktop']) && $slide['show_desktop'] === '0' && !$is_mobile) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isset($slide['show_mobile']) && $slide['show_mobile'] === '0' && $is_mobile) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Device check
|
||||||
|
if (isset($slide['device_targeting']) && $slide['device_targeting'] !== 'all') {
|
||||||
|
if ($slide['device_targeting'] === 'desktop' && $is_mobile) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($slide['device_targeting'] === 'mobile' && !$is_mobile) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. OS check
|
||||||
|
if (isset($slide['os_targeting']) && $slide['os_targeting'] !== 'all') {
|
||||||
|
$is_ios = (strpos($user_agent_lower, 'iphone') !== false || strpos($user_agent_lower, 'ipad') !== false || strpos($user_agent_lower, 'ipod') !== false);
|
||||||
|
$is_android = (strpos($user_agent_lower, 'android') !== false);
|
||||||
|
|
||||||
|
if ($slide['os_targeting'] === 'ios' && !$is_ios) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($slide['os_targeting'] === 'android' && !$is_android) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Browser check
|
||||||
|
$browser_match = true;
|
||||||
|
$allowed_browsers = [];
|
||||||
|
if (isset($slide['browser_targeting']) && $slide['browser_targeting'] !== 'all' && !empty($slide['browser_targeting'])) {
|
||||||
|
$decoded = json_decode($slide['browser_targeting'], true);
|
||||||
|
if (is_array($decoded)) {
|
||||||
|
$allowed_browsers = $decoded;
|
||||||
|
} else {
|
||||||
|
$allowed_browsers = array_filter(array_map('trim', explode(',', $slide['browser_targeting'])));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$custom_browser_str = isset($slide['browser_custom']) ? trim($slide['browser_custom']) : '';
|
||||||
|
$custom_browsers = [];
|
||||||
|
if ($custom_browser_str !== '') {
|
||||||
|
$custom_browsers = array_filter(array_map('trim', explode(',', strtolower($custom_browser_str))));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($allowed_browsers) || !empty($custom_browsers)) {
|
||||||
|
$browser_match = false;
|
||||||
|
|
||||||
|
// Detect current browser
|
||||||
|
$is_chrome = (strpos($user_agent_lower, 'chrome') !== false || strpos($user_agent_lower, 'crios') !== false) && strpos($user_agent_lower, 'edge') === false && strpos($user_agent_lower, 'opr') === false && strpos($user_agent_lower, 'opera') === false;
|
||||||
|
$is_safari = strpos($user_agent_lower, 'safari') !== false && strpos($user_agent_lower, 'chrome') === false && strpos($user_agent_lower, 'crios') === false && strpos($user_agent_lower, 'android') === false;
|
||||||
|
$is_firefox = strpos($user_agent_lower, 'firefox') !== false;
|
||||||
|
$is_opera = (strpos($user_agent_lower, 'opera') !== false || strpos($user_agent_lower, 'opr') !== false);
|
||||||
|
$is_edge = (strpos($user_agent_lower, 'edge') !== false || strpos($user_agent_lower, 'edg') !== false);
|
||||||
|
|
||||||
|
if (in_array('chrome', $allowed_browsers, true) && $is_chrome) {
|
||||||
|
$browser_match = true;
|
||||||
|
}
|
||||||
|
if (in_array('safari', $allowed_browsers, true) && $is_safari) {
|
||||||
|
$browser_match = true;
|
||||||
|
}
|
||||||
|
if (in_array('firefox', $allowed_browsers, true) && $is_firefox) {
|
||||||
|
$browser_match = true;
|
||||||
|
}
|
||||||
|
if (in_array('opera', $allowed_browsers, true) && $is_opera) {
|
||||||
|
$browser_match = true;
|
||||||
|
}
|
||||||
|
if (in_array('edge', $allowed_browsers, true) && $is_edge) {
|
||||||
|
$browser_match = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check custom browser keywords in UA
|
||||||
|
if (!$browser_match && !empty($custom_browsers)) {
|
||||||
|
foreach ($custom_browsers as $kw) {
|
||||||
|
if (strpos($user_agent_lower, $kw) !== false) {
|
||||||
|
$browser_match = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$browser_match) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolve background pattern URL
|
||||||
|
$bg_pattern_url = '';
|
||||||
|
if (isset($slide['bg_type']) && $slide['bg_type'] == 'pattern' && !empty($slide['bg_pattern']) && is_file(DIR_IMAGE . $slide['bg_pattern'])) {
|
||||||
|
$bg_pattern_url = $server_url . 'image/' . $slide['bg_pattern'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolve UTM tag injection
|
||||||
|
$slide_utm = isset($slide['link_utm']) ? trim($slide['link_utm']) : '';
|
||||||
|
|
||||||
|
// Resolve slide link
|
||||||
|
$slide_link = '';
|
||||||
|
if (isset($slide['link'][$lang_id])) {
|
||||||
|
$slide_link = trim($slide['link'][$lang_id]);
|
||||||
|
if (strpos($slide_link, 'route:') === 0) {
|
||||||
|
$slide_link = $this->parseSystemRoute($slide_link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$slide_link = $this->appendUtm($slide_link, $slide_utm);
|
||||||
|
|
||||||
|
$blocks = [];
|
||||||
|
if (isset($slide['blocks']) && is_array($slide['blocks'])) {
|
||||||
|
foreach ($slide['blocks'] as $blockIdx => $block) {
|
||||||
|
if ($block['type'] === 'text') {
|
||||||
|
$text = isset($block['text'][$lang_id]) ? trim(base64_decode($block['text'][$lang_id])) : '';
|
||||||
|
$mobile_text = isset($block['mobile_text'][$lang_id]) ? trim(base64_decode($block['mobile_text'][$lang_id])) : '';
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'text',
|
||||||
|
'text' => html_entity_decode($text, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'mobile_text' => html_entity_decode($mobile_text ?: $text, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'color' => $block['color'] ?? '',
|
||||||
|
'animation' => $block['animation'] ?? '',
|
||||||
|
'typing_effect' => isset($block['typing_effect']) && $block['typing_effect'] == '1',
|
||||||
|
'typing_speed' => isset($block['typing_speed']) ? (int)$block['typing_speed'] : 50,
|
||||||
|
'font_size' => $block['font_size'] ?? '',
|
||||||
|
'font_weight' => $block['font_weight'] ?? '',
|
||||||
|
'font_family' => $block['font_family'] ?? '',
|
||||||
|
'custom_css' => $block['custom_css'] ?? ''
|
||||||
|
];
|
||||||
|
} elseif ($block['type'] === 'image') {
|
||||||
|
$img_path = isset($block['image'][$lang_id]) ? $block['image'][$lang_id] : '';
|
||||||
|
if (!empty($img_path) && is_file(DIR_IMAGE . $img_path)) {
|
||||||
|
$width = (int)($block['width'] ?? 0) ?: 32;
|
||||||
|
$height = (int)($block['height'] ?? 0) ?: 32;
|
||||||
|
if (preg_match('/\.svg$/i', $img_path)) {
|
||||||
|
$img_src = $server_url . 'image/' . $img_path;
|
||||||
|
} else {
|
||||||
|
$img_src = $this->model_tool_image->resize($img_path, $width, $height);
|
||||||
|
}
|
||||||
|
$alt_text = isset($block['alt'][$lang_id]) ? trim(base64_decode($block['alt'][$lang_id])) : '';
|
||||||
|
$img_link = isset($block['link']) ? trim($block['link']) : '';
|
||||||
|
if (strpos($img_link, 'route:') === 0) {
|
||||||
|
$img_link = $this->parseSystemRoute($img_link);
|
||||||
|
}
|
||||||
|
$img_link = $this->appendUtm($img_link, $slide_utm);
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'image',
|
||||||
|
'src' => $img_src,
|
||||||
|
'alt' => html_entity_decode($alt_text, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'link' => $img_link,
|
||||||
|
'target_blank' => isset($block['target_blank']) && $block['target_blank'] == '1',
|
||||||
|
'hover_effect' => $block['hover_effect'] ?? '',
|
||||||
|
'width' => $block['width'] ?? '',
|
||||||
|
'height' => $block['height'] ?? ''
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} elseif ($block['type'] === 'button') {
|
||||||
|
$btn_text = isset($block['text'][$lang_id]) ? trim(base64_decode($block['text'][$lang_id])) : '';
|
||||||
|
$btn_link = isset($block['link']) ? trim($block['link']) : '';
|
||||||
|
if (strpos($btn_link, 'route:') === 0) {
|
||||||
|
$btn_link = $this->parseSystemRoute($btn_link);
|
||||||
|
}
|
||||||
|
$btn_link = $btn_link ? $this->appendUtm($btn_link, $slide_utm) : $slide_link;
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'button',
|
||||||
|
'text' => html_entity_decode($btn_text, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'link' => $btn_link,
|
||||||
|
'target_blank' => isset($block['target_blank']) && $block['target_blank'] == '1',
|
||||||
|
'bg' => $block['bg'] ?? '#e74c3c',
|
||||||
|
'color' => $block['color'] ?? '#ffffff',
|
||||||
|
'bg_hover' => $block['bg_hover'] ?? '#c0392b',
|
||||||
|
'color_hover' => $block['color_hover'] ?? '#ffffff',
|
||||||
|
'button_icon' => $block['button_icon'] ?? '',
|
||||||
|
'badge_status' => isset($block['badge_status']) && $block['badge_status'] == '1',
|
||||||
|
'badge_text' => isset($block['badge_text'][$lang_id]) ? html_entity_decode(trim(base64_decode($block['badge_text'][$lang_id])), ENT_QUOTES, 'UTF-8') : '',
|
||||||
|
'badge_bg' => $block['badge_bg'] ?? '#e74c3c',
|
||||||
|
'badge_color' => $block['badge_color'] ?? '#ffffff',
|
||||||
|
'animation' => $block['animation'] ?? '',
|
||||||
|
'font_size' => $block['font_size'] ?? '',
|
||||||
|
'font_family' => $block['font_family'] ?? '',
|
||||||
|
'padding' => $block['padding'] ?? '',
|
||||||
|
'border_radius' => $block['border_radius'] ?? '',
|
||||||
|
'custom_css' => $block['custom_css'] ?? ''
|
||||||
|
];
|
||||||
|
} elseif ($block['type'] === 'timer') {
|
||||||
|
$fallback_text = isset($block['timer_fallback_text'][$lang_id]) ? trim(base64_decode($block['timer_fallback_text'][$lang_id])) : '';
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'timer',
|
||||||
|
'timer_mode' => $block['timer_mode'] ?? 'fixed',
|
||||||
|
'timer_date' => $block['timer_date'] ?? '',
|
||||||
|
'timer_minutes' => $block['timer_minutes'] ?? '15',
|
||||||
|
'timer_action' => $block['timer_action'] ?? 'none',
|
||||||
|
'fallback_text' => html_entity_decode($fallback_text, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'color' => $block['color'] ?? '#ffffff',
|
||||||
|
'font_size' => $block['font_size'] ?? '',
|
||||||
|
'font_family' => $block['font_family'] ?? '',
|
||||||
|
'custom_css' => $block['custom_css'] ?? ''
|
||||||
|
];
|
||||||
|
} elseif ($block['type'] === 'shipping') {
|
||||||
|
$cart_total = $this->cart->getTotal();
|
||||||
|
$shipping_total = (float)($block['shipping_total'] ?? 2000);
|
||||||
|
$percent = $shipping_total > 0 ? min(100, max(0, ($cart_total / $shipping_total) * 100)) : 100;
|
||||||
|
|
||||||
|
$before = isset($block['shipping_text_before'][$lang_id]) ? trim(base64_decode($block['shipping_text_before'][$lang_id])) : '';
|
||||||
|
$after = isset($block['shipping_text_after'][$lang_id]) ? trim(base64_decode($block['shipping_text_after'][$lang_id])) : '';
|
||||||
|
|
||||||
|
if ($cart_total >= $shipping_total) {
|
||||||
|
$text = $after ?: $this->language->get('text_free_shipping_active');
|
||||||
|
} else {
|
||||||
|
$diff = $shipping_total - $cart_total;
|
||||||
|
$diff_formatted = $this->currency->format($diff, $this->session->data['currency']);
|
||||||
|
$text = str_replace('{diff}', $diff_formatted, $before ?: sprintf($this->language->get('text_free_shipping_left'), '{diff}'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'shipping',
|
||||||
|
'text' => html_entity_decode($text, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'percent' => round($percent, 1),
|
||||||
|
'color_bg' => $block['color_bg'] ?? '#e2e8f0',
|
||||||
|
'color_fill' => $block['color_fill'] ?? '#2ecc71',
|
||||||
|
'color_text' => $block['color_text'] ?? '#ffffff',
|
||||||
|
'font_size' => $block['font_size'] ?? '',
|
||||||
|
'font_family' => $block['font_family'] ?? '',
|
||||||
|
'custom_css' => $block['custom_css'] ?? ''
|
||||||
|
];
|
||||||
|
} elseif ($block['type'] === 'subscribe') {
|
||||||
|
$placeholder = isset($block['subscribe_placeholder'][$lang_id]) ? trim(base64_decode($block['subscribe_placeholder'][$lang_id])) : '';
|
||||||
|
$btn_text = isset($block['subscribe_button_text'][$lang_id]) ? trim(base64_decode($block['subscribe_button_text'][$lang_id])) : '';
|
||||||
|
$success_msg = isset($block['subscribe_success_msg'][$lang_id]) ? trim(base64_decode($block['subscribe_success_msg'][$lang_id])) : '';
|
||||||
|
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'subscribe',
|
||||||
|
'placeholder' => html_entity_decode($placeholder ?: $this->language->get('text_subscribe_placeholder'), ENT_QUOTES, 'UTF-8'),
|
||||||
|
'button_text' => html_entity_decode($btn_text ?: $this->language->get('text_subscribe_button'), ENT_QUOTES, 'UTF-8'),
|
||||||
|
'success_msg' => html_entity_decode($success_msg ?: $this->language->get('text_subscribe_success'), ENT_QUOTES, 'UTF-8'),
|
||||||
|
'input_bg' => $block['subscribe_input_bg'] ?? '#ffffff',
|
||||||
|
'input_color' => $block['subscribe_input_color'] ?? '#333333',
|
||||||
|
'button_bg' => $block['subscribe_button_bg'] ?? '#3498db',
|
||||||
|
'button_color' => $block['subscribe_button_color'] ?? '#ffffff',
|
||||||
|
'font_size' => $block['font_size'] ?? '',
|
||||||
|
'font_family' => $block['font_family'] ?? '',
|
||||||
|
'custom_css' => $block['custom_css'] ?? ''
|
||||||
|
];
|
||||||
|
} elseif ($block['type'] === 'coupon') {
|
||||||
|
$coupon_text = isset($block['coupon_text'][$lang_id]) ? trim(base64_decode($block['coupon_text'][$lang_id])) : '';
|
||||||
|
$coupon_code = isset($block['coupon_code'][$lang_id]) ? trim(base64_decode($block['coupon_code'][$lang_id])) : '';
|
||||||
|
$coupon_tooltip = isset($block['coupon_tooltip'][$lang_id]) ? trim(base64_decode($block['coupon_tooltip'][$lang_id])) : '';
|
||||||
|
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'coupon',
|
||||||
|
'text' => html_entity_decode($coupon_text ?: $coupon_code, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'code' => html_entity_decode($coupon_code, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'tooltip' => html_entity_decode($coupon_tooltip ?: $this->language->get('text_coupon_copied'), ENT_QUOTES, 'UTF-8'),
|
||||||
|
'bg' => $block['coupon_bg'] ?? '#f39c12',
|
||||||
|
'color' => $block['coupon_color'] ?? '#ffffff',
|
||||||
|
'border' => $block['coupon_border'] ?? '#d35400',
|
||||||
|
'font_size' => $block['font_size'] ?? '',
|
||||||
|
'font_family' => $block['font_family'] ?? '',
|
||||||
|
'custom_css' => $block['custom_css'] ?? ''
|
||||||
|
];
|
||||||
|
} elseif ($block['type'] === 'activity') {
|
||||||
|
$min = (isset($block['activity_min']) && $block['activity_min'] !== '') ? (int)$block['activity_min'] : 50;
|
||||||
|
$max = (isset($block['activity_max']) && $block['activity_max'] !== '') ? (int)$block['activity_max'] : 150;
|
||||||
|
if ($min > $max) {
|
||||||
|
$tmp = $min;
|
||||||
|
$min = $max;
|
||||||
|
$max = $tmp;
|
||||||
|
}
|
||||||
|
$seed = (int)date('YmdH') + (int)$slideIdx + (int)$blockIdx;
|
||||||
|
srand($seed);
|
||||||
|
$count = rand($min, $max);
|
||||||
|
srand();
|
||||||
|
|
||||||
|
$template_text = isset($block['activity_text'][$lang_id]) ? trim(base64_decode($block['activity_text'][$lang_id])) : '';
|
||||||
|
if (empty($template_text)) {
|
||||||
|
$template_text = sprintf($this->language->get('text_activity_views'), '{count}');
|
||||||
|
}
|
||||||
|
$text = str_replace('{count}', $count, $template_text);
|
||||||
|
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'activity',
|
||||||
|
'text' => html_entity_decode($text, ENT_QUOTES, 'UTF-8'),
|
||||||
|
'icon' => $block['activity_icon'] ?? 'fire',
|
||||||
|
'color' => $block['color'] ?? '',
|
||||||
|
'font_size' => $block['font_size'] ?? '',
|
||||||
|
'font_family' => $block['font_family'] ?? '',
|
||||||
|
'custom_css' => $block['custom_css'] ?? ''
|
||||||
|
];
|
||||||
|
} elseif ($block['type'] === 'product') {
|
||||||
|
$product_id = isset($block['product_id']) ? (int)$block['product_id'] : 0;
|
||||||
|
$product_info = $this->model_catalog_product->getProduct($product_id);
|
||||||
|
|
||||||
|
if ($product_info && $product_info['status']) {
|
||||||
|
$image = '';
|
||||||
|
if (!empty($block['product_show_image']) && !empty($product_info['image'])) {
|
||||||
|
$image = $this->model_tool_image->resize($product_info['image'], 32, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
$price = '';
|
||||||
|
if (!empty($block['product_show_price'])) {
|
||||||
|
if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
|
||||||
|
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
|
||||||
|
|
||||||
|
if ((float)$product_info['special']) {
|
||||||
|
$special = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
|
||||||
|
$price = '<span style="text-decoration: line-through; opacity: 0.6; margin-right: 4px;">' . $price . '</span> <span style="color:#ef4444; font-weight:bold;">' . $special . '</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$btn_text = isset($block['product_button_text'][$lang_id]) ? trim(base64_decode($block['product_button_text'][$lang_id])) : '';
|
||||||
|
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'product',
|
||||||
|
'product_id' => $product_id,
|
||||||
|
'name' => html_entity_decode($product_info['name'], ENT_QUOTES, 'UTF-8'),
|
||||||
|
'image' => $image,
|
||||||
|
'price' => $price,
|
||||||
|
'show_button' => isset($block['product_show_button']) ? (int)$block['product_show_button'] : 1,
|
||||||
|
'button_text' => html_entity_decode($btn_text ?: $this->language->get('text_product_buy'), ENT_QUOTES, 'UTF-8'),
|
||||||
|
'button_bg' => $block['product_button_bg'] ?? '#2ecc71',
|
||||||
|
'button_color'=> $block['product_button_color'] ?? '#ffffff',
|
||||||
|
'link' => $this->appendUtm($this->url->link('product/product', 'product_id=' . $product_id), $slide_utm)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} elseif ($block['type'] === 'anim_icon') {
|
||||||
|
$blocks[] = [
|
||||||
|
'type' => 'anim_icon',
|
||||||
|
'icon_type' => $block['icon_type'] ?? 'bell',
|
||||||
|
'icon_size' => $block['icon_size'] ?? '24',
|
||||||
|
'icon_color' => $block['icon_color'] ?? '#ffffff'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip slides with empty blocks
|
||||||
|
if (empty($blocks)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$slide_id = isset($slide['slide_id']) ? trim($slide['slide_id']) : '';
|
||||||
|
if (empty($slide_id)) {
|
||||||
|
$slide_id = 'slide_' . substr(md5(uniqid((string)rand(), true)), 0, 9);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['slides'][] = [
|
||||||
|
'slide_id' => $slide_id,
|
||||||
|
'layout' => $data['layout'],
|
||||||
|
'bg_type' => $slide['bg_type'] ?? 'color',
|
||||||
|
'bg_color' => $slide['bg_color'] ?? '#2c3e50',
|
||||||
|
'bg_pattern' => $bg_pattern_url,
|
||||||
|
'text_color' => $slide['text_color'] ?? '#ffffff',
|
||||||
|
'link' => $slide_link,
|
||||||
|
'full_slide_link' => !empty($slide['full_slide_link']),
|
||||||
|
'weather' => $slide['weather_targeting'] ?? 'off',
|
||||||
|
'show_close' => $slide['show_close'] ?? '1',
|
||||||
|
'show_desktop' => $slide['show_desktop'] ?? '1',
|
||||||
|
'show_mobile' => $slide['show_mobile'] ?? '1',
|
||||||
|
'height' => $slide['height'] ?? '',
|
||||||
|
'padding_top' => $slide['padding_top'] ?? '0',
|
||||||
|
'padding_bottom' => $slide['padding_bottom'] ?? '0',
|
||||||
|
'marquee_status' => isset($slide['marquee_status']) ? (int)$slide['marquee_status'] : 0,
|
||||||
|
'marquee_speed' => isset($slide['marquee_speed']) ? (int)$slide['marquee_speed'] : 15,
|
||||||
|
'custom_css' => isset($slide['custom_css']) ? trim($slide['custom_css']) : '',
|
||||||
|
'font_family' => isset($slide['font_family']) ? trim($slide['font_family']) : '',
|
||||||
|
'bg_gradient' => $slide['bg_gradient'] ?? '',
|
||||||
|
'gradient_animated' => isset($slide['gradient_animated']) && $slide['gradient_animated'] == '1',
|
||||||
|
'gradient_anim_speed' => isset($slide['gradient_anim_speed']) ? (int)$slide['gradient_anim_speed'] : 15,
|
||||||
|
'blocks' => $blocks
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If no slides are active, do not render
|
||||||
|
if (empty($data['slides'])) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load custom font if configured
|
||||||
|
$custom_font_url = $this->config->get('module_promo_top_bar_nat_custom_font_url');
|
||||||
|
if ($custom_font_url) {
|
||||||
|
$this->document->addStyle($custom_font_url);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load unique google fonts from slides & blocks
|
||||||
|
$data['google_fonts'] = [];
|
||||||
|
if (!empty($data['slides'])) {
|
||||||
|
$fonts = [];
|
||||||
|
foreach ($data['slides'] as $slide) {
|
||||||
|
if (!empty($slide['font_family'])) {
|
||||||
|
$fonts[] = $slide['font_family'];
|
||||||
|
}
|
||||||
|
if (!empty($slide['blocks']) && is_array($slide['blocks'])) {
|
||||||
|
foreach ($slide['blocks'] as $block) {
|
||||||
|
if (!empty($block['font_family'])) {
|
||||||
|
$fonts[] = $block['font_family'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($fonts)) {
|
||||||
|
$unique_fonts = array_unique($fonts);
|
||||||
|
$custom_font_name = $this->config->get('module_promo_top_bar_nat_custom_font_name');
|
||||||
|
foreach ($unique_fonts as $font) {
|
||||||
|
if ($custom_font_name && $font === $custom_font_name) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$data['google_fonts'][] = 'https://fonts.googleapis.com/css2?family=' . str_replace(' ', '+', $font) . ':wght@400;500;600;700&display=swap';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set cookie indicating the user has visited a page with the promo bar
|
||||||
|
if (!isset($this->request->cookie['nat_promo_visited'])) {
|
||||||
|
setcookie('nat_promo_visited', '1', time() + 3600 * 24 * 365, '/');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->load->view('extension/promo_top_bar_nat/module/promo_top_bar_nat', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function checkLicense(string $key): bool {
|
||||||
|
if (empty($key)) return false;
|
||||||
|
|
||||||
|
$host = $this->request->server['HTTP_HOST'] ?? '';
|
||||||
|
if (!$host) {
|
||||||
|
$host = defined('HTTP_SERVER') ? HTTP_SERVER : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$domain = str_replace(['http://', 'https://', 'www.'], '', strtolower($host));
|
||||||
|
$domain = explode('/', $domain)[0];
|
||||||
|
$domain = explode(':', $domain)[0];
|
||||||
|
|
||||||
|
$parts = explode('.', $domain);
|
||||||
|
|
||||||
|
$v_p1 = 'kto_';
|
||||||
|
$v_p2 = 'lomaet_';
|
||||||
|
$v_p3 = 'promo_';
|
||||||
|
$v_p4 = 'top_';
|
||||||
|
$v_p5 = 'bar_';
|
||||||
|
$v_p6 = 'tot_';
|
||||||
|
$v_p7 = 'rediska';
|
||||||
|
$salt = $v_p1 . $v_p2 . $v_p3 . $v_p4 . $v_p5 . $v_p6 . $v_p7;
|
||||||
|
|
||||||
|
while (count($parts) >= 2) {
|
||||||
|
$check_domain = implode('.', $parts);
|
||||||
|
$hash = md5($check_domain . $salt);
|
||||||
|
$valid_key = strtoupper(
|
||||||
|
substr($hash, 0, 4) . '-' .
|
||||||
|
substr($hash, 4, 4) . '-' .
|
||||||
|
substr($hash, 8, 4) . '-' .
|
||||||
|
substr($hash, 12, 4)
|
||||||
|
);
|
||||||
|
if ($key === $valid_key) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
array_shift($parts);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function appendUtm(string $url, string $utm): string {
|
||||||
|
$url = trim($url);
|
||||||
|
$utm = trim($utm);
|
||||||
|
if (empty($url) || empty($utm) || $url === '#' || strpos($url, 'javascript:') === 0) {
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
$utm = ltrim($utm, '?&');
|
||||||
|
|
||||||
|
if (strpos($url, '?') !== false) {
|
||||||
|
return $url . '&' . $utm;
|
||||||
|
} else {
|
||||||
|
return $url . '?' . $utm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function parseSystemRoute(string $route_str): string {
|
||||||
|
$route = str_replace('route:', '', $route_str);
|
||||||
|
$parts = explode(':', $route);
|
||||||
|
$page = $parts[0];
|
||||||
|
$id = isset($parts[1]) ? (int)$parts[1] : 0;
|
||||||
|
|
||||||
|
switch ($page) {
|
||||||
|
case 'home':
|
||||||
|
return $this->url->link('common/home');
|
||||||
|
case 'cart':
|
||||||
|
return $this->url->link('checkout/cart');
|
||||||
|
case 'checkout':
|
||||||
|
return $this->url->link('checkout/checkout');
|
||||||
|
case 'special':
|
||||||
|
return $this->url->link('product/special');
|
||||||
|
case 'category':
|
||||||
|
return $this->url->link('product/category', 'path=' . $id);
|
||||||
|
case 'information':
|
||||||
|
return $this->url->link('information/information', 'information_id=' . $id);
|
||||||
|
case 'product':
|
||||||
|
return $this->url->link('product/product', 'product_id=' . $id);
|
||||||
|
case 'manufacturer':
|
||||||
|
return $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $id);
|
||||||
|
case 'product/manufacturer':
|
||||||
|
return $this->url->link('product/manufacturer');
|
||||||
|
default:
|
||||||
|
return $this->url->link('common/home');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function subscribe(): void {
|
||||||
|
$this->load->language('extension/promo_top_bar_nat/module/promo_top_bar_nat');
|
||||||
|
$json = [];
|
||||||
|
|
||||||
|
$time = time();
|
||||||
|
if (isset($this->session->data['nat_promo_last_sub']) && ($time - $this->session->data['nat_promo_last_sub']) < 5) {
|
||||||
|
$json['error'] = $this->language->get('error_rate_limit');
|
||||||
|
$this->response->addHeader('Content-Type: application/json');
|
||||||
|
$this->response->setOutput(json_encode($json));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->session->data['nat_promo_last_sub'] = $time;
|
||||||
|
|
||||||
|
if ($this->request->server['REQUEST_METHOD'] == 'POST' && isset($this->request->post['email'])) {
|
||||||
|
$email = trim($this->request->post['email']);
|
||||||
|
|
||||||
|
if (empty($email)) {
|
||||||
|
$json['error'] = $this->language->get('error_empty_email');
|
||||||
|
} elseif (filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
$this->db->query("INSERT INTO `" . DB_PREFIX . "promo_top_bar_lead_nat` SET email = '" . $this->db->escape($email) . "', store_id = '" . (int)$this->config->get('config_store_id') . "', date_added = NOW()");
|
||||||
|
$json['success'] = true;
|
||||||
|
} else {
|
||||||
|
if (preg_match('/^@?[a-zA-Z0-9_]{3,30}$/', $email)) {
|
||||||
|
$this->db->query("INSERT INTO `" . DB_PREFIX . "promo_top_bar_lead_nat` SET email = '" . $this->db->escape($email) . "', store_id = '" . (int)$this->config->get('config_store_id') . "', date_added = NOW()");
|
||||||
|
$json['success'] = true;
|
||||||
|
} else {
|
||||||
|
$json['error'] = $this->language->get('error_invalid_email');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$json['error'] = $this->language->get('error_invalid_request');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->response->addHeader('Content-Type: application/json');
|
||||||
|
$this->response->setOutput(json_encode($json));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function log(): void {
|
||||||
|
$slide_id = isset($this->request->post['slide_id']) ? trim($this->request->post['slide_id']) : '';
|
||||||
|
$action = isset($this->request->post['action']) ? trim($this->request->post['action']) : '';
|
||||||
|
|
||||||
|
if (!empty($slide_id) && in_array($action, ['view', 'click', 'close'], true)) {
|
||||||
|
$this->db->query("INSERT INTO `" . DB_PREFIX . "promo_top_bar_stats_nat` SET slide_id = '" . $this->db->escape($slide_id) . "', action = '" . $this->db->escape($action) . "', date_added = CURDATE(), `count` = 1 ON DUPLICATE KEY UPDATE `count` = `count` + 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->response->addHeader('Content-Type: application/json');
|
||||||
|
$this->response->setOutput(json_encode(['success' => true]));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function injectCatalogHeader(string &$route, array &$data, mixed &$output): void {
|
||||||
|
try {
|
||||||
|
$is_installed = is_file(DIR_EXTENSION . 'promo_top_bar_nat/catalog/controller/module/promo_top_bar_nat.php') || is_file(DIR_APPLICATION . 'controller/extension/module/promo_top_bar_nat.php');
|
||||||
|
if ($this->config->get('module_promo_top_bar_nat_status') && $is_installed) {
|
||||||
|
$bar_html = $this->index();
|
||||||
|
if (!empty($bar_html)) {
|
||||||
|
if (strpos($output, '</header>') !== false) {
|
||||||
|
$output = str_replace('</header>', '</header>' . "\n" . $bar_html, $output);
|
||||||
|
} elseif (preg_match('/<body[^>]*>/i', $output, $m)) {
|
||||||
|
$output = str_replace($m[0], $m[0] . "\n" . $bar_html, $output);
|
||||||
|
} else {
|
||||||
|
$output = $bar_html . $output;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (\Throwable $e) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
$_['text_free_shipping_active'] = 'Free shipping is active!';
|
||||||
|
$_['text_free_shipping_left'] = 'Only %s left for free shipping!';
|
||||||
|
$_['text_subscribe_placeholder'] = 'Your Email/Telegram...';
|
||||||
|
$_['text_subscribe_button'] = 'Subscribe';
|
||||||
|
$_['text_subscribe_success'] = 'Thank you for subscribing!';
|
||||||
|
$_['text_coupon_copied'] = 'Copied!';
|
||||||
|
$_['text_activity_views'] = 'This slide has been viewed %s times!';
|
||||||
|
$_['text_product_buy'] = 'Buy';
|
||||||
|
$_['error_rate_limit'] = 'Please wait a few seconds before the next submission!';
|
||||||
|
$_['error_empty_email'] = 'Please enter your contact details!';
|
||||||
|
$_['error_invalid_email'] = 'Invalid format of Email or Telegram/Viber username!';
|
||||||
|
$_['error_invalid_request'] = 'Invalid request!';
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
$_['text_free_shipping_active'] = 'Бесплатная доставка активна!';
|
||||||
|
$_['text_free_shipping_left'] = 'До бесплатной доставки осталось %s!';
|
||||||
|
$_['text_subscribe_placeholder'] = 'Ваш Email/Telegram...';
|
||||||
|
$_['text_subscribe_button'] = 'Подписаться';
|
||||||
|
$_['text_subscribe_success'] = 'Спасибо за подписку!';
|
||||||
|
$_['text_coupon_copied'] = 'Скопировано!';
|
||||||
|
$_['text_activity_views'] = 'Этот слайд просмотрели уже %s человек!';
|
||||||
|
$_['text_product_buy'] = 'Купить';
|
||||||
|
$_['error_rate_limit'] = 'Пожалуйста, подождите несколько секунд перед следующей отправкой!';
|
||||||
|
$_['error_empty_email'] = 'Введите контактные данные!';
|
||||||
|
$_['error_invalid_email'] = 'Неверный формат Email или никнейма Telegram/Viber!';
|
||||||
|
$_['error_invalid_request'] = 'Недопустимый запрос!';
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
$_['text_free_shipping_active'] = 'Безкоштовна доставка активна!';
|
||||||
|
$_['text_free_shipping_left'] = 'До безкоштовної доставки залишилося %s!';
|
||||||
|
$_['text_subscribe_placeholder'] = 'Ваш Email/Telegram...';
|
||||||
|
$_['text_subscribe_button'] = 'Підписатися';
|
||||||
|
$_['text_subscribe_success'] = 'Дякуємо за підписку!';
|
||||||
|
$_['text_coupon_copied'] = 'Скопійовано!';
|
||||||
|
$_['text_activity_views'] = 'Цей слайд переглянули вже %s осіб!';
|
||||||
|
$_['text_product_buy'] = 'Купити';
|
||||||
|
$_['error_rate_limit'] = 'Будь ласка, зачекайте кілька секунд перед наступною відправкою!';
|
||||||
|
$_['error_empty_email'] = 'Введіть контактні дані!';
|
||||||
|
$_['error_invalid_email'] = 'Невірний формат Email або нікнейму Telegram/Viber!';
|
||||||
|
$_['error_invalid_request'] = 'Неприпустимий запит!';
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
namespace Opencart\Catalog\Model\Extension\PromoTopBarNat\Module;
|
||||||
|
|
||||||
|
class PromoTopBarNat extends \Opencart\System\Engine\Model {
|
||||||
|
|
||||||
|
public function log(string $slide_id, string $action): void {
|
||||||
|
if (!empty($slide_id) && in_array($action, ['view', 'click', 'close'], true)) {
|
||||||
|
$this->db->query("INSERT INTO `" . DB_PREFIX . "promo_top_bar_stats_nat` SET slide_id = '" . $this->db->escape($slide_id) . "', action = '" . $this->db->escape($action) . "', date_added = CURDATE(), `count` = 1 ON DUPLICATE KEY UPDATE `count` = `count` + 1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addLead(string $email, int $store_id = 0): void {
|
||||||
|
$this->db->query("INSERT INTO `" . DB_PREFIX . "promo_top_bar_lead_nat` SET email = '" . $this->db->escape($email) . "', store_id = '" . (int)$store_id . "', date_added = NOW()");
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "Promo Top Bar [NAT] (OpenCart 4.0.x)",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": "NAT",
|
||||||
|
"link": "https://opencartforum.com",
|
||||||
|
"extension": "promo_top_bar_nat"
|
||||||
|
}
|
||||||
Binary file not shown.
Loading…
Reference in New Issue