This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wp_get_attachment_image', function( $html, $attachment_id, $size, $icon, $attr ) { | |
global $product; | |
static $doing_filter = false; | |
if ( $doing_filter ) return $html; | |
if ( ! isset( $_REQUEST[ 'load-preset' ] ) ) return $html; | |
$doing_filter = true; | |
$post = get_post( (int) $_REQUEST[ 'load-preset' ] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mkl_pc .mkl_pc_container .mkl_pc_viewer .mkl_pc_layers img.bezel:not(.active) { | |
transform: translateX(calc(-50% - 300px)) translateY(-50%); | |
} | |
.mkl_pc .mkl_pc_container .mkl_pc_viewer .mkl_pc_layers img.bezel.active ~ img.bezel:not(.active) { | |
transform: translateX(calc(-50% + 300px)) translateY(-50%); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add a filter to the price, adding 'From ' to the price of a configurable product | |
add_filter( 'woocommerce_get_price_html', 'mkl_add_price_prefix', 20, 2 ); | |
function mkl_add_price_prefix( $price, $product ) { | |
if ( ! function_exists( 'mkl_pc_is_configurable' ) || ! mkl_pc_is_configurable( $product->get_id() ) ) return $price; | |
return 'À partir de ' . $price; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CREATE YOUR MAKI OR DONBURI */ | |
.donburi-builder .mkl_pc .mkl_pc_container .mkl_pc_viewer { | |
display: none; | |
} | |
.donburi-builder .mkl_pc { | |
--toolbar_width: 100%; | |
--mkl_pc_color-toolbar_bg: #fafbfc; | |
--mkl_pc_color-primary: rgb(175 78 43); | |
--mkl_pc_color-primary_rgb: 175, 78, 43; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.theme-botiga .mkl_pc .mkl_pc_container .form.form-cart .quantity { | |
width: auto; | |
display: inline-flex; | |
} | |
@media (max-width: 660px) { | |
.theme-botiga .mkl_pc .mkl_pc_container .form.form-cart .quantity { | |
height: 46px; | |
margin: 0; | |
margin-right: 5px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'mkl_pc_is_loaded', function() { | |
remove_filter( 'woocommerce_get_item_data', array( mkl_pc( 'frontend' )->cart, 'wc_cart_get_item_data' ), 10 ); | |
}); | |
add_filter( 'mkl_pc_cart_item_choice', function( $cc ) { | |
return ''; | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filters the REST response for shop order object | |
*/ | |
add_filter( 'woocommerce_rest_prepare_shop_order_object', function( $response ) { | |
if ( ! function_exists( 'mkl_pc' ) ) return $response; | |
$configurator = null; | |
if ( ! isset( $response->data['line_items'] ) ) return $response; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'tmpl-pc-configurator-choice-item--after', 'hexatac_add_choice_out_of_stock_label' ); | |
function hexatac_add_choice_out_of_stock_label() { | |
echo ' <# if ( data.manage_stock && \'none\' !== data.manage_stock && 0 >= data.stock ) { #> | |
<# if ( data.wc_backorder && "yes" == data.wc_backorder ) { #> | |
<span class="out-of-stock backorder">Sur commande</span> | |
<# } #> | |
<# } else if ( data.manage_stock && \'none\' !== data.manage_stock && 0 < data.stock ) { #> | |
<span class="out-of-stock en-stock">En stock</span> | |
<# } #>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mkl_pc .mkl_pc_container .mkl_pc_viewer .mkl_pc_layers *:not(.current_layer) { | |
opacity: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'mkl_pc_frontend_configurator_after_add_to_cart', function() { | |
if ( ! count( WC()->cart->get_cart() ) ) return; | |
echo '<a class="button elementor-button-link elementor-button elementor-size-md elementor-animation-float" href="' . trailingslashit( get_home_url() ) . 'quote/' . '">Finish Quote</a>'; | |
}, 10 ); |
NewerOlder