Coping with HK ajax

  • Posts: 19
  • Thank you received: 0
11 years 4 months ago #151110

-- url of the page with the problem -- localhost
-- HikaShop version -- :HK Essential: 2.3.0
-- Joomla version -- :2.5.19
-- PHP version -- : 5.3.13
-- Browser(s) name and version -- : FreFox 27.0.1
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi, I am struggling with two HK ajax issues related to product selection and checkout updating.

1. Product text description. Once a selection is made, the product text description is updated. Instead of appearing next to the product header, I would like the text to be displayed just above the "Add to Cart" button for improved clarity. I tried to use some jQuery to copy the text between the two highlighted spans, but the event handlers are probably destroyed by ajax once a selection is made. The html code is attached below. Could you tell me where to inject the js code to handle this issue?






2. CSS checkout button class lost after "Add to cart" button click event. By default, all buttons in the site include a custom CSS class. Once the "Add to cart" button is clicked, the checkout input button is regenerated causing this custom CSS class to be lost. Could you tell me how to add custom CSS classes back to HK elements after a HK ajax update?






TIA for any hints.

Attachments:
Last edit: 11 years 4 months ago by Helveticus.

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

  • Posts: 84290
  • Thank you received: 13691
  • MODERATOR
11 years 4 months ago #151113

Hi,

1. I would recommend to edit the show_default view file and add your event listener on the onchange trigger of the characteristic dropdowns. Then you could do the move of the HTML in the DOM with jquery each time the characteristic dropdowns are changed.

2. This means that the buttons styling is added dynamically by a plugin/the template when the page is loaded. And thus, when the HTML of the cart module is retrieved and replaced, that dynamic process is not run again.
I guess that the simplest would be to edit the file "cart" of the view "product" via the menu Display->Views and modify the code adding that button

echo $this->cart->displayButton(JText::_('PROCEED_TO_CHECKOUT'),'checkout',$this->params,hikashop_completeLink('checkout'.$url_itemid),'window.location=\''.hikashop_completeLink('checkout'.$url_itemid).'\';return false;');

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

Time to create page: 0.076 seconds
Powered by Kunena Forum