Displaying images using Ajax and Javascript

  • Posts: 15
  • Thank you received: 0
9 years 1 month ago #216592

-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.37

Hi,

I am implementing a Quick View feature on my site. On my Product Listing page there is a Quick View icon on each listed product, clicking which opens a lightbox which displays a custom layout showing thumbnails of all product images along with some more product information and an Add to Cart button.

To start with the full sized image corresponding to the first thumbnail will be shown when the lightbox opens and then as the user clicks on another thumbnail the corresponding image should be retrieved from the server using Ajax.

I have managed to add the Quick View button to each product on the Product Listing page and a click is now opening a lightbox which loads in a custom layout file which right now is a copy of the show_default.php.

I would now like to modify the show_default.php copy and implement the layout that I outlined above.

Can you please help with the JQuery / Javascript and Ajax urls required to implement the loading of images.

I would also like that the lightbox (implemented using Squeezebox) should close when the user adds a product to the cart by clicking the Add to Cart button in the lightbox. I plan to add a click handler to the Add to Cart button to close the Squeezebox but do I need to take care in some way that the product actually gets added to the cart before the Squeezebox is closed by me?

Thanks again in advance for all your help.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 1 month ago #216802

Hi,

Your current request is for high customization and that's not something that our support forum can provide.
More than that, your question is pretty vague and it is really hard to give you an advice.

All I can tell you is that you can have access to all images in a product page, so it's up to you to make the javascript to generate some kind of lightbox gallery.
"Squeezebox" is provided by Joomla itself and you can use a little javascript script to close the "current" popup.

With the new Cart/Checkout system in HikaShop 3 ; you would be easier for you to manage the "add to cart" because it could be done using ajax.
With the current version (or an old version like HikaShop 2.2.2) you should be able to use the "return url" with the add to cart ; to redirect the user to a specific page, which will just close the popup.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum