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

From Wiki at Neela Nurseries
Jump to: navigation, search
m
(Opencart Issues)
Line 14: Line 14:
  
 
*  https://github.com/opencart/opencart/issues/3811
 
*  https://github.com/opencart/opencart/issues/3811
 +
 +
*  https://stackoverflow.com/questions/40828394/opencart-2-2-how-to-show-stock-per-option-with-zero-stock-also-showing
  
  

Revision as of 07:18, 17 November 2019


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 Issues

Orders not editable when product quantity reaches zero . . .


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