Post by hpprintandgraphics » Thu Oct 31, 2013 5:11 pm

Hello Everyone,

Never have i had an issue like this before, i am comfortable coding and i have searched and searched for this issue...

My problem:

When searching from the main search bar at the top of the page it is going to this link "https://www.hpprintandgraphics.co.uk/undefinedindex.php?route=product/search&filter_name=mug"

Notice the undefined before index?

Now i have searched for 2 days for a solution and cannot find one, if you delete the "undefined" ofcourse it works.

Any ideas?


PS THIS WAS WORKING PREVIOUS AND THERE HAS BEEN NO CHANGES AT ALL, THEN SUDDENLY IT STOPPED WORKING ???


Posts

Joined
Thu Oct 31, 2013 5:05 pm

Post by MarketInSG » Sat Nov 02, 2013 9:20 am

are you using any kind of search modules? Also, check to ensure nothing is wrong in your common.js when triggering the search function.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by hpprintandgraphics » Sat Nov 02, 2013 10:10 am

Hello there,

No search modules no... cant see anything wrong in the javascript file.

Regards

Nick


Posts

Joined
Thu Oct 31, 2013 5:05 pm

Post by hpprintandgraphics » Sun Nov 03, 2013 9:55 am

No one?


Posts

Joined
Thu Oct 31, 2013 5:05 pm

Post by MarketInSG » Sun Nov 03, 2013 9:58 am

common.js file is where it does the redirection. most likely something is wrong there, or your theme uses another js file for the job. Reset to default theme, does error persist?


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by hpprintandgraphics » Sun Nov 03, 2013 10:18 am

When changing theme to default search works correctly.

Don't believe it is using a different javascript file though...


Posts

Joined
Thu Oct 31, 2013 5:05 pm

Post by hpprintandgraphics » Sun Nov 03, 2013 9:51 pm

Just realised in the attachment "common.js" at:

"$('.button-search').bind('click', function() {
url = $('base').attr('href') + 'indextest.php?route=product/search';"

Notice how it says indextest.php? THIS IS NOT THE CASE IN THE LIVE FILE IT IS JUST "INDEX.PHP....."

So this isnt the issue


Posts

Joined
Thu Oct 31, 2013 5:05 pm

Post by hpprintandgraphics » Mon Nov 04, 2013 9:38 am

Cant believe there is nobody else out there with any ideas...???


Posts

Joined
Thu Oct 31, 2013 5:05 pm

Post by dmnkdm » Thu Dec 11, 2014 8:33 pm

Check in header.tpl string (after </title> in clean v.1.6):

Code: Select all

 <base href="<?php echo $base; ?>" />
'undefined' - value of $('base').attr('href') if jQuery can't find tag 'base'

sorry for my bad English :crazy:

Newbie

Posts

Joined
Thu Dec 11, 2014 8:27 pm

Post by eareguncse » Thu Jun 13, 2019 1:42 am

I am facing this problem in Opencart 3.0.3.1
how can i solve it ?

Newbie

Posts

Joined
Mon Jun 05, 2017 8:20 am

Post by supportip » Thu Jan 30, 2020 12:41 am

Make sure that

Code: Select all

{{ search }}
inside

Code: Select all

<header>

{{ search }}

</header>
Last edited by straightlight on Thu Jan 30, 2020 9:06 am, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Fri Apr 01, 2016 5:25 am
Who is online

Users browsing this forum: No registered users and 36 guests