Open Product Page use Ajax - Fixed

  • Posts: 332
  • Thank you received: 13
  • Hikaauction Standard Hikamarket Multivendor Hikaserial Subscription Hikashop Business
3 months 1 week ago #305499

-- HikaShop version -- : 4.0.3

Hi, I have an idea and I need to use Ajax in this case. Is it possible to load a product page via Ajax? If possible, could you give an example to know what to do?

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

  • Posts: 66270
  • Thank you received: 9716
  • MODERATOR
3 months 1 week ago #305504

Sure.

Take the URL of the product page, and use the ajax function from jQuery to load it and retrieve it's HTML:
www.w3schools.com/jquery/jquery_ajax_load.asp
If you don't want the whole page but only the inside where there is the product page layout displayed by HikaShop, you can and ?tmpl=component or ?tmpl=raw to the URL.

The following user(s) said Thank You: neo191987

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

  • Posts: 332
  • Thank you received: 13
  • Hikaauction Standard Hikamarket Multivendor Hikaserial Subscription Hikashop Business
2 months 1 day ago #306580

Hi, I see that Hikashop has an Ajax function. Can you give me an example of how to load content. For example, New billing address or New shipping address in the User panel. I want to click on a button or a link to show content. The purpose is to be used on the product page and there is no need to enter any information.

As an example I will mention this code:

<a class="hikabtn hikabtn-success" href="#newAddress" onclick="return window.addressMgr.new('billing');"><?php echo JText::_('HIKASHOP_NEW_BILLING_ADDRESS'); ?></a>

Last edit: 2 months 1 day ago by neo191987.

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

  • Posts: 332
  • Thank you received: 13
  • Hikaauction Standard Hikamarket Multivendor Hikaserial Subscription Hikashop Business
2 months 17 hours ago #306586

I understand how it works. I have to use Java. :)

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

Time to create page: 0.057 seconds
Powered by Kunena Forum