Skip to content

Commit

Permalink
fix: missing fields from Add Field modal
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Sep 26, 2024
1 parent efc9f32 commit b6c461e
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions templates/admin/ppom-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
$product_meta = array();
$ppom_field_index = 1;
$is_edit_screen = false;
if ( $_REQUEST ['action'] == 'new' ) {

if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'new' ) {
$is_edit_screen = true;
}
if ( isset( $_REQUEST ['productmeta_id'] ) && $_REQUEST ['do_meta'] == 'edit' ) {
if ( isset( $_REQUEST['productmeta_id'] ) && $_REQUEST ['do_meta'] == 'edit' ) {

$product_meta_id = intval( $_REQUEST ['productmeta_id'] );
$product_meta_id = intval( $_REQUEST['productmeta_id'] );
$ppom = new PPOM_Meta();
$ppom_settings = $ppom->get_settings_by_id( $product_meta_id );
$is_edit_screen = true;
Expand Down Expand Up @@ -178,6 +179,13 @@
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_1,
'icon' => 'fa-picture-o',
],
[
'slug' => 'image',
'title' => __( 'Images', 'woocommerce-product-addon' ),
'description' => __( 'Select images.', 'woocommerce-product-addon' ),
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_1,
'icon' => 'fa-picture-o',
],
[
'slug' => 'imageselect',
'title' => __( 'Image DropDown', 'woocommerce-product-addon' ),
Expand Down Expand Up @@ -283,6 +291,13 @@
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_1,
'icon' => 'fa-money',
],
[
'slug' => 'divider',
'title' => __( 'Divider', 'woocommerce-product-addon' ),
'description' => __( 'Add a visual separator.', 'woocommerce-product-addon' ),
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_1,
'icon' => 'fa-pencil-square-o',
]
]
],
'pricing-group' => [
Expand All @@ -297,7 +312,7 @@
],
[
'slug' => 'quantities',
'title' => __( 'Select Option Quantity', 'woocommerce-product-addon' ),
'title' => __( 'Variation Quantity ', 'woocommerce-product-addon' ),
'description' => __( 'Quantity selection with options', 'woocommerce-product-addon' ),
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_2,
'icon' => 'fa-list-ol',
Expand All @@ -318,7 +333,7 @@
],
[
'slug' => 'vqmatrix',
'title' => __( 'Variation Quantity', 'woocommerce-product-addon' ),
'title' => __( 'Variation Matrix', 'woocommerce-product-addon' ),
'description' => __( 'Quantity selector for variations', 'woocommerce-product-addon' ),
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_3,
'icon' => 'fa-list-ol',
Expand All @@ -337,6 +352,20 @@
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_1,
'icon' => 'fa-money',
],
[
'slug' => 'bulkquantity',
'title' => __( 'Bulk Quantity', 'woocommerce-product-addon' ),
'description' => __( 'Bulk quantity selection for products', 'woocommerce-product-addon' ),
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_1,
'icon' => 'fa-columns',
],
[
'slug' => 'selectqty',
'title' => __( 'Select Option Quantity', 'woocommerce-product-addon' ),
'description' => __( 'Select option\'s quantity', 'woocommerce-product-addon' ),
'plan' => NM_PersonalizedProduct_Admin::LICENSE_PLAN_1,
'icon' => 'fa-list-ol',
],
]
]
];
Expand Down

0 comments on commit b6c461e

Please sign in to comment.