Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by gadlol

  1. Hello fellow osCommercians. This is the support topic for the addon SEO Friendly Urls. SEO Friendly Urls is a new addon for the osCommerce CMS that will change the default urls into what a modern website's urls should be! (at least that's what I think) I will shortly add the zip file into addons page. (I just wan tto grab this topic link in order to add it into the addons page) Example: of SEO Friendly Urls: www.mystore.com/product_info.php?products_id=17 will be www.mystore.com/scarves/oval-crystal-scarf Urls possible structure examples : * www.mydomain.com/category-alias www.mydomain.com/category-alias/sub-category-alias www.mydomain.com/category-alias/sub-category-alias/sub-category-alias www.mydomain.com/category-alias/sub-category-alias/sub-sub-category-alias/sub-sub-sub-category-alias e.t.c. www.mydomain.com/product-alias www.mydomain.com/category-alias/product-alias www.mydomain.com/category-alias/sub-category-alias/product-alias www.mydomain.com/category-alias/sub-category-alias/sub-category-alias/product-alias www.mydomain.com/category-alias/sub-category-alias/sub-sub-category-alias/sub-sub-sub-category-alias/product-alias e.t.c. * Can also add any desired extension. Can also add language alias. Example with language alias: www.mydomain.com/en/category-alias/product-alias Extras: You can also create alias for core pages such as specials.php, reviews.php For example you could change specials.php to specials (www.mystore.com/specials) ------------------- EDITED: Here is the addons link: http://addons.oscommerce.com/info/9371 P.S. I did not added this topic url to the addons page. Damn, I forgot. P.S. I hope I don't break any rule this time.
  2. Hello, I want to inform you about the status of the addon Alternative Administration System ( https://apps.oscommerce.com/YfzFh&alternative-administration-system-v0-3 ). After a long thought I decided to stop supporting and developing the Alternative Administration System (AAS) . The main reason is that no money no honey. I cannot support something that does not give me back any money. I made a mistake when releasing the AAS version v0.3 back in 2014. I had decided to give it for free and offered the modules at a price. But it did not work. Although the AAS modules were very good and useful for example the Products Monitor: http://www.alternative-administration-system.com/modules/osCommerce/products_monitor or the Payment Report module: http://www.alternative-administration-system.com/modules/osCommerce/payments_report admins did not show any interest except a few... I would like to thank those who supported AAS by making a donation. You will find the list here: http://www.alternative-administration-system.com/donations . AAS will be available in github: https://github.com/gadlol/alternative-administration-system/ The dedicated website for AAS will be online until the end of July. Thank you all for having used and using AAS. LOL: After searching in Google for "AAS Farewell" I found this video called AAS Farewell Party 2012. So I say goodbye to AAS with that: Regards, John
  3. Alternative Administration System: Categories/Products. is an alternative way to navigate through categories to easily find and EDIT products. It has its own ui totally different from the default admin one. You simply navigate to a php page and voila!!! Some features: Add extra custom fields easily All fields custom or not, can be editable or not, visible by default or not , sortable or not e.t.c. You can also add fields from other mysql tables other than products Deletion of multiple products Multiple prices edit Right side panel (sortable fields, choose what fields to display and sort - reorder them) Bottom panel (contains: categories list, languages, display in stock or not) Top Search panel (hidden by default, opens when you click on search icon) Server side pagination (includes max products per page) Advanced search (search on specific field, developers can add their own custom fields) Order products by different fields - custom fields Print categories and/or products (only the categories - products table, everything else is not displayed ) Multiple product status change Export products into csv, json, text or excel file I will post the addon at the addons page shortly Have a look at the screenshots: Youtube demo:
  4. You can find it here: https://github.com/gadlol/alternative-administration-system
  5. Hi @sinopia about the while loop there is not an easy way to do it with just foreach loops and without having the need to use recursive function. However I have code it and update it so no need of each so no deprecated messages and plus the class runs faster now. Send me p.m. for more details. About the "Also for the alias pages is there any way to add a functionality for multilingual alias?" do you mean for example: www.mystore.com/specials.php to www.mystore.com/es/specials/ ? Regards, John
  6. I did not and don't like the recursive function tep_get_categories() and the how the categories get drawn into the categories box. So I created a function that draws the categories tree (expanded or not). It uses only one query for the categories. So its faster than the default. It uses <ul> list tags. It produces full tree code even if $drawExpanded=false, that way you can use css3 or jquery menu so to popup on hover-click the hidden subcategories, any length of subcategories. Things to be done replace that recursive function tep_count_products_in_category when displaying the number of products under each category. Hope you like it. Check images: Tree fully expanded Tree expanded only if page in categories Produced Code Code : http://pastebin.com/puCzrASC or: //tep_draw_categories_tree function tep_draw_categories_tree($drawExpanded=false,$root_id = 0,$mainUlClass='',$submenuUlClass='submenu'){ global $languages_id,$cPath_array; //GET ALL CATEGORIES $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); $items = array(); while ($categories = tep_db_fetch_array($categories_query)) { $items[$categories['categories_id']] = array('name' => $categories['categories_name'], 'parent_id' => $categories['parent_id'], 'id' => $categories['categories_id']); } $citems=count($items); if($citems<=0) return ''; elseif($citems==1) $children[] = $items; //in case we have one category item without subcategories, rare but possible else foreach( $items as $item ) $children[$item['parent_id']][] = $item; // loop will be false if the root has no children (i.e., an empty categories!) $loop = !empty( $children[$root_id] ); $parent = $root_id; $parent_stack = array(); $html=array();//store html code $stack=array();//helper array so to know the current level $pic=''; //products_in_category string $html[]='<ul class="'.$mainUlClass.'">'; while ( $loop && ( ( $option = each( $children[$parent] ) ) || ( $parent > $root_id ) ) ){ if ( $option === false ){ $parent = array_pop( $parent_stack ); $html[] = str_repeat( "\t", ( count( $parent_stack ) + 1 ) * 2 ) . '</ul>'; $html[] = str_repeat( "\t", ( count( $parent_stack ) + 1 ) * 2 - 1 ) . '</li>'; array_pop( $stack ); }elseif ( !empty( $children[$option['value']['id']] ) ){ $tab = str_repeat( "\t", ( count( $parent_stack ) + 1 ) * 2 - 1 ); $stack[]=$option['value']['id']; $rt=$root_id>0 ? $root_id.'_' : ''; $cpath_new=count($stack)<=0 ? 'cPath='.$rt.$option['value']['id'] : 'cPath='.$rt.implode('_',$stack); $html[]=$tab.'<li><a href="'.tep_href_link(FILENAME_DEFAULT, $cpath_new).'">'; if (SHOW_COUNTS == 'true') { //THIS SHOULD BE CHANGED SO NOT TO USE tep_count_products_in_category WHICH IS RECURSIVE $products_in_category = tep_count_products_in_category($option['value']['id']); if ($products_in_category > 0) { $pic=' (' . $products_in_category . ')'; } } $sm=0; if((isset($cPath_array) && in_array($option['value']['id'], $cPath_array))){ $sm=1; $html[]='<strong>'.stripslashes($option['value']['name']).'->'.$pic.'</strong>'; }else{ $html[]=stripslashes($option['value']['name']).'->'.$pic; } $html[]='</a>'; $html[] = $tab . "\t" . '<ul class="'.$submenuUlClass.'" style="'.($sm!==1 && !$drawExpanded ?'display:none;':'').'">'; $parent_stack[]=$option['value']['parent_id']; $parent = $option['value']['id']; }else{ $rt=$root_id>0 ? $root_id.'_' : ''; $cpath_new= count($stack)<=0 ? 'cPath='.$rt.$option['value']['id'] : 'cPath='.$rt.implode('_',$stack).'_'.$option['value']['id']; $html[]=str_repeat( "\t", ( count( $parent_stack ) + 1 ) * 2 - 1 ).'<li><a href="'.tep_href_link(FILENAME_DEFAULT, $cpath_new).'" >'; if (SHOW_COUNTS == 'true') { //THIS SHOULD BE CHANGED SO NOT TO USE tep_count_products_in_category WHICH IS RECURSIVE $products_in_category = tep_count_products_in_category($option['value']['id']); if ($products_in_category > 0) { $pic=' (' . $products_in_category . ')'; } } if (isset($cPath_array) && in_array($option['value']['id'], $cPath_array)) { $html[]='<strong>'.stripslashes($option['value']['name']).$pic.'</strong>'; }else{ $html[]=stripslashes($option['value']['name']).$pic; } $html[]='</a></li>'; } } $html[]='</ul>'; echo implode( "\r\n", $html ); } //tep_draw_categories_tree
  7. Hi @Cary , If it does not copy the alternative images it is because I maybe had forgotten to implement that feature... I will check that and respond back as soon as possible...
  8. Hi Richard... Can you please send me some more info such as your website url e.t.c. so to go from there... Please send them to p.m. and lets continue from there... and once we solve the problem we will post the solution here... Thank you ..
  9. Hi Richard @freakystreak Thank you for your good words. Can you please tell me which version of oscommerce you have installed and using? This is strange, it was never mentioned to me such kind of problem... From what I can understand is that when you navigate for example to mystore.com/admin/ there must be a something that prevents admin backend to load because my seo class thinks that is also another page. Although it is a folder. So first I would make sure that the admin backend does not call seo_friendly_urls.php which is the normal thing and then I would check the apache - server configuration.
  10. Hi tiit, I am working on it...
  11. Unfortunately there is not a tool for that. I guess you must create a php script so to make the appropriate redirects or perhaps via htaccess. I dont know about SEO URL 5 mechanism so I cannot be much of a help..
  12. Hi Ken... Yes that's true when having lots of products and categories because free version does not support cache. The PRO version supports caching to mysql or file or apc... Regards John
  13. Problem fixed. Its a bug when the store has ONLY ONE category. osCommercians who have only one category and using Seo Friendly Urls must go and comment the line 308 //elseif($citems==1) $children[] = $items[$clang]; //in case we have one category item without subcategories, rare but possible In the next upcoming update this will be fixed... @wHiTeHaT I asked from @Stephan Gebbers to send me info in PM because I knew that I had to investigate the problem on his live website.... After the bug fix I would ( as I did ) post the solution... About $ - who fixes it, it's another story but it would be nice to see if there would be anyone here that could fix it... :-)
  14. Hi @Stephan Gebbers By default the main language is set not to appear in the url but you can change that by altering the option "Display default language alias?" About the categories not being aliased there something must be happening I must check it by myself. Is it possible to send me via PM live link and more info so to check? About clearing the cache: you must clear the cache only when you manually change the alias or products are made - deleted or modified their names.
  15. So I guess osCommerce is dead... Am I right? What will be the next stage that @JcMagpie is saying?
  16. You are welcome @janeyred
  17. Did you changed in the index.php the require('includes/application_top.php'); to require_once('includes/application_top.php'); ???
  18. Hi... blank home page can mean lots o fthings. Maybe you did something wrong during installation. Maybe this is probably the htaccess file. Does your server produce any error logs (apache error logs)? Are all the pages blank or the homepage only? Can you give me the url so to check it?
  19. Would you be interested in creating an API for osCommerce?

    1. Dan Cole

      Dan Cole

      To do what?

    2. gadlol



      Imagine having all the sql queries somewhere centralized and having a system to fetch us the data. For example: in the specials.php I would need no more to have a tep_db_query just

      $listing = $osc_api->specials(); 

      And now $listing has the data in array so to be used in the specials.php.

      Another useful thing about osc API is that you can make your website data available outside of your osc installation and so it would be easy to create mobile applications e.t.c. For example:


      will produce a json specials in json format..


    3. beerbee


      Yes! We'd need it for a life interface to our ERP system.

  20. Hi... the XML sitemap generator (http://addons.oscommerce.com/info/6583) does not use the oscommerce tep_href_link instead it uses a class method hrefLink. Thats why that addon does not work with the Seo Friendly Urls. I dont know if there is any sitemap addon that uses the osc default functions for generating the urls....
  21. Hmmmm, i dont know about that.... Maybe there are conflictions between addons....
  22. Hi @@aurelou .... You may edit the seo_friendly_urls.php class and try to change all the $HTTP_GET_VARS to $_GET and find all the FILENAME_ defines and replace them with the file. In example: FILENAME_DEFAULT => 'index.php'
  23. Hi @@29gk Glad it works..... Hope you like my addon... P.S. Γεια σου πατριώτη...
  24. In order for the SEO FRIENDLY URLS to be uninstalled you must use the uninstall option then go to the front store so that option - action run. Then If you refresh the page the SEO FRIENDLY URLS will auto install again. But I dont know what will happen if some of the configurations is corrupted. In general I would suggest to go to the configuration table and remove all the keys that start with SEO_FRIENDLY_URLS_ and then go to the front store and seo frendly urls will auto install....