← All changes
|
app/Elementor/Widgets/Controls/AddToCartSettings.php
+45
-15
2.1.11
→
2.6.5
View file →
| @@ -83,15 +83,16 @@ | ||
| 83 | 83 | 'condition' => [ |
| 84 | 84 | 'quantity_style!' => 'default', |
| 85 | 85 | ], |
| 86 | 86 | 'selectors' => [ |
| 87 | - self::$selectors['cart_icon_align'] => 'order: {{VALUE}};', | |
| 87 | + self::$selectors['cart_icon_align']['icon'] => 'order: {{VALUE}};', | |
| 88 | + self::$selectors['cart_icon_align']['svg'] => 'order: {{VALUE}};', | |
| 88 | 89 | ], |
| 89 | 90 | ], |
| 90 | 91 | 'cart_icon_gap' => [ |
| 91 | 92 | 'label' => esc_html__( 'Gap', 'shopbuilder' ), |
| 92 | 93 | 'type' => 'slider', |
| 93 | - 'mode' => 'responsive', | |
| 94 | + 'mode' => 'responsive', | |
| 94 | 95 | 'range' => [ |
| 95 | 96 | 'px' => [ |
| 96 | 97 | 'min' => 0, |
| 97 | 98 | 'max' => 100, |
| @@ -125,9 +126,10 @@ | ||
| 125 | 126 | 'max' => 50, |
| 126 | 127 | ], |
| 127 | 128 | ], |
| 128 | 129 | 'selectors' => [ |
| 129 | - self::$selectors['cart_icon_size'] => 'font-size: {{SIZE}}{{UNIT}};', | |
| 130 | + self::$selectors['cart_icon_size']['icon'] => 'font-size: {{SIZE}}{{UNIT}};', | |
| 131 | + self::$selectors['cart_icon_size']['svg'] => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', | |
| 130 | 132 | ], |
| 131 | 133 | ], |
| 132 | 134 | ]; |
| 133 | 135 | $fields = Fns::insert_controls( 'button_padding', $fields, $insert_array ); |
| @@ -331,15 +333,37 @@ | ||
| 331 | 333 | 'label' => esc_html__( 'Label Typography', 'shopbuilder' ), |
| 332 | 334 | 'description' => esc_html__( 'Only for Variation Label.', 'shopbuilder' ), |
| 333 | 335 | 'selector' => self::$selectors['variation_label_typography'], |
| 334 | 336 | ], |
| 337 | + 'variation_stock_typography' => [ | |
| 338 | + 'type' => 'typography', | |
| 339 | + 'separator' => 'before', | |
| 340 | + 'mode' => 'group', | |
| 341 | + 'label' => esc_html__( 'Stock Typography', 'shopbuilder' ), | |
| 342 | + 'description' => esc_html__( 'Only for variation stock.', 'shopbuilder' ), | |
| 343 | + 'selector' => self::$selectors['variation_stock_typography'], | |
| 344 | + ], | |
| 335 | 345 | 'variation_label_color' => [ |
| 336 | - 'label' => esc_html__( 'Color', 'shopbuilder' ), | |
| 346 | + 'label' => esc_html__( 'Label Color', 'shopbuilder' ), | |
| 337 | 347 | 'type' => 'color', |
| 338 | 348 | 'selectors' => [ |
| 339 | 349 | self::$selectors['variation_label_color'] => 'color: {{VALUE}}', |
| 340 | 350 | ], |
| 341 | 351 | ], |
| 352 | + 'variation_stock_color' => [ | |
| 353 | + 'label' => esc_html__( 'Stock Color', 'shopbuilder' ), | |
| 354 | + 'type' => 'color', | |
| 355 | + 'selectors' => [ | |
| 356 | + self::$selectors['variation_stock_color'] => 'color: {{VALUE}}', | |
| 357 | + ], | |
| 358 | + ], | |
| 359 | + 'variation_outofstock_color' => [ | |
| 360 | + 'label' => esc_html__( 'Out of Stock Color', 'shopbuilder' ), | |
| 361 | + 'type' => 'color', | |
| 362 | + 'selectors' => [ | |
| 363 | + self::$selectors['variation_outofstock_color'] => 'color: {{VALUE}}', | |
| 364 | + ], | |
| 365 | + ], | |
| 342 | 366 | 'variation_height' => [ |
| 343 | 367 | 'label' => esc_html__( 'Height', 'shopbuilder' ), |
| 344 | 368 | 'type' => 'slider', |
| 345 | 369 | 'range' => [ |
| @@ -347,14 +371,18 @@ | ||
| 347 | 371 | 'min' => 10, |
| 348 | 372 | 'max' => 200, |
| 349 | 373 | ], |
| 350 | 374 | ], |
| 375 | + 'default' => [ | |
| 376 | + 'unit' => 'px', | |
| 377 | + 'size' => '30', | |
| 378 | + ], | |
| 351 | 379 | 'selectors' => [ |
| 352 | 380 | self::$selectors['variation_height'] => 'height: {{SIZE}}{{UNIT}};', |
| 353 | 381 | ], |
| 354 | 382 | ], |
| 355 | 383 | 'variation_width' => [ |
| 356 | - 'label' => esc_html__( 'Width', 'shopbuilder' ), | |
| 384 | + 'label' => esc_html__( 'Min Width', 'shopbuilder' ), | |
| 357 | 385 | 'size_units' => [ 'px', '%' ], |
| 358 | 386 | 'type' => 'slider', |
| 359 | 387 | 'range' => [ |
| 360 | 388 | 'px' => [ |
| @@ -365,10 +393,14 @@ | ||
| 365 | 393 | 'min' => 0, |
| 366 | 394 | 'max' => 100, |
| 367 | 395 | ], |
| 368 | 396 | ], |
| 397 | + 'default' => [ | |
| 398 | + 'unit' => 'px', | |
| 399 | + 'size' => '30', | |
| 400 | + ], | |
| 369 | 401 | 'selectors' => [ |
| 370 | - self::$selectors['variation_width'] => 'width: {{SIZE}}{{UNIT}};', | |
| 402 | + self::$selectors['variation_width'] => 'min-width: {{SIZE}}{{UNIT}};', | |
| 371 | 403 | ], |
| 372 | 404 | ], |
| 373 | 405 | 'variation_border' => [ |
| 374 | 406 | 'mode' => 'group', |
| @@ -384,12 +416,13 @@ | ||
| 384 | 416 | self::$selectors['variation_border_radius'] => 'border-radius: {{SIZE}}{{UNIT}};', |
| 385 | 417 | ], |
| 386 | 418 | ], |
| 387 | 419 | 'variation_padding' => [ |
| 388 | - 'label' => esc_html__( 'Padding', 'shopbuilder' ), | |
| 389 | - 'type' => 'dimensions', | |
| 390 | - 'size_units' => [ 'px' ], | |
| 391 | - 'default' => [ | |
| 420 | + 'label' => esc_html__( 'Padding ', 'shopbuilder' ), | |
| 421 | + 'description' => esc_html__( 'Note: Only for Select And Button Field.', 'shopbuilder' ), | |
| 422 | + 'type' => 'dimensions', | |
| 423 | + 'size_units' => [ 'px' ], | |
| 424 | + 'default' => [ | |
| 392 | 425 | 'top' => '10', |
| 393 | 426 | 'right' => '10', |
| 394 | 427 | 'bottom' => '10', |
| 395 | 428 | 'left' => '10', |
| @@ -395,10 +428,10 @@ | ||
| 395 | 428 | 'left' => '10', |
| 396 | 429 | 'unit' => 'px', |
| 397 | 430 | 'isLinked' => true, |
| 398 | 431 | ], |
| 399 | - 'separator' => 'default', | |
| 400 | - 'selectors' => [ | |
| 432 | + 'separator' => 'default', | |
| 433 | + 'selectors' => [ | |
| 401 | 434 | self::$selectors['variation_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 402 | 435 | ], |
| 403 | 436 | ], |
| 404 | 437 | 'variation_label_margin' => [ |
| @@ -415,11 +448,8 @@ | ||
| 415 | 448 | 'size_units' => [ 'px', '%', 'em' ], |
| 416 | 449 | 'selectors' => [ |
| 417 | 450 | self::$selectors['variation_item_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', |
| 418 | 451 | ], |
| 419 | - ], | |
| 420 | - 'variation_section_end' => [ | |
| 421 | - 'mode' => 'section_end', | |
| 422 | 452 | ], |
| 423 | 453 | 'variation_section_end' => [ |
| 424 | 454 | 'mode' => 'section_end', |
| 425 | 455 | ], |