Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ selenium.log
*.lock
.phpintel
package-lock.json
npm-shrinkwrap.json
1 change: 1 addition & 0 deletions src/com_digicom/admin/access.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC" />
<action name="core.dashboard" title="COM_DIGICOM_ACCESS_DASHBOARD_TITLE" description="COM_DIGICOM_ACCESS_DASHBOARD_DESC" />
<action name="core.products" title="COM_DIGICOM_ACCESS_PRDUCTS_TITLE" description="COM_DIGICOM_ACCESS_PRDUCTS_DESC" />
<action name="core.categories" title="COM_DIGICOM_ACCESS_CATEGORIES_TITLE" description="COM_DIGICOM_ACCESS_CATEGORIES_DESC" />
<action name="core.filemanager" title="COM_DIGICOM_ACCESS_FILEMANAGER_TITLE" description="COM_DIGICOM_ACCESS_FILEMANAGER_DESC" />
Expand Down
2 changes: 1 addition & 1 deletion src/com_digicom/admin/helpers/digicom.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static function renderSidebar(){

}

public static function format_price ($amount, $ccode, $add_sym = true, $configs, $decial = null)
public static function format_price ($amount, $ccode, bool $add_sym = true, $configs, $decial = null)
{
if($decial === NULL){
$decial = $configs->get('decimaldigits','2');
Expand Down
6 changes: 6 additions & 0 deletions src/com_digicom/admin/language/en-GB/en-GB.com_digicom.ini
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ COM_DIGICOM_N_PRODUCTS_DUPLICATED = "%d items successfully duplicated."
COM_DIGICOM_N_ITEMS_CHECKED_IN="%d Products successfully checked in."
COM_DIGICOM_PRODUCTS_VALIDITY = "Validity"

COM_DIGICOM_PRODUCTS_TOOLBAR_ADD_VIDEO_PRODUCT = "Single Video"
COM_DIGICOM_PRODUCTS_TOOLBAR_ADD_VIDEO_PRODUCT_TIP = "Add single product is Video"
;--------------------------------------------
; PRODUCT - New/Edit View
;--------------------------------------------
Expand Down Expand Up @@ -350,6 +352,8 @@ COM_DIGICOM_ORDERS_TYPE = "Purchase Type"
COM_DIGICOM_ORDER_TYPE_FREE = "Free"
COM_DIGICOM_ORDER_TYPE_PURCHASED = "Purchase"

COM_DIGICOM_ORDERS_SEARCH_NOTICE = "Quick Search Tips: Example: <strong>email:me@domain.com</strong>. Usable codes: <br><strong>id:</strong> and write id of customer <br> <strong>user:</strong> and write username or full name of customer <br><strong>email:</strong> and write email of customer <br> <strong>processor:</strong> and write payment processor name <br><strong>promocode:</strong> and write promocode name. Then hit search"

;--------------------------------------------
; ORDER - Details View
;--------------------------------------------
Expand Down Expand Up @@ -447,6 +451,8 @@ COM_DIGICOM_ABOUT_LICENSES_USE_VIDEO = "Licenses video guide"
COM_DIGICOM_LICENSE_EDIT = "Edit License"
COM_DIGICOM_LICENSE_SEARCH_HINTS="Search by type:<br>1. License ID : Only Number<br>2. Customer : user:Id or user:Name<br>3. ID : id:Number"

COM_DIGICOM_LICENSE_SEARCH_NOTICE = "Quick Search Tips: Example: <strong>email:me@domain.com</strong>. Usable codes: <br><strong>id:</strong> and write id of customer <br> <strong>user:</strong> and write username or full name of customer <br><strong>email:</strong> and write email of customer. <br>Then hit search"

;--------------------------------------------
; ABOUT PAGE
;--------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions src/com_digicom/admin/language/en-GB/en-GB.com_digicom.sys.ini
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ JGLOBAL_PRODUCT_ORDERING_DATE_DESC = "If products are ordered by date, which dat
;--------------------------------------------
; Menu : Components > DigiCom
;--------------------------------------------
COM_DIGICOM_ACCESS_DASHBOARD_TITLE = "Access Dashboard Interface"
COM_DIGICOM_ACCESS_DASHBOARD_DESC = ""

COM_DIGICOM_ACCESS_PRDUCTS_TITLE = "Access Products Interface"
COM_DIGICOM_ACCESS_PRDUCTS_DESC = ""

Expand All @@ -132,6 +135,14 @@ COM_DIGICOM_ACCESS_DISCOUNTS_DESC = ""
COM_DIGICOM_ACCESS_REPORTS_TITLE = "Access Reports Interface"
COM_DIGICOM_ACCESS_REPORTS_DESC = ""

;--------------------------------------------
; Manager
;--------------------------------------------

COM_DIGICOM_MENU_ITEM_TYPE_MANAGER = "Manager Menu"
COM_DIGICOM_MENU_ITEM_TYPE_MANAGER_DESC = "Manager page to check orders, licenses from frontend."


;--------------------------------------------
; Menu : Components > DigiCom
;--------------------------------------------
Expand Down
10 changes: 4 additions & 6 deletions src/com_digicom/admin/layouts/edit/bundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ function jRemveProduct(id){
jQuery(function ($) {
jQuery('input[name=\"jform[bundle_source]\"]').on('change', function(){
var bundle_source = jQuery('#jform_bundle_source_option_select input:checked').val();

jQuery(`.bundle_source_option:not(#bundle_source_` + bundle_source + `_option)`).hide();
jQuery(`#bundle_source_` + bundle_source + `_option`).show();
});
Expand All @@ -64,18 +63,17 @@ function jRemveProduct(id){
$bundle_source = $form_data->get('bundle_source');
?>

<fieldset class="adminform">

<legend><?php echo JText::_('COM_DIGICOM_PRODUCT_BUNDLE_FILES');?></legend>
<fieldset class="adminform panel-box">

<h3><?php echo JText::_('COM_DIGICOM_PRODUCT_BUNDLE_FILES');?></h3>
<div class="alert alert-info">
<?php echo JText::_("COM_DIGICOM_PRODUCT_BUNDLE_HEADER_NOTICE"); ?>
</div>

<?php echo $form->renderField('bundle_source'); ?>
<br>


<hr>

<div class="bundle_source_option <?php echo ($bundle_source == 'category' ? '' : ' hide');?>" id="bundle_source_category_option">
<?php echo $form->renderField('bundle_category'); ?>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/com_digicom/admin/layouts/edit/files.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,8 @@
</table>
</div>
</fieldset>

<?php
$dispatcher = JDispatcher::getInstance();
$results = $dispatcher->trigger( 'onDigicomAdminAfterProductFiles', array());
?>
25 changes: 18 additions & 7 deletions src/com_digicom/admin/models/licenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,17 @@ protected function getListQuery()
);
$query->from($db->quoteName('#__digicom_licenses', 'a'));

// Join over the users
// Join over the customers
$query->select($db->quoteName('dc.name', 'client'))
->join('LEFT', $db->quoteName('#__digicom_customers', 'dc') . ' ON dc.id = a.userid');

// Join over the users
// Join over the products
$query->select($db->quoteName('dp.name', 'productname'))
->join('LEFT', $db->quoteName('#__digicom_products', 'dp') . ' ON dp.id = a.productid');

// Join over the users
$query->select('ju.username')
->join('LEFT', '#__users AS ju ON ju.id=a.userid');

// Filter by published state
$published = $this->getState('filter.published');
Expand All @@ -155,17 +159,24 @@ protected function getListQuery()

if (!empty($search))
{
if (stripos($search, 'user:') === 0)
if (stripos($search, 'id:') === 0){
$query->where('dc.id = ' . (int) substr($search, 3));
}
elseif (stripos($search, 'user:') === 0)
{
$search = $db->quote('%' . $db->escape(substr($search, 5), true) . '%');
$query->where(
$db->quoteName('dc.id') . ' = ' . (int) substr($search, 5)
. ' OR ' .
$db->quoteName('dc.name') . ' like "%' . substr($search, 5) . '%"'
. ' OR ' .
$db->quoteName('ju.username') . ' like "%' . substr($search, 5) . '%"'
. ' OR ' .
$db->quoteName('ju.name') . ' like "%' . substr($search, 5) . '%"'
);
}
elseif (stripos($search, 'id:') === 0)
elseif (stripos($search, 'email:') === 0)
{
$query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
$search = $db->quote('%' . $db->escape(substr($search, 6), true) . '%');
$query->where('(dc.email LIKE ' . $search . ')');
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/com_digicom/admin/models/orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected function getListQuery()
elseif (stripos($search, 'user:') === 0)
{
$search = $db->quote('%' . $db->escape(substr($search, 5), true) . '%');
$query->where('(ju.username LIKE ' . $search . ' OR c.name LIKE ' . $search . ')');
$query->where('(ju.username LIKE ' . $search . ' OR c.name LIKE ' . $search . ' OR ju.name LIKE ' . $search . ')');
}
elseif (stripos($search, 'email:') === 0)
{
Expand Down
Loading