Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    ArtcoInc reacted to Tsimi in Shipping Quote in Cart - Support Thread   
    Bootstrap Modal Version
    Package includes:
    2x new files
    1x install.txt
    1x screenshot
    This does the same thing as the original add-on but instead of being embedded into the shopping cart page this version shows a modal. (screenshot included)
    This version works only with osCommerce Bootstrap version (community build)!
  2. Like
    ArtcoInc reacted to GLWalker in osCommerce 2.3. Bootstrap Nav menu   
    The following code snippets will extend the categories class as found in the osCommerce to Bootstrap community build. Please note it only works on this version as no other version is using this category class (in production).
    Its up to you where you place this class, you can make a file and add it with the other classes, just add it to template_top.php for quick setup, or go all out and take all the code and make a module.
    So first lets extend the category class with need markup for a bootstrap nav menu.
    /* $Id$ explode_category_tree osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce extended class author: G.L. Walker Copyright (c) 2014 G.L. Walker Released under the GNU General Public License */ class explode_category_tree extends category_tree { var $parent_group_start_string = null, $parent_group_end_string = null, $parent_group_apply_to_root = false, $root_start_string = '<li class="dropdown">', $root_end_string = '</li>', $parent_start_string = '<ul class="dropdown-menu">', $parent_end_string = '</ul>', $child_start_string = '<li>', $child_end_string = '</li>'; function _buildHoz($parent_id, $level = 0) { if(isset($this->_data[$parent_id])) { foreach($this->_data[$parent_id] as $category_id => $category) { if($this->breadcrumb_usage === true) { $category_link = $this->buildBreadcrumb($category_id); } else { $category_link = $category_id; } if(($this->follow_cpath === true) && in_array($category_id, $this->cpath_array)) { $link_title = $this->cpath_start_string . $category['name'] . $this->cpath_end_string; } else { $link_title = $category['name']; } if (isset($this->_data[$category_id]) && ($level != 0)) { $result .= '<li class="dropdown dropdown-submenu"><a href="#" tabindex="-1" class="dropdown-toggle" data-toggle="dropdown">'; $caret = false; } elseif(isset($this->_data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level + 1))) { $result .= $this->root_start_string; $result .= '<a href="#" tabindex="-1" class="dropdown-toggle" data-toggle="dropdown">'; $caret = '<span class="caret"></span>'; } else { $result .= $this->child_start_string; $result .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">'; $caret = false; } $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level); $result .= $link_title . (($caret != false) ? $caret : null) . '</a>'; if(isset($this->_data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level + 1))) { // uncomment below to show parent category link // //$root_link_title = '<span class="hidden-xs"><span class="glyphicon glyphicon-th-list"></span> ' . $link_title . '</span><li class="divider"></li>'; // divider added for clarity - comment out if you no like // //$root_link_title .= '<li class="visible-xs divider"></li>'; $result .= $this->parent_start_string; $result .= '<li><a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">' . $root_link_title . '</a></li>'; $result .= $this->_buildHoz($category_id, $level + 1); $result .= $this->parent_end_string; $result .= $this->child_end_string; } else { $result .= $this->root_end_string; } } } return $result; } function getExTree() { return $this->_buildHoz($this->root_category_id); } } /* end explode_category_tree */ Now you need to add a function somewhere, either in html_output.php or just slap it in template_top if doing a quick setup:
    function build_hoz($class='') { global $cPath, $level; if (empty($class)) $class = 'nav navbar-nav'; $OSCOM_CategoryTree = new explode_category_tree(); $data = '<ul class="' . $class . '">' . $OSCOM_CategoryTree->getExTree() . '</ul>'; return $data; } Notice the class variable, you may or may not need to use it according to the later steps.
    Now here is the css markup to add to your stylesheet:
    .dropdown-submenu { position:relative;} .dropdown-menu > .dropdown > .dropdown-menu, .dropdown-submenu > .dropdown-menu{top:0;left:100%;margin-top:-6px;;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;} .dropdown-menu > .dropdown > a:after, .dropdown-submenu > a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;} .dropdown-submenu:hover > a:after{border-left-color:#555;} And you may or may not need the javascript, it depends on a couple of things, I'll let you figure it out, but start by adding it to template_bottom.php

    <script> $(document).ready(function(){ $('ul.dropdown-menu > li.dropdown > a.dropdown-toggle .caret').removeClass('caret'); $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { event.preventDefault(); event.stopPropagation(); $(this).parent().siblings().removeClass('open'); $(this).parent().toggleClass('open'); }); }); </script> If you do not have any subcategories, and you are using a  nav menu the top categories displaying across the menu, you wont need any of the javascript. If you want to nest the category menu inside a single dropdown link, you will only need the first line after document ready(or you can actually modify the extended class)  I simply gave a way of doing things that would fit a variety of applications. If I am confusing you, just add everything.
    Now inside your markup for a bootstrap nav menu their are 2 ways you can output the category tree

    <nav class="navbar navbar-default navbar-no-corners navbar-no-margin" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-navbar-collapse"> <span class="sr-only"><?php echo HEADER_TOGGLE_NAV; ?></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse" id="bs-navbar-collapse"> <div class="container-fluid"> <ul class="nav navbar-nav"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Categories<span class="caret"></span></a> <?php echo build_hoz('dropdown-menu');?> </li> </ul> <?php echo build_hoz(); ?> </div> </div> </nav> I combined the 2 together in the above code. You can pretty much make it part of the navbar top links, or next it inside one top link.
    Ive tested this up to eight sub-categories deep with great results - but if you go that crazy on a live shop, you probably need a consultant to help you better categorize- maybe an auto parts store may need that many.
  3. Like
    ArtcoInc reacted to De Dokta in Automatic Supplier Order   
    I don't know an addon which does this. But it's no big thing to add another tep_mail to the checkout_process.php (where the mail to your customer is generated) to send an order to your supplier. Collect the data that your supplier needs to fulfill your order, put them into the tep_mail string and then your supplier automatically gets an order whenever a customer orders something in your store.
    That's quite simple if you have only one supplier - with several suppliers it would be a little bit more complicated, but not impossible.
  4. Like
    ArtcoInc reacted to dculley in osCommerce Online Merchant v2.3.4   
    I finely found the error in the checkout_success.php.   A missing closing </div>.  That did not show up in ( or thers) until the upgrade to 2.3.4.  Going to tavern now. :)
  5. Like
    ArtcoInc reacted to Harald Ponce de Leon in osCommerce Online Merchant v2.3.4   
    I wouldn't exactly call it MVC ;)
    Currently only the Login, My Account, and Checkout Success pages support Content Modules. If you would like to add content to or rearrange content on those pages, doing so with Content Modules means no more source code changes are required.
    The My Account page is different as it is built from an array of links. Content Modules on this page have the capability of adding/replacing/removing links from the My Account page.
    Other pages will be updated to support Content Modules in the next v2.3.x releases.
    No. Content Modules require a group to belong to, which the group code is then called from the relevant page to load the modules.
    No. What ends up being in v3 and down the line in v2.4 will be more flexible.
    Content Modules are located in includes/modules/content/ inside group directories. Here are the pages and their relevant group codes:
    My Account -> account Checkout Success -> checkout_success Login -> login Both Login and Checkout Success pages call their content modules before the template is loaded. This allows content modules to perform actions under certain conditions and to perform page redirects where necessary. The main My Account page does not perform any processing at all so its content modules are loaded in the middle of the template.
    Content Modules are called with their group code:
    $page_content = $oscTemplate->getContent('login'); For the login page, to avoid having each login content module have duplicate code to process the login, a $login_customer_id variable is processed - if it is set with a customer ID then the login page continues to register the customer in their session. It is up to the login content module to assign this variable as soon as it has authenticated the customer.
    For example, Log In with PayPal authenticates the customer then assigns $login_customer_id with their customer ID which login detects and registers them in their session. It is possible to create a Google Login content module which authenticates the customer through Google, then that module must assign $login_customer_id to complete their session.
    Some pages may need to initialize code before its first content module is processed. For these cases before the first content module is processed, it looks in the includes/modules/pages/ directory for a file matching the following name:
    tp_CODE.php The code matches the Content Module group being called. If such a file exists, it is executed then the content modules are processed.
    This is used for the My Account page to initialize the base set of links that are shown on the My Account page.
  6. Like
    ArtcoInc reacted to geoffreywalton in osCommerce Online Merchant v2.3.4   
    Don't get me wrong I think it is a good idea to list what needs to be done but lets tell people what they need to do but in plain english not coded speak.
    I think
    To make a more secure shop, in the shop admin go to Configuration >> Administrators and edit the adminstrator, enter a password and tick the "Protect With htaccess/htpasswd" box.
    is much clearer than
    The Administration Tool should be further protected using htaccess/htpasswd and can be set-up using the Configuration -> Administrators page
    I think shop owners would understand that.
    Then something along the lines of
    You should also check the permissions on directories and files to check they are secure. This can be done on the Administration Tool -> Tools -> Security Directory Permissions page.
    And even add an extra step of
    Finally check the general state of the site using Tools >> Security Checks.
    I'll have a go at git and see if I can get my head round github, branches and other associated foliage and upload some enhancements (not corrections)!!!!
  7. Like
    ArtcoInc reacted to joli1811 in Information Pages Unlimited v1.0   
    Actually most of the welcome messages never worked unless they were commented out in the language files it was always a bug
    when I now install I modify the second extra SQL to only install the TEXT MAIN
    Now your thought about different messages for holidays is interesting sure it could be done if
    1: there was a TEXT MAIN/ TEXTMAIN1 / etc and inserted in database and reflected in the index.php.
    Another thought would be,  I experimented a bit with this with Lambros but forget where the post is
    is to make a page say Christmas and then edit it and make it a sub category of itself  that way the page is hidden  but you have ready to cut and paste.
    or also interesting is if you take this code and insert example is page id 60 anywhere it will reflect page id 60 that you created in admin so theoretically  if you pasted that in the right place in the index.php and changed the page id according to season and the pages were hidden sub category pages 
    just by changing the id you would have your quick seasonal changes
    PS: Not really tested but should work :rolleyes: maybe haha
    <?php $information_query = tep_db_query("SELECT information_title, information_description FROM " . TABLE_INFORMATION . " WHERE visible='1' AND information_id='60' AND language_id='" . (int)$languages_id ."'"); $information = tep_db_fetch_array($information_query); $title = stripslashes($information['information_title']); $page_description = stripslashes($information['information_description']); ?>
  8. Like
    ArtcoInc reacted to De Dokta in 234bs - Breadcrumb Separator   
    I do not know if it's bootstrap specific or generally for css applies: When I wanted to change my breadcrumb separator, I have thoroughly tested the usual html entities in all known variants, but none of them worked! Apart from the hardcoded version Unicode seems to be the only working solution - in any case the only one I could find........
  9. Like
    ArtcoInc reacted to MrPhil in 234bs - Breadcrumb Separator   
    The double closing guillemet (>>) is Latin-1 \BB or Unicode \00BB. If you give an HTML named entity, & raquo; will work with any encoding, as will & #x00BB; or & #187;. Note that this is the UFT-16 code number, which is what HTML wants regardless of the page encoding.
    Just a word of caution: make sure if you must give a hard-coded (binary) character in CSS or HTML/PHP that it matches the encoding that your page will be displayed in (or, it's UTF-16 and guaranteed to be converted to the proper display encoding). I've seen so many complaints about templates and such where someone typed in, say, a >> using Latin-1 encoding, and then someone else tries using this code for a UTF-8 page display, and they get the dreaded "?-in-black-diamond" invalid character glyph. HTML and PHP code must have either named or numeric HTML entities, and never anything outside the ASCII range (x00-x7F) as binary characters. I don't know offhand what the CSS rules are, but if you stick to Unicode (UTF-16 values) it is probably OK (if it was tested and worked in the examples given).
    Incidentally, U+226B is "math much greater than" and U+27EB is "math double closing angle bracket". U+00BB has traditionally been used as a breadcrumb separator, simply because it was available in Latin-1. I personally prefer U+21D2 (right pointing double arrow) because it is more semantically meaningful, but the choice is yours.
    I still don't trust this forum software not to expand the entities I gave, so I stuck and extra space after the the &.
  10. Like
    ArtcoInc reacted to De Dokta in 234bs - Breadcrumb Separator   
    add to the user.css:
    .breadcrumb > li + li:before {
      content: ">>";
    or if you prefer unicode:
    .breadcrumb > li + li:before {
      content:"\003E \003E";
  11. Like
    ArtcoInc got a reaction from grandpaj in SEO Header Tags - RELOADED support?   
    I have used this addon with 2334bs. Are there any known issues with it working with 234bs?
  12. Like
    ArtcoInc reacted to joli1811 in Category description/information page...can it be done?I   
    Either of the x 2 most  popular seo add ons will do this
    Header tags reloaded
    Header Tags SEO
    So you can kill x 2 birds with one stone decent seo and a category description
  13. Like
    ArtcoInc reacted to gadlol in tep_draw_categories_tree finally no recursion just one mysql_query   
    Improved js
    <script type="text/javascript"> /*javascript coded by John Barounis, www.johnbarounis.com Copyright © 2014 John Barounis*/ $(function(){     $(".nav-list > li > a.switch, .nav-list > li > a.switch span").on("click",function(e){              var jthis=$(this);      //uncomment the three lines below to collapse the siblings (sub-sub-xxx categories) //var sibs=jthis.closest('li').siblings();         //sibs.find('ul.in').collapse('hide');         //sibs.find('a.switch span').removeClass('glyphicon-minus-sign');                  jthis.closest('li').find('ul:first').collapse('toggle'); //here we toggle the clicked         if(jthis.hasClass('glyphicon')) jthis.toggleClass('glyphicon-minus-sign');         else $(this).find('span').toggleClass('glyphicon-minus-sign');                  return false;     }); }); </script>
  14. Like
    ArtcoInc reacted to Tsimi in tep_draw_categories_tree finally no recursion just one mysql_query   
    @@De Dokta
    Thank you for finding/taking the time to test and improve this.
    Yeah, navWrapper and the accordion part were there for testing things...forgot to remove. And don't forget to remove the $datas .='</div>'; part at the bottom of the code. ;)
    Me on the other hand gave up after searching and searching...so i ask an expert in jquery/javascript for help and asked if there is a better way than
    this over engineered way.
    So we kicked in TeamViewer and I could be witness of something astonishing, live javascript coding. Never seen something like this,
    The logic you need to have and the combinations....crazy!
    Anyway we/HE came up with a tiny bit of js code and minor changes to the html_output.php code and a bit of css.
    This javascript code adds a trigger point a glyphicon plus/minus icon next to the category name if sub categories are there to open or close the menu tree.
    Of course you can also just click the category name to open or close the tree and it stays open when browsing the current category.
    There are two ways to browse the category tree.
    1. you click on the plus icons and you can open all sub trees and keep them open while opening an other tree
    2. or you uncomment two lines of js code and the tree will close/collapse when clicking on the next category.
    This way requires only changes to 3 files. This is only osC and 2.3.4BS compatible!
    here is the html_output.php file
    // BOF Categories Tree for Categories Box by De Dokta function tep_show_tree_box($root_id = 0,$mainUlClass='navMain nav-list',$submenuUlClass='navMain nav-list collapse'){ global $languages_id,$cPath_array, $datas; $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 = !empty( $children[$root_id] ); $parent = $root_id; $parent_stack = array(); $stack=array();//helper array so to know the current level $pic=''; //products_in_category string // MAINMENU $datas .='<ul class="'.$mainUlClass.'">'; while ( $loop && ( ( $option = each( $children[$parent] ) ) || ( $parent > $root_id ) ) ){ if ( $option === false ){ $parent = array_pop( $parent_stack ); $datas .= '</ul>'; $datas .= '</li>'; array_pop( $stack ); }elseif ( !empty( $children[$option['value']['id']] ) ){ $stack[]=$option['value']['id']; $rt=$root_id>0 ? $root_id.'_' : ''; $cpath_new=count($stack)<=0 ? 'cPath='.$rt.$option['value']['id'] : 'cPath='.$rt.implode('_',$stack); $datas .= '<li><a href="'.tep_href_link(FILENAME_DEFAULT, $cpath_new).'">'; $sm=0; if((isset($cPath_array) && in_array($option['value']['id'], $cPath_array))){ $sm=1; $datas .='<strong>'.stripslashes($option['value']['name']).'</strong>'; }else{ $datas .=stripslashes($option['value']['name']); } $datas .='</a><a href="#" class="switch"><span class="glyphicon glyphicon-plus-sign '.($sm==1?'glyphicon-minus-sign':'').' test"></span></a>'; // SUBMENU $datas .= '<ul class="'.$submenuUlClass.' '.($sm==1?'in':'').' ">'; $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']; $datas .= '<li><a href="'.tep_href_link(FILENAME_DEFAULT, $cpath_new).'" >'; if (isset($cPath_array) && in_array($option['value']['id'], $cPath_array)) { $datas .='<strong>'.stripslashes($option['value']['name']).'</strong>'; }else{ $datas .=stripslashes($option['value']['name']); } $datas .='</a></li>'; //BACK ! it works like a charm //cool if you click the category name the other open tree collapses if you only click on the + sign the other tree stays open so two or even tree open trees at the same time // is this sometihng you want? i am not really sure. looks cool though. usually other tree closes if you click the next one what you think? //you can do some javascript to hide } } $datas .='</ul>'; return $datas; } // BOF Categories Tree for Categories Box by De Dokta here the js code inside the footer.php (please leave the credit inside it to honor the creater, thank you.)
    <script type="text/javascript"> /*javascript coded by John Barounis, www.johnbarounis.com Copyright © 2014 John Barounis*/ $(function(){ $(".nav-list > li > a.switch, .nav-list > li > a.switch span").on("click",function(e){ var jthis=$(this),mainUl=jthis.closest('div').find('ul:first'),sibs=jthis.closest('li').siblings(); //uncomment the two lines below to collapse the siblings (sub-sub-xxx categories) //sibs.find('ul.in').collapse('hide'); //sibs.find('a.switch span').removeClass('glyphicon-minus-sign'); jthis.closest('li').find('ul:first').collapse('toggle'); //here we toggle the clicked if(jthis.hasClass('glyphicon')) jthis.toggleClass('glyphicon-minus-sign'); else $(this).find('span').toggleClass('glyphicon-minus-sign'); return false; }); }); </script> and the css definitions to not conflict with the real nav class from bootstrap i changed the name of the class
    /* BOF CATEGORIES BOX */ .navMain { padding-left: 0; margin-bottom: 0; list-style: none; } .navMain > li { position: relative; display: block; } .navMain > li > a { position: relative; display: inline-block; padding: 10px 15px; } .navMain > li > a:hover, .navMain > li > a:focus { text-decoration: none; background-color: #eee; } .navMain > li.disabled > a { color: #999; } .navMain > li.disabled > a:hover, .navMain > li.disabled > a:focus { color: #999; text-decoration: none; cursor: not-allowed; background-color: transparent; } .navMain .open > a, .navMain .open > a:hover, .navMain .open > a:focus { background-color: #eee; border-color: #428bca; } .navMain .nav-divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } /* EOF CATEGORIES BOX */ I take no credit for the js code! All credit for it goes to @@gadlol he did an amazing job! And amazing is understated.
  15. Like
    ArtcoInc reacted to De Dokta in 2334BS - Bugs in IE8   
    Sorry, the worm must be tasty to the fish, not the fisherman.
    We still get many users with XP and IE8 in the shop. As for me you could throw IE into the trash can. But many of our customers see that different.
  16. Like
    ArtcoInc reacted to De Dokta in Categories Menu with multiple subs in the header navbar   
    I have long been looking for a way to integrate the categories menu with multiple sub categories into  the header navbar, but I always failed to embed the appropriate code into the category_tree.php.  :(  With the help of the code gadlol has recently posted, some JS and CSS I have now found a way without changing the category_tree.php.
    Looks like this:

    How it works:

     In includes/functions/html_output.php add a new function:
    function tep_show_tree($root_id = 0,$mainUlClass='dropdown-menu',$submenuUlClass='dropdown-menu sub-menu'){     global $languages_id,$cPath_array;     $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 = !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[] = '</ul>';                 $html[] = '</li>';                 array_pop( $stack );             }elseif ( !empty( $children[$option['value']['id']] ) ){                 $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[]= '<li><a class="trigger right-caret" href="'.tep_href_link(FILENAME_DEFAULT, $cpath_new).'">';           if (SHOW_COUNTS == 'true') {             $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[] = '<ul class="'.$submenuUlClass.'">';                 $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[]= '<li><a href="'.tep_href_link(FILENAME_DEFAULT, $cpath_new).'" >';         if (SHOW_COUNTS == 'true') {           $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>';         }        }         $html[]='</ul>';      $data = '<li class="dropdown">' .              '<a class="dropdown-toggle" data-toggle="dropdown">' . HEADER_CATS . '</a>' .                implode($html) .              '</li>';       return $data;   } includes/footer.php add:
    <script type="text/javascript"> $(function(){     $(".dropdown-menu > li > a.trigger").one("click",function(e){         e.preventDefault();         var current=$(this).next();         var grandparent=$(this).parent().parent();         if($(this).hasClass('left-caret')||$(this).hasClass('right-caret'))             $(this).toggleClass('right-caret left-caret');         grandparent.find('.left-caret').not(this).toggleClass('right-caret left-caret');         grandparent.find(".sub-menu:visible").not(current).hide();         current.toggle();         e.stopPropagation();     });     $(".dropdown-menu > li > a:not(.trigger)").one("click",function(){         var root=$(this).closest('.dropdown');         root.find('.left-caret').toggleClass('right-caret left-caret');         root.find('.sub-menu:visible').hide();     }); })(jQuery); </script> user.css add:
    .dropdown-menu>li /* To prevent selection of text */ {   position:relative;     padding-left: 5px;     -webkit-user-select: none; /* Chrome/Safari */             -moz-user-select: none; /* Firefox */     -ms-user-select: none; /* IE10+ */     /* Rules below not implemented in browsers yet */     -o-user-select: none;     user-select: none;     cursor:pointer; } .dropdown-menu .sub-menu {     left: 100%;     position: absolute;     top: 0;     display:none;     margin-top: -1px;     box-shadow:none; } .right-caret:after,.left-caret:after  {  content:"";     border: 5px solid transparent;     border-top: 5px solid transparent;     display: inline-block;     height: 0;     vertical-align: middle;     width: 0;     margin-left:15px; } .right-caret:after {        border-left: 5px solid #ffaf46; } .left-caret:after {     border-right: 5px solid #ffaf46; } in includes/header.php after:
    <?php echo '<li><a class="store-brand" href="' . tep_href_link(FILENAME_DEFAULT) . '">' . HEADER_HOME . '</a></li>'; ?> add:
    <?php echo '<li>' . tep_show_tree() . '</li>'; ?> or somewhere else where you like it!
    includes/languages/english.php add:
    define('HEADER_CATS', '<i class="glyphicon glyphicon-cog"></i><span class="hidden-sm"> Categories</span> <span class="caret"></span>'); or any other glyphicon.
    I tested it with Mozilla 30. IE 8, Chrome and Opera - seems to work properly in full and collapsed size. 
    Hope you enjoy it!
  17. Like
    ArtcoInc reacted to mattjt83 in 2334bs - formatting issue   
    I would suggest using the bootstrap labels instead of the image.
    Just wrap the text in the proper <span></span> as found here: http://getbootstrap.com/components/#labels 
    Then you can use the contextual classes to display the info and save a tiny bit of bandwidth not loading the image :)
  18. Like
    ArtcoInc reacted to joli1811 in 2334BS - Categories above body?   
    nice little bookmarklet tool
  19. Like
    ArtcoInc reacted to Tsimi in 2334BS - Categories above body?   
    Hi Malcolm :)
    I have no access to my PC right now.
    I can test it in about 2 hours.
    I have a smart phone and i will test it and report back.
    You know that you can simulate the view of a small device with firefox browser by pushing ctrl+shift+m.
  20. Like
    ArtcoInc reacted to burt in 2334BS - Enhanced Contact Us   

    #draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; border-radius: 100px; text-align: center; padding-top: 35px; } #droppable { width: 250px; height: 150px; padding: 0.5em; float: left; margin: 10px; border-radius: 20px; }
    /includes/template_bottom.php (after the call to the jquery.js, approx line 45)

    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <script src="ext/jquery/touch-punch.min.js"></script>
    includes/template_top.php after the endif approx line 42

    <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.22.css" />
    contact_us.php at the very end of the file after everything

    <script> $(function() { $("#draggable").draggable(); $("#droppable").droppable({ drop: function(event, ui) { console.log(ui.draggable.length); $(".submission").val(ui.draggable.data('text')); $(this).addClass("ui-state-highlight").find("p").html("You may now submit the form!"); } }); }); </script>
    same file, just above buttonset div
    note: I don't particularly like the idea for this block of code, but it's what I coded to test the concept, an input field set to display: none; that is required (thereby until it is filled out the form is impossible to submit), and can only be filled out by js trickery (moving the ball into the court)...

    <div id="draggable" class="ui-widget-content" data-text="submission"> <p>Drag me...</p> </div> <div id="droppable" class="ui-widget-header"> <p>Drop here...</p> </div> <?php echo tep_draw_input_field('test', NULL, 'required aria-required="true" style="display: none;" class="submission"'); ?> <div class="clearfix"></div>
    Now grab the external 3rd party script that allows the jqueryui to be swipeable, it's called "touch punch".
    Here is the code: https://raw.githubusercontent.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js - copy and paste that code into a new file called touch-punch.min.js and save this new file into /ext/jquery/
    Visit the contact us page and test it out.
    My conclusion:
    It is an interesting concept, and could potentially be a good way to stop bots dead...but does need some better "instructions" for the average user...and overall polishing. It's not something I would use on my own sites, I prefer the simple maths question.
  21. Like
    ArtcoInc reacted to De Dokta in Invoice Editor 1.0   
    Good question! I never ask for it. :blush: But according to the online manual fpdf - which I used for the pdf forms - is based on milimeters.
  22. Like
    ArtcoInc reacted to De Dokta in Invoice Editor 1.0   
    As the author of the contrib I will try to answer your questions. Please excuse my limited knowledge of English - I hope I can make me understood anyway
    1. I'm a little confused because there is no command line in the sql files to set the DB tables to latin1_swedish_ci, utf8 or whatever. :unsure: The tables should be installed with the same coding as all other tables of your DB. If your other tables are in utf8_unicode_ci you should convert the tables of the Invoice editor to utf8.
    To do this is quite simple: Go to Admin -> Tools -> Database Tables - click the checkboxes of all tables that are not utf8 - select in the pulldown at the bottom of the page 'Convert to utf8' (a new pulldown appears, where you select 'Auto-Detect') - click the Go button. Ready!
    2. What is not clear at this instruction? Do you have installed the tool named Order editor? (Order editor is a tool other than Invoice editor!) If yes, you do not need to add these lines of code to your general.php. If no, add them!
    3. My mistake! :blush: In invoice_en.sql in some entries accidentally a false Configuration Group is entered. To fix it open your DB with phpmyadmin (or whatever you use to manipulate your DB), search ORDER_EDITOR_PAYMENT_DROPDOWN, ORDER_EDITOR_USE_SPPC, ORDER_EDITOR_CREDIT_CARD, INV_SAVE and SAVE_FOLDER and and change the entries for configuration_group_id from 911 to 912.
    4. You must have a very BIG store logo. You're the first whose logo does not fit in the space provided. :P If you don't want to reduce the size of your logo, you can change the position of the address label. Open invoice_editor_pdf.php and invoice_pdf.php and find the following code:
    // Adressfeld mit Absender und Rechnungsanschrift
    $pdf->SetY(45); /// horizontal position address label
    $pdf->Text(20,40, SHOPBETREIBER . ' • ' . SHOPSTRASSE . ' • ' . SHOPSTADT); ///horizontal position address headline
    $pdf->MultiCell(70, 4, $anrede . tep_address_format($order->billing['format_id'], $order->billing, '', '', "\n"),0,'L');
    If you increase the values at the marked positions, the address label will slide down. You'll probably have to try a little bit to find the appropriate values ​​for you. If necessary, execute these changes also in the packingslip_editor_pdf.php and packingslip_pdf.php.
    And last your "slightly related". If you have installed a guest checkout (Purchase without account - PWA??), the guest customer should not get at all a backlink to his - non-existent - order history. With PWA it's a simple piece of code added to the checkout_process.php:
    if (!$order->customer['is_dummy_account']) {
    $email_order .= EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" ;
  23. Like
    ArtcoInc reacted to Tsimi in Responsive osCommerce - Bootstrap   
    Where is the download link to @@wHiTeHaT s better menu?