remove mootools and Squeezebox from hikashop

  • Posts: 52
  • Thank you received: 0
8 years 2 months ago #250763

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6
-- Error-message(debug-mod must be tuned on) -- : Uncaught ReferenceError: SqueezeBox is not defined

i want remove mootools.js from site.
when i remove it . in hikashop page i get this error:
Uncaught ReferenceError: SqueezeBox is not defined
and i found that squeezebox used mootools .
i don't need squeezebox , how to remove it from my site?
how can i remove this scripts:

jQuery(function($) {
			SqueezeBox.initialize({});
			SqueezeBox.assign($('a.modal').get(), {
				parse: 'rel'
			});
		});

		window.jModalClose = function () {
			SqueezeBox.close();
		};

i search in forum but can't figures out

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

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
8 years 2 months ago #250774

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 1 month ago #250764

Hi,

1 - Choose another "popup mode" and "image popup mode" in your HikaShop configuration.
2 - For the setting "After a product is added to the cart", do not use the one which display a popup.

www.hikashop.com/support/documentation/54-hikashop-config.html

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.

  • Posts: 52
  • Thank you received: 0
8 years 1 month ago #250809

i use image popup mode "vex" and test "bootstrap"
and use popup mode "shadowbox"
in "After a product is added to the cart" i choose "go to checkout page"
but squeezeBox still there and give me that error. :(

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 1 month ago #250812

Hi,

Then it should not be loaded.
Could you provide a link to a product page so that we could look at the problem ?
Maybe something else loads it on your website ?

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

  • Posts: 52
  • Thank you received: 0
8 years 1 month ago #250873

this is my product page
page

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 1 month ago #250883

Hi,

The error I see on your checkout is:
Uncaught TypeError: Fx.Slide is not a constructor
That error comes from the javascript of the payment methods selection system which needs mootools for now.
As erickb said, this won't be a problem with HikaShop 3, but for now, it is necessary for that.

If you want to remove that error when mootools is forcefully removed, you can remove the code:

if(!HIKASHOP_J30)
			JHTML::_('behavior.mootools');
		else
			JHTML::_('behavior.framework');
		$js = "
function moveOnMax(field,nextFieldID){
	if(field.value.length >= field.maxLength){
		document.getElementById(nextFieldID).focus();
	}
}
window.hikashop.ready( function(){
";
		$done=false;
		if(empty($usable_methods)) {
			if(count($class->errors)) {
				foreach($class->errors as $error){
					if(!empty($error)) $app->enqueueMessage($error);
				}
			}
		}else{
			$config =& hikashop_config();
			$auto_select_default = $config->get('auto_select_default',2);
			if($auto_select_default == 0) $done = true;
			foreach($usable_methods as $method){
				$show = false;
				if(($payment_method==$method->payment_type && $payment_id==$method->payment_id)|| (empty($payment_id)&&!$done)){
					$done = true;
					$show = true;
				}
				$js.="
	var mySlide_".$method->payment_type.'_'.$method->payment_id." = new Fx.Slide('hikashop_credit_card_".$method->payment_type.'_'.$method->payment_id."');
";
				if(!$show){
					$js.="
	mySlide_".$method->payment_type.'_'.$method->payment_id.".hide();
	var hikashop_last_opened_slide = null;
";
				}else{
					$js.="
	var hikashop_last_opened_slide = mySlide_".$method->payment_type.'_'.$method->payment_id.";
";
				}
				// document.getElementById(id).onclick= function(){}
				$js.="
	if(typeof document.id == 'function' ){
		document.id('radio_".$method->payment_type.'_'.$method->payment_id."').addEvent('click', function(e){
			if(hikashop_last_opened_slide) {
				if(mySlide_".$method->payment_type.'_'.$method->payment_id." == hikashop_last_opened_slide)
					return;
				hikashop_last_opened_slide.toggle();
			}
			mySlide_".$method->payment_type.'_'.$method->payment_id.".toggle();
			hikashop_last_opened_slide = mySlide_".$method->payment_type.'_'.$method->payment_id.";
		});
	}else{
		$('radio_".$method->payment_type.'_'.$method->payment_id."').addEvent('click', function(e){
			if(typeof(hikashop_last_opened_slide)!='undefined') hikashop_last_opened_slide.toggle();
			mySlide_".$method->payment_type.'_'.$method->payment_id.".toggle();
			hikashop_last_opened_slide = mySlide_".$method->payment_type.'_'.$method->payment_id.";
		});
	}";
			}
		}
		$js.="
});

var ccHikaErrors = new Array();
ccHikaErrors [3] = '".JText::_('CREDIT_CARD_INVALID')."';
ccHikaErrors [5] = '".JText::_('CREDIT_CARD_EXPIRED')."';
";
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration("\n<!--\n".$js."\n//-->\n");
in the file components/com_hikashop/views/checkout/view.html.php

The following user(s) said Thank You: jafar007

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

  • Posts: 52
  • Thank you received: 0
8 years 1 month ago #251226

i remove this code but that error is still there.
i made duplicate site on sub domain with remove mootools .
subdomain link here
because the main domain used ssl(https) the subdomain give warning you can select process anyway to access to site
.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 1 month ago #251270

Hi,

On that page, I'm not even able to add a product to the cart.
It seems that you've configured HikaShop to use the AJAX add to cart mode, which also requires Mootools for now. Check that the "Use AJAX when possible for add to cart buttons" setting is deactivated in the HikaShop configuration.

Also, next version of HikaShop will have a new add to cart system and it won't need mootools so that problem won't happen.

The following user(s) said Thank You: jafar007

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

  • Posts: 52
  • Thank you received: 0
8 years 1 month ago #251320

i disable "Use AJAX when possible for add to cart buttons" but that error still there.
i use remove mootools plugin for remove mootools in other page except shopping page.
i think , i must wait for next version for remove mootools completely.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 1 month ago #251328

Hi,

It sure will be simpler with the next version as most of what use mootools won't be there anymore.

The following user(s) said Thank You: jafar007

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

  • Posts: 52
  • Thank you received: 0
7 years 7 months ago #267571

unfortunately, squeezbox and mootools don't remove in hikashop 3.0.1.
you said remove in next version but still there.
when removing mootools library?

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
7 years 7 months ago #267574

Hi,

You're wrong on all the line.
I didn't say that we'll remove them. I said that most of what uses mootools won't be there.
And that's the case. The new checkout and the new add to cart system don't use it anymore.
All that's left is carousel system for which we don't have an alternative yet.

Note however that if you update from a previous version of HikaShop, the add to cart and checkout legacy systems are activated by default. So you still have the old interfaces that use mootools. We do that so that if you have customizations on your website, it doesn't break during the update.
You'll have to turn off both of these under the "advanced" tab of the HikaShop configuration to use the new add to cart and checkout systems which don't rely on mootools at all.

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

  • Posts: 52
  • Thank you received: 0
7 years 6 months ago #268480

turn off this option.
why don't you use owlcarousel instead of mootools that used jquery?it's highly customisable and responsive

Last edit: 7 years 6 months ago by jafar007.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 6 months ago #268489

Thanks for your feedback.
That subject has already been treated in other thread.

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.093 seconds
Powered by Kunena Forum