Hikashop without JavaScript?

  • Posts: 3
  • Thank you received: 0
13 years 3 months ago #23748

Hi2All!

Is it possible to run Hikashop with JavaScript disabled?

Sorry if I missed something, but I didn't find anything about that topic.

Thanx in Advance,

fuzzr

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 3 months ago #23755

Hi,

Most of the front end of HikaShop can be used without javascript. People should be able to place orders. However, some functionalities might not be working properly, like the edition of addresses.

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

  • Posts: 3
  • Thank you received: 0
13 years 3 months ago #23763

Hi Nicolas!

Thank you for your quick response!

In www.website.com\components\com_hikashop\views\product\tmpl\show.php around line 133 there is this:

		<span id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">< ? p h p
			$this->row =& $this->element;
			$this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\''.$this->row->product_id.'\',field,1'.$form.'); } else { return false; }';
			$this->setLayout('quantity');
			echo $this->loadTemplate();
		? >
		</span>

And the function hikashopModifyQuantity is rendered into the page.

So I have no clue how to replace the JavaScript with an php-statement to add something to the cart, is there a switch to disable or change this? (sorry I'm quite new to hikashop).

Thanx you & best regards,

fuzzr

Last edit: 13 years 3 months ago by fuzzr. Reason: php code not displayed

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 3 months ago #23764

Hi,

The add to cart already works without javascript. You can try yourself on our demo website with the javascript turned off. There is no code to change.

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

  • Posts: 3
  • Thank you received: 0
13 years 3 months ago #23770

Hi Nicolas!

Haha, that was the right hint, thank you!

In my shop->configuration-> view I had chosen as button-style: 'css' and that generates a JavaScript only button (it seems to be - www.website.com\administrator\components\com_hikashop\helpers\cart.php - line 38...)

Now I switched button-style to normal and it works without JavaScript.

Thanx you for your quick help & best regards,

fuzzr

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 3 months ago #23772

Hi,

Indeed. The CSS styled buttons need javascript to be turned on so you need to use normal buttons if you want them to be working while javascript is disabled.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum