{{dc:woocommerce: }}

i am looking for a list of attributes that I can insert if I use {{dc:woocommerce: }}

For example, I use.
{{dc:woocommerce:product_price product=“927”}}

I would also like to find a products stock_status,

Beyond that is there a list of all of the items the dc:woocommerce: cal call

Hello @masel1951,

Regretfully we do not have a full list in the documentation. You can find all the available WooCommerce dynamic content code {{dc:woocommerce...} in the element selector only.

As for a product status, you can create your own icon or text and then add a condition:

Hope this helps.

I have several products on a page. How does the condition know which product this refers to

Hi @masel1951,

The mentioned condition mainly applied to the Looper which automatically checks the condition of each of the products. You can also set this to the Single WC Layout, and applied to all the single products but only works if the condition is satisfied.

Thanks

Can you point me to where the term product_price is defined in woocommerce.

A Jan 21 reply said a code snippet is

case ‘product_price’: {
$result = $product->get_price();
break;
}
case ‘product_regular_price’: {
$result = $product->get_regular_price();
break;
}
case ‘product_sale_price’: {
$result = $product->get_sale_price();
break;
}

Where can I find that code snippet?

Hello @masel1951,

The code above has already been updated to:

      case 'product_price': {
        $result = $this->format_price( $product->get_price(), $args, $product );
        break;
      }
      case 'product_regular_price': {
        $result = $this->format_price( $product->get_regular_price(), $args, $product );
        break;
      }
      case 'product_sale_price': {
        $result = $this->format_price( $product->get_sale_price(), $args, $product );
        break;
      }

You can find this in wp-content/themes/pro/cornerstone/includes/integration/woocommerce.php file in line 1211.

Be advised that custom coding is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Best Regards.

I want to add additional cases. Can I put a modified function (i.e. woocommerce.php) in my child theme or do I have to modify cornerstone.

Hi @masel1951,

Instead of adding or modifying the file, you can create a custom Dynamic Content to serve your purposes. I would suggest you go through the following thread on that.

If you are not proficient in coding, please hire a developer who can assist you to do the customization or you can avail of our newly launched service called One, where we answer questions beyond normal theme support.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.