Guest Posted August 31, 2013 Posted August 31, 2013 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.
Praful Kamble Posted August 31, 2013 Posted August 31, 2013 @@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!!
Guest Posted August 31, 2013 Posted August 31, 2013 OK, first, a correction: the items that will not add are at http://www.ecoquestparts.com/index.php?cPath=26 I tried turning off "Use Search-Engine Safe URLs" and that has not helped. Other ideas? Anyone?
♥kymation Posted August 31, 2013 Posted August 31, 2013 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.
Guest Posted August 31, 2013 Posted August 31, 2013 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
♥joli1811 Posted August 31, 2013 Posted August 31, 2013 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.
Guest Posted September 1, 2013 Posted September 1, 2013 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
♥kymation Posted September 1, 2013 Posted September 1, 2013 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.
Praful Kamble Posted September 1, 2013 Posted September 1, 2013 @@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!!
Guest Posted September 2, 2013 Posted September 2, 2013 @@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.
Guest Posted September 2, 2013 Posted September 2, 2013 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>
♥kymation Posted September 2, 2013 Posted September 2, 2013 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.
Guest Posted September 2, 2013 Posted September 2, 2013 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.
Guest Posted September 2, 2013 Posted September 2, 2013 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.
Guest Posted September 2, 2013 Posted September 2, 2013 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?
♥kymation Posted September 2, 2013 Posted September 2, 2013 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.
Guest Posted September 2, 2013 Posted September 2, 2013 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
Praful Kamble Posted September 2, 2013 Posted September 2, 2013 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!!
♥joli1811 Posted September 2, 2013 Posted September 2, 2013 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.
steamship Posted January 13, 2014 Posted January 13, 2014 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.
♥kymation Posted January 13, 2014 Posted January 13, 2014 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.