View Full Version : Does your "Buy Now" button work in category view?

06-21-2005, 07:14 AM
As the title states... Buy Now works on the individual product page, but not under category view.


06-21-2005, 07:21 AM
Ya, I have the same problem. Glad to see that I'm not the only one who didn't have a perfect install.

06-21-2005, 07:30 AM
When it doesn't work, what happens. What does the button actually do?

Ok, I see. It looks like another bug. The product_id is being left off the url for the buy now button.

I have added a bug report:

I am doing debugging today, so I may get this resolved before tomorrow.

06-21-2005, 07:55 AM
This is resolved. See the bug report for the fix:


06-21-2005, 08:23 AM
You may want to change the bug fix to show the whole line so people can just cut and paste it. Otherwise it's confusing and the bug fix doesn't seem to work. I would just add the correct line

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'pName')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

that way people can just copy and replace the line

06-21-2005, 09:56 AM
The problem is with the bugtracking software. It is parsing the '<a href=" part of the corrected line of code.

I did post the entire line, unfortunately, it is not displaying properly...

Thanks for pointing it out, I totally missed it.

06-21-2005, 11:11 AM
Did you try just using <a href="
with the HTML special chars?

06-21-2005, 11:45 AM
Yes I tried that, but the output then was still incorrect, simply adding the < in front of the a href output. Still, it would have to be edited by the end user and could not be simply copied and pasted.

I worked around it by only posting the actual section that was changed in that line of code, not the entire line.