Jump to content

Czymborjeff@gmail.com

Members
  • Content count

    23
  • Joined

  • Last visited

2 Followers

Profile Information

  • Real Name
    Jeffrey
  • Gender
    Male

Recent Profile Visitors

2,572 profile views
  1. Czymborjeff@gmail.com

    multi-product copy

    it was a parse error all it did was say the line # and parse error
  2. Czymborjeff@gmail.com

    multi-product copy

    Okay so i paste this code on the bottom of catalog/admin/includes/functions/general.php and still get a parse error //// // Parse search string into indivual objects function tep_parse_search_string($search_str = '', &$objects) { $search_str = trim(strtolower($search_str)); // Break up $search_str on whitespace; quoted string will be reconstructed later $pieces = preg_split('/[[:space:]]+/', $search_str); $objects = array(); $tmpstring = ''; $flag = ''; for ($k=0; $k<count($pieces); $k++) { while (substr($pieces[$k], 0, 1) == '(') { $objects[] = '('; if (strlen($pieces[$k]) > 1) { $pieces[$k] = substr($pieces[$k], 1); } else { $pieces[$k] = ''; } } $post_objects = array(); while (substr($pieces[$k], -1) == ')') { $post_objects[] = ')'; if (strlen($pieces[$k]) > 1) { $pieces[$k] = substr($pieces[$k], 0, -1); } else { $pieces[$k] = ''; } } // Check individual words if ( (substr($pieces[$k], -1) != '"') && (substr($pieces[$k], 0, 1) != '"') ) { $objects[] = trim($pieces[$k]); for ($j=0; $j<count($post_objects); $j++) { $objects[] = $post_objects[$j]; } } else { /* This means that the $piece is either the beginning or the end of a string. So, we'll slurp up the $pieces and stick them together until we get to the end of the string or run out of pieces. */ // Add this word to the $tmpstring, starting the $tmpstring $tmpstring = trim(preg_replace('/"/', ' ', $pieces[$k])); // Check for one possible exception to the rule. That there is a single quoted word. if (substr($pieces[$k], -1 ) == '"') { // Turn the flag off for future iterations $flag = 'off'; $objects[] = trim(preg_replace('/"/', ' ', $pieces[$k])); for ($j=0; $j<count($post_objects); $j++) { $objects[] = $post_objects[$j]; } unset($tmpstring); // Stop looking for the end of the string and move onto the next word. continue; } // Otherwise, turn on the flag to indicate no quotes have been found attached to this word in the string. $flag = 'on'; // Move on to the next word $k++; // Keep reading until the end of the string as long as the $flag is on while ( ($flag == 'on') && ($k < count($pieces)) ) { while (substr($pieces[$k], -1) == ')') { $post_objects[] = ')'; if (strlen($pieces[$k]) > 1) { $pieces[$k] = substr($pieces[$k], 0, -1); } else { $pieces[$k] = ''; } } // If the word doesn't end in double quotes, append it to the $tmpstring. if (substr($pieces[$k], -1) != '"') { // Tack this word onto the current string entity $tmpstring .= ' ' . $pieces[$k]; // Move on to the next word $k++; continue; } else { /* If the $piece ends in double quotes, strip the double quotes, tack the $piece onto the tail of the string, push the $tmpstring onto the $haves, kill the $tmpstring, turn the $flag "off", and return. */ $tmpstring .= ' ' . trim(preg_replace('/"/', ' ', $pieces[$k])); // Push the $tmpstring onto the array of stuff to search for $objects[] = trim($tmpstring); for ($j=0; $j<count($post_objects); $j++) { $objects[] = $post_objects[$j]; } unset($tmpstring); // Turn off the flag to exit the loop $flag = 'off'; } } } } // add default logical operators if needed $temp = array(); for($i=0; $i<(count($objects)-1); $i++) { $temp[] = $objects[$i]; if ( ($objects[$i] != 'and') && ($objects[$i] != 'or') && ($objects[$i] != '(') && ($objects[$i+1] != 'and') && ($objects[$i+1] != 'or') && ($objects[$i+1] != ')') ) { $temp[] = ADVANCED_SEARCH_DEFAULT_OPERATOR; } }
  3. Czymborjeff@gmail.com

    multi-product copy

    http://addons.oscommerce.com/info/7297 Multi-Product Copy Utility v1.1 by Kevin L. Shelton 7/28/2010 This utility allows you to quickly copy multiple products to another category at one time. This copy is the same as "Link Product" using the "Copy To" button during category / product maintenance. This utility does not create duplicate products. Choose the destination category from the list and search for products to copy by keyword, category, manufacturer or price. You will be presented with a list of products matching your search terms. Products that are already linked to the destination category will not be listed. Look over the list and check the boxes for any product that should be copied; or uncheck the boxes of products that should not be copied if you had the utility automatically check the boxes for you. Click the Confirm button and all of the checked products will be now linked to the destination category (as well as any other categories they already appeared in) and a list of products copied will be displayed. Clicking the "Return To Catalog Entry" button after the copy is done will place you in the category you chose as the destination for the copy so you can check your work. Version 1.1 corrects the queries so that products that are not assigned to a manufacturer can be found. It also adds the ability to find products in the subcategories of the category being searched when searching by category. Instructions: First upload the new files to the indicated places. Now proceed with the files that need to be manually modified. 1) In catalog/admin/includes/filenames.php ADD the following lines somewhere before the closing ?> // Multi-Product Copy Utility define('FILENAME_MULTI_COPY', 'multi_product_copy.php'); 2) In catalog/admin/includes/languages/english.php ADD the following lines somewhere before the closing ?> // Multi-Product Copy Utility define('BOX_CATALOG_MUTLI_COPY', 'Multi-Item Copy'); 3) In catalog/admin/includes/boxes/catalog.php Find the line that reads as follows: array( 'code' => FILENAME_CATEGORIES, 'title' => BOX_CATALOG_CATEGORIES_PRODUCTS, 'link' => tep_href_link(FILENAME_CATEGORIES) ), and immediately below it add the following line: array( 'code' => FILENAME_MULTI_COPY, 'title' => BOX_CATALOG_MUTLI_COPY, 'link' => tep_href_link(FILENAME_MULTI_COPY) ), 4) Copy the tep_parse_search_string function definition in its entirety from catalog/includes/functions/general.php to catalog/admin/includes/functions/general.php. The function should run from line 598 to line 746 unless you have made modifications to functions that appear before it or added additional functions before it. Warning: If you have installed the Multiple Sales Per Product With Named Sales, the Unexpected Overwrite Protected Images with Unlimited Product Images, or the Price Adjusting Utility contributions then you have already performed this step. Don't do it twice or you will create a PHP duplicate function error. Save your changes and you are done.
  4. Czymborjeff@gmail.com

    multi-product copy

    okay so step 4 it tells me to copy the tep_parse_search_string function definition in its entirety from catalog/includes/functions/general.php to catalog/admin/includes/functions/general.php so i copy this to it: //// // Output a raw date string in the selected locale date format // $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS // NOTE: Includes a workaround for dates before 01/01/1970 that fail on windows servers function tep_date_short($raw_date) { if ( ($raw_date == '0000-00-00 00:00:00') || empty($raw_date) ) return false; $year = substr($raw_date, 0, 4); $month = (int)substr($raw_date, 5, 2); $day = (int)substr($raw_date, 8, 2); $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); if (@[member='date']('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) { return date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, $year)); } else { return preg_replace('/2037$/', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); } } //// // Parse search string into indivual objects function tep_parse_search_string($search_str = '', &$objects) { $search_str = trim(strtolower($search_str)); // Break up $search_str on whitespace; quoted string will be reconstructed later $pieces = preg_split('/[[:space:]]+/', $search_str); $objects = array(); $tmpstring = ''; $flag = ''; for ($k=0; $k<count($pieces); $k++) { while (substr($pieces[$k], 0, 1) == '(') { $objects[] = '('; if (strlen($pieces[$k]) > 1) { $pieces[$k] = substr($pieces[$k], 1); } else { $pieces[$k] = ''; } } $post_objects = array(); while (substr($pieces[$k], -1) == ')') { $post_objects[] = ')'; if (strlen($pieces[$k]) > 1) { $pieces[$k] = substr($pieces[$k], 0, -1); } else { $pieces[$k] = ''; } } // Check individual words if ( (substr($pieces[$k], -1) != '"') && (substr($pieces[$k], 0, 1) != '"') ) { $objects[] = trim($pieces[$k]); for ($j=0; $j<count($post_objects); $j++) { $objects[] = $post_objects[$j]; } } else { /* This means that the $piece is either the beginning or the end of a string. So, we'll slurp up the $pieces and stick them together until we get to the end of the string or run out of pieces. */ // Add this word to the $tmpstring, starting the $tmpstring $tmpstring = trim(preg_replace('/"/', ' ', $pieces[$k])); // Check for one possible exception to the rule. That there is a single quoted word. if (substr($pieces[$k], -1 ) == '"') { // Turn the flag off for future iterations $flag = 'off'; $objects[] = trim(preg_replace('/"/', ' ', $pieces[$k])); for ($j=0; $j<count($post_objects); $j++) { $objects[] = $post_objects[$j]; } unset($tmpstring); // Stop looking for the end of the string and move onto the next word. continue; } // Otherwise, turn on the flag to indicate no quotes have been found attached to this word in the string. $flag = 'on'; // Move on to the next word $k++; // Keep reading until the end of the string as long as the $flag is on while ( ($flag == 'on') && ($k < count($pieces)) ) { while (substr($pieces[$k], -1) == ')') { $post_objects[] = ')'; if (strlen($pieces[$k]) > 1) { $pieces[$k] = substr($pieces[$k], 0, -1); } else { $pieces[$k] = ''; } } // If the word doesn't end in double quotes, append it to the $tmpstring. if (substr($pieces[$k], -1) != '"') { // Tack this word onto the current string entity $tmpstring .= ' ' . $pieces[$k]; // Move on to the next word $k++; continue; } else { /* If the $piece ends in double quotes, strip the double quotes, tack the $piece onto the tail of the string, push the $tmpstring onto the $haves, kill the $tmpstring, turn the $flag "off", and return. */ $tmpstring .= ' ' . trim(preg_replace('/"/', ' ', $pieces[$k])); // Push the $tmpstring onto the array of stuff to search for $objects[] = trim($tmpstring); for ($j=0; $j<count($post_objects); $j++) { $objects[] = $post_objects[$j]; } unset($tmpstring); // Turn off the flag to exit the loop $flag = 'off'; } } } } // add default logical operators if needed $temp = array(); for($i=0; $i<(count($objects)-1); $i++) { $temp[] = $objects[$i]; if ( ($objects[$i] != 'and') && ($objects[$i] != 'or') && ($objects[$i] != '(') && ($objects[$i+1] != 'and') && ($objects[$i+1] != 'or') && ($objects[$i+1] != ')') ) { $temp[] = ADVANCED_SEARCH_DEFAULT_OPERATOR; } } And i get a parse error: Fatal error: Cannot redeclare tep_date_short() (previously declared in /home/d2paradi/public_html/Jeff/includes/functions/general.php:152) in /home/d2paradi/public_html/Jeff/includes/functions/general.php on line 1494
  5. Czymborjeff@gmail.com

    Custom HTML box?

    I was looking for a box were you could add custom html to, tried looking at the addons and didn't see, anyone know if they have this?
  6. Czymborjeff@gmail.com

    blog module?

    Okay fixed that error, now more :D Warning: mkdir(): No such file or directory in /home/sitename/public_html/Jeff/admin_news.php on line 46 Warning: fopen(\news/2014/20140126221638.txt): failed to open stream: No such file or directory in /home/sitename/public_html/Jeff/admin_news.php on line 47 Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/sitename/public_html/Jeff/admin_news.php on line 48 Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/sitename/public_html/Jeff/admin_news.php on line 49 Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/sitename/public_html/Jeff/admin_news.php on line 50 Warning: fclose() expects parameter 1 to be resource, boolean given in /home/sitename/public_html/Jeff/admin_news.php on line 51 Has something to do with this if (!file_exists ('/news'.$year)) { mkdir ('/new'.$year,0777);} $f = fopen('/news'.$year.'/'.$filename.".txt","w+"); not sure what to link it to lol
  7. Czymborjeff@gmail.com

    blog module?

    It actually tries to bring me to /Admin/FILENAME_NEWS when i go to it in tools
  8. Czymborjeff@gmail.com

    blog module?

    http://addons.oscommerce.com/info/8986 Okay so i decided to try a more simple one or possibly because the news folder is empty? I'm really unsure And i think this is the problem I'm having with this 1 6. Open /catalog/admin/admin_news.php and find three times: YOURABSOLUTEPATH Okay so I have my files on the public_html so its not in catalog/ And i have it set to if (!file_exists ('\news/'.$year)) {
  9. Czymborjeff@gmail.com

    blog module?

    Trying to use: http://addons.oscommerce.com/info/1709 Error SQL query: INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible ) VALUES ( '456', 'Article Manager', 'Article Manager site wide options', '20', '1' ); MySQL said: Documentation #1046 - No database selected
  10. Czymborjeff@gmail.com

    blog module?

    I saw a blog module tried it but didn't work for 2.3.3.4, I was thinking what would be cool is to have it be on the index page instead of the new products Listing, will be able to keep customers updated.
  11. Czymborjeff@gmail.com

    [Help] Mouse over image

    I'm actually using 2.3.3.4 Should i downgrade?what version should i use?
  12. Czymborjeff@gmail.com

    [Help] Mouse over image

    thx Tsimi I will try this now :) also thanks De Dokta
  13. Czymborjeff@gmail.com

    [Help] Mouse over image

    I'm not wanting to change the image size, i wan't to change what image is being displayed when you mouse over It looks like this now http://i.imgur.com/vIl1hFD.png%5B/img I wan't it to look like how this site has it. here is the product description page See How its showing the image on the product description page?
  14. Czymborjeff@gmail.com

    [Help] Mouse over image

    Its showing the regular image I wan't it to show this image Manual Installation (osCommerce 2.3.1 Version): Before beginning the manual install you need to: Upload two new files, They are (and located in): 1. catalog/js/jquery.js 2. catalog/js/main.js 3. Add new css locate in catalog/stylesheet.css /* Mouse Over Images CSS Start */ #screenshot{ position:absolute; border:-2px solid #ccc; background:#333333; padding:5px; display:none; color:#ffffff; } /* */ /* Mouse Over Images CSS End */ 4. Edit catalog/includes/template_top.php Find <link rel="stylesheet" type="text/css" href="stylesheet.css"> Add this after <!-- Image Mouse over start --> <script src="js/jquery.js" type="text/javascript"></script> <script src="js/main.js" type="text/javascript"></script> <!-- Image Mouse over end --> 4. catalog/includes/modules/new_products.php Find this: while ($new_products = tep_db_fetch_array($new_products_query)) { Add after: $image_pathe = HTTP_SERVER.DIR_WS_HTTP_CATALOG.DIR_WS_IMAGES . $new_products['products_image']; Find again: $new_prods_content .= '<td width="33%" align="center" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br />' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</td>'; Replace with: $new_prods_content .= '<td width="33%" align="center" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '" rel="'. $image_pathe .'" class="screenshot">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br />' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</td>'; 5. catalog/imcludes/modules/product_listing.php Find: case 'PRODUCT_LIST_IMAGE': 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; Replace with: case 'PRODUCT_LIST_IMAGE': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td align="center"><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></td>'; } else { $image_pathe = HTTP_SERVER.DIR_WS_HTTP_CATALOG.DIR_WS_IMAGES . $listing['products_image']; $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '" rel="'. $image_pathe .'" class="screenshot">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } break; /////////////////////////////////////-_-//////////////////////////////////////////// Taking from: http://www.arnlweb.com/mouse-over-product-images-for-oscommerce/#comment-21
×