Jump to content
Sign in to follow this  
swestcott

Buy Now button not working

Recommended Posts

I just installed the Separate Price Per Customer Version 4.0 contribution. Since the installation my Buy Now button on my producting listing has not worked. First, when I clicked on it I would be taken to my shopping cart and it would be empty, nothing added.

 

I went in and tried to tweak it a bit and add a quantity box. I got it so that it will add a specified quantity to my cart, but if I am a wholesale customer it adds it in at Retail price and also logs me out of my account.

 

I can't show you the store because it is not a live site yet, but here is the code:

 

Original code that won't add to cart:

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

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

break;

 

New code that adds to cart but logs out of my account:

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

$lc_text = '<form name="cart_quantity" method="get" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL'). '"><input type="hidden" name="action" value="buy_now"><input type="hidden" name="products_id" value="' . $listing[$x]['products_id'] . '">Qty: <input type="text" name="list_quantity" value="1" maxlength="3" size="3">' . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</form>';

break;

}

 

This is in modules/product_listing.php. Any ideas?

 

Thanks in advance,

Shannon

Share this post


Link to post
Share on other sites

I had a similar problem where the Buy It button wasn't working, it woudl go to the cart page but it would say empty cart. I fixed mine by changing the configure.php file variable for cookie path to "/" instead of "".

 

Not sure if this is the fix for everybody but it seemed to be a cookie issue since when I rolled over my Buy It button it gave a correct path with an osCid as well. It just wasn't carrying the cookie.

 

I just installed the Separate Price Per Customer Version 4.0 contribution. Since the installation my Buy Now button on my producting listing has not worked. First, when I clicked on it I would be taken to my shopping cart and it would be empty, nothing added.

 

I went in and tried to tweak it a bit and add a quantity box. I got it so that it will add a specified quantity to my cart, but if I am a wholesale customer it adds it in at Retail price and also logs me out of my account.

 

I can't show you the store because it is not a live site yet, but here is the code:

 

Original code that won't add to cart:

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

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

break;

 

New code that adds to cart but logs out of my account:

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

$lc_text = '<form name="cart_quantity" method="get" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL'). '"><input type="hidden" name="action" value="buy_now"><input type="hidden" name="products_id" value="' . $listing[$x]['products_id'] . '">Qty: <input type="text" name="list_quantity" value="1" maxlength="3" size="3">' . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</form>';

break;

}

 

This is in modules/product_listing.php. Any ideas?

 

Thanks in advance,

Shannon


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×