Jump to content

iiinetworks

Members
  • Content count

    3,685
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by iiinetworks

  1. I am releasing a file uploading contribution. This will be the support thread for the contribution. More details will follow after I finish uploading to the contribution area. Thanks, Matt
  2. STS's primary target is allowing you to reskin the store with one HTML file. If you are good with HTML but not PHP, it might be the contribution for you. BTS is good if you understand PHP and want to make changes to the whole store by changing one file. BTS is more intrusive (replaces all the catalog files), but it is also more flexible. Both contributions conflict with other contributions. STS because it has trouble mixing the outputs, and BTS because it makes so many changes that it can be hard to map where the other contribution wants to make changes to where they need to be made in the BTS files. If you are satisfied with the base 3 column layout, perhaps you would be better off just customizing the basic files. The most important places to make changes are includes/header.php, includes/footer.php, includes/column_left.php, includes/column_right.php, stylesheet.css, and includes/classes/boxes.php. Hth, Matt
  3. iiinetworks

    Product Attributes - Option Type Feature

    What Chandra told me when I asked was that the main problem was that the display can get messed up with more than 32 characters (not sure of the cut off; it's higher than 32, but I don't know how much higher). This would happen on the shopping cart and checkout confirmation pages. You can change the effective value by changing the appropriate field widths in customers_basket_attributes and orders_products_attributes. Both hold the option value as a varchar(32). You can change the 32 to be up to 255. If you need more than 255, you need to change to a text type. If you do encounter display problems, it might help to know that you can truncate a string with substr, e.g. define('MAX_OPTION_VALUE_LEN', '32'); $string = 'This string is longer than thirty-two characters'; echo ((strlen($string) > MAX_OPTION_VALUE_LEN) ? substr($string, 0, (MAX_OPTION_VALUE_LEN - 3)) . '...' : $string); which should display Hth, Matt
  4. iiinetworks

    Product Attributes - Option Type Feature

    This is most often caused by using an option value other than TEXT (which has an ID of 0 if you used the insert SQL while installing the contribution). It could also mean that your text value ID is not set properly in configure.php. Hth, Matt
  5. iiinetworks

    Option Type Feature v1.6 (for osc 2.2 MS2)

    Around line 214 of checkout_process.php, you should see a line that looks like $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . tep_decode_specialchars($order->products[$i]['attributes'][$j]['value']); This line is what includes each attribute. Hth, Matt
  6. iiinetworks

    YASU

    I don't remember what I had to do to get the product listing pages working. They are a pain. I'll look into adding some changes for the listing_split class and uploading a new version. You might have to rewrite the Back button code to point to tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', $cPath_array) or something like that ($cPath_array may not be the right name). Hth, Matt
  7. iiinetworks

    YASU

    To fix this, change the require('includes/application_top.php'); at the top of the index.php and product_info.php files to say require_once('includes/application_top.php'); Until you get the rewrite working, I would not make the includes/functions/html_output.php changes. The site should still work otherwise with just the mod_rewrite rules and rewrite.php installed. Changing require to require_once should not affect site functionality (when not using the rewrite). That way, you should be able to get both types of URLs ( www.romeysblades.com/knives/ and http://www.romeysblades.com/index.php/cPath/24 ) working simultaneously. Once you do that, you can make the html_output changes (which make osCommerce display with the new URLs). I find the regular SEF URLs goofy and would not use them. I see no advantages to writing product_info.php/products_id/24 rather than product_info.php?products_id=24. I don't think that they would hurt anything at this point though. Hth, Matt
  8. That worked out great! for my problem... Question is why would removing tep_ have any affect on the array? It doesn't. It does handle the fact that osCommerce dropped the tep_array_merge function in favor of providing their own definition of array_merge when available. There used to be a function tep_array_merge that said something along the lines of "if array_merge is defined, use it; otherwise, use this code that has the same effect." This was replaced by code that says "if array_merge is not defined, use this definition for it." At the same time, all references to tep_array_merge (in the core code) were replaced with array_merge. Hth, Matt
  9. iiinetworks

    YASU

    Does Options +FollowSymLinks RewriteEngine on RewriteRule admin - [L] RewriteCond %{REQUEST_URI} !-d RewriteCond %{REQUEST_URI} !^/$ RewriteRule !\.(gif|php|css|jpg)$ /rewrite.php work? Do you have a link to your site? When is it acting odd? Did you check to see if mod_rewrite works on your server by doing a simple rule like Options +FollowSymLinks RewriteEngine on RewriteRule /test.php /index.php You also might want to check if catalog is written into the code of rewrite.php anywhere. Hth, Matt
  10. iiinetworks

    Site Rep Program Contribution

    That's how an auto-increment field works. Once you go past a number, it won't go back unless you manually alter the table. If you do not want that behavior, remove the auto-increment and set the id to something like MAX(id)+1 manually. Hth, Matt
  11. iiinetworks

    Site Rep Program Contribution

    $sitereps_state = tep_db_prepare_input($HTTP_POST_VARS['sitereps_state']); tep_db_query("insert into " . TABLE_SITEREPS . " (sitereps_id, sitereps_name, sitereps_city, sitereps_state, sitereps_rank) values ('" . tep_db_input($sitereps_id) . "', '" . tep_db_input($sitereps_name) . "', '" . tep_db_input($sitereps_state) . "', '" . (int)$sitereps_rank . "')"); <td class="dataTableContent" align="center" width="15%"> <?php echo $sitereps['sitereps_state']; ?> </td> $contents[] = array('text' => '<br>' . TEXT_INFO_SITEREPS_STATE . '<br>' . tep_draw_pull_down_menu('sitereps_state', tep_get_sitereps_states())); It is hard to help when there is this much code. Particularly as it is spread over *six* threads. Part of the reason why I didn't post last night is that I started trying to read through the three threads that you PMed to me and just gave up. I think that I have distilled the relevant code from what you posted (for questions 1 and 2). I am missing at least one piece of code that would be relevant, the definition of function tep_get_sitereps_states. tep_draw_pull_down_menu expects to get passed a two dimensional array. The inner dimension is just a number representing position in the menu. The outer dimension is associative (i.e. keyed by a string), with keys of 'id' and 'text'. The 'text' is what appears in the menu; the 'id' is what the menu passes when you submit the form with that entry selected. In your case, you should be setting the 'text' to the state initials in your tep_get_sitereps_states function. I am guessing that your current function does not do it that way. Without seeing the function, this is the best that I can do with #1. As to #2, remember that the pull down menu passes the contents of the 'id' field when the page is submitted. As such, it is to be expected that what you put in the database (and therefore what appears when you read from the database) will be the id. You can change this behavior by adding a lookup to the states table to get the abbreviation. You can do this: before database insertion; when looking up data from the database; or by making the abbreviations the 'id' fields in the array. In regards to #3, I see many uses of tep_cfg_select_option in the oscommerce.sql, but none of tep_cfg_radio_field. I would try using tep_cfg_select_option instead (remainder of syntax would stay the same). My first guess on #4 is that it is the same problem as #2. What is tep_get_sitereps_ranks() returning? Hth, Matt
  12. iiinetworks

    Virtual Mall Contrib

    Searching the forums for tep_array_merge suggests that you are mixing an older contribution with newer core code...try deleting tep_ to make it array_merge instead. Hth, Matt
  13. iiinetworks

    Master Products - MS2

    The model number length is set in the database. You can adjust it from 1 to 255 characters as needed by altering the products table. Hth, Matt
  14. iiinetworks

    How can I do this?

    Look here for more discussion. I found that link by searching for "quantity product listing" Hth, Matt
  15. iiinetworks

    Automated Auction Process

    MS1 didn't have the upload class yet. Two possible fixes (neither of which I've tried, use at your own risk): 1. Copy the upload class from MS2 and include it manually in admin/auction_listings_admin.php 2. Replace the calls to the upload class with the equivalent code that MS1 used for image upload. I know of at least one person who is using the upload class with MS1 for the File Upload contribution, so I think that 1 would work. 2 would probably be a pain to implement. Hth, Matt
  16. iiinetworks

    Easypopulate not working

    Change the tempdir to /temp. The base changed to include catalog/. If you print your file path, it most likely has two catalog/s in it, i.e. /home/you/catalog/catalog/temp when it should be /home/you/catalog/temp (replace /home/you as appropriate). ASP? Your problem is that troubleshooting PHP is so much easier that you don't realise how simple it would be. Don't worry, you'll soon get the hang of it. I like to sprinkle some output around, so that I know to what variables are being set. Like I said in this case, it would probably show that the file path has too many catalogs. Hth, Matt
  17. iiinetworks

    Automated Auction Process

    If you have an older version of osCommerce (certainly MS1 and older, plus certain CVS versions between MS1 and MS2), then your includes/filenames.php (and database_tables.php) defines will be in includes/application_top.php. Not sure what other incompatibilities might exist. Note other than MS1, the earliest version I can find at the moment says define('PROJECT_VERSION', 'osCommerce 2.2-MS2-CVS'); This is a pre-MS2 version. I think that line you showed would be from a pre-MS1 version, i.e. from before MS1 was developed as an idea. There is no osCommerce 1.1. Until the 2.2 series, the name was The Exchange Project. I'm guessing he means MS1, which came out early this year (soon to be last year). Version 2.1 of The Exchange Project would be well over a year old now (two years?). Cheers, Matt
  18. The most reliable way to solve that kind of problem is to revert to a working backup and make the changes one section at a time, checking after each add. A parse error that goes past the end of file is usually an unmatched element, e.g. a <?php without a ?>, a { without a }, a beginning ' without an ending ', etc. Using an editor with syntax highlighting will usually catch quoting issues. The one that I use is called tsWebEditor (available free). I have also used vim (for *nix) and Dreamweaver for this. I think that at least one person on the forums recommends phpDev. Hth, Matt
  19. iiinetworks

    Gift Wrap

    You would set an attribute (or more) for each product. You can use the Attributes Copier (see mullet's link) to make this easier. Note: you may want to search the forums to see if you can find posts where people integrated both contributions previously. Hth, Matt
  20. iiinetworks

    Master Products - MS2

    Christian, look back at page 5 of this thread to add the master every time Add to Cart is pressed: http://forums.oscommerce.com/index.php?showtopic=67284&st=42 If you want to add the master only some of the time, I think that you would be better off defining two separate products: one to be the master; one to be a slave that could be added. Hth, Matt
  21. iiinetworks

    Any Contribution to create a custom order?

    You don't need the contribution. In phpMyAdmin, after creating the bookmark, just manually change the parent_id of that category to a category_id that does not exist. Now, you can only access that category via the bookmark. Hth, Matt
  22. iiinetworks

    Question about STS

    The link is wrong. The one that you want is http://www.campbundy.com/catalog/index.php which has an error at the moment. The link that you gave is direct to the template file. STS will incorporate your template file into its set itself. Viewing the template file direct (rather than through the PHP files) will always show the hooks as it is only a static file. Hth, Matt
  23. iiinetworks

    SEC & STS working together

    Chris, At the top of this page, there is a link that says Contributions. If you go there and click Add a New Contribution, it will allow you to upload the file. For various reasons, it is better to link there than to external sites (which is against forum rules). Hth, Matt
  24. iiinetworks

    Easy Populate - Serious help needed

    Look for the line where it sets the temp directory and change '/catalog/temp/' to '/temp/' or '/catalog/temp' to '/temp' (depending on what's on that line). Hth, Matt
  25. iiinetworks

    Master Products - MS2

    Uhmm...admin > Configuration > Slave Products > Display Slave Product Image? Or do you just want to modify the size of this image? To modify the size, change (around lines 150-7 of includes/modules/master_listing.php) case 'MASTER_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; to case 'MASTER_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SLAVE_IMAGE_WIDTH, SLAVE_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SLAVE_IMAGE_WIDTH, SLAVE_IMAGE_HEIGHT) . '</a> '; } break; and run the following SQL INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Slave Image Width', 'SLAVE_IMAGE_WIDTH', '100', 'The pixel width of images in the slave listings', '4', '0', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Slave Image Height', 'SLAVE_IMAGE_HEIGHT', '80', 'The pixel height of images in the slave listings', '4', '0', now()); Now the slave listing image size will be set separately in admin > Configuration > Images. Change sort order numbers as works for you. Hth, Matt
×