Post by sicilian_najdorf » Tue Nov 29, 2016 3:05 pm

I tried creating another input field in index.php?route=account/register. I have this

$this->document->addScript('https://code.jquery.com/ui/1.12.1/jquery-ui.js');
$this->document->addStyle('//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css');


at class ControllerAccountRegister. I successfully created the autocomplete on that input. But when I tried the same process on route=checkout/checkout, autocomplete does not work. I added jquery ui file in class ControllerCheckoutRegister

I tested the jquery ui calender and the continue button under New Customer did not work.

Also, when I put
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" type="text/javascript"></script> at header.tpl, jquery auto complete does not work in index.php?route=account/register. So i put the js file in class ControllerAccountRegister.

The version I used is open cart 2.1.0.1


Posts

Joined
Wed Nov 23, 2016 4:13 pm

Post by opencartmart » Tue Nov 29, 2016 5:33 pm

sicilian_najdorf wrote:I successfully created the autocomplete on that input. But when I tried the same process on route=checkout/checkout, autocomplete does not work. I added jquery ui file in class ControllerCheckoutRegister
It seems that conflicting issue with jquery datepicker module since checkout pages loads datepicker module by default and you are also loading full jquery UI modules. You can just load your required module i.e autocomplete by customizing jquery UI ( You can customize here https://jqueryui.com/download/ ) instead of full UI modules.

sicilian_najdorf wrote: Also, when I put
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" type="text/javascript"></script> at header.tpl, jquery auto complete does not work in index.php?route=account/register. So i put the js file in class ControllerAccountRegister.
Since jquery UI has dependency on jquery. So it should be placed after following script

Code: Select all

<script src="catalog/view/javascript/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am
Who is online

Users browsing this forum: No registered users and 429 guests