glennn.php Posted December 31, 2009 Share Posted December 31, 2009 this issue has become pretty dire - i inherited this "site" from someone, and there are only a few remaining issues, the major one being that the Remove/Update function doesn't work - there's one plugin added to the program, related_products_4_0, but i'm not sure if it would have affected this. i can't find any problems in the code or queries, but i'm a bit of a novice in PHP/MySQL... can someone please offer a hand in troubleshooting this for me...? i really appreciate any assistance. Thanks GN Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted December 31, 2009 Share Posted December 31, 2009 Glenn I've lost my psychic hat again. Remove update function does not work on which screen? Have you compared the code to a standard osc install? What happens when you put the standard code back? G Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
glennn.php Posted December 31, 2009 Author Share Posted December 31, 2009 my apologies - it's in any of the What's In My Cart? screens... yes, i've compared the code and there's nothing within the function() that was changed by the plugin... this is the function (in classes/shopping_cart.php), correct? function remove($products_id) { // echo "tested".$products_id; global $customer_id; unset($this->contents[$products_id]); // remove from database if (tep_session_is_registered('customer_id')) { tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'"); } // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure $this->cartID = $this->generate_cart_id(); } it simply fails to remove the item. thanks - what next? Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted December 31, 2009 Share Posted December 31, 2009 I assume the echo tested shows when you try to remove an item. If it does echo out the query statements and see if they work on phpmyadmin. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
glennn.php Posted December 31, 2009 Author Share Posted December 31, 2009 yes :) thanks, i'll try that... Link to comment Share on other sites More sharing options...
glennn.php Posted December 31, 2009 Author Share Posted December 31, 2009 ah, now i remember - it's not getting as far as that echo statement... Link to comment Share on other sites More sharing options...
glennn.php Posted December 31, 2009 Author Share Posted December 31, 2009 here's one thing that's not happening when i try to Remove a product: if i have three items listed in What's In My Cart, #s 153, 156, and 109, and then physically remove #109 from the database.customers_basket, then the three items are still listed in my Shopping Cart - then when i select aNOTHER item, the query is still sent "delete from customers_basket where customers_id = '6' and products_id = '109'" - even IF i select say item #153... ??? Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 1, 2010 Share Posted January 1, 2010 Stick with one problem at a time. If the first delete does not display the "tested" line, when it is uncommented, your initial problem lies earlier in the logic flow. Add loads more debug statements and follow what happens. Why does it not call the remove function? Is there another one that performs the same functionality? G Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
glennn.php Posted January 1, 2010 Author Share Posted January 1, 2010 i found it, thanks ya'll - i had left a variable out when i was editing the html in the shopping cart... thanks again... G Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.