Get cart class in Ajax function

  • Posts: 42
  • Thank you received: 3
3 years 5 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.

This message has attachments files.
Please log in or register to see it.

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

  • Posts: 85392
  • Thank you received: 13955
  • MODERATOR
3 years 5 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
3 years 5 months ago #345633

Its worked, thanks!!!

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

Time to create page: 0.057 seconds
Powered by Kunena Forum