Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

acidvertigo

Members
  • Posts

    278
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by acidvertigo

  1. Installed it. I have a 5.3.1 php hosting. Installed also the extensions I have an issue in the product_info.php page. The meta description reports the entire text of the product description. There is a way to set a maximum number of characters? The same for the keyword meta tag.
  2. Hello, i'm interested too to try this contrib. My shop has 3 different languages and my metatags are poor.
  3. I'm using this contrib and works well for me. However is good to delete the language_id from the canonical tag? For example if i have a product_info.php page in 10 languages with 10 different description (one per language), is this considered as duplicate page?
  4. Hello i have added to the code to caching this module you can find it in the Brows by categories contribution section you need Browse by Categories 2.7 already installed In /catalog/includes/functions/cache.php add the following before the closing end ?> tag //// //! Cache the browse categories module // Cache the browse categories module function tep_cache_browse_categories($auto_expire = false, $refresh = false) { global $cPath, $language, $languages_id, $tree, $cPath_array, $categories_string; $cache_output = ''; if (($refresh == true) || !read_cache($cache_output, 'browse_categories_box-' . $language . '.cache' . $cPath, $auto_expire)) { ob_start(); include(DIR_WS_MODULES . FILENAME_BROWSE_CATEGORIES); $cache_output = ob_get_contents(); ob_end_clean(); write_cache($cache_output, 'browse_categories-' . $language . '.cache' . $cPath); } return $cache_output; } In /catalog/index.php find all include(DIR_WS_MODULES . FILENAME_BROWSE_CATEGORIES); replace with if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_browse_categories(); } else { include(DIR_WS_MODULES . FILENAME_BROWSE_CATEGORIES); }
  5. Hello i'm tryng to install the new CKEditor 3.0 in oscommerce 2.2MS2 categories.php and mail.php following this documentation CKEditor documentation In admin/categories.php and admin/mail.php i have added this before the </head> tag <script type="text/javascript" src="ckeditor/ckeditor.js"></script> After that in admin/includes/functions/html_output.php i have modified the tep_draw_textarea_field function to this: // Output a form textarea field function tep_draw_textarea_field( $name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true, $id_area="") { $field = '<textarea name="' . tep_output_string($name) .'" id="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"'; if (tep_not_null($class)) $field .= ' ' . 'class="' . tep_output_string($class) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) { if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) { $field .= tep_output_string_protected(stripslashes($HTTP_GET_VARS[$name])); } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) { $field .= tep_output_string_protected(stripslashes($HTTP_POST_VARS[$name])); } } elseif (tep_not_null($text)) { $field .= tep_output_string_protected($text); } $field .= '</textarea> <script ="text/javascript"> //<![CDATA[ // This call can be placed at any point after the // <textarea>, or inside a <head><script> in a // window.onload event handler. // Replace the <textarea id="editor"> with an CKEditor // instance, using default configurations. CKEDITOR.replace( '. $name .' ); //]]> </script>'; return $field; } This code works for now in firefox and chrome but not in intrnet explorer 8 and only mail.php shows the CKEeditor. I have added $id_area in the code to give to the text area a id="". But internet explorer says that CKEDITOR.replace( '. $name .' ); is not defined. Hope this helps to make a new contribution.
  6. Ok now it works and leapfrog now looks wonderfull thank you very much. p.s. When you come in italy i offer you a pizza :thumbsup:
  7. And if i write $wo_last_page_url = addslashes(getenv('QUERY_STRING')); i have the cpath (all the query after ? ) How to unify with $wo_last_page_url = addslashes(getenv('PATH_INFO')); ?
  8. My server likes addslashes(getenv('PATH_INFO')); Leapfrog Says "Unable to connect to database" The page are stored now in mysql database, but without cpath= etc etc. With addslashes(getenv('ORIG_PATH_INFO')); nothing change
  9. Shows only "The Url is:" and nothing. I think that REQUEST_URI doesn't work on IIS server
  10. http://www.mydomain.com/public/catalog/def...hp?cPath=27_666
  11. no <thumburl> and no <page url> But ok for <pagetitle><visitorsid><visitorsname><refererurl><sessionid><visitorname><clicktime><visitorip> :blink:
  12. Yes, i tried it. But nothing. IN all the other contribution that i have DIR_WS_IMAGES is set correctly. :'(
  13. No, i haven't But my images folder is different from conventional installation
  14. forgot to tell you that i'am running this contrib on IIS server (impossible the CRON job) on a old 2003 snapshot ( pre MS1 era ). I can't se also the images, but not a problem for me. But i like your idea to track users only when the UI is open. :rolleyes:
  15. Hi, beautiful contribution. Just one question, Leapfrog can delete data stored after a defined time? I ask this beacause i see the leapfrog table in mysql database increase in size and i don't want taht the size of this table waste all mysql space.... :'(
  16. After a year i can't split this page result!!!! Thats incredible!!!!! :P Here is my code and i use the same xsl file listed in mine and your post. <?php Header( 'Content-Type: text/xml' ); echo '<?xml version="1.0" ?>'; echo '<?xml-stylesheet type="text/xsl" href="stile.xsl"?>'; echo "<STOREITEMS>"; /* OSCommerce Product XML Feed by Kenny Boyd ([email protected]) http://www.theinternetfoundry.com This hack will provide a basic xml feed which can be polled by applications, affiliate websites or systems using other languages such as C++, Perl, .NET etc to display your product line in xml readable format. It is rehash of the excellent Catalog Anywhere addon programmed by: Patrick Veverka ([email protected]) available at: http://www.oscommerce.com/community/contributions,294 This is a real quick and dirty xml implementation so bugs may exist Please see the README.TXT before you use this */ //////////////////////////////////////////// // THE FOLLOWING OPTIONS MUST BE CONFIGURED! // 1. Configure DB Connection $db_server = "******"; //database server $db_user = "********"; //database user $db_pass = "********"; //database password $db_name = "********"; //database name // 2. Configure Site Info //Enter the url to your website //don't use any slashes or http eg: www.mysite.com $domain_name = "www.yoursite.com"; //Enter the directory name of your catalog //don't use any slashes eg: catalog $catalog_folder_name = "********/******"; //no slashes // 3. Configure XML Data to be included // 3A: Include product prices? (1 is on, 0 is off) $product_price = "1"; // 3B: include link to product_info.php at your website? (1 is on, 0 is off) $product_info_link = "1"; // END CONFIGURATION //////////////////////////////////////////// // create connection $connection = mysql_connect("$db_server","$db_user","$db_pass") or die("Couldn't make connection."); // select database $db = mysql_select_db("$db_name", $connection) or die("Couldn't select database."); // create SQL statement $sqlcount = "SELECT * FROM `products` ORDER BY 'products_model'"; $sql = "SELECT * FROM `products` ORDER BY 'products_model'"; // execute SQL query and get result $sql_result = mysql_query($sql,$connection) or die("Couldn't execute query."); $sqlcount_result = mysql_query($sqlcount,$connection) or die("Couldn't execute query."); $num = mysql_numrows($sqlcount_result); mysql_free_result($sqlcount_result); // format results by row while ($row = mysql_fetch_array($sql_result)) { $id = $row["products_id"]; $model = $row["products_model"]; $image = $row["products_image"]; $price = $row["products_price"]; $sql2 = "SELECT `products_name` FROM `products_description` WHERE products_id = '$id' LIMIT 1"; $sql2_result = mysql_query($sql2,$connection) or die("Couldn't execute query."); $row2 = mysql_fetch_array($sql2_result); $name = $row2["0"]; // add extra data here then add the xml tag below $products_url = $row2["4"]; $products_description = $row2["5"]; // add extra data here ?> <PRODUCT ITEM='<?php echo $id; ?>'> <NAME><?php echo $name;?></NAME> <MODEL><?php echo $model; ?></MODEL> <?php if ($product_price == 1) { ?> <IMAGE><?php echo $image; ?></IMAGE> <PRICE><?php printf("%.2f", $price); ?></PRICE> <?php } if ($product_info_link == 1) { ?> <URL value="http://<?php echo $domain_name; ?>/<?php echo $catalog_folder_name; ?>/product_info.php?products_id=<?php echo $id; ?>"></URL> <?php } ?> </PRODUCT> <?php } // free resources and close connection mysql_free_result($sql_result); mysql_close($connection); ?> </STOREITEMS> You can see the result here CLICK HERE Regards! p.s. I have serious problems in split the result of this page. I want to split the results because the page is too long! I also tried with the pricelist HTML) contribution, but i can't split the results. TO SPLIT OR NOT TO SPLIT.... THAT'S THE PROBLEM :rolleyes: Any help would be appreciated :lol: BY!
  17. After a year i can't split this page result!!!! Thats incredible!!!!! :P Here is my code and i use the same xsl file listed in mine and your post. <?php Header( 'Content-Type: text/xml' ); echo '<?xml version="1.0" ?>'; echo '<?xml-stylesheet type="text/xsl" href="stile.xsl"?>'; echo "<STOREITEMS>"; /* OSCommerce Product XML Feed by Kenny Boyd ([email protected]) http://www.theinternetfoundry.com This hack will provide a basic xml feed which can be polled by applications, affiliate websites or systems using other languages such as C++, Perl, .NET etc to display your product line in xml readable format. It is rehash of the excellent Catalog Anywhere addon programmed by: Patrick Veverka ([email protected]) available at: http://www.oscommerce.com/community/contributions,294 This is a real quick and dirty xml implementation so bugs may exist Please see the README.TXT before you use this */ //////////////////////////////////////////// // THE FOLLOWING OPTIONS MUST BE CONFIGURED! // 1. Configure DB Connection $db_server = "******"; //database server $db_user = "********"; //database user $db_pass = "********"; //database password $db_name = "********"; //database name // 2. Configure Site Info //Enter the url to your website //don't use any slashes or http eg: www.mysite.com $domain_name = "www.yoursite.com"; //Enter the directory name of your catalog //don't use any slashes eg: catalog $catalog_folder_name = "********/******"; //no slashes // 3. Configure XML Data to be included // 3A: Include product prices? (1 is on, 0 is off) $product_price = "1"; // 3B: include link to product_info.php at your website? (1 is on, 0 is off) $product_info_link = "1"; // END CONFIGURATION //////////////////////////////////////////// // create connection $connection = mysql_connect("$db_server","$db_user","$db_pass") or die("Couldn't make connection."); // select database $db = mysql_select_db("$db_name", $connection) or die("Couldn't select database."); // create SQL statement $sqlcount = "SELECT * FROM `products` ORDER BY 'products_model'"; $sql = "SELECT * FROM `products` ORDER BY 'products_model'"; // execute SQL query and get result $sql_result = mysql_query($sql,$connection) or die("Couldn't execute query."); $sqlcount_result = mysql_query($sqlcount,$connection) or die("Couldn't execute query."); $num = mysql_numrows($sqlcount_result); mysql_free_result($sqlcount_result); // format results by row while ($row = mysql_fetch_array($sql_result)) { $id = $row["products_id"]; $model = $row["products_model"]; $image = $row["products_image"]; $price = $row["products_price"]; $sql2 = "SELECT `products_name` FROM `products_description` WHERE products_id = '$id' LIMIT 1"; $sql2_result = mysql_query($sql2,$connection) or die("Couldn't execute query."); $row2 = mysql_fetch_array($sql2_result); $name = $row2["0"]; // add extra data here then add the xml tag below $products_url = $row2["4"]; $products_description = $row2["5"]; // add extra data here ?> <PRODUCT ITEM='<?php echo $id; ?>'> <NAME><?php echo $name;?></NAME> <MODEL><?php echo $model; ?></MODEL> <?php if ($product_price == 1) { ?> <IMAGE><?php echo $image; ?></IMAGE> <PRICE><?php printf("%.2f", $price); ?></PRICE> <?php } if ($product_info_link == 1) { ?> <URL value="http://<?php echo $domain_name; ?>/<?php echo $catalog_folder_name; ?>/product_info.php?products_id=<?php echo $id; ?>"></URL> <?php } ?> </PRODUCT> <?php } // free resources and close connection mysql_free_result($sql_result); mysql_close($connection); ?> </STOREITEMS> You can see the result here CLICK HERE Regards! p.s. I have serious problems in split the result of this page. I want to split the results because the page is too long! I also tried with the pricelist HTML) contribution, but i can't split the results. TO SPLIT OR NOT TO SPLIT.... THAT'S THE PROBLEM :rolleyes: Any help would be appreciated :lol: BY!
  18. ;) Hi all. I downloaded and installed this contrib: http://www.oscommerce.com/community/contributions,1705 Here a demo Pricelist And modified to show category images and to take the result for the default language. Here the code: <?php define('TITLE_PRICE', 'List Price'); //define('TITLE_PRICE', 'Price list'); define('SHOW_QUANTITY',false); // true - show, false - hide quantity define('SHOW_MARKED_OUT_STOCK',true); // show marked out of stock (true - show, false - hide) define('TAX_INCREASE', 0); // 0 - No increase, 1 - Add 1%, 5 - Add 5%, Any number - add number% define('SHOW_MODEL',true); // true - show model, false - hide model require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); $breadcrumb->add(TITLE_PRICE, tep_href_link("price.php", '', 'SSL')); ?> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php');?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <!-- body_text //--> <td valign="top"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="pageHeading"><? echo TITLE_PRICE ?></td> </tr> <tr> <td class="headerNavigation">I prezzi sono IVA esclusa e possono variare senza preavviso</td> </tr> <tr> <td> <? // ???? ? ?????? ????????? // group have products? function check_products($id_group){ $products_price_query = tep_db_query("select products_to_categories.products_id FROM products_to_categories where products_to_categories.categories_id = ".$id_group." LIMIT 0,1"); if($products_price = tep_db_fetch_array($products_price_query)){ return true; } return false; } // ??????? ?????? ????????? ???????????? ?????? $id_group // list products determined group function get_products($id_group){ global $currencies; $query = ""; $products_price_query = tep_db_query("SELECT products_description.products_name, products.products_quantity, products.products_price, products.products_model, products_to_categories.products_id, products_to_categories.categories_id FROM products, products_description, products_to_categories WHERE products.products_id = products_description.products_id AND products_description.language_id =2".$query." and products.products_id = products_to_categories.products_id and products_to_categories.categories_id = ".$id_group); $x=0; while ($products_price = tep_db_fetch_array($products_price_query)){ $cell = tep_get_products_special_price($products_price['products_id']); if($cell == 0) $cell = $products_price['products_price']; if($x==1) { $col = "#F8F8F9"; $x = 0; }else{ $col = "#FFFFFF"; $x++; } $quantity = ""; $model = ""; if(SHOW_QUANTITY) $quantity = "<td width=\"100\" align=\"right\" class=\"productListing-data\">(".$products_price['products_quantity'].")</td>"; if(SHOW_MODEL) $model = "<td width=\"100\" align=\"left\" class=\"productListing-data\">[".$products_price['products_model']."]</td>"; print "<tr bgcolor=\"".$col."\" align = \"left\">".$model."<td width=\"1000\" class=\"productListing-data\" align=\"left\"> <a href=\"" . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $products_price['products_id']) . "\"<a>".$products_price['products_name']."</td>".$quantity."<td width=\"150\" align=\"left\" class=\"productListing-data\">".$currencies->display_price($cell,TAX_INCREASE)."</td></tr>"; } } // ??????????? ???????, ???????? ?????? ?? ??????? // get all groups function get_group($id_parent,$position){ $groups_price_query = tep_db_query("select categories.categories_id,categories_image,categories_description.categories_name from categories, categories_description where categories.categories_id = categories_description.categories_id and categories.parent_id = ".$id_parent." and categories_description.language_id = 2 order by categories_description.categories_name"); while ($groups_price = tep_db_fetch_array($groups_price_query)){ $str = ""; for($i = 0; $i < $position; $i++){ $str = $str . " "; } $class = "productListing-heading"; if($position == 0) { $class = "headerNavigation"; print "<tr><td colspan=\"4\" width=\"1000\" class=\"productListing-data\"> </td></tr>"; // ?????? ?????? } if(check_products($groups_price['categories_id']) || $position == 0){ print "<br<tr><td colspan=\"4\" width=\"1000\" class=\"".$class."\"><img src= \"/public/".$groups_price['categories_image']."\" height=\"64\" width=\"84\"><strong><font color=\"#FFFFFF\" size=\"3\"><u>".$str.$groups_price['categories_name']."</font></u></strong></td></tr>"; get_products($groups_price['categories_id']); } get_group($groups_price['categories_id'],$position+1); // ????????? ?????? } } ?> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <? // Content is in $site get_group(0,0); ?> </table> </td> </tr> </table> </td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> How i can split the result by page with a navigation bar?
×
×
  • Create New...