| @@ -11,9 +11,8 @@ | ||
| 11 | 11 | use RadiusTheme\SB\Elementor\Widgets\Cart; |
| 12 | 12 | use RadiusTheme\SB\Elementor\Widgets\Checkout; |
| 13 | 13 | use RadiusTheme\SB\Elementor\Widgets\General; |
| 14 | 14 | use RadiusTheme\SB\Elementor\Widgets\Single; |
| 15 | -use RadiusTheme\SB\Helpers\SvgIcons; | |
| 16 | 15 | use RadiusTheme\SB\Models\Base\ListModel; |
| 17 | 16 | use RadiusTheme\SB\Traits\SingletonTrait; |
| 18 | 17 | use RadiusTheme\SBPRO\Elementor\Widgets\Checkout as CheckoutPro; |
| 19 | 18 | |
| @@ -50,9 +49,9 @@ | ||
| 50 | 49 | 'shop' => [ |
| 51 | 50 | 'title' => esc_html__( 'Shop / Archive', 'shopbuilder' ), |
| 52 | 51 | ], |
| 53 | 52 | 'product' => [ |
| 54 | - 'title' => esc_html__( 'Product Page', 'shopbuilder' ), | |
| 53 | + 'title' => esc_html__( 'Single', 'shopbuilder' ), | |
| 55 | 54 | ], |
| 56 | 55 | 'quick_view' => [ |
| 57 | 56 | 'title' => esc_html__( 'Quick View', 'shopbuilder' ), |
| 58 | 57 | ], |
| @@ -92,189 +91,12 @@ | ||
| 92 | 91 | + $this->orderpay_page_widget_list() |
| 93 | 92 | + $this->my_account_page_widget_list() |
| 94 | 93 | + $this->myaccount_auth_page_widget_list(); |
| 95 | 94 | |
| 96 | - // Inject SVG icons per element. | |
| 97 | - $icon_map = self::element_icon_map(); | |
| 98 | - foreach ( $list as $key => &$item ) { | |
| 99 | - $item['icon'] = SvgIcons::get( $icon_map[ $key ] ?? 'default' ); | |
| 100 | - } | |
| 101 | - unset( $item ); | |
| 102 | - | |
| 103 | 95 | return apply_filters( 'rtsb/core/elements/raw_list', $list ); |
| 104 | 96 | } |
| 105 | 97 | |
| 106 | 98 | /** |
| 107 | - * Maps element IDs to SvgIcons keys. | |
| 108 | - * | |
| 109 | - * @return array<string, string> | |
| 110 | - */ | |
| 111 | - private static function element_icon_map() { | |
| 112 | - return [ | |
| 113 | - // General. | |
| 114 | - 'products_grid' => 'grid', | |
| 115 | - 'products_list' => 'list', | |
| 116 | - 'products_slider' => 'slider', | |
| 117 | - 'highlighted_product' => 'star', | |
| 118 | - 'products_single_cateogory' => 'category', | |
| 119 | - 'product_cateogories' => 'category', | |
| 120 | - 'product_lookbook' => 'image', | |
| 121 | - 'category_showcase_tabs' => 'tabs', | |
| 122 | - 'rtsb_wishlist' => 'heart', | |
| 123 | - 'social_share' => 'share', | |
| 124 | - 'wc_breadcrumbs' => 'breadcrumb', | |
| 125 | - 'product_notice' => 'notification', | |
| 126 | - 'advanced_heading' => 'heading', | |
| 127 | - 'dropcaps' => 'text', | |
| 128 | - 'shopbuilder_button' => 'button', | |
| 129 | - 'shopbuilder_cta' => 'cta', | |
| 130 | - 'shopbuilder_info_box' => 'info_box', | |
| 131 | - 'shopbuilder_flip_box' => 'flip_box', | |
| 132 | - 'shopbuilder_pricing_table' => 'pricing', | |
| 133 | - 'image_hotspots' => 'hotspot', | |
| 134 | - 'coupon_list' => 'coupon', | |
| 135 | - 'hero_slider' => 'slider', | |
| 136 | - 'shopbuilder_counter' => 'counter', | |
| 137 | - 'shopbuilder_countdown' => 'countdown', | |
| 138 | - 'shopbuilder_progress_bar' => 'progress', | |
| 139 | - 'image_accordion' => 'accordion', | |
| 140 | - 'shopbuilder_faq' => 'faq', | |
| 141 | - 'logo_slider_and_grid' => 'logo', | |
| 142 | - 'testimonial' => 'testimonial', | |
| 143 | - 'team_member' => 'user', | |
| 144 | - 'post_grid' => 'grid', | |
| 145 | - 'post_list' => 'list', | |
| 146 | - 'advanced_ajax_search' => 'search', | |
| 147 | - 'save_for_buy_later' => 'heart', | |
| 148 | - | |
| 149 | - // Single product. | |
| 150 | - 'product_title' => 'heading', | |
| 151 | - 'product_description' => 'document', | |
| 152 | - 'product_short_description' => 'document', | |
| 153 | - 'product_images' => 'product_page', | |
| 154 | - 'product_onsale' => 'onsale', | |
| 155 | - 'product_additional_info' => 'info_box', | |
| 156 | - 'product_price' => 'counter', | |
| 157 | - 'product_meta' => 'tag', | |
| 158 | - 'product_categories' => 'category', | |
| 159 | - 'product_rating' => 'star', | |
| 160 | - 'product_tags' => 'tag', | |
| 161 | - 'product_sku' => 'tag', | |
| 162 | - 'product_stock' => 'chart', | |
| 163 | - 'actions_button' => 'button', | |
| 164 | - 'product_add_to_cart' => 'cart', | |
| 165 | - 'product_share' => 'share', | |
| 166 | - 'product_sales_count' => 'counter', | |
| 167 | - 'product_stock_counter' => 'chart', | |
| 168 | - 'flash_sale_countdown' => 'countdown', | |
| 169 | - 'product_size_chart' => 'chart', | |
| 170 | - 'product_quick_checkout' => 'checkout', | |
| 171 | - 'product_tabs' => 'tabs', | |
| 172 | - 'advance_product_tabs' => 'tabs', | |
| 173 | - 'product_qr_code' => 'qr', | |
| 174 | - 'product_reviews' => 'star', | |
| 175 | - 'upsells_product' => 'onsale', | |
| 176 | - 'upsells_product_custom' => 'onsale', | |
| 177 | - 'upsells_products_slider_custom' => 'onsale', | |
| 178 | - 'related_product' => 'grid', | |
| 179 | - 'related_product_custom' => 'grid', | |
| 180 | - 'related_products_slider_custom' => 'slider', | |
| 181 | - | |
| 182 | - // Quick view. | |
| 183 | - 'qv_product_title' => 'heading', | |
| 184 | - 'qv_product_description' => 'document', | |
| 185 | - 'qv_product_short_description' => 'document', | |
| 186 | - 'qv_product_images' => 'product_page', | |
| 187 | - 'qv_product_badges' => 'onsale', | |
| 188 | - 'qv_product_additional_info' => 'info_box', | |
| 189 | - 'qv_product_price' => 'counter', | |
| 190 | - 'qv_product_meta' => 'tag', | |
| 191 | - 'qv_product_categories' => 'category', | |
| 192 | - 'qv_product_rating' => 'star', | |
| 193 | - 'qv_product_tags' => 'tag', | |
| 194 | - 'qv_product_sku' => 'tag', | |
| 195 | - 'qv_product_stock' => 'chart', | |
| 196 | - 'qv_actions_button' => 'button', | |
| 197 | - 'qv_product_add_to_cart' => 'cart', | |
| 198 | - 'qv_product_sales_count' => 'counter', | |
| 199 | - 'qv_social_share' => 'share', | |
| 200 | - 'qv_product_quick_checkout' => 'checkout', | |
| 201 | - 'qv_product_size_chart' => 'chart', | |
| 202 | - | |
| 203 | - // Shop / Archive. | |
| 204 | - 'archive_title' => 'heading', | |
| 205 | - 'archive_description' => 'document', | |
| 206 | - 'products_archive_catalog' => 'grid', | |
| 207 | - 'products_archive_catalog_custom' => 'grid', | |
| 208 | - 'ajax_product_filters' => 'filter', | |
| 209 | - 'product_filters' => 'filter', | |
| 210 | - 'archive_result_count' => 'counter', | |
| 211 | - 'archive_products_ordering' => 'progress', | |
| 212 | - 'archive_product_mode' => 'grid', | |
| 213 | - | |
| 214 | - // Cart. | |
| 215 | - 'cart_table' => 'cart', | |
| 216 | - 'cart_totals' => 'counter', | |
| 217 | - 'cart_coupon_form' => 'coupon', | |
| 218 | - 'cross_sells' => 'grid', | |
| 219 | - 'cross_sells_custom' => 'grid', | |
| 220 | - 'cross_sells_custom_slider' => 'slider', | |
| 221 | - 'save_for_later_preview' => 'heart', | |
| 222 | - | |
| 223 | - // Checkout. | |
| 224 | - 'billing_form' => 'form', | |
| 225 | - 'shipping_form' => 'address', | |
| 226 | - 'order_notes' => 'note', | |
| 227 | - 'order_review' => 'checkout', | |
| 228 | - 'checkout_payment' => 'payment', | |
| 229 | - 'coupon_form' => 'coupon', | |
| 230 | - 'checkout_login_form' => 'lock', | |
| 231 | - 'shipping_method' => 'address', | |
| 232 | - 'multi_step_checkout_widget' => 'multi_step', | |
| 233 | - | |
| 234 | - // Thank you / Order received. | |
| 235 | - 'order_received_text' => 'document', | |
| 236 | - 'order_details_summary' => 'checkout', | |
| 237 | - 'order_details_table' => 'document', | |
| 238 | - 'downloadable_products' => 'download', | |
| 239 | - 'order_billing_address' => 'address', | |
| 240 | - 'order_shipping_address' => 'address', | |
| 241 | - 'order_custom_fields_data' => 'document', | |
| 242 | - | |
| 243 | - // My Account. | |
| 244 | - 'order_pay_form' => 'payment', | |
| 245 | - 'account_avatar' => 'user', | |
| 246 | - 'account_navigation_edit_shipping' => 'address', | |
| 247 | - 'account_dashboard' => 'user', | |
| 248 | - 'account_orders' => 'document', | |
| 249 | - 'account_downloads' => 'download', | |
| 250 | - 'account_gift_cards' => 'gift', | |
| 251 | - 'account_gift_card_details' => 'gift', | |
| 252 | - 'account_billing_address' => 'address', | |
| 253 | - 'account_shipping_address' => 'address', | |
| 254 | - 'account_address_description' => 'document', | |
| 255 | - 'account_details' => 'user', | |
| 256 | - 'account_order_status' => 'chart', | |
| 257 | - 'account_order_details_download' => 'download', | |
| 258 | - 'account_order_details_note' => 'note', | |
| 259 | - 'account_order_details_table' => 'document', | |
| 260 | - 'account_order_details_order_again' => 'cart', | |
| 261 | - 'account_order_details_order_shipping' => 'address', | |
| 262 | - 'account_order_details_order_billing' => 'address', | |
| 263 | - 'account_edit_billing_address' => 'form', | |
| 264 | - 'account_edit_shipping_address' => 'form', | |
| 265 | - 'account_payment_methods' => 'payment', | |
| 266 | - 'account_add_payment_method' => 'payment', | |
| 267 | - | |
| 268 | - // Others / Auth. | |
| 269 | - 'account_login' => 'lock', | |
| 270 | - 'account_login_form' => 'lock', | |
| 271 | - 'account_registration_form' => 'user', | |
| 272 | - 'account_lost_password' => 'lock', | |
| 273 | - ]; | |
| 274 | - } | |
| 275 | - | |
| 276 | - /** | |
| 277 | 99 | * GLobal Widget List. |
| 278 | 100 | * |
| 279 | 101 | * @return array |
| 280 | 102 | */ |
| @@ -361,19 +183,8 @@ | ||
| 361 | 183 | 'package' => $this->pro_package(), |
| 362 | 184 | 'fields' => [], |
| 363 | 185 | ] |
| 364 | 186 | ), |
| 365 | - 'category_showcase_tabs' => apply_filters( | |
| 366 | - 'rtsb/elements/category_showcase_tabs/options', | |
| 367 | - [ | |
| 368 | - 'id' => 'category_showcase_tabs', | |
| 369 | - 'title' => esc_html__( 'Category Showcase Tabs', 'shopbuilder' ), | |
| 370 | - 'category' => 'general', | |
| 371 | - 'active' => '', | |
| 372 | - 'package' => $this->pro_package(), | |
| 373 | - 'fields' => [], | |
| 374 | - ] | |
| 375 | - ), | |
| 376 | 187 | 'rtsb_wishlist' => apply_filters( |
| 377 | 188 | 'rtsb/elements/rtsb_wishlist/options', |
| 378 | 189 | [ |
| 379 | 190 | 'id' => 'rtsb_wishlist', |
| @@ -1395,9 +1206,9 @@ | ||
| 1395 | 1206 | 'rtsb/elements/product_filters/options', |
| 1396 | 1207 | [ |
| 1397 | 1208 | 'id' => 'product_filters', |
| 1398 | 1209 | 'title' => esc_html__( 'Product Filters', 'shopbuilder' ), |
| 1399 | - 'base_class' => Archive\ProductFilters\ProductFilters::class, | |
| 1210 | + 'base_class' => Archive\ProductFilters::class, | |
| 1400 | 1211 | 'category' => 'shop', |
| 1401 | 1212 | 'active' => 'on', |
| 1402 | 1213 | 'package' => 'free', |
| 1403 | 1214 | 'fields' => [], |
| @@ -1654,8 +1465,9 @@ | ||
| 1654 | 1465 | 'package' => $this->pro_package(), |
| 1655 | 1466 | 'fields' => [], |
| 1656 | 1467 | ] |
| 1657 | 1468 | ), |
| 1469 | + | |
| 1658 | 1470 | ]; |
| 1659 | 1471 | |
| 1660 | 1472 | return apply_filters( 'rtsb/core/elements/checkout/widget_list', $list ); |
| 1661 | 1473 | } |
| @@ -1835,32 +1647,8 @@ | ||
| 1835 | 1647 | 'rtsb/elements/account_downloads/options', |
| 1836 | 1648 | [ |
| 1837 | 1649 | 'id' => 'account_downloads', |
| 1838 | 1650 | 'title' => esc_html__( 'Account Downloads', 'shopbuilder' ), |
| 1839 | - 'category' => 'myaccount_dashboard', | |
| 1840 | - 'is_front_page' => 'all_myaccount_dashboard_inner', | |
| 1841 | - 'active' => 'on', | |
| 1842 | - 'package' => $this->pro_package(), | |
| 1843 | - 'fields' => [], | |
| 1844 | - ] | |
| 1845 | - ), | |
| 1846 | - 'account_gift_cards' => apply_filters( | |
| 1847 | - 'rtsb/elements/account_gift_cards/options', | |
| 1848 | - [ | |
| 1849 | - 'id' => 'account_gift_cards', | |
| 1850 | - 'title' => esc_html__( 'Account Gift Cards', 'shopbuilder' ), | |
| 1851 | - 'category' => 'myaccount_dashboard', | |
| 1852 | - 'is_front_page' => 'all_myaccount_dashboard_inner', | |
| 1853 | - 'active' => 'on', | |
| 1854 | - 'package' => $this->pro_package(), | |
| 1855 | - 'fields' => [], | |
| 1856 | - ] | |
| 1857 | - ), | |
| 1858 | - 'account_gift_card_details' => apply_filters( | |
| 1859 | - 'rtsb/elements/account_gift_card_details/options', | |
| 1860 | - [ | |
| 1861 | - 'id' => 'account_gift_card_details', | |
| 1862 | - 'title' => esc_html__( 'Account Gift Card Details', 'shopbuilder' ), | |
| 1863 | 1651 | 'category' => 'myaccount_dashboard', |
| 1864 | 1652 | 'is_front_page' => 'all_myaccount_dashboard_inner', |
| 1865 | 1653 | 'active' => 'on', |
| 1866 | 1654 | 'package' => $this->pro_package(), |