cart-table.php
1520 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Elementor; |
| 4 | |
| 5 | defined('ABSPATH') || exit; |
| 6 | |
| 7 | use ShopEngine\Widgets\Products; |
| 8 | |
| 9 | class ShopEngine_Cart_Table extends \ShopEngine\Base\Widget { |
| 10 | |
| 11 | public function config() { |
| 12 | return new ShopEngine_Cart_Table_Config(); |
| 13 | } |
| 14 | |
| 15 | |
| 16 | protected function register_controls() { |
| 17 | |
| 18 | /* |
| 19 | * Setting Tab - Content |
| 20 | */ |
| 21 | $this->start_controls_section( |
| 22 | 'shopengine_section_cart_table_general', |
| 23 | [ |
| 24 | 'label' => esc_html__('General', 'shopengine'), |
| 25 | 'type' => Controls_Manager::TAB_SETTINGS, |
| 26 | ] |
| 27 | ); |
| 28 | |
| 29 | $this->add_control( |
| 30 | 'shopengine_cart_table_footer__buttons', |
| 31 | [ |
| 32 | 'label' => esc_html__('Footer Buttons', 'shopengine'), |
| 33 | 'type' => Controls_Manager::HEADING, |
| 34 | 'separator' => 'before', |
| 35 | ] |
| 36 | ); |
| 37 | |
| 38 | $this->add_control( |
| 39 | 'show_continue_shopping', |
| 40 | [ |
| 41 | 'label' => esc_html__('Hide Continue Shopping Button?', 'shopengine'), |
| 42 | 'type' => Controls_Manager::SWITCHER, |
| 43 | 'label_on' => esc_html__('Yes', 'shopengine'), |
| 44 | 'label_off' => esc_html__('No', 'shopengine'), |
| 45 | 'return_value' => 'none', |
| 46 | 'default' => 'inline-block', |
| 47 | 'selectors' => [ |
| 48 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .return-to-shop' => 'display: {{VALUE}};' |
| 49 | ], |
| 50 | ] |
| 51 | ); |
| 52 | |
| 53 | $this->add_control( |
| 54 | 'show_clear_all', |
| 55 | [ |
| 56 | 'label' => esc_html__('Hide Clear All Button?', 'shopengine'), |
| 57 | 'type' => Controls_Manager::SWITCHER, |
| 58 | 'label_on' => esc_html__('Yes', 'shopengine'), |
| 59 | 'label_off' => esc_html__('No', 'shopengine'), |
| 60 | 'return_value' => 'none', |
| 61 | 'default' => 'inline-block', |
| 62 | 'selectors' => [ |
| 63 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer button[name=empty_cart]' => 'display: {{VALUE}};' |
| 64 | ], |
| 65 | ] |
| 66 | ); |
| 67 | |
| 68 | $this->add_control( |
| 69 | 'shopengine_cart_table_footer__remove_button', |
| 70 | [ |
| 71 | 'label' => esc_html__('Remove Button', 'shopengine'), |
| 72 | 'type' => Controls_Manager::HEADING, |
| 73 | 'separator' => 'before', |
| 74 | ] |
| 75 | ); |
| 76 | |
| 77 | $this->add_control('shopengine_cart_table_remove_button_style', |
| 78 | [ |
| 79 | 'label' => esc_html__('Change Position?', 'shopengine'), |
| 80 | 'type' => Controls_Manager::SWITCHER, |
| 81 | 'default' => 'default', |
| 82 | 'label_on' => esc_html__('Yes', 'shopengine'), |
| 83 | 'label_off' => esc_html__('No', 'shopengine'), |
| 84 | 'return_value' => 'positional', |
| 85 | 'render_type' => 'template', |
| 86 | ] |
| 87 | ); |
| 88 | |
| 89 | $this->add_control( |
| 90 | 'shopengine_cart_table_remove_button_position', |
| 91 | [ |
| 92 | 'label' => esc_html__('Remove Button Position', 'shopengine'), |
| 93 | 'type' => Controls_Manager::SELECT, |
| 94 | 'default' => 'default', |
| 95 | 'options' => [ |
| 96 | 'default' => esc_html__('Default', 'shopengine'), |
| 97 | 'start' => esc_html__('Start', 'shopengine'), |
| 98 | 'end' => esc_html__('End', 'shopengine'), |
| 99 | ], |
| 100 | 'condition' => [ |
| 101 | 'shopengine_cart_table_remove_button_style' => 'positional', |
| 102 | ], |
| 103 | 'prefix_class' => 'shopengine-cart-remove-pos-', |
| 104 | 'render_type' => 'template', |
| 105 | ]); |
| 106 | |
| 107 | $this->add_control( |
| 108 | 'shopengine_cart_table_quantity_icon', |
| 109 | [ |
| 110 | 'label' => esc_html__('Quantity Icons', 'shopengine'), |
| 111 | 'type' => Controls_Manager::HEADING, |
| 112 | 'separator' => 'before', |
| 113 | ] |
| 114 | ); |
| 115 | |
| 116 | $this->add_control('shopengine_cart_table_quantity_icon_remove', |
| 117 | [ |
| 118 | 'label' => esc_html__('Remove Icons', 'shopengine'), |
| 119 | 'type' => Controls_Manager::SWITCHER, |
| 120 | 'default' => 'no', |
| 121 | 'label_on' => esc_html__('Yes', 'shopengine'), |
| 122 | 'label_off' => esc_html__('No', 'shopengine'), |
| 123 | 'return_value' => 'yes', |
| 124 | ] |
| 125 | ); |
| 126 | |
| 127 | $this->end_controls_section(); |
| 128 | |
| 129 | $this->start_controls_section( |
| 130 | 'shopengine_section_cart_table_content', |
| 131 | [ |
| 132 | 'label' => esc_html__('Content', 'shopengine'), |
| 133 | 'type' => Controls_Manager::TAB_SETTINGS, |
| 134 | ] |
| 135 | ); |
| 136 | |
| 137 | $this->add_control( |
| 138 | 'shopengine_cart_table_title', |
| 139 | [ |
| 140 | 'label' => esc_html__('Title', 'shopengine'), |
| 141 | 'type' => Controls_Manager::TEXT, |
| 142 | 'default' => esc_html__('Product', 'shopengine') |
| 143 | ] |
| 144 | ); |
| 145 | |
| 146 | $this->add_control( |
| 147 | 'shopengine_cart_table_price', |
| 148 | [ |
| 149 | 'label' => esc_html__('Price', 'shopengine'), |
| 150 | 'type' => Controls_Manager::TEXT, |
| 151 | 'default' => esc_html__('Price', 'shopengine') |
| 152 | ] |
| 153 | ); |
| 154 | |
| 155 | $this->add_control( |
| 156 | 'shopengine_cart_table_quantity', |
| 157 | [ |
| 158 | 'label' => esc_html__('Quantity', 'shopengine'), |
| 159 | 'type' => Controls_Manager::TEXT, |
| 160 | 'default' => esc_html__('Quantity', 'shopengine') |
| 161 | ] |
| 162 | ); |
| 163 | |
| 164 | $this->add_control( |
| 165 | 'shopengine_cart_table_subtotal', |
| 166 | [ |
| 167 | 'label' => esc_html__('Subtotal', 'shopengine'), |
| 168 | 'type' => Controls_Manager::TEXT, |
| 169 | 'default' => esc_html__('Subtotal', 'shopengine') |
| 170 | ] |
| 171 | ); |
| 172 | |
| 173 | $this->add_control( |
| 174 | 'shopengine_cart_continue_shopping_btn', |
| 175 | [ |
| 176 | 'label' => esc_html__('Continue Shopping', 'shopengine'), |
| 177 | 'type' => Controls_Manager::TEXT, |
| 178 | 'default' => esc_html__('Continue Shopping', 'shopengine') |
| 179 | ] |
| 180 | ); |
| 181 | |
| 182 | $this->add_control( |
| 183 | 'shopengine_cart_table_update', |
| 184 | [ |
| 185 | 'label' => esc_html__('Update Cart', 'shopengine'), |
| 186 | 'type' => Controls_Manager::TEXT, |
| 187 | 'default' => esc_html__('Update Cart', 'shopengine') |
| 188 | ] |
| 189 | ); |
| 190 | |
| 191 | $this->add_control( |
| 192 | 'shopengine_cart_table_clear_all', |
| 193 | [ |
| 194 | 'label' => esc_html__('Clear All', 'shopengine'), |
| 195 | 'type' => Controls_Manager::TEXT, |
| 196 | 'default' => esc_html__('Clear All', 'shopengine') |
| 197 | ] |
| 198 | ); |
| 199 | |
| 200 | $this->end_controls_section(); |
| 201 | |
| 202 | /* |
| 203 | ============================== |
| 204 | Style Tab - Cart Table Header |
| 205 | ============================= |
| 206 | */ |
| 207 | $this->start_controls_section( |
| 208 | 'shopengine_section__cart_table_head', |
| 209 | [ |
| 210 | 'label' => esc_html__('Table Header', 'shopengine'), |
| 211 | 'tab' => Controls_Manager::TAB_STYLE, |
| 212 | ] |
| 213 | ); |
| 214 | |
| 215 | $this->add_control( |
| 216 | 'shopengine_cart_table_head__bg_color', |
| 217 | [ |
| 218 | 'label' => esc_html__( 'Background Color', 'shopengine' ), |
| 219 | 'type' => Controls_Manager::COLOR, |
| 220 | 'alpha' => false, |
| 221 | 'default' => '#F2F2F2', |
| 222 | 'alpha' => false, |
| 223 | 'selectors' => [ |
| 224 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__head' => 'background-color: {{VALUE}};', |
| 225 | ], |
| 226 | ] |
| 227 | ); |
| 228 | |
| 229 | $this->add_control( |
| 230 | 'shopengine_cart_table_head__color', |
| 231 | [ |
| 232 | 'label' => esc_html__( 'Text Color', 'shopengine' ), |
| 233 | 'type' => Controls_Manager::COLOR, |
| 234 | 'alpha' => false, |
| 235 | 'default' => '#3a3a3a', |
| 236 | 'alpha' => false, |
| 237 | 'selectors' => [ |
| 238 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__head div' => 'color: {{VALUE}};', |
| 239 | ], |
| 240 | ] |
| 241 | ); |
| 242 | |
| 243 | $this->add_group_control( |
| 244 | Group_Control_Typography::get_type(), |
| 245 | array( |
| 246 | 'name' => 'shopengine_cart_table_head_typography', |
| 247 | 'label' => esc_html__('Typography', 'shopengine'), |
| 248 | 'name' => 'shopengine_cart_table_head_typography', |
| 249 | 'label' => esc_html__('Typography', 'shopengine'), |
| 250 | 'selector' => '{{WRAPPER}} .shopengine-cart-table .shopengine-table__head div', |
| 251 | 'exclude' => ['font_style', 'text_decoration', 'font_family'], |
| 252 | 'fields_options' => [ |
| 253 | 'typography' => [ |
| 254 | 'default' => 'custom', |
| 255 | ], |
| 256 | 'font_weight' => [ |
| 257 | 'default' => '600', |
| 258 | ], |
| 259 | 'font_size' => [ |
| 260 | 'label' => esc_html__('Font Size (px)', 'shopengine'), |
| 261 | 'default' => [ |
| 262 | 'size' => '16', |
| 263 | 'unit' => 'px' |
| 264 | ], |
| 265 | 'size_units' => ['px'] |
| 266 | ], |
| 267 | 'text_transform' => [ |
| 268 | 'default' => 'capitalize', |
| 269 | ], |
| 270 | 'line_height' => [ |
| 271 | 'label' => esc_html__('Line-Height (px)', 'shopengine'), |
| 272 | 'default' => [ |
| 273 | 'size' => '19', |
| 274 | 'unit' => 'px' |
| 275 | ], |
| 276 | 'size_units' => ['px'] |
| 277 | ], |
| 278 | 'letter_spacing' => [ |
| 279 | 'default' => [ |
| 280 | 'size' => '0', |
| 281 | ] |
| 282 | ], |
| 283 | ], |
| 284 | ) |
| 285 | ); |
| 286 | |
| 287 | $this->add_responsive_control( |
| 288 | 'shopengine_cart_table_head__padding', |
| 289 | [ |
| 290 | 'label' => esc_html__('Padding (px)', 'shopengine'), |
| 291 | 'type' => Controls_Manager::DIMENSIONS, |
| 292 | 'size_units' => ['px'], |
| 293 | 'default' => [ |
| 294 | 'top' => '12', |
| 295 | 'right' => '40', |
| 296 | 'bottom' => '12', |
| 297 | 'left' => '40', |
| 298 | 'unit' => 'px', |
| 299 | 'isLinked' => false, |
| 300 | ], |
| 301 | 'selectors' => [ |
| 302 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__head' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 303 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__head' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};', |
| 304 | ], |
| 305 | 'separator' => 'before', |
| 306 | ] |
| 307 | ); |
| 308 | |
| 309 | $this->add_group_control( |
| 310 | Group_Control_Border::get_type(), |
| 311 | [ |
| 312 | 'name' => 'shopengine_cart_table_head__border', |
| 313 | 'label' => esc_html__('Border', 'shopengine'), |
| 314 | 'fields_options' => [ |
| 315 | 'border' => [ |
| 316 | 'default' => 'solid', |
| 317 | ], |
| 318 | 'width' => [ |
| 319 | 'default' => [ |
| 320 | 'top' => '1', |
| 321 | 'right' => '1', |
| 322 | 'bottom' => '1', |
| 323 | 'left' => '1', |
| 324 | 'isLinked' => true, |
| 325 | ], |
| 326 | 'selectors' => [ |
| 327 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__head' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 328 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__head' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}', |
| 329 | ] |
| 330 | ], |
| 331 | 'color' => [ |
| 332 | 'default' => '#f2f2f2' |
| 333 | ] |
| 334 | ], |
| 335 | 'selector' => '{{WRAPPER}} .shopengine-cart-table .shopengine-table__head', |
| 336 | 'separator' => 'before' |
| 337 | ] |
| 338 | ); |
| 339 | |
| 340 | $this->end_controls_section(); // end ./ Style Tab - Cart Table Header |
| 341 | |
| 342 | /* |
| 343 | =============================== |
| 344 | Style Tab - Cart Table Body |
| 345 | =============================== |
| 346 | */ |
| 347 | |
| 348 | $this->start_controls_section( |
| 349 | 'shopengine_section__cart_table_content', |
| 350 | [ |
| 351 | 'label' => esc_html__('Table Body', 'shopengine'), |
| 352 | 'tab' => Controls_Manager::TAB_STYLE, |
| 353 | ] |
| 354 | ); |
| 355 | |
| 356 | $this->add_control( |
| 357 | 'shopengine_cart_table_single_cart_item_bg', |
| 358 | [ |
| 359 | 'label' => esc_html__('Background', 'shopengine'), |
| 360 | 'type' => Controls_Manager::COLOR, |
| 361 | 'alpha' => false, |
| 362 | 'default' => '#ffffff', |
| 363 | 'alpha' => false, |
| 364 | 'selectors' => [ |
| 365 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body' => 'background: {{VALUE}};', |
| 366 | ], |
| 367 | ] |
| 368 | ); |
| 369 | |
| 370 | |
| 371 | $this->add_control( |
| 372 | 'shopengine_cart_table_content__text_color', |
| 373 | [ |
| 374 | 'label' => esc_html__('Text Color', 'shopengine'), |
| 375 | 'type' => Controls_Manager::COLOR, |
| 376 | 'default' => '#979797', |
| 377 | 'alpha' => false, |
| 378 | 'selectors' => [ |
| 379 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body :is(.shopengine-table__body-item--td, div, a, span)' => 'color: {{VALUE}};' |
| 380 | ], |
| 381 | ] |
| 382 | ); |
| 383 | |
| 384 | $this->add_control( |
| 385 | 'shopengine_cart_table_border_color', |
| 386 | [ |
| 387 | 'label' => esc_html__('Border Color', 'shopengine'), |
| 388 | 'type' => Controls_Manager::COLOR, |
| 389 | 'default' => '#F2F2F2', |
| 390 | 'alpha' => false, |
| 391 | 'selectors' => [ |
| 392 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body' => 'border-style: solid; border-width: 0 1px 1px 1px; border-color: {{VALUE}};' |
| 393 | ], |
| 394 | ] |
| 395 | ); |
| 396 | |
| 397 | $this->add_control( |
| 398 | 'shopengine_cart_table_content__text_hover_color', |
| 399 | [ |
| 400 | 'label' => esc_html__('Link Hover Color', 'shopengine'), |
| 401 | 'type' => Controls_Manager::COLOR, |
| 402 | 'alpha' => false, |
| 403 | 'default' => '#979797', |
| 404 | 'alpha' => false, |
| 405 | 'selectors' => [ |
| 406 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .shopengine-table__body-item--td a:hover' => 'color: {{VALUE}};', |
| 407 | ], |
| 408 | ] |
| 409 | ); |
| 410 | |
| 411 | $this->add_control( |
| 412 | 'shopengine_cart_table_content__price_color', |
| 413 | [ |
| 414 | 'label' => esc_html__('Price Color', 'shopengine'), |
| 415 | 'type' => Controls_Manager::COLOR, |
| 416 | 'alpha' => false, |
| 417 | 'default' => '#222222', |
| 418 | 'alpha' => false, |
| 419 | 'selectors' => [ |
| 420 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .shopengine-table__body-item--td .amount :is(span, bdi)' => 'color: {{VALUE}};', |
| 421 | '{{WRAPPER}} .shopengine-cart-table table tbody .product-subtotal' => 'color: {{VALUE}};', |
| 422 | ], |
| 423 | ] |
| 424 | ); |
| 425 | |
| 426 | $this->add_group_control( |
| 427 | Group_Control_Typography::get_type(), |
| 428 | array( |
| 429 | 'name' => 'shopengine_cart_table_content_typography', |
| 430 | 'label' => esc_html__('Typography', 'shopengine'), |
| 431 | 'selector' => '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .shopengine-table__body-item--td :is(a, .amount, bdi)', |
| 432 | 'exclude' => ['font_family', 'text_decoration', 'font_style', 'letter_spacing'], |
| 433 | 'fields_options' => [ |
| 434 | 'typography' => [ |
| 435 | 'default' => 'custom', |
| 436 | ], |
| 437 | 'font_weight' => [ |
| 438 | 'default' => '500', |
| 439 | ], |
| 440 | 'font_size' => [ |
| 441 | 'label' => esc_html__('Font Size (px)', 'shopengine'), |
| 442 | 'default' => [ |
| 443 | 'size' => '14', |
| 444 | 'unit' => 'px' |
| 445 | ], |
| 446 | 'size_units' => ['px'] |
| 447 | ], |
| 448 | 'text_transform' => [ |
| 449 | 'default' => 'uppercase', |
| 450 | ], |
| 451 | 'line_height' => [ |
| 452 | 'label' => esc_html__('Line Height (px)', 'shopengine'), |
| 453 | 'default' => [ |
| 454 | 'size' => '18', |
| 455 | 'unit' => 'px' |
| 456 | ], |
| 457 | 'size_units' => ['px'] |
| 458 | ], |
| 459 | 'letter_spacing' => [ |
| 460 | 'default' => [ |
| 461 | 'size' => '0', |
| 462 | ] |
| 463 | ], |
| 464 | ], |
| 465 | ) |
| 466 | ); |
| 467 | |
| 468 | $this->add_responsive_control( |
| 469 | 'shopengine_cart_table_content_padding', |
| 470 | [ |
| 471 | 'label' => esc_html__('Content Padding (px)', 'shopengine'), |
| 472 | 'type' => Controls_Manager::DIMENSIONS, |
| 473 | 'size_units' => ['px'], |
| 474 | 'desktop_default' => [ |
| 475 | 'top' => '30', |
| 476 | 'right' => '0', |
| 477 | 'bottom' => '30', |
| 478 | 'left' => '10', |
| 479 | 'unit' => 'px', |
| 480 | 'isLinked' => false, |
| 481 | ], |
| 482 | 'tablet_default' => [ |
| 483 | 'top' => '20', |
| 484 | 'right' => '30', |
| 485 | 'bottom' => '20', |
| 486 | 'left' => '40', |
| 487 | 'unit' => 'px', |
| 488 | 'isLinked' => false, |
| 489 | ], |
| 490 | 'selectors' => [ |
| 491 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 492 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__body' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};', |
| 493 | ], |
| 494 | |
| 495 | ] |
| 496 | ); |
| 497 | |
| 498 | |
| 499 | $this->add_control( |
| 500 | 'shopengine_cart_table_cell_gap', |
| 501 | [ |
| 502 | 'label' => esc_html__('Row Gap', 'shopengine'), |
| 503 | 'type' => Controls_Manager::SLIDER, |
| 504 | 'size_units' => ['px'], |
| 505 | |
| 506 | 'range' => [ |
| 507 | 'px' => [ |
| 508 | 'min' => 0, |
| 509 | 'max' => 100, |
| 510 | 'step' => 1, |
| 511 | ], |
| 512 | ], |
| 513 | 'default' => [ |
| 514 | 'unit' => 'px', |
| 515 | 'size' => 30, |
| 516 | ], |
| 517 | 'selectors' => [ |
| 518 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body' => 'grid-row-gap: {{SIZE}}{{UNIT}};', |
| 519 | ], |
| 520 | ] |
| 521 | ); |
| 522 | |
| 523 | |
| 524 | $this->end_controls_section(); // end ./ Style Tab - Cart Table Body |
| 525 | |
| 526 | /* |
| 527 | =============================== |
| 528 | Style Tab - produt image |
| 529 | =============================== |
| 530 | */ |
| 531 | |
| 532 | $this->start_controls_section( |
| 533 | 'shopengine_ct_product_image', |
| 534 | [ |
| 535 | 'label' => esc_html__('Product Image', 'shopengine'), |
| 536 | 'tab' => Controls_Manager::TAB_STYLE, |
| 537 | ] |
| 538 | ); |
| 539 | |
| 540 | $this->add_group_control( |
| 541 | Group_Control_Border::get_type(), |
| 542 | [ |
| 543 | 'name' => 'shopengine_ct_product_image_border', |
| 544 | 'label' => esc_html__('Border', 'shopengine'), |
| 545 | 'exclude' => ['color'], |
| 546 | 'fields_options' => [ |
| 547 | 'border' => [ |
| 548 | 'default' => 'solid', |
| 549 | ], |
| 550 | 'width' => [ |
| 551 | 'default' => [ |
| 552 | 'top' => '1', |
| 553 | 'right' => '1', |
| 554 | 'bottom' => '1', |
| 555 | 'left' => '1', |
| 556 | 'isLinked' => true, |
| 557 | ], |
| 558 | 'selectors' => [ |
| 559 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 560 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}', |
| 561 | ] |
| 562 | ], |
| 563 | ], |
| 564 | 'selector' => '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img', |
| 565 | 'separator' => 'before' |
| 566 | ] |
| 567 | ); |
| 568 | |
| 569 | $this->add_control( |
| 570 | 'shopengine_ct_product_image_border_clr', |
| 571 | [ |
| 572 | 'label' => esc_html__('Border Color', 'shopengine'), |
| 573 | 'type' => Controls_Manager::COLOR, |
| 574 | 'default' => '#F2F2F2', |
| 575 | 'alpha' => false, |
| 576 | 'selectors' => [ |
| 577 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img' => 'border-color: {{VALUE}};', |
| 578 | ], |
| 579 | ] |
| 580 | ); |
| 581 | |
| 582 | $this->add_control( |
| 583 | 'shopengine_ct_product_image_border_radius', |
| 584 | [ |
| 585 | 'label' => esc_html__('Border Radius (px)', 'shopengine'), |
| 586 | 'type' => Controls_Manager::DIMENSIONS, |
| 587 | 'size_units' => ['px'], |
| 588 | 'default' => [ |
| 589 | 'top' => '4', |
| 590 | 'right' => '4', |
| 591 | 'bottom' => '4', |
| 592 | 'left' => '4', |
| 593 | 'unit' => 'px', |
| 594 | 'isLinked' => true, |
| 595 | ], |
| 596 | 'selectors' => [ |
| 597 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 598 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};', |
| 599 | ], |
| 600 | 'separator' => 'before' |
| 601 | ] |
| 602 | ); |
| 603 | |
| 604 | $this->add_control( |
| 605 | 'shopengine_ct_product_image_width', |
| 606 | [ |
| 607 | 'label' => esc_html__('Width', 'shopengine'), |
| 608 | 'type' => Controls_Manager::SLIDER, |
| 609 | 'size_units' => ['px'], |
| 610 | |
| 611 | 'range' => [ |
| 612 | 'px' => [ |
| 613 | 'min' => 0, |
| 614 | 'max' => 200, |
| 615 | 'step' => 1, |
| 616 | ], |
| 617 | ], |
| 618 | 'default' => [ |
| 619 | 'unit' => 'px', |
| 620 | 'size' => 80, |
| 621 | ], |
| 622 | 'selectors' => [ |
| 623 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img' => 'width: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}};', |
| 624 | ], |
| 625 | ] |
| 626 | ); |
| 627 | |
| 628 | $this->add_responsive_control( |
| 629 | 'shopengine_ct_product_image_padding', |
| 630 | [ |
| 631 | 'label' => esc_html__('Padding (px)', 'shopengine'), |
| 632 | 'type' => Controls_Manager::DIMENSIONS, |
| 633 | 'size_units' => ['px'], |
| 634 | 'selectors' => [ |
| 635 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 636 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__body .product-thumbnail img' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};', |
| 637 | ], |
| 638 | ] |
| 639 | ); |
| 640 | |
| 641 | $this->end_controls_section(); // end ./ Style Tab - produt image |
| 642 | |
| 643 | |
| 644 | /* |
| 645 | =============================== |
| 646 | Style Tab - produt item |
| 647 | =============================== |
| 648 | */ |
| 649 | |
| 650 | $this->start_controls_section( |
| 651 | 'shopengine_ct_product_item', |
| 652 | [ |
| 653 | 'label' => esc_html__('Product Item', 'shopengine'), |
| 654 | 'tab' => Controls_Manager::TAB_STYLE, |
| 655 | ] |
| 656 | ); |
| 657 | |
| 658 | $this->add_control( |
| 659 | 'shopengine_ct_product_item_background', |
| 660 | [ |
| 661 | 'label' => esc_html__( 'Show Item Background?', 'shopengine' ), |
| 662 | 'type' => \Elementor\Controls_Manager::SWITCHER, |
| 663 | 'label_on' => esc_html__( 'Show', 'shopengine' ), |
| 664 | 'label_off' => esc_html__( 'Hide', 'shopengine' ), |
| 665 | 'return_value' => 'yes', |
| 666 | 'default' => '', |
| 667 | ] |
| 668 | ); |
| 669 | |
| 670 | $this->add_control( |
| 671 | 'shopengine_ct_product_item_background_notice', |
| 672 | [ |
| 673 | 'label' => esc_html__( 'Notice', 'shopengine' ), |
| 674 | 'type' => \Elementor\Controls_Manager::RAW_HTML, |
| 675 | 'show_label' => false, |
| 676 | 'raw' => esc_html__( 'If you allow Item background please control padding from Product item section', 'shopengine' ), |
| 677 | 'content_classes'=> 'elementor-panel-alert elementor-panel-alert-info', |
| 678 | 'condition' => [ |
| 679 | 'shopengine_ct_product_item_background' => 'yes', |
| 680 | ], |
| 681 | ] |
| 682 | ); |
| 683 | |
| 684 | $this->add_control( |
| 685 | 'shopengine_ct_product_item_even_background', |
| 686 | [ |
| 687 | 'label' => esc_html__( 'Even Background Color', 'shopengine' ), |
| 688 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 689 | 'default' => '#F9FAFB', |
| 690 | 'selectors' => [ |
| 691 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item:nth-child(even)' => 'background-color: {{VALUE}}', |
| 692 | ], |
| 693 | 'condition' => [ |
| 694 | 'shopengine_ct_product_item_background' => 'yes', |
| 695 | ], |
| 696 | ] |
| 697 | ); |
| 698 | |
| 699 | $this->add_control( |
| 700 | 'shopengine_ct_product_item_odd_background', |
| 701 | [ |
| 702 | 'label' => esc_html__( 'Odd Background Color', 'shopengine' ), |
| 703 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 704 | 'default' => '#FFFFFF', |
| 705 | 'selectors' => [ |
| 706 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item:nth-child(odd)' => 'background-color: {{VALUE}}', |
| 707 | ], |
| 708 | 'condition' => [ |
| 709 | 'shopengine_ct_product_item_background' => 'yes', |
| 710 | ], |
| 711 | ] |
| 712 | ); |
| 713 | |
| 714 | $this->add_group_control( |
| 715 | \Elementor\Group_Control_Border::get_type(), |
| 716 | [ |
| 717 | 'name' => 'shopengine_ct_product_item_border', |
| 718 | 'label' => esc_html__('Border', 'shopengine'), |
| 719 | 'separator' => 'before', |
| 720 | 'fields_options' => [ |
| 721 | 'width' => [ |
| 722 | 'label' => esc_html__('Border Width', 'shopengine'), |
| 723 | 'default' => [ |
| 724 | 'top' => 1, |
| 725 | 'right' => 1, |
| 726 | 'bottom' => 1, |
| 727 | 'left' => 1, |
| 728 | 'isLinked' => true, |
| 729 | ], |
| 730 | 'responsive' => false, |
| 731 | ], |
| 732 | 'color' => [ |
| 733 | 'label' => esc_html__('Border Color', 'shopengine'), |
| 734 | 'default' => '#dee3ea', |
| 735 | 'alpha' => false, |
| 736 | ], |
| 737 | ], |
| 738 | 'selector' => '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item', |
| 739 | ] |
| 740 | ); |
| 741 | |
| 742 | $this->add_responsive_control( |
| 743 | 'shopengine_ct_product_item_padding', |
| 744 | [ |
| 745 | 'label' => esc_html__('Padding (px)', 'shopengine'), |
| 746 | 'type' => Controls_Manager::DIMENSIONS, |
| 747 | 'size_units' => ['px'], |
| 748 | 'separator' => 'before', |
| 749 | 'selectors' => [ |
| 750 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 751 | ], |
| 752 | ] |
| 753 | ); |
| 754 | |
| 755 | $this->end_controls_section(); // end ./ Style Tab - Product Item |
| 756 | |
| 757 | /* |
| 758 | =============================== |
| 759 | Style Tab - Quantity |
| 760 | =============================== |
| 761 | */ |
| 762 | |
| 763 | $this->start_controls_section( |
| 764 | 'shopengine_ct_quantity_section', |
| 765 | [ |
| 766 | 'label' => esc_html__('Quantity', 'shopengine'), |
| 767 | 'tab' => Controls_Manager::TAB_STYLE, |
| 768 | ] |
| 769 | ); |
| 770 | |
| 771 | $this->add_control( |
| 772 | 'shopengine_cart_table_qty_btn_text_clr', |
| 773 | [ |
| 774 | 'label' => esc_html__('Text Color', 'shopengine'), |
| 775 | 'type' => Controls_Manager::COLOR, |
| 776 | 'default' => '#101010', |
| 777 | 'alpha' => false, |
| 778 | 'selectors' => [ |
| 779 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .shopengine-cart-quantity :is(.minus-button, .plus-button, .quantity, input)' => 'color: {{VALUE}};' |
| 780 | ], |
| 781 | ] |
| 782 | ); |
| 783 | |
| 784 | $this->add_control( |
| 785 | 'shopengine_cart_table_qty_btn_hover_text_clr', |
| 786 | [ |
| 787 | 'label' => esc_html__('Hover Text Color', 'shopengine'), |
| 788 | 'type' => Controls_Manager::COLOR, |
| 789 | 'default' => '#ACA3A3', |
| 790 | 'alpha' => false, |
| 791 | 'selectors' => [ |
| 792 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .shopengine-cart-quantity :is(.minus-button, .plus-button, input):hover' => 'color: {{VALUE}};' |
| 793 | ], |
| 794 | ] |
| 795 | ); |
| 796 | |
| 797 | $this->add_control( |
| 798 | 'shopengine_cart_table_qty_btn_background_color', |
| 799 | [ |
| 800 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 801 | 'type' => Controls_Manager::COLOR, |
| 802 | 'default' => '', |
| 803 | 'selectors' => [ |
| 804 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td .shopengine-cart-quantity' => 'background-color: {{VALUE}};' |
| 805 | ], |
| 806 | ] |
| 807 | ); |
| 808 | |
| 809 | $this->add_control( |
| 810 | 'shopengine_cart_table_qty_btn_border_clr', |
| 811 | [ |
| 812 | 'label' => esc_html__('Border Color', 'shopengine'), |
| 813 | 'type' => Controls_Manager::COLOR, |
| 814 | 'default' => '#F2F2F2', |
| 815 | 'alpha' => false, |
| 816 | 'selectors' => [ |
| 817 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body .shopengine-cart-quantity :is(.minus-button, .plus-button, .quantity)' => 'border-color: {{VALUE}};' |
| 818 | ], |
| 819 | ] |
| 820 | ); |
| 821 | |
| 822 | $this->add_control( |
| 823 | 'shopengine_cart_table_qty_btn_border_radius', |
| 824 | [ |
| 825 | 'label' => esc_html__('Border Radius (px)', 'shopengine'), |
| 826 | 'type' => Controls_Manager::DIMENSIONS, |
| 827 | 'size_units' => ['px'], |
| 828 | 'selectors' => [ |
| 829 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td .shopengine-cart-quantity .minus-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; border-top-right-radius: 0px; border-bottom-right-radius: 0px;', |
| 830 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td .shopengine-cart-quantity .plus-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; border-top-left-radius: 0px; border-bottom-left-radius: 0px;', |
| 831 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td .shopengine-cart-quantity' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' |
| 832 | ], |
| 833 | 'separator' => 'before' |
| 834 | ] |
| 835 | ); |
| 836 | |
| 837 | $this->end_controls_section(); // end ./ Style Tab - Quantity |
| 838 | |
| 839 | /* |
| 840 | * Style Tab - Cart Table Footer |
| 841 | */ |
| 842 | |
| 843 | $this->start_controls_section( |
| 844 | 'shopengine_cart_table_footer_section', |
| 845 | [ |
| 846 | 'label' => esc_html__('Table Footer', 'shopengine'), |
| 847 | 'tab' => Controls_Manager::TAB_STYLE, |
| 848 | ] |
| 849 | ); |
| 850 | |
| 851 | $this->add_control( |
| 852 | 'shopengine_cart_table_footer_bg', |
| 853 | [ |
| 854 | 'label' => esc_html__('Background', 'shopengine'), |
| 855 | 'type' => Controls_Manager::COLOR, |
| 856 | 'default' => '#ffffff', |
| 857 | 'alpha' => false, |
| 858 | 'selectors' => [ |
| 859 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer' => 'background: {{VALUE}};', |
| 860 | ], |
| 861 | ] |
| 862 | ); |
| 863 | |
| 864 | $this->add_responsive_control( |
| 865 | 'shopengine_cart_table_footer_padding', |
| 866 | [ |
| 867 | 'label' => esc_html__('Padding (px)', 'shopengine'), |
| 868 | 'type' => Controls_Manager::DIMENSIONS, |
| 869 | 'size_units' => ['px'], |
| 870 | 'desktop_default' => [ |
| 871 | 'top' => '30', |
| 872 | 'right' => '0', |
| 873 | 'bottom' => '0', |
| 874 | 'left' => '0', |
| 875 | 'unit' => 'px', |
| 876 | 'isLinked' => false, |
| 877 | ], |
| 878 | 'selectors' => [ |
| 879 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 880 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__footer' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};', |
| 881 | ], |
| 882 | ] |
| 883 | ); |
| 884 | |
| 885 | $this->add_responsive_control( |
| 886 | 'shopengine_cart_table_footer_alignment', |
| 887 | [ |
| 888 | 'label' =>esc_html__('Alignment', 'shopengine'), |
| 889 | 'type' => Controls_Manager::CHOOSE, |
| 890 | 'options' => [ |
| 891 | 'left' => [ |
| 892 | 'title' =>esc_html__('Left', 'shopengine'), |
| 893 | 'icon' => 'eicon-text-align-left', |
| 894 | ], |
| 895 | 'center' => [ |
| 896 | 'title' =>esc_html__('Center', 'shopengine'), |
| 897 | 'icon' => 'eicon-text-align-center', |
| 898 | ], |
| 899 | 'right' => [ |
| 900 | 'title' =>esc_html__('Right', 'shopengine'), |
| 901 | 'icon' => 'eicon-text-align-right', |
| 902 | ], |
| 903 | ], |
| 904 | 'prefix_class' => 'elementor-align-', |
| 905 | 'selectors' => [ |
| 906 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer' => 'justify-content: {{VALUE}};', |
| 907 | '.rtl {{WRAPPER}}.elementor-align-left .shopengine-cart-table .shopengine-table__footer' => 'justify-content: end;', |
| 908 | '.rtl {{WRAPPER}}.elementor-align-right .shopengine-cart-table .shopengine-table__footer' => 'justify-content: start;', |
| 909 | ], |
| 910 | ] |
| 911 | ); |
| 912 | |
| 913 | $this->add_control( |
| 914 | 'shopengine_cart_table_footer_btn_styles', |
| 915 | [ |
| 916 | 'label' => esc_html__('Button Styles', 'shopengine'), |
| 917 | 'type' => Controls_Manager::HEADING, |
| 918 | 'separator' => 'before', |
| 919 | ] |
| 920 | ); |
| 921 | |
| 922 | $this->add_group_control( |
| 923 | Group_Control_Typography::get_type(), |
| 924 | array( |
| 925 | 'name' => 'shopengine_cart_table_footer_btn_typography', |
| 926 | 'label' => esc_html__('Typography', 'shopengine'), |
| 927 | 'selector' => '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .shopengine-footer-button', |
| 928 | 'exclude' => ['font_family', 'letter_spacing', 'line_height', 'text_decoration', 'font_style'], |
| 929 | 'fields_options' => [ |
| 930 | 'typography' => [ |
| 931 | 'default' => 'custom', |
| 932 | ], |
| 933 | 'font_weight' => [ |
| 934 | 'default' => '600', |
| 935 | ], |
| 936 | 'font_size' => [ |
| 937 | 'label' => esc_html__('Font Size (px)', 'shopengine'), |
| 938 | 'default' => [ |
| 939 | 'size' => '16', |
| 940 | 'unit' => 'px' |
| 941 | ], |
| 942 | 'size_units' => ['px'] |
| 943 | ], |
| 944 | 'text_transform' => [ |
| 945 | 'default' => 'capitalize', |
| 946 | ], |
| 947 | |
| 948 | ], |
| 949 | ) |
| 950 | ); |
| 951 | |
| 952 | |
| 953 | |
| 954 | $this->start_controls_tabs('shopengine_cart_table_footer_button_style__tabs'); |
| 955 | |
| 956 | $this->start_controls_tab('shopengine_cart_table_footer_button_tab__normal', |
| 957 | [ |
| 958 | 'label' => esc_html__('Normal', 'shopengine'), |
| 959 | ] |
| 960 | ); |
| 961 | |
| 962 | // Return To Shop Button Styles - Normal |
| 963 | |
| 964 | $this->add_control( |
| 965 | 'shopengine_cart_table_footer_btn_styles_return_to_shop', |
| 966 | [ |
| 967 | 'label' => esc_html__('Continue Shopping', 'shopengine'), |
| 968 | 'type' => Controls_Manager::HEADING, |
| 969 | 'separator' => 'before', |
| 970 | ] |
| 971 | ); |
| 972 | |
| 973 | $this->add_control( |
| 974 | 'shopengine_cart_table_footer_btn_normal_color_return_to_shop', |
| 975 | [ |
| 976 | 'label' => esc_html__('Color', 'shopengine'), |
| 977 | 'type' => Controls_Manager::COLOR, |
| 978 | 'default' => '#979797', |
| 979 | 'alpha' => false, |
| 980 | 'selectors' => [ |
| 981 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .return-to-shop.shopengine-footer-button :is(a, i)' => 'color: {{VALUE}} !important;' |
| 982 | ] |
| 983 | ] |
| 984 | ); |
| 985 | |
| 986 | $this->add_control( |
| 987 | 'shopengine_cart_table_footer_btn_normal_bg_color_return_to_shop', |
| 988 | [ |
| 989 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 990 | 'type' => Controls_Manager::COLOR, |
| 991 | 'default' => '#f1f1f1', |
| 992 | 'alpha' => false, |
| 993 | 'selectors' => [ |
| 994 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .return-to-shop.shopengine-footer-button' => 'background-color: {{VALUE}} !important;', |
| 995 | ], |
| 996 | ] |
| 997 | ); |
| 998 | |
| 999 | // Update Cart Button Styles - Normal |
| 1000 | |
| 1001 | $this->add_control( |
| 1002 | 'shopengine_cart_table_footer_btn_styles_update_cart', |
| 1003 | [ |
| 1004 | 'label' => esc_html__('Update Cart Button', 'shopengine'), |
| 1005 | 'type' => Controls_Manager::HEADING, |
| 1006 | 'separator' => 'before', |
| 1007 | ] |
| 1008 | ); |
| 1009 | |
| 1010 | $this->add_control( |
| 1011 | 'shopengine_cart_table_footer_btn_normal_color_update_cart', |
| 1012 | [ |
| 1013 | 'label' => esc_html__('Color', 'shopengine'), |
| 1014 | 'type' => Controls_Manager::COLOR, |
| 1015 | 'default' => '#979797', |
| 1016 | 'alpha' => false, |
| 1017 | 'selectors' => [ |
| 1018 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .update-cart-btn.shopengine-footer-button :is(a, i, span)' => 'color: {{VALUE}} !important;', |
| 1019 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .update-cart-btn.shopengine-footer-button' => 'color: {{VALUE}} !important;' |
| 1020 | ], |
| 1021 | ] |
| 1022 | ); |
| 1023 | |
| 1024 | $this->add_control( |
| 1025 | 'shopengine_cart_table_footer_btn_normal_bg_color_update_cart', |
| 1026 | [ |
| 1027 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 1028 | 'type' => Controls_Manager::COLOR, |
| 1029 | 'default' => '#f1f1f1', |
| 1030 | 'alpha' => false, |
| 1031 | 'selectors' => [ |
| 1032 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .update-cart-btn.shopengine-footer-button' => 'background-color: {{VALUE}} !important;', |
| 1033 | ], |
| 1034 | ] |
| 1035 | ); |
| 1036 | |
| 1037 | // Clear Cart Button Styles - Normal |
| 1038 | |
| 1039 | $this->add_control( |
| 1040 | 'shopengine_cart_table_footer_btn_styles_clear_cart', |
| 1041 | [ |
| 1042 | 'label' => esc_html__('Clear Cart Button', 'shopengine'), |
| 1043 | 'type' => Controls_Manager::HEADING, |
| 1044 | 'separator' => 'before', |
| 1045 | ] |
| 1046 | ); |
| 1047 | |
| 1048 | $this->add_control( |
| 1049 | 'shopengine_cart_table_footer_btn_normal_color_clear_cart', |
| 1050 | [ |
| 1051 | 'label' => esc_html__('Color', 'shopengine'), |
| 1052 | 'type' => Controls_Manager::COLOR, |
| 1053 | 'default' => '#979797', |
| 1054 | 'alpha' => false, |
| 1055 | 'selectors' => [ |
| 1056 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .clear-btn.shopengine-footer-button :is(a, i, span)' => 'color: {{VALUE}} !important;', |
| 1057 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .clear-btn.shopengine-footer-button' => 'color: {{VALUE}} !important;' |
| 1058 | ], |
| 1059 | ] |
| 1060 | ); |
| 1061 | |
| 1062 | $this->add_control( |
| 1063 | 'shopengine_cart_table_footer_btn_normal_bg_color_clear_cart', |
| 1064 | [ |
| 1065 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 1066 | 'type' => Controls_Manager::COLOR, |
| 1067 | 'default' => '#f1f1f1', |
| 1068 | 'alpha' => false, |
| 1069 | 'selectors' => [ |
| 1070 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .clear-btn.shopengine-footer-button' => 'background-color: {{VALUE}} !important;', |
| 1071 | ], |
| 1072 | ] |
| 1073 | ); |
| 1074 | |
| 1075 | $this->end_controls_tab(); |
| 1076 | |
| 1077 | $this->start_controls_tab('shopengine_cart_table_footer_button_tab__hover', |
| 1078 | [ |
| 1079 | 'label' => esc_html__('Hover', 'shopengine'), |
| 1080 | ] |
| 1081 | ); |
| 1082 | |
| 1083 | // Return To Shop Button Styles - Hover |
| 1084 | |
| 1085 | $this->add_control( |
| 1086 | 'shopengine_cart_table_footer_btn_styles_hover_return_to_shop', |
| 1087 | [ |
| 1088 | 'label' => esc_html__('Return To Shop Button', 'shopengine'), |
| 1089 | 'type' => Controls_Manager::HEADING, |
| 1090 | 'separator' => 'before', |
| 1091 | ] |
| 1092 | ); |
| 1093 | |
| 1094 | $this->add_control( |
| 1095 | 'shopengine_cart_table_footer_btn_hover_color_return_to_shop', |
| 1096 | [ |
| 1097 | 'label' => esc_html__('Color', 'shopengine'), |
| 1098 | 'type' => Controls_Manager::COLOR, |
| 1099 | 'alpha' => false, |
| 1100 | 'default' => '#FFFFFF', |
| 1101 | 'alpha' => false, |
| 1102 | 'selectors' => [ |
| 1103 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .return-to-shop.shopengine-footer-button:hover' => 'color: {{VALUE}} !important;', |
| 1104 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .return-to-shop.shopengine-footer-button:hover :is(a, i, span)' => 'color: {{VALUE}} !important;' |
| 1105 | ] |
| 1106 | ] |
| 1107 | ); |
| 1108 | |
| 1109 | $this->add_control( |
| 1110 | 'shopengine_cart_table_footer_btn_hover_bg_color_return_to_shop', |
| 1111 | [ |
| 1112 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 1113 | 'type' => Controls_Manager::COLOR, |
| 1114 | 'default' => '#3A3A3A', |
| 1115 | 'alpha' => false, |
| 1116 | 'selectors' => [ |
| 1117 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .return-to-shop.shopengine-footer-button:hover' => 'background-color: {{VALUE}} !important;', |
| 1118 | ], |
| 1119 | ] |
| 1120 | ); |
| 1121 | |
| 1122 | // Update Cart Button Styles - Hover |
| 1123 | |
| 1124 | $this->add_control( |
| 1125 | 'shopengine_cart_table_footer_btn_styles_hover_update_cart', |
| 1126 | [ |
| 1127 | 'label' => esc_html__('Update Cart Button', 'shopengine'), |
| 1128 | 'type' => Controls_Manager::HEADING, |
| 1129 | 'separator' => 'before', |
| 1130 | ] |
| 1131 | ); |
| 1132 | |
| 1133 | $this->add_control( |
| 1134 | 'shopengine_cart_table_footer_btn_hover_color_update_cart', |
| 1135 | [ |
| 1136 | 'label' => esc_html__('Color', 'shopengine'), |
| 1137 | 'type' => Controls_Manager::COLOR, |
| 1138 | 'default' => '#FFFFFF', |
| 1139 | 'alpha' => false, |
| 1140 | 'selectors' => [ |
| 1141 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .update-cart-btn.shopengine-footer-button:hover' => 'color: {{VALUE}} !important;', |
| 1142 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .update-cart-btn.shopengine-footer-button:hover :is(a, i, span)' => 'color: {{VALUE}} !important;' |
| 1143 | ] |
| 1144 | ] |
| 1145 | ); |
| 1146 | |
| 1147 | $this->add_control( |
| 1148 | 'shopengine_cart_table_footer_btn_hover_bg_color_update_cart', |
| 1149 | [ |
| 1150 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 1151 | 'type' => Controls_Manager::COLOR, |
| 1152 | 'default' => '#3A3A3A', |
| 1153 | 'alpha' => false, |
| 1154 | 'selectors' => [ |
| 1155 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .update-cart-btn.shopengine-footer-button:hover' => 'background-color: {{VALUE}} !important;', |
| 1156 | ], |
| 1157 | ] |
| 1158 | ); |
| 1159 | |
| 1160 | // Clear Cart Button Styles - Hover |
| 1161 | |
| 1162 | $this->add_control( |
| 1163 | 'shopengine_cart_table_footer_btn_styles_hover_clear_cart', |
| 1164 | [ |
| 1165 | 'label' => esc_html__('Clear Cart Button', 'shopengine'), |
| 1166 | 'type' => Controls_Manager::HEADING, |
| 1167 | 'separator' => 'before', |
| 1168 | ] |
| 1169 | ); |
| 1170 | |
| 1171 | $this->add_control( |
| 1172 | 'shopengine_cart_table_footer_btn_hover_color_clear_cart', |
| 1173 | [ |
| 1174 | 'label' => esc_html__('Color', 'shopengine'), |
| 1175 | 'type' => Controls_Manager::COLOR, |
| 1176 | 'default' => '#FFFFFF', |
| 1177 | 'alpha' => false, |
| 1178 | 'selectors' => [ |
| 1179 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .clear-btn.shopengine-footer-button:hover' => 'color: {{VALUE}} !important;', |
| 1180 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .clear-btn.shopengine-footer-button:hover :is(a, i, span)' => 'color: {{VALUE}} !important;' |
| 1181 | ] |
| 1182 | ] |
| 1183 | ); |
| 1184 | |
| 1185 | $this->add_control( |
| 1186 | 'shopengine_cart_table_footer_btn_hover_bg_color_clear_cart', |
| 1187 | [ |
| 1188 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 1189 | 'type' => Controls_Manager::COLOR, |
| 1190 | 'default' => '#3A3A3A', |
| 1191 | 'alpha' => false, |
| 1192 | 'selectors' => [ |
| 1193 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .clear-btn.shopengine-footer-button:hover' => 'background-color: {{VALUE}} !important;', |
| 1194 | ], |
| 1195 | ] |
| 1196 | ); |
| 1197 | |
| 1198 | $this->end_controls_tab(); |
| 1199 | $this->end_controls_tabs(); |
| 1200 | |
| 1201 | $this->add_control( |
| 1202 | 'shopengine_cart_table_footer_btn_padding', |
| 1203 | [ |
| 1204 | 'label' => esc_html__('Button Padding', 'shopengine'), |
| 1205 | 'type' => Controls_Manager::DIMENSIONS, |
| 1206 | 'size_units' => ['px'], |
| 1207 | 'default' => [ |
| 1208 | 'top' => '13', |
| 1209 | 'right' => '22', |
| 1210 | 'bottom' => '15', |
| 1211 | 'left' => '22', |
| 1212 | 'unit' => 'px', |
| 1213 | 'isLinked' => true, |
| 1214 | ], |
| 1215 | 'selectors' => [ |
| 1216 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .shopengine-footer-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1217 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .shopengine-footer-button' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};', |
| 1218 | ], |
| 1219 | 'separator' => 'before', |
| 1220 | ] |
| 1221 | ); |
| 1222 | |
| 1223 | $this->add_control( |
| 1224 | 'shopengine_cart_table_footer_btn_border_radius', |
| 1225 | [ |
| 1226 | 'label' => esc_html__('Border Radius (px)', 'shopengine'), |
| 1227 | 'type' => Controls_Manager::DIMENSIONS, |
| 1228 | 'size_units' => ['px'], |
| 1229 | 'default' => [ |
| 1230 | 'top' => '4', |
| 1231 | 'right' => '4', |
| 1232 | 'bottom' => '4', |
| 1233 | 'left' => '4', |
| 1234 | 'unit' => 'px', |
| 1235 | 'isLinked' => true, |
| 1236 | ], |
| 1237 | 'selectors' => [ |
| 1238 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .shopengine-footer-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1239 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__footer .shopengine-footer-button' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};', |
| 1240 | ], |
| 1241 | 'separator' => 'before' |
| 1242 | ] |
| 1243 | ); |
| 1244 | |
| 1245 | $this->end_controls_section(); |
| 1246 | |
| 1247 | /* Cart Table Remove Button Style start */ |
| 1248 | $this->start_controls_section( |
| 1249 | 'shopengine_cart_table_remove_button_style_section', |
| 1250 | [ |
| 1251 | 'label' => esc_html__('Remove Button', 'shopengine'), |
| 1252 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1253 | ] |
| 1254 | ); |
| 1255 | |
| 1256 | $this->add_control( |
| 1257 | 'shopengine_table_remove_button_icon_change', |
| 1258 | [ |
| 1259 | 'label' =>esc_html__('Remove Icon', 'shopengine'), |
| 1260 | 'type' => Controls_Manager::ICONS, |
| 1261 | 'label_block' => true, |
| 1262 | 'default' => [ |
| 1263 | 'value' => 'fas fa-times', |
| 1264 | 'library' => 'fa-solid', |
| 1265 | ], |
| 1266 | ] |
| 1267 | ); |
| 1268 | |
| 1269 | $this->add_responsive_control( |
| 1270 | 'shopengine_cart_table_remove_button_font_size', |
| 1271 | [ |
| 1272 | 'label' => esc_html__('Font Size (px)', 'shopengine'), |
| 1273 | 'type' => Controls_Manager::SLIDER, |
| 1274 | 'size_units' => ['px'], |
| 1275 | 'range' => [ |
| 1276 | 'px' => [ |
| 1277 | 'min' => 0, |
| 1278 | 'max' => 40, |
| 1279 | ], |
| 1280 | ], |
| 1281 | 'default' => [ |
| 1282 | 'size' => 12, |
| 1283 | ], |
| 1284 | 'selectors' => [ |
| 1285 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a' => 'font-size: {{SIZE}}{{UNIT}} !important;', |
| 1286 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a svg' => 'width: {{SIZE}}{{UNIT}} !important;', |
| 1287 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove a' => 'font-size: {{SIZE}}{{UNIT}} !important;', |
| 1288 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove a svg' => 'width: {{SIZE}}{{UNIT}} !important;', |
| 1289 | ], |
| 1290 | ] |
| 1291 | ); |
| 1292 | |
| 1293 | $this->start_controls_tabs( |
| 1294 | 'shopengine_cart_table_remove_button_style_tabs' |
| 1295 | ); |
| 1296 | |
| 1297 | $this->start_controls_tab( |
| 1298 | 'shopengine_cart_table_normal_remove_button_style_tab', |
| 1299 | [ |
| 1300 | 'label' => esc_html__( 'Normal', 'shopengine' ), |
| 1301 | ] |
| 1302 | ); |
| 1303 | |
| 1304 | $this->add_control( |
| 1305 | 'shopengine_cart_table_remove_btn_color', |
| 1306 | [ |
| 1307 | 'label' => esc_html__('Color', 'shopengine'), |
| 1308 | 'type' => Controls_Manager::COLOR, |
| 1309 | 'default' => '', |
| 1310 | 'alpha' => false, |
| 1311 | 'selectors' => [ |
| 1312 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove :is(a,span)' => 'color: {{VALUE}} !important;', |
| 1313 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove svg' => 'fill: {{VALUE}} !important;', |
| 1314 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove :is(a,span)' => 'color: {{VALUE}} !important;', |
| 1315 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove svg' => 'fill: {{VALUE}} !important;' |
| 1316 | ] |
| 1317 | ] |
| 1318 | ); |
| 1319 | |
| 1320 | $this->add_control( |
| 1321 | 'shopengine_cart_table_remove_btn_bg_color', |
| 1322 | [ |
| 1323 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 1324 | 'type' => Controls_Manager::COLOR, |
| 1325 | 'default' => '', |
| 1326 | 'alpha' => false, |
| 1327 | 'selectors' => [ |
| 1328 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove :is(a)' => 'background-color: {{VALUE}};', |
| 1329 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove :is(a)' => 'background-color: {{VALUE}};', |
| 1330 | ], |
| 1331 | ] |
| 1332 | ); |
| 1333 | |
| 1334 | //opacity control with slider |
| 1335 | $this->add_control( |
| 1336 | 'shopengine_cart_table_remove_btn_opacity', |
| 1337 | [ |
| 1338 | 'label' => esc_html__('Opacity', 'shopengine'), |
| 1339 | 'type' => Controls_Manager::SLIDER, |
| 1340 | 'range' => [ |
| 1341 | 'px' => [ |
| 1342 | 'max' => 1, |
| 1343 | 'min' => 0, |
| 1344 | 'step' => 0.1, |
| 1345 | ], |
| 1346 | ], |
| 1347 | 'selectors' => [ |
| 1348 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a' => 'opacity: {{SIZE}} !important;', |
| 1349 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove a' => 'opacity: {{SIZE}} !important;', |
| 1350 | ], |
| 1351 | ] |
| 1352 | ); |
| 1353 | |
| 1354 | $this->add_group_control( |
| 1355 | Group_Control_Border::get_type(), |
| 1356 | [ |
| 1357 | 'name' => 'shopengine_cart_table_remove_btn_border', |
| 1358 | 'label' => esc_html__('Border', 'shopengine'), |
| 1359 | 'fields_options' => [ |
| 1360 | 'border' => [ |
| 1361 | 'default' => 'solid', |
| 1362 | ], |
| 1363 | 'width' => [ |
| 1364 | 'default' => [ |
| 1365 | 'top' => '1', |
| 1366 | 'right' => '1', |
| 1367 | 'bottom' => '1', |
| 1368 | 'left' => '1', |
| 1369 | 'isLinked' => true, |
| 1370 | ], |
| 1371 | 'selectors' => [ |
| 1372 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1373 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}', |
| 1374 | ] |
| 1375 | ], |
| 1376 | 'color' => [ |
| 1377 | 'default' => '#f2f2f2' |
| 1378 | ] |
| 1379 | ], |
| 1380 | 'selector' => '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a', |
| 1381 | 'separator' => 'before' |
| 1382 | ] |
| 1383 | ); |
| 1384 | |
| 1385 | $this->end_controls_tab(); |
| 1386 | $this->start_controls_tab( |
| 1387 | 'shopengine_cart_table_hover_remove_button_style_tab', |
| 1388 | [ |
| 1389 | 'label' => esc_html__( 'Hover', 'shopengine' ), |
| 1390 | ] |
| 1391 | ); |
| 1392 | |
| 1393 | $this->add_control( |
| 1394 | 'shopengine_cart_table_remove_btn_color_hover', |
| 1395 | [ |
| 1396 | 'label' => esc_html__('Color', 'shopengine'), |
| 1397 | 'type' => Controls_Manager::COLOR, |
| 1398 | 'default' => '', |
| 1399 | 'alpha' => false, |
| 1400 | 'selectors' => [ |
| 1401 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove :is(a,span):hover' => 'color: {{VALUE}} !important;' |
| 1402 | ] |
| 1403 | ] |
| 1404 | ); |
| 1405 | |
| 1406 | $this->add_control( |
| 1407 | 'shopengine_cart_table_remove_btn_bg_color_hover', |
| 1408 | [ |
| 1409 | 'label' => esc_html__('Background Color', 'shopengine'), |
| 1410 | 'type' => Controls_Manager::COLOR, |
| 1411 | 'default' => '', |
| 1412 | 'alpha' => false, |
| 1413 | 'selectors' => [ |
| 1414 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove :is(a):hover' => 'background-color: {{VALUE}};', |
| 1415 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove :is(a):hover' => 'background-color: {{VALUE}};', |
| 1416 | ], |
| 1417 | ] |
| 1418 | ); |
| 1419 | |
| 1420 | //opacity control with slider |
| 1421 | $this->add_control( |
| 1422 | 'shopengine_cart_table_remove_btn_opacity_hover', |
| 1423 | [ |
| 1424 | 'label' => esc_html__('Opacity', 'shopengine'), |
| 1425 | 'type' => Controls_Manager::SLIDER, |
| 1426 | 'range' => [ |
| 1427 | 'px' => [ |
| 1428 | 'max' => 1, |
| 1429 | 'min' => 0, |
| 1430 | 'step' => 0.1, |
| 1431 | ], |
| 1432 | ], |
| 1433 | 'selectors' => [ |
| 1434 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a:hover' => 'opacity: {{SIZE}} !important;', |
| 1435 | '{{WRAPPER}} .shopengine-widget .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove a:hover' => 'opacity: {{SIZE}} !important;', |
| 1436 | ], |
| 1437 | ] |
| 1438 | ); |
| 1439 | |
| 1440 | $this->add_group_control( |
| 1441 | Group_Control_Border::get_type(), |
| 1442 | [ |
| 1443 | 'name' => 'shopengine_cart_table_remove_btn_border_hover', |
| 1444 | 'label' => esc_html__('Border', 'shopengine'), |
| 1445 | 'fields_options' => [ |
| 1446 | 'border' => [ |
| 1447 | 'default' => 'solid', |
| 1448 | ], |
| 1449 | 'width' => [ |
| 1450 | 'default' => [ |
| 1451 | 'top' => '1', |
| 1452 | 'right' => '1', |
| 1453 | 'bottom' => '1', |
| 1454 | 'left' => '1', |
| 1455 | 'isLinked' => true, |
| 1456 | ], |
| 1457 | 'selectors' => [ |
| 1458 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a:hover' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1459 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a:hover' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}', |
| 1460 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove a:hover' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1461 | '.rtl {{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove a:hover' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}', |
| 1462 | ] |
| 1463 | ], |
| 1464 | 'color' => [ |
| 1465 | 'default' => '#f2f2f2' |
| 1466 | ] |
| 1467 | ], |
| 1468 | 'selectors' => [ |
| 1469 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td:first-child .product-thumbnail .product-remove a:hover' => 'border-color: {{VALUE}};', |
| 1470 | '{{WRAPPER}} .shopengine-cart-table .shopengine-table__body-item--td.remove-button .product-remove a:hover' => 'border-color: {{VALUE}};', |
| 1471 | ], |
| 1472 | 'separator' => 'before' |
| 1473 | ] |
| 1474 | ); |
| 1475 | |
| 1476 | $this->end_controls_tab(); |
| 1477 | $this->end_controls_tabs(); |
| 1478 | $this->end_controls_section(); |
| 1479 | /* Cart Table Remove Button Style end */ |
| 1480 | |
| 1481 | /*--------------------------- |
| 1482 | global font family |
| 1483 | -----------------------------*/ |
| 1484 | $this->start_controls_section( |
| 1485 | 'shopengine_cart_table_typography', |
| 1486 | array( |
| 1487 | 'label' => esc_html__('Global Font', 'shopengine'), |
| 1488 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1489 | ) |
| 1490 | ); |
| 1491 | |
| 1492 | $this->add_control( |
| 1493 | 'shopengine_cart_table_font_family', |
| 1494 | [ |
| 1495 | 'label' => esc_html__('Font Family', 'shopengine'), |
| 1496 | 'description' => esc_html__('This font family is set for this specific widget.', 'shopengine'), |
| 1497 | 'type' => Controls_Manager::FONT, |
| 1498 | 'default' => '', |
| 1499 | 'selectors' => [ |
| 1500 | '{{WRAPPER}} .shopengine-cart-table :is(.shopengine-table__body, .shopengine-table__head, .shopengine-table__footer) :is(div, span, a, button, bdi)' => 'font-family: {{VALUE}}', |
| 1501 | ], |
| 1502 | ] |
| 1503 | ); |
| 1504 | |
| 1505 | $this->end_controls_section(); |
| 1506 | } |
| 1507 | |
| 1508 | |
| 1509 | protected function screen() { |
| 1510 | |
| 1511 | $settings = $this->get_settings_for_display(); |
| 1512 | |
| 1513 | $post_type = get_post_type(); |
| 1514 | |
| 1515 | $tpl = Products::instance()->get_widget_template($this->get_name()); |
| 1516 | |
| 1517 | include $tpl; |
| 1518 | } |
| 1519 | } |
| 1520 |