Difference between revisions of "Opencart to do and wish list"

From Wiki at Neela Nurseries
Jump to: navigation, search
m (OpenCart Feature And Capabilities Wish List)
m
Line 1: Line 1:
 +
 +
 +
 +
== OVERVIEW ==
 +
 +
This wiki article, started 2017 August at Neela, a stash point for Ted's notes on OpenCart.  Notes include configuration and works in progress, and some notes on basic MYSQL queries to aid in data manipulations which OpenCart interface doesn't fully support . . .  - TMH
 +
 +
<!-- comment -->
  
  
Line 76: Line 84:
  
  
 +
<!-- comment -->
 +
 +
 +
 +
== Useful Queries to OC Database ==
 +
 +
OpenCart 2.x web interface provides much control over store, product category and product records and attributes but falls shy of some useful query-and-update expressions.  Some of these queries include,
 +
 +
 +
<ul>
 +
<li>  find all products not in any category (required MYSQL sub-query)
 +
<li>  change product status per product category
 +
<li>  add "product to store B" record per "product in store A" record
 +
</ul>
  
  
<!-- comment -->
 
  
 
<!-- EOF -->
 
<!-- EOF -->

Revision as of 15:16, 7 September 2017


OVERVIEW

This wiki article, started 2017 August at Neela, a stash point for Ted's notes on OpenCart. Notes include configuration and works in progress, and some notes on basic MYSQL queries to aid in data manipulations which OpenCart interface doesn't fully support . . . - TMH



OpenCart Feature And Capabilities Wish List

- 2017-08-29 -

OpenCart 2.x administrative web interface has a lot of nice features, but the product adding and editing page has only limited product filtering. Would be useful to be able to amend the product-filtering options beyond the six product attributes shown on this page in OC 2.x. As first step in locating the PHP script or scripts responsible for generating this admin interface, here Ted posts the HTML code which creates the six-count input form for filtering products . . .


Figure x - HTML excerpt of OpenCart 2.x "edit products" administrative web interface:


      <div class="panel-body">
        <div class="well">
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label class="control-label" for="input-name">Product Name</label>
                <input type="text" name="filter_name" value="" placeholder="Product Name" id="input-name" class="form-control" />
              </div>
              <div class="form-group">
                <label class="control-label" for="input-model">Model</label>
                <input type="text" name="filter_model" value="" placeholder="Model" id="input-model" class="form-control" />
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="control-label" for="input-price">Price</label>
                <input type="text" name="filter_price" value="" placeholder="Price" id="input-price" class="form-control" />
              </div>
              <div class="form-group">
                <label class="control-label" for="input-quantity">Quantity</label>
                <input type="text" name="filter_quantity" value="" placeholder="Quantity" id="input-quantity" class="form-control" />
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="control-label" for="input-status">Status</label>
                <select name="filter_status" id="input-status" class="form-control">
                  <option value="*"></option>
                                    <option value="1" selected="selected">Enabled</option>
                                                      <option value="0">Disabled</option>
                                  </select>
              </div>
              <div class="form-group">
                <label class="control-label" for="input-image">Image</label>
                <select name="filter_image" id="input-image" class="form-control">
                  <option value="*"></option>
                                    <option value="1">Enabled</option>
                                                      <option value="0">Disabled</option>
                                  </select>
              </div>
              <button type="button" id="button-filter" class="btn btn-primary pull-right"><i class="fa fa-filter"></i> Filter</button>
            </div>
          </div>
        </div>


Ok narrowing a text search via grep called in OpenCart's installation directory, with -r recursive search option, leads to two results both in files of type 'tpl'. These may be template files of some kind. Have PHP developers a convention of writing template files and giving them .tpl extension? . . .


ted@localhost:/var/wwwsite.com/public_html/opencart-2p3p0p2$ grep -n -r 'input type="text" name="filter_quantity"' ./*

./admin/view/template/catalog/product_list.tpl:52:                <input type="text" name="filter_quantity" value="<?php echo $filter_quantity; ?>" placeholder="<?php echo $entry_quantity; ?>" id="input-quantity" class="form-control" />

./admin/view/template/extension/openbay/openbay_itemlist.tpl:122:                    <input type="text" name="filter_quantity" value="<?php echo $filter_quantity; ?>" class="form-control" placeholder="<?php echo $text_min; ?>" id="input-quantity" />

ted@localhost:/var/www/site.com/public_html/opencart-2p3p0p2$



Useful Queries to OC Database

OpenCart 2.x web interface provides much control over store, product category and product records and attributes but falls shy of some useful query-and-update expressions. Some of these queries include,


  • find all products not in any category (required MYSQL sub-query)
  • change product status per product category
  • add "product to store B" record per "product in store A" record