Categories
CMS Mastering Development Wordpress

ACF Group Field in add_post_meta?

how I can fill field in ACF Group Field in add_post_meta? This is maybe useful, I tried something, but it doesn’t work. $values = array(‘value 1’, ‘value 2’, ‘value 3’); Now the code to insert the repeater values: $repeater_field = ‘repeater’; $repeater_key = ‘field_5443d4e2dd4e4’; $sub_field = ‘sub_field’; $sub_field_key = ‘field_5443d4e2dd4e5’; $count = count($values); if ($count) […]

Categories
Mastering Development

MongoDB query to make key-value with existing values

My database has: [{id: ‘a’, value: 1}], [{id: ‘b’, value: 2}], [{id: ‘c’, value: 3}], And I need get {a: 1, b: 2, c: 3} Could I do it using only mongo commands? Thanks!

Categories
CMS Development Magento

Missing values from multiselect in store config

I’m trying to add a new multiselect under magento/module-backend/Block/System/Store/Edit/Form/Group.php but for some reason I can only see the last selected value from the multiselect. I have added the new multiselect like this: $fieldset->addField( ‘group_country’, ‘multiselect’, [ ‘name’ => ‘group[country][]’, ‘label’ => __(‘Country’), ‘title’ => __(‘Country’), ‘values’ => [[‘label’ => ‘one’, ‘value’ => 1], [‘label’ => […]

Categories
Development

How can i get access to component fields – React JS

I got little issue with my dropdown component that i imported from ‘react-select’, i am newbie at React so its pretty hard for me to solve this. i just want to get the selection of user from dropdown list, how can i do that? for example this is the Dropdown component: import React from ‘react’; […]

Categories
CMS Development Magento

GraphQL: Add Bundle to cart

I am attempting to add a bundle to a cart using GraphQL. The problem that I am facing is that my bundle has four items in it. Configurable Product (Frame) [Has a size and color option] Simple Product Simple Product Simple Product What I cannot figure out is how to set the options in the […]

Categories
Development

Grouping Elements in Dictionary by The Last Character of The Keys [iOS Swift 5]

I have a dictionary that I want to group by the last character of the keys. This is the dictionary: var displayValues = [“volume_1”: 1, “price_2”: 6, “price_1”: 2, “stock_1”: 3, “volume_2”: 5, “stock_2”: 7] This is the code that I used in order to group them let groupValues = Dictionary(grouping: displayValues) { $0.key.last! } […]

Categories
CMS Development Magento

Category attribute dropdown saying class doesnt exists

Here is my xml file for my custom category drop down <?xml version=”1.0″ encoding=”UTF-8″?> <form xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <fieldset name=”general”> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”label” xsi:type=”string” translate=”true”>General Settings</item> <item name=”collapsible” xsi:type=”boolean”>true</item> <item name=”sortOrder” xsi:type=”number”>0</item> </item> </argument> <field name=”cat_front_label”> <argument name=”data” xsi:type=”array”> <item name=”options” xsi:type=”object”>XX\XX\Model\CategoryLabelDropdown</item> <item name=”config” xsi:type=”array”> <item name=”formElement” xsi:type=”string”>select</item> <item name=”label” xsi:type=”string” […]

Categories
Development

Flutter Radio Value not Changing in Stepper

The problem is that _qualificationRadioGroupValue value update when setState() called but after build method called its reset to its original value I am beginner to flutter so don’t know what I am doing wrong I have tested only 2 radio button it’s working outside of stepper but not working in stepper I don’t know why […]

Categories
CMS Development Magento

working on product adding with images on magento using curl. but not working properly. i have used below code

$curl = curl_init(); $URL = “”; curl_setopt_array($curl, array( CURLOPT_URL => $URL . “/rest/V1/integration/admin/token”, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => “”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => “POST”, CURLOPT_POSTFIELDS => json_encode([“username”=>”uname”, “password”=>”passs”]), CURLOPT_HTTPHEADER => array( “accept: application/json”, “cache-control: no-cache”, “content-type: application/json”, ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); echo $response; […]

Categories
Development

search for a number in a JSON array in javascript

I have a json array something like [ { value: 1, hidden: false }, { value: 2, hidden: false }, { value: 3, hidden: false } ] I want to see if integer 2 exists in this array. What’s the best way to achieve it?