...
Then install as normal WP plugin via Plugins -> Add New.
Plugin adds integration:
On the homepage as a floating button in the lower right corner
On the category page as a entry point after price (used hook woocommerce_after_shop_loop_item. Visual Hook Guide)
On the single product page as a entry point after add to cart (used hook woocommerce_after_add_to_cart_form. Visual Hook Guide)
Two-way shopping cart synchronization
On the category page and single product card, the existence of the article in the PIM is checked by the vendor code (SKU).
Note: Woocomerce in the cart displays the number of all rolls. But the shopping cart in the fitting room displays the number of products.
Example display cart with the same articles:
...
To change the display of buttons, need to use the deployment kit in the file public/class-wizart-public.php in the functions:
Code Block |
---|
Homepage: wizart_script_add_parameters() Category page: category_page() Single product page: single_product_page() |
To disable integration, you need to comment out the call of the integration button in the file includes/class-wizart.php:
Code Block |
---|
Category page: $this->loader->add_action( 'woocommerce_after_shop_loop_item', $plugin_public, 'category_page'); Single product page: $this->loader->add_action( 'woocommerce_product_meta_start', $plugin_public, 'single_product_page'); Homepage: $this->loader->add_filter( 'script_loader_tag', $plugin_public, 'wizart_script_add_parameters', 10 ,3); |
You can add css to the After integration on the site, you may need to stylize the buttons. Use file
Code Block |
---|
public/css/wizart-public.css |
...
Example custom stylization for product single page: added data-class_name for integration button
Code Block |
---|
<script data-class_name="custom_style-product_single_page" class="wizart__entry-point" data-width="250px" data-height="50px" data-vendor_code="<?php echo $productSku; ?>" data-token="<?php echo self::CLIENT_TOKEN; ?>" src="<?php echo self::ENTRY_POINT_SCRIPT_URL; ?>" data-onload-callback="<?php echo self::HANDLER_ONLOAD_CALLBACK; ?>" ></script> |
...