Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Need Urgent Help About Products M Update Rate Topic   - - - - -

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 347 posts

Posted 08 May 2018 - 11:10 AM #1

hi all i have a problem with product m_update

i added a array to $product_data

 

like this

    [gg_specs] => Array
        (
            [0] => Array
                (
                    [name] => brand
                    [id] => 13
                    [variants] => Array
                        (
                            [0] => Array
                                (
                                    [id] => 87
                                    [value] => @phone
                                    [spec_id] => 13
                                )

                            [1] => Array
                                (
                                    [id] => 12
                                    [value] => Acer
                                    [spec_id] => 13
                                )
.....

i have build update codes with hook. everythink is ok but

 

in products.post

manage mode 

 $selected_fields[] = array(
        'name' => '[data][gg_spec]',
        'text' => __('gg_specs')
    );

m_update mode


    if (!empty($selected_fields['data']['gg_spec'])) {
        $field_groups['S']['gg_spec'] = 'products_data';
        $filled_groups['S']['gg_spec'] = __('gg_spec');
    }


i cant get values, if i remove gg_spec i can get values, how can i fix this ?



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10955 posts

Posted 08 May 2018 - 09:08 PM #2

Not knowing what you're really trying to do, you might want to review how you're using 'name' in your $selected_fields array.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 347 posts

Posted 09 May 2018 - 09:39 AM #3

i want update an array with m update.

like up code i have added an values to $product_data['gg_specs']

check up code i want update taht array with m update

like product features.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10955 posts

Posted 09 May 2018 - 06:57 PM #4

Sorry, but your code examples don't make any sense to me at all for what you may be trying to do.

If you are wanting to update product_data, then use the get_product_data hook and populate the array however you want.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18348 posts

Posted 10 May 2018 - 06:06 AM #5

Use built-in addons as examples (like Reward points or SEO) to add new fields to multiple update


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 347 posts

Posted 10 May 2018 - 07:19 AM #6

i check them codes. if i add a key to product_data array like gg_specs i cant get values, if remove key and add direct to product data i can get values.

whats wrong