Jump to content
Latest News: (loading..)

Recommended Posts

Some of you might remember my rather poor attempt to bootstrap the admin a while back. :wacko:
Well I went over all the files again and recoded/fixed it and now finally I can say things work as they should. B)

I also took the bootstrapped install package from the EDGE version. Now we have at least a full responsive osC from A-Z.
There might be minor bugs around and it is recommended to use at least a tablet to work with it.

Anyway here is my "complete" version.

https://github.com/Tsimi78/osCommerce-GOLD-AdminBS

Enjoy and if anything is you know where to find me. ;)

Edited by Tsimi

Share this post


Link to post
Share on other sites

Cool. I'll have a play.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@@BrockleyJohn

 

Yes, please do so. Play with it, test the s**t out of it and report any bugs here. Or better fix them and report here. :D

Thank you.

Edited by Tsimi

Share this post


Link to post
Share on other sites

Are you going to package this up and release it as an addon from the addons area?


REMEMBER BACKUP, BACKUP AND BACKUP

Before installing the official version of oscommerce first look at a responsive version here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

@@14steve14

 

Hi Steve

 

I don't think that would be possible. It is not a drop on top thing and/or cannot be written as install with a search and replace routine.

Every file under the admin folder has been touched and altered. Additional to that it is not 100% finished, there are few files that I couldn't test thoroughly

and there is plenty of room for improvement.

Share this post


Link to post
Share on other sites

All great addons start that way. If no one can find it, use it, or test it, it will never be improved.


REMEMBER BACKUP, BACKUP AND BACKUP

Before installing the official version of oscommerce first look at a responsive version here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

@@Tsimi I found you're using standard version of orders.php. Currently the one from paypal app has been added to github so it seems it's the way to go.

 

I'll try to adapt it but I cannot fully test the page as I don't use paypal app.

Share this post


Link to post
Share on other sites

The initial version used a horizontal header menu instead of the side menu which is nice and good if you don't have new/many tabs inside it.

But as soon you add some addons like AAS or other Addons that need to have their own tabs then the space inside the horizontal menu is simply not enough.

So I introduced a switch that allows you to switch between a horizontal menu and a offcanvas side menu.

Both menus are generated dynamically. No hard coded stuff this time. B)

 

Also updated to the latest version, Bootstrap ver. 3.3.5

Share this post


Link to post
Share on other sites

Just reverted back to bootstrap.js version 3.2.0. Somehow the accordion for the side menu won't toggle/collapse with later version like 3.3.4 or 3.3.5

Btw. to use the menu switch go to Configuration -> My Store

Share this post


Link to post
Share on other sites

UPDATE:

 

fixed the accordion menu to work with the latest version (3.3.5) of bootstrap.js.

Needed to add the panel-side class to the parent definition inside the collapse js part.

Share this post


Link to post
Share on other sites

So I introduced a switch that allows you to switch between a horizontal menu and a offcanvas side menu.

Both menus are generated dynamically. No hard coded stuff this time. B)

 

Also updated to the latest version, Bootstrap ver. 3.3.5

 

I cannot find that switch. Can you please point me in the right direction?

Share this post


Link to post
Share on other sites

@Tsimi

 

Hi Lambros,

 

I upgraded my admin to your BS version earlier this afternoon and it works great.

 

I do however have one little problem (so far) after converting an existing addon to work with Bootstrap. The code worked perfectly before changing.

 

Its not a massive problem just a button issue I think. I know my button code is not correct but not sure what to change and what parameters to use)

 

to assign a product:

 

1. click on a checkbox to add the tick

2. click save

 

to unassign a product

 

1. click on the checkbox to remove the tick

2. click save

 

The current submit does assign the product_id to the database but for some reason does not remove it.

 

would you be so kind to have a look over the following code and let me know if anything jumps out at you as I have been staring at the code all afternoon and still can not sort it.

<?php
/*
   Parts Filter
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
   Copyright (c) 2010 osCommerce
   Released under the GNU General Public License
*/

require('includes/application_top.php');

 $printer_category_id = $_REQUEST['printer_category_id'];
 $parent_id = $_REQUEST['parent_id'];

 if(isset($_REQUEST['printer_category_id'])&&($_REQUEST['printer_category_id']!='')) {
	$vehcat_query = tep_db_query("SELECT * FROM ".TABLE_PRINTER_CATEGORY." WHERE printer_category_id = '".$_REQUEST['printer_category_id']."'");
	$vehcat_row = tep_db_fetch_array($vehcat_query);
 }

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

// Ultimate SEO URLs v2.1
// If the action will affect the cache entries
    if ( preg_match("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

  if (tep_not_null($action)) {
    switch ($action) {
	 case 'assign_products':
        $productids = "";
        $mediacat_ref_no = "";
        $mediacat_quantity = "";
		$selvalarray = array();
		$pagearray = array();
		$remproductarray = array();

		$products_query_raw = 'select distinct p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd,  '.TABLE_PRINTER_CATEGORY.' pc where p.products_id = pd.products_id and p.products_id = pc.printer_category_id and pd.language_id = "'.(int)$languages_id.'" and pc.printer_category_id = "'.(int)$printer_category_id.'" order by pd.products_id asc';

		$products_query = tep_db_query($products_query_raw);
		$products_split = new splitPageResults($_REQUEST['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);
		$products_query = tep_db_query($products_query_raw);

		while ($products = tep_db_fetch_array($products_query)) {
			array_push($pagearray,$products['products_id']);
		}

		if(isset($HTTP_POST_VARS['productids'])) {
			foreach($HTTP_POST_VARS['productids'] as $val)
		  { if($val!='') {
			array_push($selvalarray,$val);
			$productids .= $val.",";
		  }
		 }
		}

		foreach($pagearray as $val) {
		 if(!in_array($val,$selvalarray)) {
		  array_push($remproductarray,$val);
		 }
		}

		$olderdata = $vehcat_row['productids'];

		$finaldata = "";
		if($olderdata!='') {
		 $oldprodarray = explode(",",$olderdata);
		 foreach($oldprodarray as $val)
		{ if(!in_array($val,$remproductarray)) {
			if(!in_array($val,$selvalarray)) {
			 array_push($selvalarray,$val);
			}
		  }
		}

		$productids = "";
        foreach($selvalarray as $val) {
	      $productids .= $val.",";
        }
	      $finaldata = substr($productids,0,-1);
		}else{
		  $finaldata = substr($productids,0,-1);
		}

		$update_sql_data = array('productids' => $finaldata);

        tep_db_perform(TABLE_PRINTER_CATEGORY, $update_sql_data, 'update', "printer_category_id = '" . (int)$printer_category_id . "'");
        tep_redirect(tep_href_link(FILENAME_PRINTER_PRODUCTS, 'parent_id=' . $parent_id.'&printer_category_id='.$printer_category_id.'&page='.$_REQUEST['page'] ));
        break;

	}
  }

  require(DIR_WS_INCLUDES . 'template_top.php');

  $vehcat_query = tep_db_query("SELECT * FROM ".TABLE_PRINTER_CATEGORY." WHERE printer_category_id = '".$_REQUEST['printer_category_id']."'");
  $vehcat_row = tep_db_fetch_array($vehcat_query);
  $prodidsarr = explode(",",$vehcat_row['productids']);
?>

<div class="row">
  <div class="col-md-8 h3">
    <?php echo HEADING_TITLE." ".$vehcat_row['category_name']; ?>
  </div>
  <div class="col-md-2">
    <?php echo '<a href="' . tep_href_link(FILENAME_PRINTER_CATEGORY, 'printer_category_id='.$printer_category_id.'&parent_id=' . $parent_id ) . '"><div class="go_back">' . tep_draw_button(IMAGE_GO_BACK, 'arrowreturnthick-1-w', null, 'primary') . '</div></a>';?>
   </div>
   <div class="col-md-2">
    <?php echo tep_draw_form('printerfilter', FILENAME_PRINTER_PRODUCTS, 'action=assign_products&parent_id='.$parent_id.'&printer_category_id='.$printer_category_id.'&page='.$_REQUEST['page'], 'post');?>
    <?php echo tep_image_submit('button_save.gif', IMAGE_SAVE); ?>
   </div>
</div>

<div class="table-responsive">
<table class="table table-condensed table-hover header">
        <thead><!-- table head-->
            <tr>
               <th><?php echo TABLE_HEADING_PRODUCT_ID; ?></th>
               <th><?php echo TABLE_HEADING_PRODUCT_MODEL;?></th>
               <th><?php echo TABLE_HEADING_PRODUCT_NAME;?></th>
               <th><?php echo TABLE_HEADING_PRODUCT_CATEGORY_NAME;?></th>
               <th><?php echo TABLE_HEADING_PRODUCT_MEDIACAT_REF_NO;?></th>
               <th><?php echo TABLE_HEADING_PRODUCT_MEDIACAT_QUANTITY;?></th>
               <th><?php echo TABLE_HEADING_PRODUCT_SELECT;?></th>
            </tr>
        </thead>

        <tbody>
			<?php
				$products_query_raw = 'select distinct p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd where p.products_id = pd.products_id and pd.language_id = "'.(int)$languages_id.'" order by pd.products_id asc';
				$products_split = new splitPageResults($_REQUEST['page'], '70', $products_query_raw, $products_query_numrows);
				$products_query = tep_db_query($products_query_raw);
				while ($products = tep_db_fetch_array($products_query)) {

 				if ( strpos( tep_get_product_path($products['products_id']), "_" ) == FALSE  ) {
 				  $result = tep_get_category_name( tep_get_product_path( $products['products_id'] ) );
 				} else {
 				   $pieces = explode("_", tep_get_product_path($products['products_id']) );
 			       $categories_array = array();
 			       $categories_array = tep_get_categories( $categories_array, $pieces[0] );
 		             for ( $j = 0 ; $j < count($categories_array) ; $j++ ) {
 				     if ( $categories_array[ $j ]['id'] == $pieces[ count( $pieces ) - 1 ] ) {
 				       $result =  $categories_array[ $j ][ 'text' ];
 		       break;
 				     }
 				   }
 				 }
			?>
<tr>
<?php
  if (empty( $products['products_mediacat_ref_no'] )) {
  }else{
?>
  <td class="col-md-1"><?php echo $products['products_id'];?></td>
  <td class="col-md-2"><?php echo $products['products_model'];?></td>
  <td class="col-md-2"><?php echo $products['products_name'];?></td>
  <td class="col-md-2"><?php echo $result; ?></td>
  <td class="col-md-1"><?php echo $products['products_mediacat_ref_no'];?></td>
  <td class="col-md-1"><?php echo $products['products_mediacat_quantity'];?></td>
  <td class="col-md-1"><input type="checkbox" name="productids[]" value="<?php echo $products['products_id'];?>" <?php if(in_array($products['products_id'],$prodidsarr)) echo 'checked';?> /></td>

<?php
	}
   } // End of while
?>

  </tr>
 </tbody>
</table>
</div>

</form>

<!-- body_eof //-->
<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

Thanks

 

Mark

Edited by PupStar

Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

@@PupStar

 

Hi Mark

 

I don't see any issues regarding the code for the buttons or form tag except that the buttons need some restyling.

I tried to test that code of yours but it's hard if you have only bits and pieces. I know you recoded the Ink & Printer Filter addon.

That addon is old and has many deprecated code inside it. And to test your code I needed at least this file filter_printer_products.php. When I click on the save button it redirects me to that file to select a product and there is where my road ends because of eregi code bla, bla, bla....

I am not sure how that code of yours look like when it works so hard to tell what is not working.

You said it was working previously before the Bootstrap changes? Maybe you can show me your previous code and I can compare them then with your latest one?

Share this post


Link to post
Share on other sites

@@PupStar

 

Hi Mark

 

I don't see any issues regarding the code for the buttons or form tag except that the buttons need some restyling.

I tried to test that code of yours but it's hard if you have only bits and pieces. I know you recoded the Ink & Printer Filter addon.

That addon is old and has many deprecated code inside it. And to test your code I needed at least this file filter_printer_products.php. When I click on the save button it redirects me to that file to select a product and there is where my road ends because of eregi code bla, bla, bla....

I am not sure how that code of yours look like when it works so hard to tell what is not working.

You said it was working previously before the Bootstrap changes? Maybe you can show me your previous code and I can compare them then with your latest one?

 

@@Tsimi

 

Hi Lambros,

 

The code above is the filename_printer_products.php if thats what you meant??

 

below is the original non BS code

 

thank you for taking time out to look at this for me.

 

Mark

<?php
/*
   Parts Filter
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
   Copyright (c) 2010 osCommerce
   Released under the GNU General Public License
*/

  require('includes/application_top.php');

 $printer_category_id = $_REQUEST['printer_category_id'];
 $parent_id = $_REQUEST['parent_id'];
if(isset($_REQUEST['printer_category_id'])&&($_REQUEST['printer_category_id']!=''))
{
	$vehcat_query = tep_db_query("SELECT * FROM ".TABLE_PRINTER_CATEGORY." WHERE printer_category_id = '".$_REQUEST['printer_category_id']."'");
	$vehcat_row = tep_db_fetch_array($vehcat_query);
}

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
// Ultimate SEO URLs v2.1
// If the action will affect the cache entries
    if ( preg_match("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

  if (tep_not_null($action)) {
    switch ($action) {
	 case 'assign_products':
        $productids = "";
        $mediacat_ref_no = "";
        $mediacat_quantity = "";
		$selvalarray = array();
		$pagearray = array();
		$remproductarray = array();

		$products_query_raw = 'select distinct p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd,  '.TABLE_PRINTER_CATEGORY.' pc where p.products_id = pd.products_id and p.products_id = pc.printer_category_id and pd.language_id = "'.(int)$languages_id.'" and pc.printer_category_id = "'.(int)$printer_category_id.'" order by pd.products_id asc';

		$products_query = tep_db_query($products_query_raw);
		$products_split = new splitPageResults($_REQUEST['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);
		$products_query = tep_db_query($products_query_raw);

		while ($products = tep_db_fetch_array($products_query))
		{
			array_push($pagearray,$products['products_id']);
		}

		if(isset($HTTP_POST_VARS['productids']))
		{
			foreach($HTTP_POST_VARS['productids'] as $val)
			{
				if($val!='')
				{
					array_push($selvalarray,$val);
					$productids .= $val.",";
				}
			}
		}
		foreach($pagearray as $val)
		{
			if(!in_array($val,$selvalarray))
			{
				array_push($remproductarray,$val);
			}
		}

		$olderdata = $vehcat_row['productids'];

		$finaldata = "";
		if($olderdata!='')
		{
			 $oldprodarray = explode(",",$olderdata);
			 foreach($oldprodarray as $val)
			 {
			 	if(!in_array($val,$remproductarray))
				{
					if(!in_array($val,$selvalarray))
					{
						array_push($selvalarray,$val);
					}
				}
			 }

			 $productids = "";

			 foreach($selvalarray as $val)
			 {
			 	$productids .= $val.",";

			 }
			 $finaldata = substr($productids,0,-1);
		}
		else
		{
			 $finaldata = substr($productids,0,-1);
		}

		$update_sql_data = array('productids' => $finaldata);

        tep_db_perform(TABLE_PRINTER_CATEGORY, $update_sql_data, 'update', "printer_category_id = '" . (int)$printer_category_id . "'");
        tep_redirect(tep_href_link(FILENAME_PRINTER_PRODUCTS, 'parent_id=' . $parent_id.'&printer_category_id='.$printer_category_id.'&page='.$_REQUEST['page'] ));
        break;

	}
  }
// check if the catalog image directory exists
  if (is_dir(DIR_FS_CATALOG_IMAGES)) {
    if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
  } else {
    $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
  }

  require(DIR_WS_INCLUDES . 'template_top.php');

  $vehcat_query = tep_db_query("SELECT * FROM ".TABLE_PRINTER_CATEGORY." WHERE printer_category_id = '".$_REQUEST['printer_category_id']."'");
  $vehcat_row = tep_db_fetch_array($vehcat_query);
  $prodidsarr = explode(",",$vehcat_row['productids']);
?>

<table border="0" align="center" width="85%" cellspacing="2" cellpadding="2">
  <tr>
<!-- body_text //-->
    <td width="100%" valign="top">
      <table border="0" width="100%" cellspacing="4" cellpadding="0">
        <tr>
          <td>
            <table border="0" width="80%" cellspacing="2" cellpadding="2">
              <tr>
                <td class="pageHeading"><?php echo HEADING_TITLE." ".$vehcat_row['category_name']; ?></td>
                <td class="smallText" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_PRINTER_CATEGORY, 'printer_category_id='.$printer_category_id.'&parent_id=' . $parent_id ) . '"><div class="go_back">' . tep_draw_button(IMAGE_GO_BACK, 'arrowreturnthick-1-w', null, 'primary') . '</div></a>';?> </td>
                 <?php echo tep_draw_form('categorie', FILENAME_PRINTER_PRODUCTS, '', 'get'); echo tep_draw_hidden_field( 'row_by_page', $row_by_page);?>
                 <td class="smallText" align="right" valign="top">
                 </td></form>
                <td align="right"></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td>
            <table border="0" width="80%" cellspacing="0" cellpadding="0">
            <tr>
              <td valign="top">
                <?php echo tep_draw_form('printerfilter', FILENAME_PRINTER_PRODUCTS, 'action=assign_products&parent_id='.$parent_id.'&printer_category_id='.$printer_category_id.'&page='.$_REQUEST['page'], 'post');?>
                <table border="0" width="100%" cellspacing="2" cellpadding="2">
                  <tr class="dataTableHeadingRow">
                    <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PRODUCT_ID; ?></td>
                    <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PRODUCT_MODEL;?></td>
                    <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_PRODUCT_NAME;?></td>
                    <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PRODUCT_CATEGORY_NAME;?></td>
                    <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PRODUCT_MEDIACAT_REF_NO;?></td>
                    <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PRODUCT_MEDIACAT_QUANTITY;?></td>
                    <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PRODUCT_SELECT;?></td>
                  </tr>
<?php
     $products_query_raw = 'select distinct p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd where p.products_id = pd.products_id and pd.language_id = "'.(int)$languages_id.'" order by pd.products_id asc';

$products_split = new splitPageResults($_REQUEST['page'], '30', $products_query_raw, $products_query_numrows);
     $products_query = tep_db_query($products_query_raw);
     while ($products = tep_db_fetch_array($products_query))
     {


 if ( strpos( tep_get_product_path($products['products_id']), "_" ) == FALSE  ) {
   $result = tep_get_category_name( tep_get_product_path( $products['products_id'] ) );
 } else {
    $pieces = explode("_", tep_get_product_path($products['products_id']) );
     $categories_array = array();
      $categories_array = tep_get_categories( $categories_array, $pieces[0] );
      for ( $j = 0 ; $j < count($categories_array) ; $j++ ) {
      if ( $categories_array[ $j ]['id'] == $pieces[ count( $pieces ) - 1 ] ) {
        $result =  $categories_array[ $j ][ 'text' ];
        break;
      }
    }
  }

  if (empty( $products['products_mediacat_ref_no'] )) {
  }else{
?>
                  <tr>
                    <td class="dataTableContentBorder" valign="middle" align="center"><?php echo $products['products_id'];?></td>
                    <td class="dataTableContentBorder" align="center" valign="middle"><?php echo $products['products_model'];?></td>
                    <td class="dataTableContentBorder" valign="middle"><?php echo $products['products_name'];?></td>

                    <td class="dataTableContentBorder" valign="middle" align="center"><?php echo $result; ?></td>

                    <td class="dataTableContentBorder" valign="middle" align="center"><?php echo $products['products_mediacat_ref_no'];?></td>
                    <td class="dataTableContentBorder" valign="middle" align="center"><?php echo $products['products_mediacat_quantity'];?></td>
                    <td class="dataTableContentBorder" valign="middle" align="center"><input type="checkbox" name="productids[]" value="<?php echo $products['products_id'];?>" <?php if(in_array($products['products_id'],$prodidsarr)) echo 'checked';?> /></td>
                  </tr>
<?php
	}
   } // End of while
?>

 <div class="assign_parts"><?php echo tep_draw_button(IMAGE_ASSIGN_PARTS, 'disk', null, 'primary'); ?></div>

                </table></form>
              </td>
          </tr>
          <tr>
			<td ><table border="0" width="100%" cellspacing="0" cellpadding="2">
			 <tr>
			  <td class="smallText" valign="top"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_REQUEST['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
			  <td class="smallText" align="right"><?php echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_REQUEST['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y', 'cID', 'action'))); ?></td>
			 </tr>
			</table></td>
		  </tr>
        </table>
		</td>
      </tr>
    </table>
    </td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->
<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
Edited by PupStar

Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

@@Tsimi, u r the MAN!!!  Any chance to consolidate the functions and packages between the shop and admin side would be nice, too.

 

 

Some of you might remember my rather poor attempt to bootstrap the admin a while back. :wacko:
Well I went over all the files again and recoded/fixed it and now finally I can say things work as they should. B)

I also took the bootstrapped install package from the EDGE version. Now we have at least a full responsive osC from A-Z.
There might be minor bugs around and it is recommended to use at least a tablet to work with it.

Anyway here is my "complete" version.

https://github.com/Tsimi78/osCommerce-GOLD-AdminBS

Enjoy and if anything is you know where to find me. ;)

Share this post


Link to post
Share on other sites

Any chance to consolidate the functions and packages between the shop and admin side would be nice, too.

 

Hi Tim

 

Glad you like it.

 

What exactly do you mean with "consolidate"? You mean using 1 Bootstrap file set for catalog side and admin side?

 

If that is what you meant, I did that a while back and reverted the changes, don't really remember why.

There is still a lot room for improvement I did some changes to my local test shop but I haven't uploaded those changes to the github yet. To be honest it's been a few months since I touched this Admin BS project

and I am a bit rusty when it comes to "pull", "merge" and so on...using the scourcetree software. I also did a change inside the bootstrap.js which is not good I should put the change into a user.js file similar to the css done in the front end.

It looks like more and more people start to get interested in this Admin BS stuff so I might get back to work and see what can be done to improve this project.

Share this post


Link to post
Share on other sites

@@PupStar

 

Hi Mark

 

I have looked at your file and played around with it the whole day yesterday but no luck. It took me half day to get everything running more or less. Then as you already mentioned you can tick the checkboxes and it records into the Database but it won't delete them from the Database once unchecked.

I also installed this into a normal osC 2.3.4 shop and got the same result. I am not really sure that this is a button issue but more of an array issue.

I am terribly bad with complex php coding like arrays and queries therefore I couldn't get it working.

While I was looking at it I was thinking why not use radio buttons instead? You know active/inactive kind a thing? Or instead of unchecking the checkbox just add a trash icon on the right that would delete the item from the database.

Here again array knowledge is a must and this is where I fail.

 

Sorry that I can't be of any more help right now. I will keep trying and if anything should arise I will contact you. You know how to change the buttons to look like Bootstrap buttons right? The save button and the back button need a bit of recoding.

Share this post


Link to post
Share on other sites

@@PupStar

 

Hi Mark

 

I have looked at your file and played around with it the whole day yesterday but no luck. It took me half day to get everything running more or less. Then as you already mentioned you can tick the checkboxes and it records into the Database but it won't delete them from the Database once unchecked.

I also installed this into a normal osC 2.3.4 shop and got the same result. I am not really sure that this is a button issue but more of an array issue.

I am terribly bad with complex php coding like arrays and queries therefore I couldn't get it working.

While I was looking at it I was thinking why not use radio buttons instead? You know active/inactive kind a thing? Or instead of unchecking the checkbox just add a trash icon on the right that would delete the item from the database.

Here again array knowledge is a must and this is where I fail.

 

Sorry that I can't be of any more help right now. I will keep trying and if anything should arise I will contact you. You know how to change the buttons to look like Bootstrap buttons right? The save button and the back button need a bit of recoding.

 

Hi Lambros,

 

Thanks for taking the time to have a go.

 

I will revert everything back to the old admin and work forward one step at a time and see if I can get it solved.

 

Thanks again

 

Mark


Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

@@Tsimi

 

ok I have started from scratch and I think I have found the problem and it lies in the product query.

 

This query works

$products_query_raw = 'select distinct p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd, '.TABLE_PRINTER_CATEGORY.' pc where p.products_id = pd.products_id and pd.language_id = "'.(int)$languages_id.'" and pc.printer_category_id = "'.$printer_category_id.'" order by pd.products_name asc';

but as soon as I add in

p.products_id = pc.printer_category_id

so the query then looks like this it stops working

$products_query_raw = 'select distinct p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd, '.TABLE_PRINTER_CATEGORY.' pc where p.products_id = pd.products_id and p.products_id = pc.printer_category_id and pd.language_id = "'.(int)$languages_id.'" and pc.printer_category_id = "'.$printer_category_id.'" order by pd.products_name asc';

Any ideas why?

 

Mark


Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

@@Tsimi, I guess I meant that by the functions and classes that reside in the catalog and admin side...I don't know if anyone else think it would be nice if it can be done via one set of functions/classes for both side to reduce the amount of codes that need to be managed.

 

 

Hi Tim

 

Glad you like it.

 

What exactly do you mean with "consolidate"? You mean using 1 Bootstrap file set for catalog side and admin side?

 

If that is what you meant, I did that a while back and reverted the changes, don't really remember why.

There is still a lot room for improvement I did some changes to my local test shop but I haven't uploaded those changes to the github yet. To be honest it's been a few months since I touched this Admin BS project

and I am a bit rusty when it comes to "pull", "merge" and so on...using the scourcetree software. I also did a change inside the bootstrap.js which is not good I should put the change into a user.js file similar to the css done in the front end.

It looks like more and more people start to get interested in this Admin BS stuff so I might get back to work and see what can be done to improve this project.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×