Get cart class in Ajax function

  • Posts: 42
  • Thank you received: 3
1 year 6 months ago #345537

-- url of the page with the problem -- : eduquay.satumalaysiahosting.com/booklist

Hi there,

I am facing an error which I unable to get cart class in my ajax function. (Previously worked BTW)

The attachments below are my ajax function and product listing.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81478
  • Thank you received: 13061
  • MODERATOR
1 year 6 months ago #345540

Hi,

You're not loading HikaShop in your code. It's possible it will work if you have a system plugin of HikaShop loading HikaShop before your plugin is triggered by com_ajax, but it's only luck.
You should yourself load HikaShop before trying to use HikaShop with such code:

if(!@include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')){ return false; }
That way, you're sure HikaShop is loaded before you try using it.

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 3
1 year 6 months ago #345633

Its worked, thanks!!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum