Jump to content

apodigm

Members
  • Content count

    73
  • Joined

  • Last visited

2 Followers

Profile Information

  1. apodigm

    Anyone using ThumbAds contribution?

    you could modify the SQL query to hard code a category id, or you could change it to use a category id that you specify in the configuration area. in catalog/includes/modules/thumbads.php around line 42: $sqlstring = "select products_id, products_image, products_price, products_tax_class_id from " . TABLE_PRODUCTS . " where products_price<'" . THUMBADS_MAX_PRICE . "' and products_price>'" . THUMBADS_MIN_PRICE . "' and products_status='1'"; change this sql query to match your desired category id.... something like this: define('THUMBADS_DESIRED_CATEGORY_ID',1); $sqlstring = "select p.products_id, p.products_image, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_price<'" . THUMBADS_MAX_PRICE . "' and p.products_price>'" . THUMBADS_MIN_PRICE . "' and p.products_status='1' and pc.products_id = p.products_id and pc.categories_id = '" . THUMBADS_DESIRED_CATEGORY_ID . "'"; If you want to make the selected category ID dynamic (instead of hard coded), you will need to remove the constant define statement and instead make the THUMBADS_DESIRED_CATEGORY_ID a configuration key.
  2. apodigm

    Ebay auction manager for OSCOMMERCE

    Has anyone looked at AuctionWorks.com? They have a backend interface that is very slick that allows customers to manage thier product inventory, catalog, auction listings, results, etc. I'm wondering if it might be possible to build the osC store to pull data directly from that product database. The main problem we are facing is that a store owner would conceivable have to manage inventory/product using the osCommerce web interface in addition to the eBay product listings. They are currently using Seller's Assistant Pro to manage the eBay listings but we are trying to combine them into a single product listing interface. It looks like if we make osCommerce be the master database for the storefront as well as for the eBay listings, then we would need to have the eBay developer kit and pay for API calls. The other option we are looking at is something like AuctionWorks where the customer could manage eBay product listings on the web interfaced product database. We only need to figure a way to build the storefront to use the AuctionWorks database. I think they have some options for that as well, but the osCommerce system seems to be much more flexible and provides some better reporting/CRM tools. Any ideas?
  3. apodigm

    Anyone using ThumbAds contribution?

    I believe this is a setting defined in the admin console Configuration Settings -> My Store -> Display prices with taxes set it to true if you want the price displayed with the total amount after taxes. This will be misleading sometimes. I've noticed that if a customer is not logged in, the system will assume that they are located in your home state (or zone) and apply taxes in that way. Once they create an account and specify a different location, it is very possible that thier total amount will change depending on the tax rules you specify for other locations.
  4. apodigm

    Anyone using ThumbAds contribution?

    Also... for some more examples of the ThumbAds and ThumbBox mods... check here: http://www.hipoparts.com/ The area called "Some Hot Items" is the thumbAds (which uses a "module" insert) and the area called "Quick Suggestions" uses the thumbBox. I originally intended the thumbBox to take up the space in the top left column area, but we replaced that with a featured_item box instead. I have changed so much of my osCommerce code that I have a hard time remembering what is standard and what I have added, but I've tried to make a few contributions (like ThumbAds and menuBar) of the stuff that most people ask about. JG
  5. apodigm

    Anyone using ThumbAds contribution?

    Jen, BTW... your site looks nice. I noticed that very often your thumbads don't have pictures associated. There are two ways you might correct this... Change the sql query to only return products that have pictures associated... $sqlstring = "select products_id, products_image, products_price, products_tax_class_id from " . TABLE_PRODUCTS . " where products_price<'" . THUMBADS_MAX_PRICE . "' and products_price>'" . THUMBADS_MIN_PRICE . "' and products_image<>'' and products_status='1'"; or you can do something a little more flexible that I did on my website. Basically, I replaced the code that pulled the tep_image with a custom function that would return the manufacturer image if the product image was not available. I don't know if this would help in your case, but you might want to consider using this to return a default generic picture... in includes/modules/thumbads.php (on my website), I have changed the code to look more like this: $image_text = tep_get_product_image($random_product['products_id'],$random_product['products_image'],$random_product['products_name'],SMALL_IMAGE_WIDTH * THUMBADS_SCALE, SMALL_IMAGE_HEIGHT * THUMBADS_SCALE); $tempstring = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $image_text . '</a>'; if you compare, you will see that I changed the code to remove the call to tep_image and replaced it with my own custom function 'tep_get_product_image' (which I added to the includes/functions/html_output.php file): //added JG Apodigm 3/16/03 function tep_get_product_image($pid,$img,$txt,$img_width,$img_height){ if ($img != ''){ $res = tep_image(DIR_WS_IMAGES . $img, $txt, $img_width, $img_height); } else { $manufacturer_img_query = tep_db_query("select m.manufacturers_image from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p where p.products_id = '" . $pid . "' and p.manufacturers_id = m.manufacturers_id"); if (tep_db_num_rows($manufacturer_img_query)) { $manufacturer = tep_db_fetch_array($manufacturer_img_query); $res = tep_image(DIR_WS_IMAGES . $manufacturer['manufacturers_image'], $txt, $img_width); } } return $res; }
  6. apodigm

    Anyone using ThumbAds contribution?

    sorry... I didn't know there was anyone using this mod... l'm using the standard boxes class that is part of osc. If you want to force the size of your columns, try something like this.... in includes/modules/thumbads.php find this line: 'params' => 'class="smallText" valign="top"', and replace it with this: 'params' => 'width="33%" class="smallText" valign="top"', This will pass your 33% width to the cell when the table is generated in boxes.php (or thema_boxes.php if you are using the Thema Packs mod). Of course, this assumes that you are using 3 columns. If you want to make it more generic, you could try this: 'params' => 'width="' . 100/THUMBADS_NUM_COLS .'%" class="smallText" valign="top"', Good luck!
  7. apodigm

    Ebay auction manager for OSCOMMERCE

    Smitty/Dave, Please start a new thread to discuss your topics. Forum, Is there anyone that is interested in working with the eBay SDK to develop this tool? The add listing and relist API calls are free. However, the ebay developer website was a little vague about whether you still needed to pay the minumum $1000 annual "Bronze" API Developer fee. .... and if there are any API calls that are not specifically the "add listing" - such as logging in and downloading categories, those are still charged. It occurs to me that if we did develop this code it would be necessary to charge some sort of usage or licensing fee to at least recover the eBay fees. I'm definitely a proponent of open source GPL software, but unless we can get eBay to open the doors a little bit, we may have a problem. It would be interesting if anyone has already registered as an API developer what sort of unique code do they use to record the source of each API call. Perhaps it is possible to avoid the eBay API altogether and just find another way to automate ebay listings (possibly from HTTP parsing and end-user emulation). If I understand the problem correctly, we are trying to make it so that a store owner could enter product into osCommerce for sale on their osc website. And if they want to list the same product in eBay it would be duplicating work to enter the product into ebay listing (or Seller's assistant pro). Perhaps, we could solve this problem easier if we could dump data directly into one of the eBay approved listing programs already available. I would be curiuos to take a poll in this forum to see what the most common listing software being used today. We use Seller's Assistant Pro, but I understand that it may be easier/cheaper to use one of the others.... JG
  8. Here are my instructions to implement the file logging or email for failed login attempts.... *****Run SQL script to add the options in configuration: INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Store Admin Login Errors', 'STORE_ADMIN_LOGIN_ERROR', 'false', 'Store the results of admin login errors', '10', '6', 'tep_cfg_select_option(array('true', 'false'), ', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Admin Login Errors Log Destination', 'STORE_ADMIN_LOGIN_LOG', '/var/log/www/tep/http_error.log', 'Directory and filename of the admin login error log', '10', '7', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Email Admin Login Errors', 'EMAIL_ADMIN_LOGIN_ERROR', 'false', 'Email Admin Login Error Report to Store Owner.', '12', '6', 'tep_cfg_select_option(array('true', 'false'), ', now()); ****************************************************************************** ***Add the following code to admin/login.php: below: require('includes/application_top.php'); function tep_admin_error_record($att_email='', $att_pass=''){ // Send the Email to Store Owner if (EMAIL_ADMIN_LOGIN_ERROR == 'true') { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_FAIL_TEXT_SUBJECT, sprintf(EMAIL_FAIL_BODY, date("m/d/Y G:i:s"), getenv('REMOTE_ADDR'), getenv('HTTP_USER_AGENT'), getenv('HTTP_REFERER'),$att_email, $att_pass ), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, ''); } // Save the Error Report to disk if (STORE_ADMIN_LOGIN_ERROR == 'true') { error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ',' . getenv('REMOTE_ADDR') . ',' . getenv('HTTP_USER_AGENT') . ',' . getenv('HTTP_REFERER') . ',' . $att_email . ',' .$att_pass . "n", 3, STORE_ADMIN_LOGIN_LOG); } } ***Then add this line in the two places where the login fails: add below: $HTTP_GET_VARS['login'] = 'fail'; tep_admin_error_record($email_address,$password); ****************************************************************************** ***Add the following lines to admin/includes/languages/english/login.php: define('EMAIL_FAIL_TEXT_SUBJECT','Login Fail Attempt'); define('EMAIL_FAIL_BODY', '------------------------------------------------------' . "n" . 'Date/Time: %s.' . "n" . 'Remote IP Address: %s' . "n" . 'User Agent: %s' . "n" . 'Referer: %s' . "n" . 'Attempted Email Address: %s' . "n" . 'Attempted Password: %s' . "n" . '------------------------------------------------------'); ****************************************************************************** ***Then you will need to update your configuration. The option to email on failed attempts will be in the Admin console under configuration in the "Email" group. The option to store the failed attempts in a logfile is found in the Admin console under configuration in the "Logging" group. Emails and logfile will include the date/time, IP address, browser, page referrer, attempted email address, attempted password. It is set to send the email store owner as defined in the configuration settings. However, for additional security, it may be wise to hardcode that setting to a special security email address. enjoy!
  9. apodigm

    [Contribution] Custom HTTP Error Pages

    wheh! I thought I would never figure this out.... It turns out that the http_error.php script was running exactly as it should when a file is not found. The 404 error described was pretty good too. It actually took me using a packet sniffer on my lan to troubleshoot this and see what the HTTP packets were doing.... Here's why I wasn't seeing the error.... I had modified my stylesheet to specify a background graphic... while this is not normally a problem, since I am using thema stylesheets, the stylesheet is not in the same root folder as my catalog.... so when my web browser was processing the stylesheet for "body" it was looking for the graphic: www.hipoparts.com/includes/classes/thema/1/images/flagbk.gif instead of: www.hipoparts.com/images/flagbk.gif I wasn't seeing the lack of the image, because I had also declared the "body" style in the header.php file. As soon as I removed the graphic file reference from my stylesheet, the errors stopped. Anyway... probably a long explanation for such a silly mistake, but I figured I would document my experience in case anyone else is using http_error and thema stylesheets.
  10. I thought about this feature to record bad login attempts. I had created a column in the database table and I wrote some code to increment it if the email address was correct but not the password. The problem is that I was resetting it as soon as the user properly logged in, so although I was capturing what might be useful data, it was reset before the administrator got a chance to view it. And then I started wondering how I would capture information when a hacker attempted to log in and didn't get the email address correct. So I abandoned the lock-down policy and records in the db. However, my solution to tracking this is to create a logfile that can record failed attempts. This can record the IP address, date, time, etc of any failed attempts. I'm borrowing from some code in the HTTP_Error contribution. I should have it ready in another day or two. JG
  11. This appears to work for me as well. I only have one concern... since you are specifying certain files which should not be checked, I wonder if we should let the administrator specify additional "non-check" files. I know in my website I have added several files from other contributions that shouldn't be checked. I have found that as long as I have those files associated with one of the side boxes (even if there is no link from that side box), it will get allowed. I'm just curious if there should be a way in the admin console to specify "allow/disallow" for these miscellaneous files. That may be something to add later.
  12. apodigm

    [Contribution] Custom HTTP Error Pages

    yep.... I'm pretty sure it is being generated using the language file. Attached is an example email:
  13. Has anyone already done a module or contribution that supports events? It seems like I saw an oscommerse site once that just put events in as products. However, I couldn't find even that site when I went back to look for it. Basically, I have an application that was originally written in ASP/Access that I want to migrate and mature into something more like osCommerce. (see www.weridesafe.com - click on register) It pulls available class dates from the database and keeps track of the current enrollments and confirmed (paid) enrollments. Each class date uses lookup tables to pull the associated class, location, instructor, and also has information to keep track of the available seats. Given that many businesses are going towards online training and travel-free web conferences/meetings, I think this might be useful to mature. I also want to make it a contribution where "members" or affiliates with limited admin rightes could create and manage events as well. After putting some thought into this, I believe it is a project that I will definitely undertake, but I was hoping that someone had already pulled the beginnings of the contribution together. Also, if anyone is interested in collaborating or testing, please let me know. JG
  14. apodigm

    Ebay auction manager for OSCOMMERCE

    I would suggest that we move this project to sourceforge to have a place to share files and forum. I definitely think that this needs to be an add-on to oscommerce, but if we create a new project we can collaborate there and then just submit the contrib on this site. I'm going to be working on another project to combine *nuke with Osc and phpBB2, and I believe that is probably more important to me right now. However, I would like to assist with the ebay API project. I guess we need to determine who is the most active and willing to manage an oscEbay mod and have that person begin the sourceforge project.
  15. apodigm

    [Contribution] Custom HTTP Error Pages

    I have been having some strange issues with this mod. I just recently upgraded to MS1 daily CVS so I'm not sure if there might be some new tweaks that are causing a problem. Basically, I can go my website and surf it completely fine. (In other words, I do not get any HTTP_Error pages. However, I get a ton of emails that appear to be generated from the http_error page. It is almost as if the http_error.php file is getting run through the scripting engine by accident anytime any customer views a normal page. Has anyone else had this problem? Here's my htacces file in case it helps: # $Id: .htaccess,v 1.1 2002/07/21 23:41:41 hpdl Exp $ # # This is used with Apache WebServers # # The following makes adjustments to the SSL protocol for Internet # Explorer browsers # # For this to work, you must include the parameter 'Limit' to the # AllowOverride configuration # # Example: # #<Directory "/usr/local/apache/htdocs"> # AllowOverride Limit #</Directory> # # 'All' with also work. (This configuration is in your # apache/conf/httpd.conf file) <IfModule mod_setenvif.c> <IfDefine SSL> SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 </IfDefine> </IfModule> # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName www.hipoparts.com AuthUserFile /www/hipoparts/_vti_pvt/service.pwd AuthGroupFile /www/hipoparts/_vti_pvt/service.grp ErrorDocument 400 http://www.hipoparts.com/http_error.php?error_id=400 ErrorDocument 401 http://www.hipoparts.com/http_error.php?error_id=401 ErrorDocument 403 http://www.hipoparts.com/http_error.php?error_id=403 ErrorDocument 404 http://www.hipoparts.com/http_error.php?error_id=404 ErrorDocument 405 http://www.hipoparts.com/http_error.php?error_id=405 ErrorDocument 408 http://www.hipoparts.com/http_error.php?error_id=408 ErrorDocument 415 http://www.hipoparts.com/http_error.php?error_id=415 ErrorDocument 500 http://www.hipoparts.com/http_error.php?error_id=500 ErrorDocument 501 http://www.hipoparts.com/http_error.php?error_id=501 ErrorDocument 502 http://www.hipoparts.com/http_error.php?error_id=502 ErrorDocument 503 http://www.hipoparts.com/http_error.php?error_id=503 ErrorDocument 505 http://www.hipoparts.com/http_error.php?error_id=505 ErrorDocument 504 http://www.hipoparts.com/http_error.php?error_id=504 Anyone have any ideas?
×