Difference between revisions of "Opencart to do and wish list"
(2017-08-29 - Ted starting OpenCart features and capabilities to-do and wish-list page) |
m |
||
(7 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
− | == OpenCart Feature And Capabilities Wish List == | + | == [[#top|^]] 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 --> | ||
+ | |||
+ | |||
+ | == [[#top|^]] Opencart Issues == | ||
+ | |||
+ | Orders not editable when product quantity reaches zero . . . | ||
+ | |||
+ | * 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 | ||
+ | |||
+ | 2021 Q4 note: Opencart recent release is 3.0.3.7, a release which now incorporates [ Twig] template language and changes the somewhat the manner in which database queries by Opencart PHP scripts can be shared with the HTML output generating code. A useful Opencart forum post which gave key clue as to sharing product quantities with general product search results pages: | ||
+ | |||
+ | * https://forum.opencart.com/viewtopic.php?t=200892 | ||
+ | |||
+ | Key files changes are: | ||
+ | |||
+ | [cart_install_dir]/catalog/controller/product/category.php | ||
+ | |||
+ | ...and... | ||
+ | |||
+ | [cart_install_dir]/catalog/view/theme/default/template/product/category.twig | ||
+ | |||
+ | |||
+ | <!-- comment --> | ||
+ | |||
+ | == [[#top|^]] OpenCart Feature And Capabilities Wish List == | ||
- 2017-08-29 - | - 2017-08-29 - | ||
Line 60: | Line 90: | ||
</pre> | </pre> | ||
+ | |||
+ | Ok narrowing a text search via <code>grep</code> called in OpenCart's installation directory, with <code>-r</code> 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? . . . | ||
+ | |||
+ | <pre> | ||
+ | |||
+ | 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$ | ||
+ | |||
+ | </pre> | ||
<!-- comment --> | <!-- comment --> | ||
+ | |||
+ | == [[#top|^]] 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> | ||
+ | |||
+ | |||
+ | == [[#top|^]] Date and Timestamp Related == | ||
+ | |||
+ | * https://stackoverflow.com/questions/8338031/mysql-setup-the-format-of-datetime-to-dd-mm-yyyy-hhmmss-when-creating-a-tab | ||
+ | |||
+ | |||
<!-- EOF --> | <!-- EOF --> |
Latest revision as of 21:50, 2 November 2021
Contents
^ 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 . . .
2021 Q4 note: Opencart recent release is 3.0.3.7, a release which now incorporates [ Twig] template language and changes the somewhat the manner in which database queries by Opencart PHP scripts can be shared with the HTML output generating code. A useful Opencart forum post which gave key clue as to sharing product quantities with general product search results pages:
Key files changes are:
[cart_install_dir]/catalog/controller/product/category.php
...and...
[cart_install_dir]/catalog/view/theme/default/template/product/category.twig
^ 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
^ Date and Timestamp Related