0

I'm trying to add J2Store add to cart with below code

templates/name-template/html/com_content/article/default.php

code

require_once(JPATH_ADMINISTRATOR.'/components/com_j2store/helpers/j2store.php');
$product = F0FTable::getAnInstance('Product', 'J2StoreTable')->getClone();
            if($product->get_product_by_source('com_content', $this->item->id)) {
            echo $product->get_product_html();
        }

and load cart use this code

<?php echo $product->get_product_cart_html();?>

this code show cart button but not work

after click add to cart button no action for add product to cart

How can i do after click add to cart buuton , add product at cart?

Solution

this problem is conflict javascript j2store...i updated j2store to latest version (3.3.9) solved this problem

  • 1
    I can't reproduce your issue. What HTML markup does your code generate? – Sharky May 17 at 17:42
  • @Sharky thank you so much .. this problem is conflict javascript j2store...i updated j2store to latest version (3.3.9) solved this problem – niaziblog May 18 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.