!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/includes/admin/importers/mappings/   drwxr-xr-x
Free 290.87 GB of 429.69 GB (67.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     shopify.php (2.83 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Shopify mappings
 *
 * @package Kkart\Admin\Importers
 */

if ( ! defined'ABSPATH' ) ) {
    exit;
}

/**
 * Add Shopify mappings.
 *
 * @since 3.7.0
 * @param array $mappings    Importer columns mappings.
 * @param array $raw_headers Raw headers from CSV being imported.
 * @return array
 */
function kkart_importer_shopify_mappings$mappings$raw_headers ) {
    
// Only map if this is looks like a Shopify export.
    
if ( !== countarray_diff( array( 'Title''Body (HTML)''Type''Variant SKU' ), $raw_headers ) ) ) {
        return 
$mappings;
    }
    
$shopify_mappings = array(
        
'Variant SKU'               => 'sku',
        
'Title'                     => 'name',
        
'Body (HTML)'               => 'description',
        
'Quantity'                  => 'stock_quantity',
        
'Variant Inventory Qty'     => 'stock_quantity',
        
'Image Src'                 => 'images',
        
'Variant Image'             => 'images',
        
'Variant SKU'               => 'sku',
        
'Variant Price'             => 'sale_price',
        
'Variant Compare At Price'  => 'regular_price',
        
'Type'                      => 'category_ids',
        
'Tags'                      => 'tag_ids_spaces',
        
'Variant Grams'             => 'weight',
        
'Variant Requires Shipping' => 'meta:shopify_requires_shipping',
        
'Variant Taxable'           => 'tax_status',
    );
    return 
array_merge$mappings$shopify_mappings );
}
add_filter'kkart_csv_product_import_mapping_default_columns''kkart_importer_shopify_mappings'10);

/**
 * Add special wildcard Shopify mappings.
 *
 * @since 3.7.0
 * @param array $mappings    Importer columns mappings.
 * @param array $raw_headers Raw headers from CSV being imported.
 * @return array
 */
function kkart_importer_shopify_special_mappings$mappings$raw_headers ) {
    
// Only map if this is looks like a Shopify export.
    
if ( !== countarray_diff( array( 'Title''Body (HTML)''Type''Variant SKU' ), $raw_headers ) ) ) {
        return 
$mappings;
    }
    
$shopify_mappings = array(
        
'Option%d Name'  => 'attributes:name',
        
'Option%d Value' => 'attributes:value',
    );
    return 
array_merge$mappings$shopify_mappings );
}
add_filter'kkart_csv_product_import_mapping_special_columns''kkart_importer_shopify_special_mappings'10);

/**
 * Expand special Shopify columns to KKART format.
 *
 * @since 3.7.0
 * @param  array $data Array of data.
 * @return array Expanded data.
 */
function kkart_importer_shopify_expand_data$data ) {
    if ( isset( 
$data['meta:shopify_requires_shipping'] ) ) {
        
$requires_shipping kkart_string_to_bool$data['meta:shopify_requires_shipping'] );

        if ( ! 
$requires_shipping ) {
            if ( isset( 
$data['type'] ) ) {
                
$data['type'][] = 'virtual';
            } else {
                
$data['type'] = array( 'virtual' );
            }
        }

        unset( 
$data['meta:shopify_requires_shipping'] );
    }
    return 
$data;
}
add_filter'kkart_product_importer_pre_expand_data''kkart_importer_shopify_expand_data' );

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.1 ]--