Any experienced J2Store users out there? I'm displaying my product articles via the j2store products module. I've made an override for a product line that we want to display but not sell yet and the product options have gotten lost in the shuffle somewhere. I believe this is because I basically copied and pasted the necessary code from addtocart.php and addtocart_options.php into my override file. Is there a way to use a direct php call to display the product options? I know they're in the article attributes I just can't figure out how to access them...

  • So if you hide your template override file, the options are there? A template override has access to all the same variables that the base file does, so you should have no trouble accessing the information and displaying it. (I'm not familiar with J2Store though.) Commented Oct 21, 2014 at 14:23

1 Answer 1


I had a similar situation on a page I built using J2Store, as the client wanted to present the products but wasn't ready to actually sell them yet.

As a quick solution that also is easy to reverse once the products are ready to be sold, I added this jQuery code to my template in order to disable all "Buy" buttons:

<script type="text/javascript">
    jQuery(".j2store_cart_button").prop('disabled', true);

I don't think it's the best and cleanest solution, but it was enough for this particular case, and a very quick fix.

In your case, maybe you can remove the override file, and modify the jQuery code to target only the buy buttons from the product line you want to disable.

  • Doesn't sound bad -for a quick and temporary solution - to disable the buy buttons. Sometimes small smart things can work adequate for certain scenarios. I give it +1 -for the reasons I described.
    – FFrewin
    Commented Oct 23, 2014 at 12:14
  • 1
    Thanks for your suggestion! After talking to J2store's support team, all I had to do was comment out a line, $attributes = $model->processAttributeOptions($attributes, $product); in /components/com_j2store/helpers/cart.php
    – Annemarie
    Commented Oct 24, 2014 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.