Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Feb 2006
    Posts
    22
    Plugin Contributions
    0

    Default error when adding product to cart

    I'm getting this error when adding a cart to the shopping cart:

    Fatal error: Call to undefined function: actionaddproduct() in /home/smilingcross/www/www.smilingcross.com/zc/includes/main_cart_actions.php on line 36

    the URL is http://www.smilingcross.com/zc/index...on=add_product

    I guess the function actionaddproduct() is misnamed or is missing? In the main_cart_actions page there is a call to a function called actionAddProduct($goto, $parameters).

    I have version 1.3 and this hasn't always been broken. I know some php so if I can just get pointed to the file that has this function I might be able to figure it out.

    Can anyone help? Thanks!

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: error when adding product to cart

    Go to the Admin ... Tools ... Developer's Tool Kit ...

    In the bottom input box, type in: actionaddproduct

    Select Catalog from the dropdown and click Search ...

    What comes up for these?

    What kind of server are you on, unix or windows?

    Was this a clean install or an upgrade?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Feb 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: error when adding product to cart

    this is what comes up
    /home/smilingcross/www/www.smilingcross.com/zc/includes/main_cart_actions.php

    Line #0 : <?php /** * Main shopping Cart actions supported. * * The main cart actions supported by the current shoppingCart class. * This can be added to externally using the extra_cart_actions directory. * * @package initSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: main_cart_actions.php 3066 2006-02-25 22:14:00Z wilt $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } /** * include the list of extra cart action files (*.php in the extra_cart_actions folder) */ if ($za_dir = @dir(DIR_WS_INCLUDES . 'extra_cart_actions')) { while ($zv_file = $za_dir->read()) { if (preg_match('/\.php$/', $zv_file) > 0) { /** * get user/contribution defined cart actions */ include(DIR_WS_INCLUDES . 'extra_cart_actions/' . $zv_file); } } } switch ($_GET['action']) { /** * customer wants to update the product quantity in their shopping cart * delete checkbox or 0 quantity removes from cart */ case 'update_product' : $_SESSION['cart']->actionUpdateProduct($goto, $parameters); break; /** * customer adds a product from the products page */ case 'add_product' : $_SESSION['cart']->actionAddProduct($goto, $parameters); break; case 'buy_now' : /** * performed by the 'buy now' button in product listings and review page */ $_SESSION['cart']->actionBuyNow($goto, $parameters); break; case 'multiple_products_add_product' : /** * performed by the multiple-add-products button */ $_SESSION['cart']->actionMultipleAddProduct($goto, $parameters); break; case 'notify' : $_SESSION['cart']->actionNotify($goto, $parameters); break; case 'notify_remove' : $_SESSION['cart']->actionNotifyRemove($goto, $parameters); break; case 'cust_order' : $_SESSION['cart']->actionCustomerOrder($goto, $parameters); break; case 'remove_product' : $_SESSION['cart']->actionRemoveProduct($goto, $parameters); break; case 'cart' : $_SESSION['cart']->actionCartUserAction($goto, $parameters); break; } ?>

    this was an upgrade. this error didn't show up at the same time as the upgrade however. it was working at first. haven't customized this page at all yet.


    linux OS, apache 2.0

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: error when adding product to cart

    Reload the file:
    /includes/main_cart_actions.php

    From your clean download of Zen Cart v1.3.0.1 ... looks like a bad upload ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Feb 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: error when adding product to cart

    tried it. got the same error.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: error when adding product to cart

    What are you using to edit files with?

    How about to load the files to your site?

    It looks like either you are editing your files with CPanel or something similar or you are loading files and getting bad uploads so the files are getting trashed ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Feb 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: error when adding product to cart

    I use Dreamweaver. I use Dreamweaver a lot, for a dozen other sites. No other problems. Is there another file besides main_cart_actions.php which may be corrupt?

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: error when adding product to cart

    Do you have something like Beyond Compare that you can do an FTP compare of a clean checkout to your site and see what files Dreamweaver may have corrupted? Or what files did not upload correctly?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Feb 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: error when adding product to cart

    I found it! It was the classes/shopping_cart.php file that was off. Just uploaded a fresh one and all is good. Thanks a lot.

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: error when adding product to cart

    Thanks for the update ... that will be of help to others with similar problems ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 Attribute gives error when adding product to cart
    By sw1138lr in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 5 Jul 2016, 06:53 PM
  2. Replies: 3
    Last Post: 17 Oct 2013, 06:37 PM
  3. Replies: 7
    Last Post: 15 Jun 2010, 06:30 PM
  4. Error when adding item to cart
    By Sabine_in_MG in forum General Questions
    Replies: 1
    Last Post: 29 Apr 2008, 11:26 PM
  5. attribute error when adding to cart
    By newagekat in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 Jul 2006, 05:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg