If you need to show something for which there is no appropriate Themler control you can use
CMS Code control with native WP or Woocommerce functions. Simply add the provided code into the CMS Code editor (#1) and configure the appearance of the text inside this control using Styles options under #2:
Show "Products in Stock"
<?php echo "Available in stock: ".$product->stock; ?>
Show SKU
<?php echo $product->sku ?>
Show Product Price with Tax:
<?php echo woocommerce_price($product->get_price_including_tax()); ?>
Add a link to Product Details to the Products template
<a href="<?php echo $product_view['link']; ?>">View Product Details</a>
To style this link as Themler button please use the following code:
<a href="<?php echo $product_view['link']; ?>" class="bd-button">View Product Details</a>
Show specific Product Attribute on the Products Template:
For example, we need to show the values of the attribute with Slug size
:
<?php
global $product;
$size = $product->get_attribute( 'pa_size' );
if ( !empty($size) ) {
echo "Size: ".$size;
}
?>
<div class="alert alert-warning">
If you need to show something for which there is no appropriate Themler control you can use <b>CMS Code</b> control with native WP or Woocommerce functions. Simply add the provided code into the CMS Code editor (#1) and configure the appearance of the text inside this control using Styles options under #2:
<br>
!cms-code-settings-2.png!
</div>
#### Show "Products in Stock"
`<?php echo "Available in stock: ".$product->stock; ?>`
#### Show SKU
`<?php echo $product->sku ?>`
#### Show Product Price with Tax:
` <?php echo woocommerce_price($product->get_price_including_tax()); ?>`
#### Add a link to Product Details to the Products template
`<a href="<?php echo $product_view['link']; ?>">View Product Details</a>`
To style this link as Themler button please use the following code:
`<a href="<?php echo $product_view['link']; ?>" class="bd-button">View Product Details</a>`
#### Show specific Product Attribute on the Products Template:
For example, we need to show the values of the attribute with Slug `size`:
`<?php
global $product;
$size = $product->get_attribute( 'pa_size' );
if ( !empty($size) ) {
echo "Size: ".$size;
}
?>`