learwbc Posted June 1, 2005 Share Posted June 1, 2005 what about this section of the other general.php file (there are two by the way)... what are the instructions saying to do with this section? just to look at it prettiness? this section already exits and is the same as what the instructions say to add......***very confusing*** // Sets the status of a product on special function tep_set_specials_status($specials_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_SPECIALS . " set status = '1', expires_date = NULL, date_status_change = NULL where specials_id = '" . (int)$specials_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_SPECIALS . " set status = '0', date_status_change = now() where specials_id = '" . (int)$specials_id . "'"); } else { return -1; } } Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2005 Share Posted June 1, 2005 //Begin SPCglobal $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); //End SPC my site no longer opens. Why did you edit catalog/include/general.php? The instructions never say not to edit that file. You added code from my site, which you do not have, which I clearly state in the instructions you are likely to not have, and so of course your site no longer opens. That's the entire point of the copy from catalog & paste into admin Step 9 process. this is my original code: // Return a product's special price (returns nothing if there is no offer) // TABLES: products function tep_get_products_special_price($product_id) { this is what the instructions say to change it to: <{POST_SNAPBACK}> If your admin's general.php file already has the "tep_get_products_special_price" function then you do not need to add it. You do not change your catalog's general.php file! As the instructions clearly state; the examples included are from my site, your code may be different. Did you read this part of the instructions? "You are copying this (vs. updating from something included in this contribution) because many stores have modified this function for things like Pricing Per Customer or Group Pricing or so forth. Therefore you need to use your existing code. " define('FILENAME_CATALOG_PRODUCT_INFO', 'product_info.php');define('FILENAME_CATALOG_LOGIN', 'login.php'); go in database_tables.php or filenames.php? Well, the instructions say "Edit /catalog/admin/includes/filenames.php and add:" so I would guess filenames.php? what about this section of the other general.php file (there are two by the way)...what are the instructions saying to do with this section? just to look at it prettiness? this section already exits and is the same as what the instructions say to add......***very confusing*** // Sets the status of a product on special function tep_set_specials_status($specials_id, $status) { The instructions never say to change this function...why do you think it needs to be changed? Would it matter if my admin folder is not called admin?what would i have to change in the recover cart system if my admin folder is called something else? If your admin area is not called admin, simply substitute. My admin folder is not admin and works fine. and the admin one is not located here:catalog/admin/functions/ it's located here: catalog/admin/includes/functions/ OK, this is a typo, good catch. I've updated the docs for the next release.Look, I realize I am a bit harsh in this reply, but you simply did not follow the instructions which have successfully guided many others in installing this contribution. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2005 Share Posted June 1, 2005 //Begin SPCglobal $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); //End SPC my site no longer opens. Why did you edit catalog/include/general.php? The instructions never say not to edit that file. You added code from my site, which you do not have, which I clearly state in the instructions you are likely to not have, and so of course your site no longer opens. That's the entire point of the copy from catalog & paste into admin Step 9 process. this is my original code: // Return a product's special price (returns nothing if there is no offer) // TABLES: products function tep_get_products_special_price($product_id) { this is what the instructions say to change it to: <{POST_SNAPBACK}> If your admin's general.php file already has the "tep_get_products_special_price" function then you do not need to add it. You do not change your catalog's general.php file! As the instructions clearly state; the examples included are from my site, your code may be different. Did you read this part of the instructions? "You are copying this (vs. updating from something included in this contribution) because many stores have modified this function for things like Pricing Per Customer or Group Pricing or so forth. Therefore you need to use your existing code. " define('FILENAME_CATALOG_PRODUCT_INFO', 'product_info.php');define('FILENAME_CATALOG_LOGIN', 'login.php'); go in database_tables.php or filenames.php? Well, the instructions say "Edit /catalog/admin/includes/filenames.php and add:" so I would guess filenames.php? what about this section of the other general.php file (there are two by the way)...what are the instructions saying to do with this section? just to look at it prettiness? this section already exits and is the same as what the instructions say to add......***very confusing*** // Sets the status of a product on special function tep_set_specials_status($specials_id, $status) { The instructions never say to change this function...why do you think it needs to be changed? Would it matter if my admin folder is not called admin?what would i have to change in the recover cart system if my admin folder is called something else? If your admin area is not called admin, simply substitute. My admin folder is not admin and works fine. and the admin one is not located here:catalog/admin/functions/ it's located here: catalog/admin/includes/functions/ OK, this is a typo, good catch. I've updated the docs for the next release. I realize I am a bit harsh in this reply, but you simply did not follow the instructions which have successfully guided many others in installing this contribution. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2005 Share Posted June 1, 2005 Sorry about the double post, board freaked out and by the time it recovered there were two postings and no ability edit or delete them :( Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2005 Share Posted June 1, 2005 Never mind I got it, just make shure you have a sale pending to turn the recover carts listing green. Thats kind of neat feature since you can tell who abanonded at checkout, especialy at the paypal site. Great work !!!!!!!! <{POST_SNAPBACK}> Thanks :D Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 2, 2005 Share Posted June 2, 2005 Everything seem fantastic except I am getting double attributes for every product that has attributes assigned to a product? Here is a capture of the output: <td class="dataTableContent" align="left" nowrap="nowrap" valign="top" width="13%">Coolsat 4000 Pro</td> <td class="dataTableContent" colspan="2" align="left" valign="top" width="55%"><a href="http://www.dvbhardware.com/admin/categories.php?action=new_product_preview&read=only&pID=52%7B6%7D12&origin=recover_cart_sales.php?page="><b>Coolsat 4000 Pro</b></a> <br><small><i> - Color Black</i></small><br><small><i> - Color Black</i></small><br> </td> <td class="dataTableContent" align="center" nowrap="nowrap" valign="top" width="5%">1</td> <td class="dataTableContent" align="right" nowrap="nowrap" valign="top" width="5%">$149.99</td> <td class="dataTableContent" align="right" nowrap="nowrap" valign="top" width="10%">$149.99</td> Hope this helps to figure out Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2005 Share Posted June 2, 2005 Everything seem fantastic except I am getting double attributes for every product that has attributes assigned to a product? Here is a capture of the output: <td class="dataTableContent" align="left" nowrap="nowrap" valign="top" width="13%">Coolsat 4000 Pro</td> <td class="dataTableContent" colspan="2" align="left" valign="top" width="55%"><a href="http://www.dvbhardware.com/admin/categories.php?action=new_product_preview&read=only&pID=52%7B6%7D12&origin=recover_cart_sales.php?page="><b>Coolsat 4000 Pro</b></a> <br><small><i> - Color Black</i></small><br><small><i> - Color Black</i></small><br> </td> <td class="dataTableContent" align="center" nowrap="nowrap" valign="top" width="5%">1</td> <td class="dataTableContent" align="right" nowrap="nowrap" valign="top" width="5%">$149.99</td> <td class="dataTableContent" align="right" nowrap="nowrap" valign="top" width="10%">$149.99</td> Hope this helps to figure out <{POST_SNAPBACK}> I don't follow... what you posted isn't output I'd expect. (ie, I would not expect raw HTML to display). I kinda see what might be double stuff in that, but can you post a screen capture? I do not have any products with Attributes, so it will be hard for me to test, but I'll see what I can do. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2005 Share Posted June 2, 2005 I got it workin and now I get this Fatal error: Call to undefined function: tep_get_products_special_price() in /home/prisonpa/public_html/packstore/admin/recover_cart_sales.php on line 461 Line 461 reads as follows // Check to see if the product is on special, and if so use that pricing $sprice = tep_get_products_special_price( $inrec['pid'] ); if( $sprice < 1 ) $sprice = $inrec2['price']; Any help would be appreciated Quote Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2005 Share Posted June 2, 2005 I got it workin and now I get this Fatal error: Call to undefined function: tep_get_products_special_price() in /home/prisonpa/public_html/packstore/admin/recover_cart_sales.php on line 461 Line 461 reads as follows // Check to see if the product is on special, and if so use that pricing $sprice = tep_get_products_special_price( $inrec['pid'] ); if( $sprice < 1 ) $sprice = $inrec2['price']; Any help would be appreciated <{POST_SNAPBACK}> When installing a contribution, it usually helps to follow all the installation instructions. :blush: Your error is due to not following Step 9 in the install guide, which says Open catalog/includes/functions/general.php and find the function: tep_get_products_special_price Copy this function and paste it into catalog/admin/includes/functions/general.php after the function tep_set_specials_status. It actually give much more detail than that, including giving examples of what the code might look like. You are copying this (vs. updating from something included in this contribution) because many stores have modified this function for things like Pricing Per Customer or Group Pricing or so forth. Therefore you need to use your existing code. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2005 Share Posted June 2, 2005 Hey guys, In looking at the display setup; it occurred to me that the green and blue colors really should be swapped. I think this because "green" typically means go, and seems like a better choice for the "should be safe to contact" entries. Especially since the "Already contacted" entries (ie, not safe to contact) are red. Thoughts? Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 2, 2005 Share Posted June 2, 2005 Sounds good to me, makes more sense. Did you get the screen capture I sent to you that you needed ? Jimmy Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2005 Share Posted June 2, 2005 Sounds good to me, makes more sense. Did you get the screen capture I sent to you that you needed ? Jimmy <{POST_SNAPBACK}> I did, and I see what you are talking about. However, the code to display attributes is very simple; first it selects the attributes and then it displays them with: while ($attribrecs = tep_db_fetch_array($attribquery)) $prodAttribs .= '<small><i> - ' . $attribrecs['poname'] . ' ' . $attribrecs['povname'] . '</i></small><br>'; So, either the attribute SQL selection criteria is incorrect or you have duplicate attributes in your TABLE_CUSTOMERS_BASKET_ATTRIBUTES DB table. I suspect the latter. Can you look at that table in myphpadmin or similar? Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 2, 2005 Share Posted June 2, 2005 I have 2 different customers with attributes for color, it shows 1 entry for each in the table. If if it was TABLE_CUSTOMERS_BASKET_ATTRIBUTES then I would think it would be double in the basket. I am still looking. Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
DVBHardware Posted June 2, 2005 Share Posted June 2, 2005 I dowloaded a backup to my local machine, same thing, but I deleted all the abandonded carts, loged in added items to cart then logged out. The recover cart shows the correct attribute's as a single now. go figure that one ?? I will clear up all the abandoned carts on the main server and see how it goes. Jimmy www.dvbhardware.com Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2005 Share Posted June 2, 2005 I have 2 different customers with attributes for color, it shows 1 entry for each in the table. If if it was TABLE_CUSTOMERS_BASKET_ATTRIBUTES then I would think it would be double in the basket. I am still looking. <{POST_SNAPBACK}> That is the table used; the query is: $attribquery = tep_db_query("select cba.products_id pid, po.products_options_name poname, pov.products_options_values_name povname from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " cba, " . TABLE_PRODUCTS_OPTIONS . " po, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_LANGUAGES . " l where cba.products_id ='" . $inrec['pid'] . "' and po.products_options_id = cba.products_options_id and pov.products_options_values_id = cba.products_options_value_id and po.language_id = $languages_id and pov.language_id = $languages_id "); And I think I see the problem... the query is not limiting it's search to a single customer. Hmm....that table does have a customer id, so if we add cba.customers_id = " . $curcus . " and to the mix it should fix it. Hmmm... and we should fix the use of $languages_id as well. Here is the new query I think will fix this: $attribquery = tep_db_query("select cba.products_id pid, po.products_options_name poname, pov.products_options_values_name povname from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " cba, " . TABLE_PRODUCTS_OPTIONS . " po, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_LANGUAGES . " l where cba.products_id ='" . $inrec['pid'] . "' and cba.customers_id = " . $curcus . " and po.products_options_id = cba.products_options_id and pov.products_options_values_id = cba.products_options_value_id and po.language_id = " . (int)$languages_id . " and pov.language_id = " . (int)$languages_id ); I have not check this, so make a backup of your current recover_carts.php file before replacing this query (or just comment the current one out) :) Let me know if this fixes it, if it does I'll update the distribution. Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 2, 2005 Share Posted June 2, 2005 (edited) I saved you update offline, I am going to see if I get doubles again once the recover carts starts filling up, should be 24 hours. I just remembered my previous db on the local machine one customer showed triple attributes, mabe if I had 4 customers with the same it would show quad attributes. Edited June 2, 2005 by RI Downlink Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
DVBHardware Posted June 2, 2005 Share Posted June 2, 2005 Ok I recieved a few abandoned carts, 3 customers, 1 attribute each which were the same, and gave me triples in recover carts. I added your fix above and all the attributes showed normal as it should be. Thanks, Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
DVBHardware Posted June 2, 2005 Share Posted June 2, 2005 A little food for thought, I noticed that now all uncontacted are checked off ready to send an email. I have to now uncheck them since some I want to send a bulk email and some I would like to add additional message. So accidently hitting the send when booting up the recover carts will send them all out when you realy want to modify a couple, especialy when they are not visible due to the amount of listings to show. :) Lane thanks for the attribute fix. Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 A little food for thought, I noticed that now all uncontacted are checked off ready to send an email. I have to now uncheck them since some I want to send a bulk email and some I would like to add additional message. So accidently hitting the send when booting up the recover carts will send them all out when you realy want to modify a couple, especialy when they are not visible due to the amount of listings to show.I was afraid of that ... in 2.1 I will add in a configuration option to change the default behavior for checking uncontacted entries.:) Lane thanks for the attribute fix. <{POST_SNAPBACK}> Glad to hear it worked, this is already integrated into my 2.1 codebase which I will get up asap. Thanks for the excellent reporting and testing, it made it easy to track down and fix. Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 3, 2005 Share Posted June 3, 2005 Here is somthing down the road, to be able to send a coupon "jpeg" or etc. in the email. Just to add a checkbox next to the uncontacted to select if you want to send one along. Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 Here is somthing down the road, to be able to send a coupon "jpeg" or etc. in the email. Just to add a checkbox next to the uncontacted to select if you want to send one along. <{POST_SNAPBACK}> Why a jpeg? Why not just send a coupon code? Keep in mind that the emails sent...actually, I don't know about this... is there any case in which the emails sent are pure HTML? I know that I have an option to use some HTML in creating links, but as far as I know the emails are still plain text. Like many people, I do not accept HTML emails (they get deleted automatically), and my spam filters label anything with an attachment (like a jpeg) if it's not from someone in my address book. That said, I am not totally opposed to this if I can be convinced it has value. Hmmm... and actually, you know, if your config causes real HTML emails to be sent then to include a jpeg image in that email all you would need to do is paste an <img> tag into the PS box. I think.... :) Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 3, 2005 Share Posted June 3, 2005 I used a jpeg as an example, actualy anthing to intise someone to return that may otherwise be lost for a long time. Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2005 Share Posted June 3, 2005 I used a jpeg as an example, actualy anthing to intise someone to return that may otherwise be lost for a long time. <{POST_SNAPBACK}> Any reason you can not use something like this in the PS text field? <img src="http://www.ifd.com/banner2.gif" border="0" align="center"> which would display the image in an HTML email. Heck, you could even do something like this? <a href="https://www.ifd.com"><img src="http://www.ifd.com/banner2.gif" border="0" align="center"></a> This should display an image that can be clicked on (you could even have it go to your banner page to track where these come from (you'd need to make a special banner in a group that otherwise is not called up, pretty simple really). Speaking of banners, I am using a similar technique there, where I a. fixed the banner manager to work and b. improved it so that I could have the text portion be anything and the URL would wrap it in an href. Mostly I use this to put in <img> tags to outside images. PS: I like the way your site looks, very custom and clean. Quote Link to comment Share on other sites More sharing options...
Vitamate Posted June 7, 2005 Share Posted June 7, 2005 I have been trying to install this great contr into my site - until now without succes. The problem lies in the admin general.php where I am supposed to copy/paste a section of the code from catalog general.php. I also have B2B total installed (among many others) and it seems to make problems. [/code] // Sets the status of a product on special function tep_set_specials_status($specials_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_SPECIALS . " set status = '1', expires_date = NULL, date_status_change = NULL where specials_id = '" . (int)$specials_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_SPECIALS . " set status = '0', date_status_change = now() where specials_id = '" . (int)$specials_id . "'"); } else { return -1; } } . . . // Return a product's name // TABLES: products function tep_get_products_name($product_id, $language = '') { global $languages_id; if (empty($language)) $language = $languages_id; $product_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language . "'"); $product = tep_db_fetch_array($product_query); return $product['products_name']; } //// // Return a product's special price (returns nothing if there is no offer) // TABLES: products //TotalB2B start function tep_get_customers_groups_id() { global $customer_id; $customers_groups_query = tep_db_query("select customers_groups_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customers_groups_id = tep_db_fetch_array($customers_groups_query); return $customers_groups_id['customers_groups_id']; } function tep_get_products_special_price($product_id) { global $customer_id; $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status = '1' and customers_id = '" . $customer_id . "' and customers_groups_id = '0'"); if (!tep_db_num_rows($product_query)) { $customer_groups_id = tep_get_customers_groups_id(); $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status = '1' and customers_groups_id = '" . $customer_groups_id . "' and customers_id = '0'"); if (!tep_db_num_rows($product_query)) { $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status = '1' and customers_groups_id = '0' and customers_id = '0'"); } } $product = tep_db_fetch_array($product_query); return $product['specials_new_products_price']; } //TotalB2B end //// . . . // Sets timeout for the current script. // Cant be used in safe mode. When I try to go into the admin part, I get the following error: Fatal error: Cannot redeclare tep_get_products_name() (previously declared in /var/www/html/admin/includes/functions/general.php:590) in /var/www/html/admin/includes/functions/general.php on line 845 As I am not a coder, I hope somebody out there can help me. All inputs are appreciated :D Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 7, 2005 Share Posted June 7, 2005 Lane, Just a reminder to uncheck by default "Uncontacted", it is getting to be somwhat of a hassel. Also include the attribute fix. Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.