How to get J2Store item price

by webchun   Last Updated May 15, 2019 04:10 AM

I'm trying to add J2Store item price to the (my modified) built-in joomla mod_articles_latest.

I'm able to get a 'complete' Add to Cart block with this code :

$product = F0FTable::getAnInstance('Product', 'J2StoreTable')->getClone();
            if($product->get_product_by_source('com_content', $item->id)) {
            echo $product->get_product_html();

But how can I get any of elements on that block partially? For example, how can I get the price only or add to cart button only?

Tags : j2store

Answers 1

There are methods for this:

// Show price.
echo $product->get_product_price_html();

// Show cart button.
echo $product->get_product_cart_html();
May 15, 2019 06:48 AM

Related Questions

j2store add to cart button

Updated May 17, 2019 15:10 PM

Appropriate J2Store event for wishlist button

Updated June 23, 2019 18:10 PM

Call Joomla! Custom fields in J2Store?

Updated July 07, 2018 00:10 AM