Jump to content

gadlol

Members
  • Content count

    240
  • Joined

  • Last visited

  • Days Won

    13

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. 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
  3. 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
  4. 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:
  5. Hi Cary, please have a look at this: Thank you..
  6. Hello, I want to inform you about the status of the addon Alternative Administration System ( https://apps.oscommerce.com/YfzFh&amp;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
  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. Hello. I have developed a module - addon called Product Next Previous Products ADDON for osc 2.34 bootstrap (The name perhpas needs improvement) which displays a next and/or previous products box using bootstrap thumbnail or bootstrap panel in the product_info page. Description: when a customer is in a category viewing the listed products and clicks on a product then bellow that product it displays the next and previous product. NOTE: When customer is listing products in a category and has changed the sort then if clicks on a product then the previous and next product may not be the same as he was seeing in the listing. In order to solve this you must add the sort get param into the product links in the category listing. (Optional) Installation guide is included in the zip file plus the extra code needed to be changed if wanted (read NOTE paragraph above) Screenshot 1 (module displayed as bootstrap thumbnail) Screenshot 2 (module displayed as bootstrap panel) You can find the module here. I post it here in order for you to test it. Thank you. P.S. Message to this forums administrators: Please I need more upload space in the forum, it is full and does not allow me to upload anything.
  17. @RAC I actually don't know. If you put in content it needs changes to the class. So it is better to place it in the boxes for now. If I find some free time I will coded it the right way..
  18. Hi @RAC Right now the one I have uploaded in the first post of this thread uses bm_product_next_previous. I don't know how the newer version has changed in terms on modulating (is this the right word?) I think that the module should be in content and not in box: includes/modules/content/product_info/cm_pi_next_previous.php includes/modules/content/product_info/templates/next_previous.php
  19. You are welcome @janeyred
  20. Did you changed in the index.php the require('includes/application_top.php'); to require_once('includes/application_top.php'); ???
  21. 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?
  22. Would you be interested in creating an API for osCommerce?

    1. Dan Cole

      Dan Cole

      To do what?

    2. gadlol

      gadlol

      Hmmm.

      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:

      $osc_api->specials()->toJSON();

      will produce a json specials in json format..

       

    3. beerbee

      beerbee

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

  23. 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....
  24. Hmmmm, i dont know about that.... Maybe there are conflictions between addons....
  25. 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'
×