Zen Cart Logo
Forums / Basic Configuration / my add to cart button goes to wrong place

my add to cart button goes to wrong place

Locked

Views: 2,357

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
19 May 2008, 2:40 PM
#1
abv101 avatar

abv101

New Zenner

Join Date:
May 2008
Posts:
6
Plugin Contributions:
0

my add to cart button goes to wrong place

Hi all

First attemped with zen cart but am having a problem with the add to cart button going to the advanced search page instead of checkout ???

using 1.3.8

https://www.seatingvfm.co.uk

any help would be great as i've been hitting my head against the wall looking for the answer

19 May 2008, 3:04 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

If you switch back to the Classic template do you still have a problem?

20 May 2008, 11:44 AM
#3
abv101 avatar

abv101

New Zenner

Join Date:
May 2008
Posts:
6
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

switch back to classic and the product page just comes up as a blank so cant really test it mate

20 May 2008, 1:06 PM
#4
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

You have a Template Monster template installed and they are well known for not working properly. If you search the forum for Template Monster you will see all sorts of horror stories. The problem you are having seems to be caused by a missing </form> tag on the search sidebox.

Regards,
Christian.

20 May 2008, 3:33 PM
#5
abv101 avatar

abv101

New Zenner

Join Date:
May 2008
Posts:
6
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

i agree they are a bleedin nightmare and i know its a dumb question but being new to zen you say its a missing form tag any idea where i can change this and what i should put?

20 May 2008, 4:23 PM
#6
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

Normally you would need to look in a file called /includes/templates/YOUR_TEMPLATE/sideboxes/tpl_search.php where YOUR_TEMPLATE is the name of the template override that is being used. TM have a tendency to not follow the rules though so the file could be elsewhere. Once you find it there should be a line in it that says...

$content .= "</form>";
```...and I would guess that it has been missed out. Compare the file's contents to the template default file in /includes/templates/template_default/sideboxes/tpl_search.php and see if you can see where to put the missing line.

If you get stuck you will probably have to go back to Template Monster and raise the issue with them. In my opinion you would be better of trying to get your money back and going for a template that works with Zen Cart. There are some nice free ones in the Zen Cart downloads area which can be used as a good base to build on.

Regards,
Christian.
21 May 2008, 9:35 AM
#7
abv101 avatar

abv101

New Zenner

Join Date:
May 2008
Posts:
6
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

thank you for your help mate much appreciated i checked the file it did have the form line in there same as default and on the offchance i tried swapping files out with the default one to see if it would remedy the problem but it was still the same much appreciated anyway bud

21 May 2008, 9:46 AM
#8
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

includes/templates/YOUR_TEMPLATE/sideboxes/tpl_search_header.php This is the file you actually need to look at... The source of your page shows no closing </form>

21 May 2008, 10:54 AM
#9
abv101 avatar

abv101

New Zenner

Join Date:
May 2008
Posts:
6
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
$content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 100px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == '' . HEADER_SEARCH_DEFAULT_TEXT . '') this.value = '';"') . ' ' . zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
} else {
$content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 100px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == '' . HEADER_SEARCH_DEFAULT_TEXT . '') this.value = '';"') . ' <input type="submit" value="' . HEADER_SEARCH_BUTTON . '" style="width: 45px" />';
}

$content .= "</form>";
?>

thank you marg checked this one as well shows hte same as default zen file tried changing them over to and shows same problem

21 May 2008, 11:31 AM
#10
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

includes/templates/theme013/sideboxes/tpl_search_header.php

The above is absolutely where you are looking? Because... the issue discussed is absolutley what is causing your error. There is a missing </form> somewhere and we know this because of the advanced_search_results.php reference... Keep digging? Is there a way of turning off the header search just for poop and piddles?

21 May 2008, 11:59 AM
#11
abv101 avatar

abv101

New Zenner

Join Date:
May 2008
Posts:
6
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

thanks marg was definately that file i was looking at by luck i have just come accross the issue it was actually in the common folder tpl_header.php file for anyone else having the same issue all you do is remove the line referencing the advanced search and write around it and problem solved thank you all for your help in this matter was most appreciated

21 May 2008, 12:02 PM
#12
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: my add to cart button goes to wrong place

Thank you for submitting your solution. I'm sure it will help the next person.