PDA

View Full Version : Buy Now buttons from catagories list is not working,



Redeye_Joe
08-23-2005, 01:47 PM
Hi, the buy it now button for any of my items after you click on one of the catagories list doesnt work, it only works if you open the item then buy it now, not if you try to buy direct from the catagories page. Here is error that comes up;
1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

delete from customers_wishlist WHERE customers_id=1 AND products_id=

[TEP STOP]


Anyone else having this problem?
Any ideas on how I can fix this? Thanks,

Doug

Redeye_Joe
08-23-2005, 01:52 PM
If logged it this happens, but if you are not logged in, it acts like it adds it to the cart but shows nothing, and $0.00 for total.

think it my have something to do with visitors cart.
Please help!!
Doug

ganast
08-23-2005, 03:57 PM
Apply patch for bug 11.

http://bugtrack.oscmax.com/view.php?id=11

--gabe

cleangroove
08-26-2005, 08:45 PM
Hello all... and props to all, especially Michael and Gabe for wonderful work and knowledge. I wasn't sure if I should open a new thread on this? I am also experiencing a Buy Now button issue for V2 from the Categories area. I have applied the ID=11 patch. I have tried my own homework on this, but now turned to the forum.

Problem: The link that is offered when rolling over (and of course clicking) the Buy Now button - which excludes the .php file extension from the link.

From this link
http://partsoplenty.com/catalog/index.php?cPath=4

Rolling over the Buy It Now button gives you this link
http://partsoplenty.com/catalog/index?cPath=4&sort=2a&action=buy_now&products_id=1

Notice the .php is missing after index.

OK, I'm not the PHP expert here but my problem is not PHP, but where to find where this link is generated.

I'm not sure if I broke something applying bug fixes or not. Fix 11 is confirmed correct. I didn't just turn to the forum here. Please just point me in the right direction, if you can. The site is not live yet. This is not priority 1 for you, just for me. Thanks - Cleangroove

sarahjessica
11-22-2005, 02:35 PM
The fix for product_listing_col.php does not fix the SQL error because the problem is actually coming from includes/application_top.php - the database query is wrong. To fix it, change this:


// performed by the 'buy now' button in product listings and review page
case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {
// BOF: MOD - Wish List 2.3
if (tep_session_is_registered('customer_id')) {
tep_db_query("delete from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND products_id=$products_id");
tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " WHERE customers_id=$customer_id AND products_id=$products_id");
}
// EOF: MOD - Wish List 2.3

to this:


case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {
// BOF: MOD - Wish List 2.3
if (tep_session_is_registered('customer_id')) {
tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'");
// Begin Wish List Code w/Attributes
tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " WHERE customers_id=$customer_id AND products_id='" . $HTTP_GET_VARS['pid']."'");
}
// EOF: MOD - Wish List 2.3

Hope that helps!! :D

macfionn
12-11-2005, 09:51 PM
Thank you, sarahjessica, this has indeed squelched the error. ;)

Mac

danhosts
09-29-2006, 12:18 PM
OK, this is an easy fix but why is it not corrected in the download?

michael_s
09-29-2006, 02:14 PM
This is fixed in the download. I just downloaded and installed RC3 and the issue is not present.

go2pub
12-11-2006, 04:14 AM
This is fixed in the download. I just downloaded and installed RC3 and the issue is not present.
I downloaded RC3 about 2 weeks ago and had to apply this fix, not sure why but I did and it worked a treat.

Oscmax is a great piece of work BTW, I'm in the process of switching from a standard osc install and so far oscmax is super. :-)

Pivkhan
03-25-2007, 11:21 AM
I'm having a simular problem. The Buy now button doesn't do anything in IE but works fine in Firefox. The fixes mentioned above are all there and the adress it points to looks right. I have several other buttons not working in IE as well so I'm thinking that some global file is the problem here. any ideas anyone?

michael_s
03-25-2007, 01:01 PM
I'm having a simular problem. The Buy now button doesn't do anything in IE but works fine in Firefox. The fixes mentioned above are all there and the adress it points to looks right. I have several other buttons not working in IE as well so I'm thinking that some global file is the problem here. any ideas anyone?


How about a link to your site? If it works in firefox but not IE, I am thinking the problem is IE or server level, not osC. But check your error logs, and IE's javascript debugger (or firefox's). See if you can find an error message.

Pivkhan
03-26-2007, 10:09 AM
It seems contained to when the button is called by the tep_image_button command, so I canged all instances with tep_image instead and it works. Sorry, I didn't have time to wait for a formal reply (you know clients). So the problem is temporarely solved and there is nothing on the site left to show.

chrisbarbers
08-21-2007, 06:27 AM
OK, I have the latest osCMax and this fix helped me, I applied it and my error has gone.

Many thanks sarahjessica