Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Variant Off Canvas View with Variant/Product Images #105

Open
wants to merge 71 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b4e5138
added hiddenlabel
newlinewebdesign Oct 23, 2024
40be10f
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 23, 2024
ff221b5
-Updated fa icon to work with J4 & J5
newlinewebdesign Oct 23, 2024
b830f3e
-Updated fa icon to work with J4 & J5
newlinewebdesign Oct 23, 2024
f83dd1f
-Updated fa icon to work with J4 & J5
newlinewebdesign Oct 23, 2024
07f9859
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 23, 2024
a628588
-Updated fa icon to work with J4 & J5
newlinewebdesign Oct 23, 2024
76ce555
Merge remote-tracking branch 'origin/main'
newlinewebdesign Oct 23, 2024
b025ec3
Product Category/Menu Cleanup - Language Strings, Joomla 5 customfiel…
newlinewebdesign Oct 25, 2024
8e856a7
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 25, 2024
754b5af
Update administrator/components/com_j2store/models/fields/tagtemplate…
newlinewebdesign Oct 25, 2024
61b1cd7
updated language file
newlinewebdesign Oct 26, 2024
34ba67e
Merge remote-tracking branch 'origin/main'
newlinewebdesign Oct 26, 2024
dce1c6c
JYes -> JYES
j2commerce Oct 26, 2024
d026488
updated version #
newlinewebdesign Oct 26, 2024
baedac0
Merge remote-tracking branch 'origin/main'
newlinewebdesign Oct 26, 2024
77f2ebb
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 26, 2024
a19f776
fix array_merge() error by ensuring $templateFolders is always an arr…
newlinewebdesign Oct 26, 2024
4966592
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 26, 2024
77e10f3
email editor fix (broken since 4.0) J5 cleanup
newlinewebdesign Oct 26, 2024
90496bb
Merge remote-tracking branch 'origin/main'
newlinewebdesign Oct 26, 2024
13c50e4
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 26, 2024
f0240d4
top padding for #j-main-container
newlinewebdesign Oct 26, 2024
f36f5bf
Merge remote-tracking branch 'origin/main'
newlinewebdesign Oct 26, 2024
de75dd9
$language_list[$lang->lang_code] should be $languageList[$lang->value]
j2commerce Oct 27, 2024
d563377
bug fixes for source file fields and sql error in j2html
newlinewebdesign Oct 27, 2024
8b92f8d
Merge remote-tracking branch 'origin/main'
newlinewebdesign Oct 27, 2024
f097810
bug fixes for source file fields and sql error in j2html
newlinewebdesign Oct 27, 2024
a7d19cd
bug fixes for source file fields and sql error in j2html
newlinewebdesign Oct 27, 2024
794e1d4
Merge branch 'main' into main
newlinewebdesign Oct 27, 2024
5428990
Update emailtemplates.php
newlinewebdesign Oct 27, 2024
7dfcdbe
Update j2html.php
newlinewebdesign Oct 27, 2024
740f6ce
Update email_tab.php
newlinewebdesign Oct 27, 2024
e1e32dc
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 27, 2024
aca2cf6
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 27, 2024
fb1ef70
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 29, 2024
987e8d3
Update language files in admin menu module and download product error…
newlinewebdesign Oct 29, 2024
a66b741
Merge branch 'j2commerce:main' into main
newlinewebdesign Oct 31, 2024
ddb23c3
admin dashboard UX improvements
newlinewebdesign Nov 4, 2024
d23b52f
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 4, 2024
d398831
Admin Apps page UX improvements
newlinewebdesign Nov 4, 2024
846b594
Mobile responsive update to Apps Page
newlinewebdesign Nov 4, 2024
3e87334
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 6, 2024
9ac7cd7
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 7, 2024
cd7c298
Add FA5 class to icon update Post Configuration Page
newlinewebdesign Nov 7, 2024
54134b2
add button button type field (instead of just input button type)
newlinewebdesign Nov 7, 2024
0dced35
add button button type field (instead of just input button type)
newlinewebdesign Nov 7, 2024
3f2c282
products admin view UI updates
newlinewebdesign Nov 7, 2024
b74717a
products admin view language updates
newlinewebdesign Nov 7, 2024
95c40cb
Revert "products admin view UI updates"
newlinewebdesign Nov 7, 2024
5989c73
products admin view language updates
newlinewebdesign Nov 7, 2024
9535641
products admin view language updates
newlinewebdesign Nov 7, 2024
08d13d6
products admin view language updates
newlinewebdesign Nov 8, 2024
14030d0
inventory page UI updates
newlinewebdesign Nov 8, 2024
3cc8054
Merge branch 'main' into main
j2commerce Nov 10, 2024
ebf3505
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 10, 2024
4dc0e9c
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 10, 2024
cfa20b6
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 10, 2024
b6f8788
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 10, 2024
57610d7
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 11, 2024
b15573d
Merge branch 'j2commerce:main' into main
newlinewebdesign Nov 12, 2024
5735c4e
Orders Page UI Improvements
newlinewebdesign Nov 13, 2024
e2e119d
Orders Page UI Improvements
newlinewebdesign Nov 13, 2024
d18de0f
Old function getThousandSysmbol calls the new one
j2commerce Nov 13, 2024
c6c88fb
Orders Page UI Improvements
newlinewebdesign Nov 14, 2024
bea5653
Merge remote-tracking branch 'origin/order-page-updates-11-12-24' int…
newlinewebdesign Nov 14, 2024
bdb3d0d
Orders Page UI Improvements
newlinewebdesign Nov 16, 2024
aad51cc
Orders Page UI Improvements
newlinewebdesign Nov 16, 2024
aa03b7e
Orders Page UI Improvements
newlinewebdesign Nov 16, 2024
129da8d
Update administrator/components/com_j2store/controllers/traits/list_v…
newlinewebdesign Nov 16, 2024
ee92979
Update media/j2store/css/J4/j2store_admin.css
newlinewebdesign Nov 16, 2024
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
166 changes: 93 additions & 73 deletions administrator/components/com_j2store/controllers/configurations.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
<?php
/**
* @package J2Store
* @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org
* @copyright Copyright (c) 2024 J2Commerce . All rights reserved.
* @license GNU GPL v3 or later
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Toolbar\ToolbarFactoryInterface;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Uri\Uri;

trait list_view {
function addBrowseToolBar(){
$app = J2Store::platform()->application();
$option = $app->input->getCmd('option', 'com_foobar');
$subtitle_key = strtoupper($option . '_TITLE_' . $app->input->getCmd('view', 'cpanel'));
JToolBarHelper::title(JText::_(strtoupper($option)) . ': ' . JText::_($subtitle_key), str_replace('com_', '', $option));
JToolBarHelper::addNew();
JToolBarHelper::editList();
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
$msg = JText::_($option . '_CONFIRM_DELETE');
JToolBarHelper::deleteList(strtoupper($msg));
ToolBarHelper::title(Text::_(strtoupper($option)) . ': ' . Text::_($subtitle_key), str_replace('com_', '', $option));
ToolBarHelper::addNew();
ToolBarHelper::editList();
ToolBarHelper::publishList();
ToolBarHelper::unpublishList();
$msg = Text::_($option . '_CONFIRM_DELETE');
ToolBarHelper::deleteList(strtoupper($msg));
}

private function noToolbar() {
Expand All @@ -20,7 +34,7 @@ private function noToolbar() {

// Set toolbar title
$subtitle_key = strtoupper($option . '_TITLE_' . F0FInflector::pluralize($this->input->getCmd('view', 'cpanel')));
JToolBarHelper::title(JText::_(strtoupper($option)) . ': ' . JText::_($subtitle_key), $componentName);
ToolBarHelper::title(Text::_(strtoupper($option)) . ': ' . Text::_($subtitle_key), $componentName);
}

function editToolBar(){
Expand All @@ -30,21 +44,21 @@ function editToolBar(){

// Set toolbar title
$subtitle_key = strtoupper($option . '_TITLE_' . F0FInflector::pluralize($this->input->getCmd('view', 'cpanel'))) . '_EDIT';
JToolBarHelper::title(JText::_(strtoupper($option)) . ': ' . JText::_($subtitle_key), $componentName);
JToolBarHelper::apply();
JToolBarHelper::save();
JToolBarHelper::custom('savenew', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
JToolBarHelper::cancel();
ToolBarHelper::title(Text::_(strtoupper($option)) . ': ' . Text::_($subtitle_key), $componentName);
ToolBarHelper::apply();
ToolBarHelper::save();
ToolBarHelper::custom('savenew', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
ToolBarHelper::cancel();
}
public function toolbarBacktodashboard(){
$app = J2Store::platform()->application();
$option = $app->input->getCmd('option', 'com_foobar');
$componentName = str_replace('com_', '', $option);
// Set toolbar title
$subtitle_key = strtoupper($option . '_TITLE_' . F0FInflector::pluralize($this->input->getCmd('view', 'cpanel')));
JToolBarHelper::title(JText::_(strtoupper($option)) . ': ' . JText::_($subtitle_key), $componentName);
ToolBarHelper::title(Text::_(strtoupper($option)) . ': ' . Text::_($subtitle_key), $componentName);
// Set toolbar icons
JToolBarHelper::back(JText::_('J2STORE_BACK_TO_DASHBOARD'), 'index.php?option=com_j2store&view=cpanel');
ToolBarHelper::back(Text::_('J2STORE_BACK_TO_DASHBOARD'), 'index.php?option=com_j2store&view=cpanel');
}
function getBaseVars(){
$platform = J2Store::platform();
Expand All @@ -56,28 +70,14 @@ function getBaseVars(){
$vars->action_url = 'index.php?option='.$vars->option;
return $vars;
}
/*$header = array(
'id' => array(
'type' => 'rowselect',
'tdwidth' => '20',
'label' => 'id'
),
'name' => array(
'type' => 'fieldsearchable',
'sortable' => 'true',
'label' => 'name'
)
);*/

function setHeader($header,&$vars){
if(empty($header)){
$header = array();
}
$vars->header = $header;
}
/*$items_format = array(
'id' => array('type' => 'selectrow'),
'name' => array( 'type' => 'text' , 'show_link' => 'true', url => 'index.php')
);*/

function setItemsFormat($item_format,&$vars){
$vars->items_format = $item_format;
}
Expand All @@ -101,11 +101,11 @@ function _getLayoutPath($layout = 'default',$layout_type = 'list')
$defaultPath = JPATH_ADMINISTRATOR.'/components/com_j2store/layouts/'.$layout_type.'/'.$layout.'.php';
$additional_path = JPATH_ADMINISTRATOR.'/components/com_j2store/views/'.$view.'/tmpl/'.$layout.'.php';
// if the site template has a layout override, use it
jimport('joomla.filesystem.file');
if (JFile::exists( $templatePath ))

if (file_exists($templatePath))
{
return $templatePath;
}elseif (JFile::exists( $defaultPath ))
}elseif (file_exists( $defaultPath ))
{
return $defaultPath;
}
Expand All @@ -131,18 +131,18 @@ function getPageId(){

protected function exportButton($view = 'orders') {
if(!isset($view) || empty($view)) return;
$bar = JToolBar::getInstance('toolbar');
$bar = Factory::getContainer()->get(ToolbarFactoryInterface::class)->createToolbar('toolbar');
// Add "Export to CSV"
$link = JURI::getInstance();
$link = URI::getInstance();
$query = $link->getQuery(true);
$query['format'] = 'csv';
$query['option'] = 'com_j2store';
$query['view'] = $view;
$query['task'] = 'browse';
$link->setQuery($query);

JToolBarHelper::divider();
ToolBarHelper::divider();
$icon = 'download';
$bar->appendButton('Link', $icon, JText::_('J2STORE_EXPORTCSV'), $link->toString());
$bar->appendButton('Link', $icon, Text::_('J2STORE_EXPORTCSV'), $link->toString());
}
}
30 changes: 17 additions & 13 deletions administrator/components/com_j2store/helpers/currency.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php
/*------------------------------------------------------------------------
# com_j2store - J2Store
# ------------------------------------------------------------------------
# author Sasi varna kumar - Weblogicx India http://www.weblogicxindia.com
# copyright Copyright (C) 2014 - 19 Weblogicxindia.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://j2store.org
# Technical Support: Forum - http://j2store.org/forum/index.html
-------------------------------------------------------------------------*/
// no direct access
/**
* @package J2Store
* @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org
* @copyright Copyright (c) 2024 J2Commerce . All rights reserved.
* @license GNU GPL v3 or later
*/


// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;


class J2Currency {
private $code;
Expand All @@ -26,8 +27,8 @@ class J2Currency {

public function __construct($config=array()) {

$this->session = JFactory::getSession();
$this->input = JFactory::getApplication()->input;
$this->session = Factory::getApplication()->getSession();
$this->input = Factory::getApplication()->input;

if(count($this->currencies) < 1) {
$rows = F0FModel::getTmpInstance('Currencies', 'J2StoreModel')->enabled(1)->getList();
Expand Down Expand Up @@ -182,6 +183,9 @@ public function getThousandSymbol($currency=''){
return 0;
}
}
public function getThousandSysmbol($currency=''){ // kept for backwards compatibility with those who use layout overrides on the template
return $this->getThousandSymbol($currency);
}

public function getCode() {
return $this->code;
Expand Down Expand Up @@ -396,4 +400,4 @@ public static function getNumericCode(){

return $result;
}
}
}
107 changes: 56 additions & 51 deletions administrator/components/com_j2store/layouts/edit/tab.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
<?php
/**
* @package J2Store
* @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org
* @copyright Copyright (c) 2024 J2Commerce . All rights reserved.
* @license GNU GPL v3 or later
*/


// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;

defined('_JEXEC') or die;
$platform = J2Store::platform();
$platform->loadExtra('behavior.formvalidator');
$row_class = 'row';
$col_class = 'col-md-';
$alert_html = '<joomla-alert type="danger" close-text="Close" dismiss="true" role="alert" style="animation-name: joomla-alert-fade-in;"><div class="alert-heading"><span class="error"></span><span class="visually-hidden">Error</span></div><div class="alert-wrapper"><div class="alert-message" >'.JText::_('J2STORE_INVALID_INPUT_FIELD').'</div></div></joomla-alert>' ;
$alert_html = '<joomla-alert type="danger" close-text="Close" dismiss="true" role="alert" style="animation-name: joomla-alert-fade-in;"><div class="alert-heading"><span class="error"></span><span class="visually-hidden">Error</span></div><div class="alert-wrapper"><div class="alert-message" >'.Text::_('J2STORE_INVALID_INPUT_FIELD').'</div></div></joomla-alert>' ;
if (version_compare(JVERSION, '3.99.99', 'lt')) {
$row_class = 'row-fluid';
$col_class = 'span';
$alert_html = '<div class="alert alert-error alert-danger">'.JText::_('J2STORE_INVALID_INPUT_FIELD').'<button type="button" class="close" data-dismiss="alert">×</button></div>' ;
$alert_html = '<div class="alert alert-error alert-danger">'.Text::_('J2STORE_INVALID_INPUT_FIELD').'<button type="button" class="close" data-dismiss="alert">×</button></div>' ;
}
?>
<script type="text/javascript">
Expand All @@ -33,72 +48,62 @@
<div class="<?php echo $row_class;?>">
<div class="<?php echo $col_class;?>12">
<div class="j2store_<?php echo $vars->view;?>_edit">
<form id="adminForm" class="form-horizontal form-validate" action="<?php echo $vars->action_url?>" method="post" name="adminForm">
<form id="adminForm" class="form-validate" action="<?php echo $vars->action_url?>" method="post" name="adminForm">
<?php echo J2Html::hidden('option','com_j2store');?>
<?php echo J2Html::hidden('view',$vars->view);?>
<?php if(isset($vars->primary_key) && !empty($vars->primary_key)): ?>
<?php echo J2Html::hidden($vars->primary_key,$vars->id);?>
<?php endif; ?>
<?php echo J2Html::hidden('task', '', array('id'=>'task'));?>
<?php echo JHTML::_( 'form.token' ); ?>
<?php echo HTMLHelper::_( 'form.token' ); ?>
<div class="<?php echo $row_class;?>">
<?php if(isset($vars->field_sets) && !empty($vars->field_sets)):?>
<?php if (version_compare(JVERSION, '3.99.99', 'lt')):?>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'basic_options')); ?>
<?php else: ?>
<?php echo \Joomla\CMS\HTML\HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'basic_options', 'recall' => true, 'breakpoint' => 768]); ?>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'basic_options', 'recall' => true, 'breakpoint' => 768]); ?>
<?php foreach ($vars->field_sets as $field_set):?>
<?php if(isset($field_set['fields']) && !empty($field_set['fields'])):?>
<?php if (version_compare(JVERSION, '3.99.99', 'lt')):?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $field_set['id'], JText::_($field_set['label'])); ?>
<?php else: ?>
<?php echo \Joomla\CMS\HTML\HTMLHelper::_('uitab.addTab', 'myTab', $field_set['id'], JText::_($field_set['label'])); ?>
<?php endif; ?>
<div <?php echo isset($field_set['id']) && $field_set['id'] ? 'id="'.$field_set['id'].'"': '';?>
<?php echo isset($field_set['class']) && is_array($field_set['class']) ? 'class="'.implode(' ',$field_set['class']).'"': '';?>
>
<?php /*if(isset($field_set['label']) && !empty($field_set['label'])):*/?><!--
<h3><?php /*echo JText::_($field_set['label']);*/?></h3>
--><?php /*endif; */?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', $field_set['id'], Text::_($field_set['label'])); ?>
<fieldset <?php echo isset($field_set['id']) && $field_set['id'] ? 'id="'.$field_set['id'].'"': '';?>
<?php echo $field_set['class'] ? 'class="'.$field_set['class'].'"': '';?>

<?php echo isset($field_set['class']) && is_array($field_set['class']) ? 'class="'.implode(' ',$field_set['class']).'"': '';?>>
<legend><?php echo Text::_($field_set['label']);?></legend>
<?php if(isset($field_set['is_pro']) && $field_set['is_pro'] && J2Store::isPro() != 1):?>
<?php echo J2Html::pro();?>
<?php else: ?>
<?php foreach ($field_set['fields'] as $field_name => $field):?>
<?php $is_required = isset($field['options']['required']) && !empty($field['options']['required']) ? true:false;?>
<div class="control-group">
<label class="control-label">
<?php if(isset($field['label']) && !empty($field['label'])):?>
<?php echo JText::_($field['label']);?><?php echo $is_required ? "<span>*</span>": '';?>
<?php endif; ?>
</label>
<div class="controls">
<?php if(isset($field['type']) && in_array($field['type'],array('number','text','email','password','textarea','file','radio','checkbox','button','submit','hidden'))):?>
<?php echo J2Html::input($field['type'],$field['name'],$field['value'],$field['options']);?>
<?php else:?>
<?php echo J2Html::custom($field['type'],$field['name'],$field['value'],$field['options']);?>
<?php endif; ?>
<?php if(isset($field['desc']) && !empty($field['desc'])):?>
<br>
<small><?php echo JText::_($field['desc']);?></small>
<?php endif; ?>
<div class="form-grid">
<?php foreach ($field_set['fields'] as $field_name => $field):?>
<?php $is_required = isset($field['options']['required']) && !empty($field['options']['required']) ? true:false;?>
<div class="control-group">
<?php if($field['options']['hiddenLabel'] != true):?>
<div class="control-label">
<label>
<?php if(isset($field['label']) && !empty($field['label'])):?>
<?php echo Text::_($field['label']);?><?php echo $is_required ? "<span>*</span>": '';?>
<?php endif; ?>
</label>
</div>
<?php endif;?>
<div class="controls">
<?php if(isset($field['type']) && in_array($field['type'],array('number','text','email','password','textarea','file','radio','checkbox','button','submit','hidden'))):?>
<?php echo J2Html::input($field['type'],$field['name'],$field['value'],$field['options']);?>
<?php else:?>
<?php echo J2Html::custom($field['type'],$field['name'],$field['value'],$field['options']);?>
<?php endif; ?>
<?php if(isset($field['desc']) && !empty($field['desc'])):?>
<div class="hide-aware-inline-help">
<small class="form-text"><?php echo Text::_($field['desc']);?></small>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php if (version_compare(JVERSION, '3.99.99', 'lt')):?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php else: ?>
<?php echo \Joomla\CMS\HTML\HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php endforeach;?>
<?php if (version_compare(JVERSION, '3.99.99', 'lt')):?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<?php else: ?>
<?php echo \Joomla\CMS\HTML\HTMLHelper::_('uitab.endTabSet'); ?>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
<?php endif; ?>
</div>
</form>
Expand Down
Loading