Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy Now button not working


swestcott
 Share

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

Link to comment
Share on other sites

  • 1 year later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...