Plugin Directory

Changeset 2750777


Ignore:
Timestamp:
07/01/2022 01:00:10 PM (4 years ago)
Author:
themescoder
Message:

Merge New Updates

Location:
tc-ecommerce
Files:
954 added
4 edited

Legend:

Unmodified
Added
Removed
  • tc-ecommerce/trunk/functions/tc_app_setting_config.php

    r2721293 r2750777  
    88        'opt_name'             => $opt_name_tc_ecommerce_app,
    99        'display_name'         => 'TC Ecommerce',
    10         'display_version'      => '1.2.2',
     10        'display_version'      => '1.3.0',
    1111        'menu_type'            => 'menu',
    1212        'allow_sub_menu'       => true,
  • tc-ecommerce/trunk/readme.txt

    r2721293 r2750777  
    22Tags: app builder, woocommerce app, Ionic app, flutter app, mobile builder
    33Requires at least: 5.3
    4 Tested up to: 5.9
    5 Stable tag: 1.2.2
     4Tested up to: 6.0
     5Stable tag: 1.3.0
    66License: GPLv2 or later
    77License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    111111* Minor Fix
    112112*Improve plugin details
     113
     114= 1.2.2 =
     115* Minor Fix
     116
     117= 1.3.0 =
     118* Plugin Product Add-Ons  configure
     119* Plugin Tera Wallet Configure
  • tc-ecommerce/trunk/tc-ecommerce.php

    r2721293 r2750777  
    44 * Plugin URI: https://themes-coder.com/
    55 * Description: A wordpress Plugin for mobile app solution for android and iOS platform with WordPress WooCommerce as backend.
    6  * Version: 1.2.2
     6 * Version: 1.3.0
    77 * Author: ThemesCoder
    88 * Author URI: https://themes-coder.com
     
    5858require_once( 'controller/app_user.php' );
    5959require_once( 'controller/app_settings.php' );
     60require_once( 'controller/tc_tera_wallet.php' );
    6061
    6162function all_app_routes() {
     
    6566    $controller = new AppSettingsController();
    6667    $controller->tc_app_routes();
     68   
     69    $controller = new TcTeraWalletController();
     70    $controller->tc_tera_wallet_routes();
    6771}
    6872add_action( 'rest_api_init', 'all_app_routes' );
  • tc-ecommerce/trunk/templates/template-mobile-checkout.php

    r2714340 r2750777  
    4545    $woocommerce->cart->empty_cart();
    4646    foreach ($products as $single_item) {
    47         $product_id     = absint($single_item->product_id);
    48         $quantity       = absint($single_item->quantity);
     47         $product_id    = absint($single_item->product_id);
     48         $quantity      = absint($single_item->quantity);
     49         $meta_data     = $single_item->meta_data;
     50         $add_ons       = array();
     51         $addons        = array();
     52       
     53        if(isset($meta_data)){
     54            foreach($meta_data as $mdata => $values ){
     55                $add_ons['name'] =  $values->key;
     56                $add_ons['value'] =  $values->value;
     57                $add_ons['price'] =  $values->price;
     58                $add_ons['field_name'] =  $values->field_name;
     59                $add_ons['field_type'] =  $values->field_type;
     60                $add_ons['price_type'] =  $values->price_type;
     61                $addons[] = $add_ons;
     62            }           
     63        }
     64       
     65        $cart_item_data = Array ("addons" => $addons);
     66        //print_r($addons);
    4967        if(isset($single_item->variation_id)){ 
    5068            $is_variable    = absint($single_item->variation_id);
    5169        }else{ $is_variable = "";}
     70       
    5271        if (isset($is_variable) && $is_variable >= 1 ) {
    5372            $variable_pro    = new WC_Product_Variable($product_id);
     
    5675                if ($single_value['variation_id']  ==  $is_variable ) {
    5776                    $attribute = $single_value['attributes'];
    58                     $woocommerce->cart->add_to_cart($product_id, $quantity, $is_variable, $attribute);
     77                    $woocommerce->cart->add_to_cart($product_id, $quantity, $is_variable, $attribute, $cart_item_data);
    5978                }
    6079            }
    6180        }
    6281        else {
    63             $woocommerce->cart->add_to_cart($product_id, $quantity);
    64         }
    65     }
     82            $woocommerce->cart->add_to_cart($product_id, $quantity, NULL, null, $cart_item_data);
     83        }           
     84    }
     85   
    6686    if (isset($coupons)) {
    6787        foreach ($coupons as $coupon) {
Note: See TracChangeset for help on using the changeset viewer.