Jump to content

 

_root

Member Since 09 Apr 2015
Offline Last Active Today, 06:37 AM
-----

Topics I've Started

❗️❓ Where Is Colors On Product Detail Page !?

03 August 2019 - 04:36 PM

Hi guys.

 

I've setup a feature and variation as color , it look good on product admin page , filter of catalog but not in product detail page (it just shows the name of it if I check as Text Label).

 

How can I show the colors in product detail page instead of its label , like filters of product lists !!? (without code modification)

 

Catalog : Just show the labels (color names) 

Attached File  catalog.jpg   48.51KB   3 downloads

 

Catalog Filters : 

Attached File  filters.jpg   31.06KB   4 downloads

 

Product Edit :

Attached File  product_edit.jpg   86.42KB   3 downloads

 

Feature edit : 

Attached File  feature_edit.jpg   36.09KB   3 downloads

 

Feature Edit Variants :

Attached File  feature_edit2.jpg   33.64KB   3 downloads

 

Thanks :)


❗️❓ 4.10.2 New Checkout Layout Is Empty !

15 June 2019 - 07:13 AM

Hi guys

I've recently upgraded to 4.10.2 and try the new Checkout.

 

Question 1 : But checkout layout is empty and can't edit anything of its .

because of I've upgraded it from 4.9.x, do I need to to do something that enable layout features of checkout tab ?

 

Question 2 : I've upgrade it from 4.9.3S1 to 4.10.1 and then 4.10.1 to 4.10.2 , but in the installed upgrades I don't find any item that say about 4.9.3 to 4.10.1 , is it a problem that according to checkout layout ?


Enable Login By Username With Hooks

11 March 2019 - 10:23 AM

Hi Experts  :grin:

 

I want to enable username login on 4.9.x .

 

I've changed the fn.users.php and its fn_auth_routines function and it will work perfectly but I want to do it by a hook without core files modification .

 

 

All I want is to add 3 lines after $user_data variable :

	$user_data = db_get_row("SELECT * FROM ?:users WHERE $field = ?s" . $condition, $user_login);
// added below 3 lines
    if (empty($user_data)) {
		$user_data = db_get_row("SELECT * FROM ?:users WHERE user_login = ?s" . $condition, $user_login);
    }

Is there anyway to do it by hook ?

For example override all of the function or do the same as function by hook and skip anything after the hook ?

 

the whole function code is as below : 

function fn_auth_routines($request, $auth)
{
    $status = true;

    $user_login = (!empty($request['user_login'])) ? trim($request['user_login']) : '';
    $password = (!empty($request['password'])) ? $request['password']: '';
    $field = 'email';

    $condition = '';

    if (fn_allowed_for('ULTIMATE')) {
        if (Registry::get('settings.Stores.share_users') == 'N' && AREA != 'A') {
            $condition = fn_get_company_condition('?:users.company_id');
        }
    }

    /**
     * Selects user data
     *
     * @param array $request Query parameters
     * @param array $auth Authentication data
     * @param string $field SQL field to select user by
     * @param string $condition String containing SQL-query condition possibly prepended with a logical operator (AND or OR)
     * @param string $user_login Value to select user by
     */
    fn_set_hook('auth_routines', $request, $auth, $field, $condition, $user_login);

    $user_data = db_get_row("SELECT * FROM ?:users WHERE $field = ?s" . $condition, $user_login);

    if (empty($user_data)) {
        $user_data = db_get_row("SELECT * FROM ?:users WHERE $field = ?s AND user_type IN ('A', 'V', 'P')", $user_login);
    }

    if (!empty($user_data)) {
        $user_data['usergroups'] = fn_get_user_usergroups($user_data['user_id']);
    }

    if (
        !empty($user_data)
        && (!fn_check_user_type_admin_area($user_data) && AREA == 'A' || !fn_check_user_type_access_rules($user_data))
    ) {
        fn_set_notification('E', __('error'), __('error_area_access_denied'));
        $status = false;
    }

    if (!empty($user_data['status']) && $user_data['status'] == 'D') {
        fn_set_notification('E', __('error'), __('error_account_disabled'));
        $status = false;
    }

    $salt = isset($user_data['salt']) ? $user_data['salt'] : '';

    return array($status, $user_data, $user_login, $password, $salt);
}