Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Some items go to cart, others will not, inconsistent posting to cart


Guest

Recommended Posts

Posted

I have a new site using OSC 2.3.3. Today, I moved site to the site root level. The site is up and appears to be working. Items added to the database before the move appear to be able to be added to the cart. But items added after the move won't add to cart unless you click on reviews, then add to cart. The add to cart button does not show a link when you hover over it in product Info, but it does in the page with the reviews. When the product_info page add to cart button is clicked, it takes you to the cart, but the item is not added to the cart.

 

I have looked for differences in the products both in the database and in the editor. However, I have not found anything that suggests any commonalities that would make these items not be added to the cart.

 

The site is http://www.ecoquestparts.com. Many parts will add to cart. Examples that won't are in Category: Water Filters/Springhouse/ There are three parts there that I added today. Items from the Air Purifier section appear to be working great.

 

I've checked the configuration.php files and I'm pretty sure all the references to the old catalog directory have been removed. It doesn't appear to be a config error, or it doesn't make sense why the other parts work.

 

Any ideas on why this anomoly exists? Or how to fix it?

 

Thanks.

Posted

@@cp3inc

 

Seems session issue. Off the SEO urls and check again.

Like post..hit LIKE button.

 

osCommerce | Joomla | WordPress | Magento | SEO | CakePHP | CI

 

Guaranteed Website Speed Optimization!!

Posted

This could be a session problem. Truncate (empty) the sessions table in your database.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

This could be a session problem. Truncate (empty) the sessions table in your database.

 

Regards

Jim

 

Thanks, Jim. I emptied the table and tried again. No luck. Still won't add to cart. Thanks again.

 

Carl

Posted

next is check includes/application_top.php just upload original again

 

then maybe database???

 

But try an original application_top.php as the site does not seem to have many mods

To improve is to change; to be perfect is to change often.

 

Posted

next is check includes/application_top.php just upload original again

 

then maybe database???

 

But try an original application_top.php as the site does not seem to have many mods

 

Thank you John. I have replaced application_top.php with the code from a fresh copy of 2.3.3. No apparent change. I can still go to the review page and the button there works, just not on the product info page. And only on a few items. Most of which it appears I have added since the move. But I'm pretty sure those on this page were added before the move and they don't work:

 

 

http://www.ecoquestparts.com/index.php?cPath=26

Posted

I can't find any products where the Add to Cart button works on the Product Info page. I don't see anything wrong with that page as it is displayed. Try replacing product_info.php with a fresh copy from stock osCommerce and see if that works.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

@@cp3inc

 

You have below errors on your website:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/ecoftp/public_html/includes/application_top.php:490) in /home/ecoftp/public_html/includes/functions/general.php on line49

Like post..hit LIKE button.

 

osCommerce | Joomla | WordPress | Magento | SEO | CakePHP | CI

 

Guaranteed Website Speed Optimization!!

Posted

@@cp3inc

 

You have below errors on your website:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/ecoftp/public_html/includes/application_top.php:490) in /home/ecoftp/public_html/includes/functions/general.php on line49

 

How did you get this error? I do not get it when I access the system. Thanks.

Posted

I can't find any products where the Add to Cart button works on the Product Info page. I don't see anything wrong with that page as it is displayed. Try replacing product_info.php with a fresh copy from stock osCommerce and see if that works.

 

Regards

Jim

 

I replaced the product_info.php with a fresh copy, but to no avail. It still does not allow parts to be added to the cart. On the product info page, I notice that when you hover over the add to cart button, there is no link showing in the status bar below. But on the page with the reviews, there is a link showing. That one works, of course. It shows as:

 

http://ecoquestparts.com/product_reviews.php?products_id=89&action=buy_now

 

If I try to "copy link location" from the one on product_info.php, it doesn't offer the option to copy the link. The button appears to only include the submit button for the form. This is the form in context:

 

<form method="post" action="http://ecoquestparts.com/product_info.php?products_id=89&action=add_product" name="cart_quantity">

<div> … </div>

<div class="contentContainer">

<div class="contentText"> … </div>

<div class="buttonSet">

<span class="buttonAction">

<input type="hidden" value="89" name="products_id"></input><span class="">

<button id="tdb4" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-primary" type="submit" role="button" aria-disabled="false"> …

</button>

</span>

<script type="text/javascript"> … </script>

</span><span class=""> … </span>

<script type="text/javascript"> … </script>

</div>

</div>

</form>

Posted

The button on the Product Info page is just a submit for the form. The form allows the customer to set quantity and any options that are available for that product. The buttons on other pages are just links and do not allow the quantity/options to be set.

 

The form on your Product Info page looks correct to me, and you've replaced your copy of application_top.php which processes the output from the form. I'm not aware of anything else that could cause just this problem.

 

Check your PHP error log for errors that might point to a solution.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

The problem appears to be just on the product_info.php page. The Add to cart button does not work. It takes you to the cart, but does not add the item. The "Buy Now" buttons that appear on other pages DO work. I'd love to know what is causing this issue and/or how to replace that button with the same "Buy Now" button on the other pages that does work.

Posted

The button on the Product Info page is just a submit for the form. The form allows the customer to set quantity and any options that are available for that product. The buttons on other pages are just links and do not allow the quantity/options to be set.

 

The form on your Product Info page looks correct to me, and you've replaced your copy of application_top.php which processes the output from the form. I'm not aware of anything else that could cause just this problem.

 

Check your PHP error log for errors that might point to a solution.

 

Regards

Jim

 

Thank you, Jim. When I try to use this button, it does not appear to produce any error messages.

Posted

The button on the Product Info page is just a submit for the form. The form allows the customer to set quantity and any options that are available for that product. The buttons on other pages are just links and do not allow the quantity/options to be set.

 

The form on your Product Info page looks correct to me, and you've replaced your copy of application_top.php which processes the output from the form. I'm not aware of anything else that could cause just this problem.

 

Check your PHP error log for errors that might point to a solution.

 

Regards

Jim

 

Is there anything I could have missed when moving the catalog to the root level? Some setting I missed? Or a file that didn't get moved?

Posted

Something in the configure.php file is wrong? I don't see how that would cause this problem and not others, but it might.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

SOLUTION!

 

OK, here's what I found: I had set the .htaccess file to change all links to include the www. in front of the domain name. However, when I looked at the configure.php file, the lines below did NOT have the www in front of them. Once I changed that, it started working!

 

define('HTTP_SERVER', 'http://ecoquestparts.com');

define('HTTPS_SERVER', 'http://ecoquestparts.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'ecoquestparts.com');

define('HTTPS_COOKIE_DOMAIN', 'ecoquestparts.com');

 

Changing them to :

 

define('HTTP_SERVER', 'http://www.ecoquestparts.com');

define('HTTPS_SERVER', 'http://www.ecoquestparts.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'www.ecoquestparts.com');

define('HTTPS_COOKIE_DOMAIN', 'www.ecoquestparts.com');

 

solved my problem. I hope this helps someone else sometime. THanks to all who helped me figure this out!!

 

Carl

Posted

How did you get this error? I do not get it when I access the system. Thanks.

 

When you click checkout button from cart, you shall be able to see.

Like post..hit LIKE button.

 

osCommerce | Joomla | WordPress | Magento | SEO | CakePHP | CI

 

Guaranteed Website Speed Optimization!!

Posted

SOLUTION!

 

OK, here's what I found: I had set the .htaccess file to change all links to include the www. in front of the domain name. However, when I looked at the configure.php file, the lines below did NOT have the www in front of them. Once I changed that, it started working!

 

define('HTTP_SERVER', 'http://ecoquestparts.com');

define('HTTPS_SERVER', 'http://ecoquestparts.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'ecoquestparts.com');

define('HTTPS_COOKIE_DOMAIN', 'ecoquestparts.com');

 

Changing them to :

 

define('HTTP_SERVER', 'http://www.ecoquestparts.com');

define('HTTPS_SERVER', 'http://www.ecoquestparts.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'www.ecoquestparts.com');

define('HTTPS_COOKIE_DOMAIN', 'www.ecoquestparts.com');

 

solved my problem. I hope this helps someone else sometime. THanks to all who helped me figure this out!!

 

Carl

 

Hi Carl,

Thanks for the info on how you solved forgot that one :thumbsup: I remember now reading that there are three possible settings for the cookies.

'www.ecoquestparts.com'

'.ecoquestparts.com'

'ecoquestparts.com'

Guess it is a server thing.

Regards

John

To improve is to change; to be perfect is to change often.

 

  • 4 months later...
Posted

The problem appears to be just on the product_info.php page. The Add to cart button does not work. It takes you to the cart, but does not add the item. The "Buy Now" buttons that appear on other pages DO work. I'd love to know what is causing this issue and/or how to replace that button with the same "Buy Now" button on the other pages that does work.

 

 

SOLUTION!

 

OK, here's what I found: I had set the .htaccess file to change all links to include the www. in front of the domain name. However, when I looked at the configure.php file, the lines below did NOT have the www in front of them. Once I changed that, it started working!

 

define('HTTP_SERVER', 'http://ecoquestparts.com');

define('HTTPS_SERVER', 'http://ecoquestparts.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'ecoquestparts.com');

define('HTTPS_COOKIE_DOMAIN', 'ecoquestparts.com');

 

Changing them to :

 

define('HTTP_SERVER', 'http://www.ecoquestparts.com');

define('HTTPS_SERVER', 'http://www.ecoquestparts.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'www.ecoquestparts.com');

define('HTTPS_COOKIE_DOMAIN', 'www.ecoquestparts.com');

 

solved my problem. I hope this helps someone else sometime. THanks to all who helped me figure this out!!

 

Carl

 

I have just set up my oscommerce site and still using the demo data until I'm happy with the layout, etc. One of the problems I came across is this exact one that Carl mentions in the first quote. i.e. the 'Add to Cart' button only works on the Reviews page and not on the Products page. In another post he states that the 'Add to Cart' on the Products page displays nothing when you hover over it, but does on the Reviews page. I'm new to oscommerce and PHP, but how does adding 'www' to the server and cookie_domain fix it? How does that make the 'Add to Cart' have a valid link behind it now on the Products page? Surely something has to be done to the Products page itself and the Add to Cart button in particular. I just don't know what at this early stage of learning.

Posted

The configure.php file tells osCommerce where all of the files are. If your configure.php says that all of the files are at example.com, and the .htaccess file tells the server that everything is at www.example.com, you're telling it two different things. That is never a good idea. Stick with one or the other everywhere.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...