profile
viewpoint

drbyte/laravel-docs 2

The Laravel Framework Documentation

DivaVocals/zen_AddToAny 1

AddToAny for Zen Cart

drbyte/laravel-impersonate-ui 1

UI for 404labfr/laravel-impersonate

ajeh/zc-v1-series 0

Zen Cart® is a full-function e-commerce application for your website. NOTE: For "stable" releases, see the tagged releases section in GitHub.

DivaVocals/zen_MetaTagsImproved 0

1st version attempt at modernizing the current Zen Cart meta tagging functionality

drbyte/all_invoices 0

Print All Invoices

drbyte/array-redactor 0

A PHP package to redact array values by their keys.

push eventzencart/zencart

Chris Brown

commit sha 8e14368e080b910a120f6e2ec3d8a8c7dc1b9f11

Add file header

view details

push time in 13 hours

push eventdrbyte/zencart

Chris Brown

commit sha 8e14368e080b910a120f6e2ec3d8a8c7dc1b9f11

Add file header

view details

push time in 13 hours

push eventdrbyte/zencart

Chris Brown

commit sha 233eaa688a58249964333937bd49ebabc6917383

For "required" input fields, use browser validation instead of just text indicator

view details

Chris Brown

commit sha f1df3daa643cd6ae22b7f3ec0e6cd724280c6a24

Merge pull request #3645 from drbyte/required For "required" input fields, use browser validation instead of just text indicator

view details

Chris Brown

commit sha fc3eedd3f9d581b4b1ef9a83732c133d447f34ca

Explicitly mention ext-json and ext-curl

view details

push time in 15 hours

push eventzencart/zencart

Chris Brown

commit sha f345fed946f1d612268f0d912c7d62485f987eba

Explicitly mention ext-json and ext-curl

view details

push time in 15 hours

push eventdrbyte/zencart

Chris Brown

commit sha 52e85af3068fdafb29a0274d8f46faafabbee622

admin product avail datepicker vs empty or malformed dates Co-authored-by: mc12345678 <mc12345678@users.noreply.github.com>

view details

Chris Brown

commit sha f345fed946f1d612268f0d912c7d62485f987eba

Explicitly mention ext-json and ext-curl

view details

push time in 15 hours

startedsimivar/reverse-print-r

started time in 15 hours

delete branch drbyte/zencart

delete branch : required

delete time in 16 hours

push eventzencart/zencart

Chris Brown

commit sha 233eaa688a58249964333937bd49ebabc6917383

For "required" input fields, use browser validation instead of just text indicator

view details

Chris Brown

commit sha f1df3daa643cd6ae22b7f3ec0e6cd724280c6a24

Merge pull request #3645 from drbyte/required For "required" input fields, use browser validation instead of just text indicator

view details

push time in 16 hours

PR merged zencart/zencart

For "required" input fields, use browser validation instead of just text indicator

<span class="alert">*</span> creates layout messes, and still doesn't enforce required entry in fields.

Passing the required attribute tells the browser to alert when the field is left empty, and skipping the <span> prevents the layout issues.

+8 -8

0 comment

1 changed file

drbyte

pr closed time in 16 hours

delete branch zencart/zencart

delete branch : master

delete time in 16 hours

create barnchzencart/zencart

branch : stable

created branch time in 16 hours

push eventdrbyte/zencart

zcwilt

commit sha 78d8cfdb7e1bd3f9973eb14480ee262d9424e068

App structure and import laravel eloquent

view details

zcwilt

commit sha 92eb7c6be9a0a0698bdf9a60838e7021c26b133d

commit vendor folder

view details

zcwilt

commit sha daafe01c5c2fc63ce6d7ac12a7ba5679f631909b

update to same php versions as root composer.json

view details

Chris Brown

commit sha 4947a0e5a5c4ade14771b022d5f8374a95c168f6

Apply suggestions from code review

view details

Chris Brown

commit sha 27c42c2d68ad2e70e1826de558d2c7a7da358924

Fix typo

view details

Chris Brown

commit sha 883432c683a0b2391f257a414df4fa5f43468738

Merge pull request #3646 from zcwilt/v158-laravel-eloquent V158 incorporate Laravel Eloquent for db features

view details

Zen4All

commit sha 827330337447b1559246f6363218095df8314d4e

Update css Now stylesheet.css is loaded, so some fixes were needed to make the look of the login screen the same as before.

view details

zcwilt

commit sha 156f9880b17781cde03ed3028576f4ef924b8ec7

Adding more support for Illuminate components Support for Arr/String/Collections Support for Illuminate\Request Illuminate\Routing Illuminate\View There is no intention to switch to routing for Zen Cart web routes just yet. The support here will allow some testing for the future, and the possiblity of building out an API based on routing. Also updated the config define loader to cast some groups to int as was done before.

view details

zcwilt

commit sha bed27ed325f404a2ffad6e1490d8f5ad334f42cc

commit vendor folder

view details

Ian Wilson

commit sha 4080375c61b339ac2c547f452ed0c1803052153a

Merge pull request #3652 from zcwilt/illuminate-support-request-and-routing Illuminate support request and routing

view details

Chris Brown

commit sha cc06b74aaf5523ee73e1ecce7456468d468ef795

Merge pull request #3651 from Zen4All/html_admin_head Update css for login page

view details

push time in 18 hours

pull request commentzencart/zencart

Refactor admin pages to use admin_html_head.php

Thanks!

Zen4All

comment created time in 20 hours

push eventzencart/zencart

Zen4All

commit sha 827330337447b1559246f6363218095df8314d4e

Update css Now stylesheet.css is loaded, so some fixes were needed to make the look of the login screen the same as before.

view details

Chris Brown

commit sha cc06b74aaf5523ee73e1ecce7456468d468ef795

Merge pull request #3651 from Zen4All/html_admin_head Update css for login page

view details

push time in 20 hours

PR merged zencart/zencart

Update css for login page

Because the file stylesheet.css is now loaded on the page, some tweaks needed to be done to make the look the same as in ZC 1.5.7

+13 -46

0 comment

2 changed files

Zen4All

pr closed time in 20 hours

starteddavesaddle/InstantSearch

started time in a day

startedtorvista/instant-search-steve

started time in a day

pull request commentzencart/zencart

Refactor admin pages to use admin_html_head.php

@Zen4All note that the admin login and password-forgotten screens look differently now, including secondary buttons of wrong colour ...

Screen Shot 2020-07-01 at 7 58 14 PM Screen Shot 2020-07-01 at 7 58 09 PM

Zen4All

comment created time in a day

issue closedspatie/laravel-permission

Multi tenant multi database support, tried all but not working.

I tried to extend the models, as well as updating permission config files while switching to tenant database but still when I try to update the role and permissions it does not work and always fetching roles and permissions using default database connection.

<?php

namespace App\Client;

use Spatie\Permission\Models\Role as ModelsRole;

class Role extends ModelsRole
{
    protected $connection = 'client';

    protected $table = 'roles';

    protected $fillable = ['name'];
    
    public function __construct()
    {
        parent::__construct();

        if ($connection = config('permission.db_connection')) {
            $this->setConnection($connection);
        }
    }
}

Permission model

<?php

namespace App\Client;

use Spatie\Permission\Models\Permission as ModelsPermission;

class Permission extends ModelsPermission
{
    protected $connection = 'client';

    protected $table = 'permissions';

    protected $fillable = ['name'];

    public function __construct()
    {
        parent::__construct();

        if ($connection = config('permission.db_connection')) {
            $this->setConnection($connection);
        }
    }
}

Configuration update while switching to tenant connection

'permission.db_connection' => 'client',
'permission.models.permission' => Permission::class,
 'permission.models.role' => Role::class,

Role and permission seeder

<?php

use App\Client\Permission;
use App\Client\Role;
use Illuminate\Database\Seeder;

class ClientRoleAndPermissionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //add client permissions.
        $client_permissions = [
            'manage properties',
            'manage agents',
        ];

        foreach($client_permissions as $p)
        {
            Permission::firstOrCreate([
                'name' => $p,
                'guard_name' => 'client'
            ]);
        }

        //add client roles and assign general permissions to get start.
        Role::firstOrCreate([
            'name' => 'account manager',
            'guard_name' => 'client'
        ])->givePermissionTo([ 'manage agents']);

    }
}

Now when I try to update permission, I receive an error that permission does not exist, It means permissions are still being fetched from the main database.

public function updatePermissions(Request $request)
    {
        $this->validate($request, [
            'role' => 'required|numeric',
        ]);

        $role = Role::findById($request->role);

        return $role->givePermissionTo('manage properties');

        flash()->success('Permissions updated for the <b> ' . $role->name . '</b>');
        return back();
    }

closed time in a day

kingashok29

issue closedspatie/laravel-permission

Special Deny

This is not an issue per se, but I was wondering how can I add a special deny permission to the user whose role has access to the permission. Example: A group with the role of Manager, but you you want to deny one Manager from accessing a financial report. How can I go about that?

Thank You

closed time in a day

philipnjuguna66

issue closedspatie/laravel-permission

Two laravel project using spatie paackage but database is same both projects is it possible because i have issue?

hello hi guys laravel spatie package role base permission is very owsum but i am using in my project to different laravel projects using database in both project single database but its not working problem is i am assign permission to user in first project its working fine ... but its user using in second project permissions not working... i see problem is ... please tell me what we do i am stuck in my both project have you any idea pleaase suggest me. problem conclusion

assign permission to user first project is woking in same project... but this user is not wrokign in second prject... but if you can assign user to permisssion in second he is working fine in second project but dosent work in first project please help me and sorry for poor englihs

NOte: please tell me is it possible single database using in laravel multiple project with laravel spatie role and permission

closed time in a day

syedhassan25

issue closedspatie/laravel-permission

$user->can not working

Hi, I have a problem with determining the permission with $user->can('...'). For example $user->can('view contacts') returns always false; Hi, great work! But I have a problem. If I dump $user->getPermissionsViaRoles(); ,I will get a large result. See file permissions_via_roles I have also attached a database query from ther permissions table. permissions_table

What can I do?

Also attached: userController , Seeder ProjectPolicy.txt PermissionTableSeeder.txt

UserController.txt

closed time in a day

MathiasWeisheit

issue openedzencart/zencart

Drop admin configure.php file

Since the content is the same, there's no need to have a separate /admin/includes/configure.php file anymore.

created time in a day

issue openedzencart/zencart

Country Limitations: allow separate rules for billing vs shipping

Currently if a Country's status is disabled, then any customer who has an address-book entry with that country in it will be stopped in their tracks until they delete that address or edit it to another country.

In the case of stores who will ship to an address other than the billing address, (eg: US merchant ships to a US address near the border of Canada or Mexico and the customer makes their own arrangements for pickup/forwarding, at their own cost and their own duties arrangements), then it would be beneficial for the storeowner to enable such capability.

created time in a day

push eventzencart/zencart

zcwilt

commit sha 78d8cfdb7e1bd3f9973eb14480ee262d9424e068

App structure and import laravel eloquent

view details

zcwilt

commit sha 92eb7c6be9a0a0698bdf9a60838e7021c26b133d

commit vendor folder

view details

zcwilt

commit sha daafe01c5c2fc63ce6d7ac12a7ba5679f631909b

update to same php versions as root composer.json

view details

Chris Brown

commit sha 4947a0e5a5c4ade14771b022d5f8374a95c168f6

Apply suggestions from code review

view details

Chris Brown

commit sha 27c42c2d68ad2e70e1826de558d2c7a7da358924

Fix typo

view details

Chris Brown

commit sha 883432c683a0b2391f257a414df4fa5f43468738

Merge pull request #3646 from zcwilt/v158-laravel-eloquent V158 incorporate Laravel Eloquent for db features

view details

push time in a day

PR merged zencart/zencart

V158 incorporate Laravel Eloquent for db features

NOTE:

  • this means PDO is now required in PHP (in addition to mysqli); thankfully it's compiled in by default
  • this means PHP 7.1.3+ is now required
+131986 -79

0 comment

1457 changed files

zcwilt

pr closed time in a day

push eventzcwilt/zencart

Chris Brown

commit sha 27c42c2d68ad2e70e1826de558d2c7a7da358924

Fix typo

view details

push time in a day

push eventzcwilt/zencart

Chris Brown

commit sha 4947a0e5a5c4ade14771b022d5f8374a95c168f6

Apply suggestions from code review

view details

push time in a day

Pull request review commentzencart/zencart

V158 incorporate Laravel Eloquent for db features

  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0  * @version $Id: Scott C Wilson 2020 Apr 12 Modified in v1.5.7 $  */++use App\Model\Configuration;+use App\Model\ProjectVersion;+use App\Model\ProductTypeLayout;+ if (!defined('IS_ADMIN_FLAG')) {-  die('Illegal Access');+    die('Illegal Access'); } -  $sql = "SELECT configuration_value FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'GLOBAL_AUTH_KEY'";-  $authkey = $db->Execute($sql);-  if (!$authkey->EOF && $authkey->fields['configuration_value'] == '') {-      $hashable = hash('sha256', openssl_random_pseudo_bytes(64));-      $sql = "UPDATE " . TABLE_CONFIGURATION . " SET configuration_value = :hash: WHERE configuration_key = 'GLOBAL_AUTH_KEY'";-      $sql = $db->bindVars($sql, ':hash:', $hashable, 'string');-      $db->Execute($sql);-  }-// Determine the DATABASE patch level-  $project_db_info= $db->Execute("SELECT * FROM " . TABLE_PROJECT_VERSION . " WHERE project_version_key = 'Zen-Cart Database' ");-  define('PROJECT_DB_VERSION_MAJOR',$project_db_info->fields['project_version_major']);-  define('PROJECT_DB_VERSION_MINOR',$project_db_info->fields['project_version_minor']);-  define('PROJECT_DB_VERSION_PATCH1',$project_db_info->fields['project_version_patch1']);-  define('PROJECT_DB_VERSION_PATCH2',$project_db_info->fields['project_version_patch2']);-  define('PROJECT_DB_VERSION_PATCH1_SOURCE',$project_db_info->fields['project_version_patch1_source']);-  define('PROJECT_DB_VERSION_PATCH2_SOURCE',$project_db_info->fields['project_version_patch2_source']);+$config = new Configuration;+$authkey = $config->where('configuration_key', 'GLOBAL_AUTH_KEY')->value('configuration_value');+if (!isset($authkey) || $authkey == '') {

Since empty() does both of these, let's use it:

if (empty($authkey)) {
zcwilt

comment created time in a day

Pull request review commentzencart/zencart

V158 incorporate Laravel Eloquent for db features

  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0  * @version $Id: Scott C Wilson 2020 Apr 12 Modified in v1.5.7 $  */++use App\Model\Configuration;+use App\Model\ProjectVersion;+use App\Model\ProductTypeLayout;+ if (!defined('IS_ADMIN_FLAG')) {-  die('Illegal Access');+    die('Illegal Access'); } -  $sql = "SELECT configuration_value FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'GLOBAL_AUTH_KEY'";-  $authkey = $db->Execute($sql);-  if (!$authkey->EOF && $authkey->fields['configuration_value'] == '') {-      $hashable = hash('sha256', openssl_random_pseudo_bytes(64));-      $sql = "UPDATE " . TABLE_CONFIGURATION . " SET configuration_value = :hash: WHERE configuration_key = 'GLOBAL_AUTH_KEY'";-      $sql = $db->bindVars($sql, ':hash:', $hashable, 'string');-      $db->Execute($sql);-  }-// Determine the DATABASE patch level-  $project_db_info= $db->Execute("SELECT * FROM " . TABLE_PROJECT_VERSION . " WHERE project_version_key = 'Zen-Cart Database' ");-  define('PROJECT_DB_VERSION_MAJOR',$project_db_info->fields['project_version_major']);-  define('PROJECT_DB_VERSION_MINOR',$project_db_info->fields['project_version_minor']);-  define('PROJECT_DB_VERSION_PATCH1',$project_db_info->fields['project_version_patch1']);-  define('PROJECT_DB_VERSION_PATCH2',$project_db_info->fields['project_version_patch2']);-  define('PROJECT_DB_VERSION_PATCH1_SOURCE',$project_db_info->fields['project_version_patch1_source']);-  define('PROJECT_DB_VERSION_PATCH2_SOURCE',$project_db_info->fields['project_version_patch2_source']);+$config = new Configuration;+$authkey = $config->where('configuration_key', 'GLOBAL_AUTH_KEY')->value('configuration_value');+if (!isset($authkey) || $authkey == '') {+    $hashable = hash('sha256', openssl_random_pseudo_bytes(64));+    $config->update(['comnfiguration_value' => $hashable])->where('configuration_key', 'GLOBAL_AUTH_KEY');

Typo:

    $config->update(['configuration_value' => $hashable])->where('configuration_key', 'GLOBAL_AUTH_KEY');
zcwilt

comment created time in a day

issue openedzencart/zencart

Consolidate language classes

Objectives:

  • [ ] merge admin/catalog classes
  • [ ] merge associated functions
  • [ ] refactor code snippets that should be using these shared functions

created time in 2 days

issue openedzencart/zencart

Slim down admin header.php

Objective:

  • [ ] Extract language stuff
  • [ ] Extract version-notification stuff
  • [ ] Extract GV Queue button stuff

created time in 2 days

create barnchdrbyte/zencart

branch : required

created branch time in 2 days

push eventzencart/zencart

Chris Brown

commit sha 2ca8bfb918fa7807d48905b603c9f0f356e5026b

Reformat file

view details

push time in 2 days

push eventdrbyte/zencart

Scott C Wilson

commit sha 9340ba7f6e883d0fa558cc09b8ebf9322ccb96fa

Link on checkout success page does not work

view details

Scott C Wilson

commit sha 00d286ee933230f0a8f23808964ae1dc4aebf39e

Prevent notice during send email

view details

mc12345678

commit sha e48fd21ab9872bb93ae4e40f6b75f569695fb8d6

Support product update if incorrectly formatted date provided Addresses: https://www.zen-cart.com/showthread.php?226900-v157-DATE_FORMAT_DATE_PICKER-error-if-date-format-change-and-update-product&p=1370184#post1370184 When storing a product without an available date and using a format other than `yy-mm-dd`, the update action failed because `$dt===false` and `false->format` doesn't exist. Alternative solutions considered: testing against the existence of the method `format` of the variable `$dt` as part of this resolution, providing admin feedback (likely in the preview area or as a redirect here when such a failure occurs. The same problem appears to occur if an invalid date format is provided: E.g. if using `dd-mm-yy` for `DATE_FORMAT_DATE_PICKER` and a date is entered as `dd/mm/yy` then `$dt` will be set to false and the same problem would occur as otherwise found for an empty date and a modified format.

view details

mc12345678

commit sha de920cbecf4ab19902cd8b6cb776a1968f929edd

Update product_music

view details

zcwilt

commit sha 4096549054c7970ed301a9462e57fc8ebcb29d4c

Don't double samitize customer comments fixes #3312

view details

Chris Brown

commit sha 245e79241770128c1394a29705f97f742e4196ac

Merge pull request #3635 from zcwilt/dont-double-sanitize-customer-comments-issue3312 Don't double sanitize customer comments

view details

Zen4All

commit sha 0ad89b15667eef3d4279c999a1f967e74f2c8d73

html_admin_head Converting files to use the new 'html_admin_head.php'

view details

zcwilt

commit sha 7ec11946b80c55b03f7750883858e7ac0b3b04d2

new/featured/all pages not adding to cart. extraneous quote - fixes #3640

view details

Ian Wilson

commit sha 28525ef61852cf75cae5a0ed2ee5354bc5c4b794

Merge pull request #3642 from zcwilt/issue3640-new-featured-all-not-adding-to-cart new/featured/all pages not adding to cart.

view details

zcwilt

commit sha 95345e02d3b99ec186c1f64ed91ffff2035df84a

Refactoring base class to traits. Most of the code from the base class (class.base.php) has been removed. Code is now loaded via 2 traits NotifierManager and ObserverManager The reason for this change is to allow classes to use the Observer/Notifier system without extending the base class. Any class that wants to use notifiers need now only `use` the NotifierManager and observer classes `use` the ObserverManager. Note the camelize method has been left in the base class for now to preserver backward compatibilty, but that will probably change going forward. I've also taken the opportunity to consolidate the 2 psr4Autoload config files into one.

view details

Chris Brown

commit sha 942f1ef131cc94a9ce3f6c64ea16d02fb0d86858

Merge pull request #3631 from mc12345678/v158-admin-product-avail-date V157 admin product avail datepicker vs empty or malformed dates

view details

Chris Brown

commit sha 83b737d2ef78bc6c27a0443d34449916127c1669

Merge pull request #3644 from zcwilt/v158-base-class-restructuring Refactoring base class to traits.

view details

Chris Brown

commit sha 256f882cdbb57103d138a869e8ee65f3a1b4bfdd

Round seconds up to integer

view details

Zen4All

commit sha dcb137797405ebd3380ff83397807d12bd306797

fix typo in filename

view details

Zen4All

commit sha 210b3a391ae78d42641e2fdf9e2b3756c127c30e

Add autofocus

view details

Chris Brown

commit sha 2ed3561db7326c3446e18ce4986bb7866034b18a

Merge pull request #3641 from Zen4All/html_admin_head Refactor admin pages to use admin_html_head.php

view details

Chris Brown

commit sha 8453ddc49ba46be737a2530ee5f0e81f39a99a90

Update jscript_main.php

view details

Chris Brown

commit sha 5635dc85f19bfecfa89edf13f85cf6a6c6cbc77e

Merge pull request #3616 from scottcwilson/success_coupon Coupon Popup link on checkout success page does not work

view details

Chris Brown

commit sha 0ec1dd3a9bc82e7db47916de2c8ea617e97765fc

Merge pull request #3619 from scottcwilson/email_notice Prevent notice during send email during currency char substitution

view details

Chris Brown

commit sha 2ca8bfb918fa7807d48905b603c9f0f356e5026b

Reformat file

view details

push time in 2 days

push eventzencart/zencart

Scott C Wilson

commit sha 00d286ee933230f0a8f23808964ae1dc4aebf39e

Prevent notice during send email

view details

Chris Brown

commit sha 0ec1dd3a9bc82e7db47916de2c8ea617e97765fc

Merge pull request #3619 from scottcwilson/email_notice Prevent notice during send email during currency char substitution

view details

push time in 2 days

push eventzencart/zencart

Scott C Wilson

commit sha 9340ba7f6e883d0fa558cc09b8ebf9322ccb96fa

Link on checkout success page does not work

view details

Chris Brown

commit sha 8453ddc49ba46be737a2530ee5f0e81f39a99a90

Update jscript_main.php

view details

Chris Brown

commit sha 5635dc85f19bfecfa89edf13f85cf6a6c6cbc77e

Merge pull request #3616 from scottcwilson/success_coupon Coupon Popup link on checkout success page does not work

view details

push time in 2 days

PR merged zencart/zencart

Coupon Popup link on checkout success page does not work

Missing javascript. Checkout with a coupon and you'll see the link on the checkout success page gives a JS error.

+15 -0

7 comments

1 changed file

scottcwilson

pr closed time in 2 days

push eventscottcwilson/zencart

Chris Brown

commit sha 8453ddc49ba46be737a2530ee5f0e81f39a99a90

Update jscript_main.php

view details

push time in 2 days

push eventzencart/zencart

Zen4All

commit sha 0ad89b15667eef3d4279c999a1f967e74f2c8d73

html_admin_head Converting files to use the new 'html_admin_head.php'

view details

Zen4All

commit sha dcb137797405ebd3380ff83397807d12bd306797

fix typo in filename

view details

Zen4All

commit sha 210b3a391ae78d42641e2fdf9e2b3756c127c30e

Add autofocus

view details

Chris Brown

commit sha 2ed3561db7326c3446e18ce4986bb7866034b18a

Merge pull request #3641 from Zen4All/html_admin_head Refactor admin pages to use admin_html_head.php

view details

push time in 2 days

PR merged zencart/zencart

Refactor admin pages to use admin_html_head.php

Converting files to use the new 'html_admin_head.php'

+294 -1069

2 comments

66 changed files

Zen4All

pr closed time in 2 days

push eventzencart/zencart

Chris Brown

commit sha 256f882cdbb57103d138a869e8ee65f3a1b4bfdd

Round seconds up to integer

view details

push time in 2 days

pull request commentzencart/zencart

html_admin_head

Typo in new filename: admin/includes/css/attrobutes_controller.css

Zen4All

comment created time in 2 days

push eventzencart/zencart

zcwilt

commit sha 95345e02d3b99ec186c1f64ed91ffff2035df84a

Refactoring base class to traits. Most of the code from the base class (class.base.php) has been removed. Code is now loaded via 2 traits NotifierManager and ObserverManager The reason for this change is to allow classes to use the Observer/Notifier system without extending the base class. Any class that wants to use notifiers need now only `use` the NotifierManager and observer classes `use` the ObserverManager. Note the camelize method has been left in the base class for now to preserver backward compatibilty, but that will probably change going forward. I've also taken the opportunity to consolidate the 2 psr4Autoload config files into one.

view details

Chris Brown

commit sha 83b737d2ef78bc6c27a0443d34449916127c1669

Merge pull request #3644 from zcwilt/v158-base-class-restructuring Refactoring base class to traits.

view details

push time in 2 days

PR merged zencart/zencart

Refactoring base class to traits.

Most of the code from the base class (class.base.php) has been removed. Code is now loaded via 2 traits NotifierManager and ObserverManager The reason for this change is to allow classes to use the Observer/Notifier system without extending the base class. Any class that wants to use notifiers need now only use the NotifierManager and observer classes use the ObserverManager.

Note the camelize method has been left in the base class for now to preserve backward compatibilty, but that will probably change going forward.

I've also taken the opportunity to consolidate the 2 psr4Autoload config files into one.

+581 -671

0 comment

14 changed files

zcwilt

pr closed time in 2 days

Pull request review commentzencart/zencart

html_admin_head

 function SetCategories() {     </head>
 <?php } ?> <?php if ($action == 'new' || $action == 'edit') { ?>-       <body onload="SetCategories(); SetFocus(); init()">+       <body onload="SetCategories();">        <div id="spiffycalendar" class="text"></div> <?php } else { ?>-       <body onload="SetFocus(); init()">+       <body>

Removing SetFocus() here means line 307 should have autofocus added to the input field attributes, shouldn't it?

Zen4All

comment created time in 2 days

issue closedzencart/zencart

Do we need noindex and nofollow in setup wizard

I am preparing a PR with converting all admin files to use admin_html_head.php. My question is do we really need noindex and nofollow here? As it is already after admin login, and can never be reached by a search engine. https://github.com/zencart/zencart/blob/b75923a06280b2bc4ca41d8ae7cb443568aa26f2/admin/index_setup_wizard.php#L83

closed time in 2 days

Zen4All

push eventzencart/zencart

Chris Brown

commit sha 52e85af3068fdafb29a0274d8f46faafabbee622

admin product avail datepicker vs empty or malformed dates Co-authored-by: mc12345678 <mc12345678@users.noreply.github.com>

view details

push time in 2 days

PR merged zencart/zencart

V157 admin product avail datepicker vs empty or malformed dates

Support product update if incorrectly formatted date provided Addresses: https://www.zen-cart.com/showthread.php?226900-v157-DATE_FORMAT_DATE_PICKER-error-if-date-format-change-and-update-product&p=1370184#post1370184 When storing a product without an available date and using a format other than yy-mm-dd, the update action failed because $dt===false and false->format doesn't exist.

Alternative solutions considered: testing against the existence of the method format of the variable $dt as part of this resolution, providing admin feedback (likely in the preview area or as a redirect here when such a failure occurs.

The same problem appears to occur if an invalid date format is provided: E.g. if using dd-mm-yy for DATE_FORMAT_DATE_PICKER and a date is entered as dd/mm/yy then $dt will be set to false and the same problem would occur as otherwise found for an empty date and a modified format.

+14 -8

1 comment

2 changed files

mc12345678

pr closed time in 2 days

push eventzencart/zencart

mc12345678

commit sha e48fd21ab9872bb93ae4e40f6b75f569695fb8d6

Support product update if incorrectly formatted date provided Addresses: https://www.zen-cart.com/showthread.php?226900-v157-DATE_FORMAT_DATE_PICKER-error-if-date-format-change-and-update-product&p=1370184#post1370184 When storing a product without an available date and using a format other than `yy-mm-dd`, the update action failed because `$dt===false` and `false->format` doesn't exist. Alternative solutions considered: testing against the existence of the method `format` of the variable `$dt` as part of this resolution, providing admin feedback (likely in the preview area or as a redirect here when such a failure occurs. The same problem appears to occur if an invalid date format is provided: E.g. if using `dd-mm-yy` for `DATE_FORMAT_DATE_PICKER` and a date is entered as `dd/mm/yy` then `$dt` will be set to false and the same problem would occur as otherwise found for an empty date and a modified format.

view details

mc12345678

commit sha de920cbecf4ab19902cd8b6cb776a1968f929edd

Update product_music

view details

Chris Brown

commit sha 942f1ef131cc94a9ce3f6c64ea16d02fb0d86858

Merge pull request #3631 from mc12345678/v158-admin-product-avail-date V157 admin product avail datepicker vs empty or malformed dates

view details

push time in 2 days

push eventdrbyte/zencart

zcwilt

commit sha 5b38229acfea3ee2e1ceb7103ffa905d5e661954

don't double sanitize customer comments fixes #3312

view details

Ian Wilson

commit sha a8b9863ff85260de9df88b32e5104e61d01392ee

Merge pull request #3639 from zcwilt/v157 don't double sanitize customer comments

view details

zcwilt

commit sha b47e38feaecd02f2be6b1c6fe9ca2ea8ed53722a

new/featured/all pages not adding to cart. extraneous quote - fixes #3640

view details

Ian Wilson

commit sha c2ab9beeda1ced19b270e3991fc8f0667ac1e8e4

Merge pull request #3643 from zcwilt/v157 new/featured/all pages not adding to cart.

view details

push time in 2 days

issue closedzencart/zencart

Higher priority notices intermixed with lower priority ones

Looking at myDEBUG-adm-20200630-165120-000758-warning.log:

[30-Jun-2020 16:51:20 America/New_York] PHP Fatal error: Uncaught Error: Call to a member function read() on boolean in /Users/scott/Sites/site/admin/includes/functions/general.php:3157 Stack trace: #0 /Users/scott/Sites/site/admin/categories.php(443): zen_build_subdirectories_array('/Users/scott/Si...') #1 /Users/scott/Sites/site/admin/index.php(11): require('/Users/scott/Si...') #2 {main} thrown in /Users/scott/Sites/site/admin/includes/functions/general.php on line 3157

closed time in 2 days

scottcwilson

issue commentzencart/zencart

Higher priority notices intermixed with lower priority ones

Ya, once a fatal error is triggered it can only bubble execution up to already-configured listening error-handling processes on the way to final exit. I think the only other option at that point is to have already-registered additional handlers listening in order to take action in a round-robin loop.

scottcwilson

comment created time in 2 days

issue commentspatie/laravel-permission

Question : Super-admin AuthServiceProvider override not working for route middleware

Ok, so sounds like i'm best off creating my own middleware that checks the combination of admin|super-admin instead.

You might find that cloning the role middleware to add additional logic may be the easiest route, whether you use it as its own named middleware (maybe register it as admins?) or use it to replace the role middleware.

TheFrankman

comment created time in 2 days

push eventzencart/documentation

Chris Brown

commit sha c4c5257969e2dbb3f85b279017ca8f8fdfbaf9f6

Update login_as_customer.md

view details

push time in 2 days

issue commentspatie/laravel-permission

$user->can not working

If your app is always only using api guard, then set it as the first in the config array so that all the non-specified lookups use it.

Else, if $user is an instance of \App\User then in \App\User set the $guard_name property to api if that's the guard you want to use whenever authorizing users of that model.

MathiasWeisheit

comment created time in 2 days

issue commentspatie/laravel-permission

$user->can not working

$user->can() assumes the $user->guard_name property else the first guard listed in your auth config file, which is probably web. If all your routes are using api for the guard, then set $guard_name to api. Otherwise, use hasPermissionTo instead of can. https://docs.spatie.be/laravel-permission/v3/basic-usage/multiple-guards/

MathiasWeisheit

comment created time in 2 days

pull request commentzencart/zencart

Ensure dir is not null before reading

More information would be helpful about how this new situation has presented itself.

Also:

  • What's the use-case where this was missing but otherwise expected? eg: is this a situation where the images directory has been deleted and therefore all kinds of errors will appear all over?
  • Does all code that's calling this function properly handle this new empty array coming back? Or is it expecting at least the default entry to be present?
scottcwilson

comment created time in 2 days

push eventzencart/zencart

zcwilt

commit sha 4096549054c7970ed301a9462e57fc8ebcb29d4c

Don't double samitize customer comments fixes #3312

view details

Chris Brown

commit sha 245e79241770128c1394a29705f97f742e4196ac

Merge pull request #3635 from zcwilt/dont-double-sanitize-customer-comments-issue3312 Don't double sanitize customer comments

view details

push time in 3 days

PR merged zencart/zencart

Don't double sanitize customer comments Backport

fixes #3312

+400 -400

0 comment

2 changed files

zcwilt

pr closed time in 3 days

push eventzencart/zencart

Chris Brown

commit sha 650c713fb5722f22b3f3a22a64c8efd9faf7203f

Fix dev-mode-only config loading Ref #3623

view details

push time in 3 days

push eventdrbyte/zencart

Chris Brown

commit sha 650c713fb5722f22b3f3a22a64c8efd9faf7203f

Fix dev-mode-only config loading Ref #3623

view details

push time in 3 days

push eventdrbyte/zencart

Scott C Wilson

commit sha 882a88a353c4059de233c43d7aa56fb75744bc59

This will add information on SQL Patches to the admin activity log

view details

Scott C Wilson

commit sha 4088a02219c46884ff115ac27007b83300903a7f

Prevent notice on customers_fax field

view details

Scott C Wilson

commit sha 23dbef96f2eba291c9939f6f89d3eb202828f6ef

Ensure stock_check array entry is set prior to display

view details

Scott C Wilson

commit sha 7f25d08b84ea132a56f3fb5c3d89533152d05122

Fix define pages editor

view details

Chris Brown

commit sha 696fc2a51805e9b1b86133d84ddcb6daa4cbf86b

Add NOTIFY_SEARCH_RESULTS notifier This can be used to log search queries and results without double-running the lookups to get a count. (Previously had to watch `NOTIFY_SEARCH_ORDERBY_STRING` and then parse the query to alter it and run a count query, which could result in db GROUP BY errors which the splitPageResults class handles more intelligently.)

view details

zcwilt

commit sha 6af3f04d5b4837b3622fa27424834f4e3456a606

Initial Commit

view details

Scott C Wilson

commit sha 7eabde9fdf399c994ff93d17cbe8702fb51214c1

It's useful to have other fields (e.g. the coupon code) as well

view details

Scott C Wilson

commit sha 1681f346cccea86300ef824b6128028d28d1070d

Fixes default attribute issues

view details

mc12345678

commit sha 8083c448a31e79da4d0d4395da57ce5c49e7ee32

Incorporate $antiSpamFieldName

view details

Chris Brown

commit sha dd2f6a11979d0caf643880cf6c3b73e162b8fb67

Merge pull request #3632 from mc12345678/v158-ask-a-question-template Incorporate $antiSpamFieldName

view details

zcwilt

commit sha e8eb0104eb2d0647076c34e44704f5a0a731114a

Update some language defines Based on #3625 and #3630

view details

zcwilt

commit sha 962def889595690bfcae9b4d3dd038992f5cedae

remove debug code

view details

zcwilt

commit sha a1d9b862ab989b7dafac2869586088f9491535f3

remove renamed file

view details

zcwilt

commit sha c290719bc6701ebd8927cdd13ff01517fcffe89e

remove configuration validation defines to lang.english.php

view details

Chris Brown

commit sha 9a0f3143e406599117e6883c6460c24b15155424

Merge pull request #3633 from zcwilt/v158-language-loading V158 language loading infrastructure

view details

Chris Brown

commit sha e78173ebed9c4b9b23dd7942959b19ee16b6b645

Merge pull request #3629 from scottcwilson/default_attr Fixes default attribute issues

view details

Chris Brown

commit sha f847dcf36718ee82134fea397c85fe12904f9d33

Merge pull request #3621 from scottcwilson/define_pages_editor Fix define pages editor

view details

Chris Brown

commit sha af6d6716288a5f4326866181e7927ada4bdfc04e

Merge pull request #3620 from scottcwilson/no_stock_notice Ensure stock_check array entry is set prior to display

view details

Chris Brown

commit sha 27056ae9ca96ad312c0cbd7ba2b54628f6b1ce00

Merge pull request #3617 from scottcwilson/coupon_code ot_coupon - Add coupon_code to SELECT statement

view details

Chris Brown

commit sha dac45af092418fbb5c49c8f6ef47b0942d32ef37

Update customers.php

view details

push time in 3 days

push eventzencart/zencart

Scott C Wilson

commit sha 7afd96d50e301dd9f4acb5229b39648cbaf99a4a

Ensure stock_check array entry is set prior to display

view details

push time in 3 days

push eventdrbyte/zencart

Scott C Wilson

commit sha ff5414a202c3625dab905590eab5a3ddd7177185

Add missing message

view details

Scott C Wilson

commit sha b69d52b22ada1fd8a53371ec435713f1b831dfe4

Fixes default attribute issues

view details

Scott C Wilson

commit sha 88de64883d959d0664fd74aea8989b237eb0e28d

Fix define pages editor

view details

Scott C Wilson

commit sha 7afd96d50e301dd9f4acb5229b39648cbaf99a4a

Ensure stock_check array entry is set prior to display

view details

push time in 3 days

issue commentzencart/zencart

Do we need noindex and nofollow in setup wizard

For that page I guess not.

Zen4All

comment created time in 3 days

push eventzencart/zencart

Scott C Wilson

commit sha 882a88a353c4059de233c43d7aa56fb75744bc59

This will add information on SQL Patches to the admin activity log

view details

Chris Brown

commit sha a66223927cd60f615e94471f7f82da0a45eb9f59

Merge pull request #3613 from scottcwilson/patch Add information on SQL Patches to the admin activity log

view details

push time in 3 days

pull request commentzencart/zencart

Add information on SQL Patches to the admin activity log

You didn't explain your "why" for doing this PR.

I assume you wanted some sort of audit trail of which patches you'd run?

scottcwilson

comment created time in 3 days

pull request commentzencart/zencart

Add information on SQL Patches to the admin activity log

Why would it be worse in the log?

Because log files can be downloaded and stored separately. The rule is to never log sensitive stuff.

scottcwilson

comment created time in 3 days

pull request commentzencart/zencart

Add information on SQL Patches to the admin activity log

  • updating a customer's personal information, whether in customer or order tables
  • inserting configuration keys that contain module credentials for external services
scottcwilson

comment created time in 3 days

pull request commentzencart/zencart

Prevent notice during send email

In the scenario where this came up, what was the string that ended up having no substitution available? Was this an intentional leaving-out of the replacement? ie: is there a common case for this?

scottcwilson

comment created time in 3 days

push eventzencart/zencart

Scott C Wilson

commit sha 4088a02219c46884ff115ac27007b83300903a7f

Prevent notice on customers_fax field

view details

Chris Brown

commit sha dac45af092418fbb5c49c8f6ef47b0942d32ef37

Update customers.php

view details

Chris Brown

commit sha b75923a06280b2bc4ca41d8ae7cb443568aa26f2

Merge pull request #3618 from scottcwilson/fix_fax Prevent notice on customers_fax field

view details

push time in 3 days

pull request commentzencart/zencart

Prevent notice on customers_fax field

Refactored to avoid the else clause.

scottcwilson

comment created time in 3 days

push eventscottcwilson/zencart

Chris Brown

commit sha dac45af092418fbb5c49c8f6ef47b0942d32ef37

Update customers.php

view details

push time in 3 days

push eventzencart/zencart

Scott C Wilson

commit sha 7eabde9fdf399c994ff93d17cbe8702fb51214c1

It's useful to have other fields (e.g. the coupon code) as well

view details

Chris Brown

commit sha 27056ae9ca96ad312c0cbd7ba2b54628f6b1ce00

Merge pull request #3617 from scottcwilson/coupon_code ot_coupon - Add coupon_code to SELECT statement

view details

push time in 3 days

pull request commentzencart/zencart

Link on checkout success page does not work

Should this invoke the entire popup? Or just provide an empty JS function to avoid the error? Also, why the commented-out-code?

scottcwilson

comment created time in 3 days

pull request commentzencart/zencart

Add information on SQL Patches to the admin activity log

How do we strip logging of sensitive data?

scottcwilson

comment created time in 3 days

PR merged zencart/zencart

Ensure stock_check array entry is set prior to display

Prevents PHP notice.

+3 -2

0 comment

2 changed files

scottcwilson

pr closed time in 3 days

push eventzencart/zencart

Scott C Wilson

commit sha 23dbef96f2eba291c9939f6f89d3eb202828f6ef

Ensure stock_check array entry is set prior to display

view details

Chris Brown

commit sha af6d6716288a5f4326866181e7927ada4bdfc04e

Merge pull request #3620 from scottcwilson/no_stock_notice Ensure stock_check array entry is set prior to display

view details

push time in 3 days

push eventzencart/zencart

Scott C Wilson

commit sha ff5414a202c3625dab905590eab5a3ddd7177185

Add missing message

view details

Scott C Wilson

commit sha b69d52b22ada1fd8a53371ec435713f1b831dfe4

Fixes default attribute issues

view details

Scott C Wilson

commit sha 88de64883d959d0664fd74aea8989b237eb0e28d

Fix define pages editor

view details

push time in 3 days

push eventzencart/zencart

Scott C Wilson

commit sha 7f25d08b84ea132a56f3fb5c3d89533152d05122

Fix define pages editor

view details

Chris Brown

commit sha f847dcf36718ee82134fea397c85fe12904f9d33

Merge pull request #3621 from scottcwilson/define_pages_editor Fix define pages editor

view details

push time in 3 days

PR merged zencart/zencart

Fix define pages editor [Issue Type] Confirmed Bug

Currently, opening Admin > Tools > Define Pages Editor does not correctly open the define page (instead it shows includes/local/skip_version_check.ini). First reported here:

https://www.zen-cart.com/showthread.php?226877-Define-Pages-Editor-only-opens-includes-local-skip_version_check-ini

+2 -2

6 comments

1 changed file

scottcwilson

pr closed time in 3 days

PR closed zencart/zencart

admin, categories: add missing constant definitions [Status] on hold
+3 -1

5 comments

1 changed file

torvista

pr closed time in 3 days

pull request commentzencart/zencart

admin, categories: add missing constant definitions

Closed by #3633

torvista

comment created time in 3 days

issue commentzencart/documentation

Need to document login as customer

Pre-1.5.7 should just mention links to plugins, not describing them in detail. Need to encourage people to move forward, not just patch the old.

scottcwilson

comment created time in 3 days

push eventzencart/zencart

Scott C Wilson

commit sha 1681f346cccea86300ef824b6128028d28d1070d

Fixes default attribute issues

view details

Chris Brown

commit sha e78173ebed9c4b9b23dd7942959b19ee16b6b645

Merge pull request #3629 from scottcwilson/default_attr Fixes default attribute issues

view details

push time in 3 days

PR merged zencart/zencart

Fixes default attribute issues
  • Correct test data set to ensure single product single attribute product has an associated file download
  • Update documentation on data set
  • Update shopping cart:
    • build attributes array for defaultable attributes products added from listing page.
    • correct in cart quantity in that situation.
    • permit add from listing page when Buy Now button is used (vs Multiple Products Qty Box).

Fixes #3626

+24 -5

2 comments

3 changed files

scottcwilson

pr closed time in 3 days

issue closedzencart/zencart

Default attribute doesn't work

This is the feature described as follows: Storefront - Products with single-valued attributes (such as downloads) can now be added to the cart from the listing page.

There is a bug in the test data that led me to believe this was working but it won't work as expected on downloadable products. Still thinking about the best way to fix this.

closed time in 3 days

scottcwilson

push eventzencart/zencart

zcwilt

commit sha 6af3f04d5b4837b3622fa27424834f4e3456a606

Initial Commit

view details

zcwilt

commit sha e8eb0104eb2d0647076c34e44704f5a0a731114a

Update some language defines Based on #3625 and #3630

view details

zcwilt

commit sha 962def889595690bfcae9b4d3dd038992f5cedae

remove debug code

view details

zcwilt

commit sha a1d9b862ab989b7dafac2869586088f9491535f3

remove renamed file

view details

zcwilt

commit sha c290719bc6701ebd8927cdd13ff01517fcffe89e

remove configuration validation defines to lang.english.php

view details

Chris Brown

commit sha 9a0f3143e406599117e6883c6460c24b15155424

Merge pull request #3633 from zcwilt/v158-language-loading V158 language loading infrastructure

view details

push time in 3 days

PR merged zencart/zencart

V158 language loading infrastructure

This commit adds further infrastructure to the Language loading classes in preparation for converting catalog side code. Removes legacy admin language files and replaces them with array based defines. Note. The changes to the gv_faq and index page code on catalog side. This removes the php selection choice of the language defines from the actual language files. Note also. Although legacy define files have been removed from admin, code will still allow for legacy type language defines in contributions.

+6443 -6779

0 comment

207 changed files

zcwilt

pr closed time in 3 days

push eventzencart/documentation

Chris Brown

commit sha c12062ea60f5c9769c46dec0af3a9db7fe9aea26

Update sql_installation.md

view details

push time in 3 days

pull request commentzencart/zencart

Adjust added product to max of max and units

Having submitted this PR "moments" before 3607, should I rebase this?

Yes. Specifically, this PR is for a new feature (or improvement of sorts) and not a fix for a showstopper bug in v157, so it should be in the new v158 branch.

mc12345678

comment created time in 3 days

issue commentspatie/laravel-permission

Question : Super-admin AuthServiceProvider override not working for route middleware

This is by design. Gate::before/after will respond to the can() helpers, authorize() calls, and model policy methods that leverage Laravel's Authorization features.

The role middleware isn't checking for any permissions or can() checks.

In the cases where I want my routes to be filtered through the role middleware, I'll add the |Super-Admin role to the list of other roles, as you mentioned.

TheFrankman

comment created time in 3 days

more