Jump to content

sirkyle

Members
  • Content count

    116
  • Joined

  • Last visited

  1. Solved myself. Posting the solution if someone else looks for it (or I need to find it again) Found this line while ($customers = tep_db_fetch_array($customers_query)) { $info_query = tep_db_query("select customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customers['customers_id'] . "'"); $info = tep_db_fetch_array($info_query); and below it added //BOF: Add Orders to table $order_count_query = tep_db_query("select count(*) as number_of_orders from " . TABLE_ORDERS . " where customers_id = '" . (int)$customers['customers_id'] . "'"); $order_count = tep_db_fetch_array($order_count_query); $info = array_merge($info, $order_count); //EOF: Add Orders to Table then added to the table list the call to the array <td class="dataTableContent" align="center"><?php echo ($info['number_of_orders']); ?></td>
  2. I have installed the Customer List Improved mod and like it very much. It would help me if I could also view # of orders in the list and even sort by most ordered. The query I am working with is: $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_telephone, c.customers_dob, ci.customers_info_date_of_last_logon as last_logon, ci.customers_info_number_of_logons as num_logons, ci.customers_info_date_account_created as date_account_created, a.entry_city as city, a.entry_state as state_alt, z.zone_name as state, ctry.countries_iso_code_2 as country,c.customers_newsletter, a.entry_country_id, c.member_flag from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join " . TABLE_CUSTOMERS_INFO . " ci on c.customers_id = ci.customers_info_id left join " . TABLE_COUNTRIES . " ctry on a.entry_country_id = ctry.countries_id left join " . TABLE_ZONES . " z on a.entry_zone_id = z.zone_id " . $search . " order by " . $db_orderby . " " . $sort; I'm guessing I would have to do something like left join" . TABLE_ORDERS . " o on c.customer_id = o.customer_id" . ...and at that point I'm not really sure how to issue a count of numbers in o.order_id If someone could push me in the right direction or give me a field where the customers orders are already counted (summed) that would be great. Thank you.
  3. sirkyle

    Wishlist 3.0 Support Thread

    Ummm.... Nevermind. Had another piece of code that broke the wishlist.php.
  4. sirkyle

    Wishlist 3.0 Support Thread

    I would love a kick in the right direction. When I am a guest and I do anything that interacts with the wishlist.php file, I get redirected to login. If I add something to the wishlist it shows as added in the infobox, but I am still directed to the login page. Once logged in, the wishlist is transferred correctly and then all funcitons work as advertised, so far as I can tell. What makes this tough is I am using the Basic Template System, so the default wishlist.php and wishlist_public.php have to be modified to meet this system. If anyone has had experience with this let me know. Other than my stupid issue, the mod is fantastic.
  5. sirkyle

    Master Products - MS2

    Nevermind..... As usual, once I post a request I figure it out. I'll explain for those who run into this problem as well. I am using a seperate pricing per customer mod that places a variable $x in the array for $listing, so to call a products_id it is $listing[$x][products_id]. I included the variable [$x] in the links that were built, but not into the if statement. Once that was done, the buy now button works as advertised. Happy now.
  6. sirkyle

    Master Products - MS2

    ** Buy Now button not working properly I have added Master Products to my already customized store and the buy now button is not working as it should (and as it has on past builds). The only buy now link that works properly is the buy now on slave products. The master products and the regular products do not work. The link they provide is: http://mystore/product_info.php?cPath=10_2...p;products_id=0 I think I have isolated the issue to this piece of code in included/modules/product_listing.php //Master Products if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') { $lc_text = ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } elseif ($listing['products_master'] != '0') { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } //Master Products EOF If i change the if statement to show if ($listing['products_master_status'] != '1' && $listing['products_master'] == "" ){ then the buy now is available on all products including the slave and master. I have also stepped through the rest of my code and I can't see where I'm missing anything. I have seperate price and bts installed and am working with MP 1.15 I have verified the data in my database shows that products_master_status = 0 and the products_master = 0, neither have a null value, but the products appear to step past the first result in the if statement and proceede to the second result. If anyone has run across this problem, please let me know. Thank You!
  7. Chris, I don't suppose you've done anything with that contrib yet?
  8. sirkyle

    Master Products - MS2

    Any word on the single slave for multiple masters update?
  9. sirkyle

    [Contribution] Multi Pickup

    This mod actually works great for my needs. I created a page to display the different pickup locations dynamically and link to a yahoo map for the location. At this time it is a crude looking hack for a cart I'm working on. Its MS2 with BTS and some other mods, so you may need to modify it to fit for you. The map feature works for US only. To change for your location visit yahoomaps. <table> <?php $sql = "select s.*, a.*, z.* from stores s, address_book a, zones z where s.address_book_id = a.address_book_id and a.customers_id = 0 and z.zone_id = a.entry_zone_id"; $qstores = tep_db_query($sql); while ($store = tep_db_fetch_array($qstores)) { $company = $store['entry_company']; $street = $store['entry_street_address']; $city = $store['entry_city']; $state = $store['zone_name']; $zip = $store['entry_postcode']; $map = "http://us.rd.yahoo.com/maps/us/insert/Tmap/extmap/*-http://maps.yahoo.com/maps_result?addr=" . urlencode($street) . "&csz=" . urlencode($city) . "," . urlencode($state) . "%20" . urlencode($zip); echo "<tr>"; echo "<td class=\"boldmain\">" . $company . "</td>"; echo "</tr><tr>"; echo "<td class=\"main\">" . $street . "</td>"; echo "<td class=\"main\">" . $city . "</td>"; echo "<td class=\"main\">" . $state . "</td>"; echo "<td class=\"main\">" . $zip . "</td>"; echo "<td class=\"main\"><a href=". $map . " target=\"_blank\">Map it</a></td>"; echo "</tr>"; } ?> </table>
  10. Ok, just poking around in admin/categories.php and found this code: tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); Can't you just yank the code for tep_get_category_tree() and use that?
  11. Yan Totally agree! I'm wondering if you can clip the code for the category drop down in admin/categories. I really haven't had time to look at it, but there must be some way of pulling the querry to show if it is a subcategory and if so, what it is under.
  12. Marg and Shawn, Great work on the product_model - product_name correction. This helps out a ton! Any idea of how to include a search option for selecting products by model number? With most of my phone orders, the customer will just start reading off the model number and I'm not quite good enough with all my products to know exactly what category it is in.
  13. sirkyle

    NEW! Complete Order Editing Tool!

    I would like to change how the products are selected. I want to show the model number and sort based on that number. Could someone point me in the right direction on this.
  14. sirkyle

    NEW! Complete Order Editing Tool!

    perhaps I'm the only one with this issue, but my 'notify customer' and 'comments' fields will only update if I change the status at the same time. In my shop however, I would like to be able to add comments with the status set as pending. Any suggestions?
  15. I'm looking to something similar to this. I would like to send an email to customers 7 days after they place an order to see if everything went well. Any idea on a way to modify this contrib to do that, or know of another contrib that would work?
×