Questions tagged [array]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
59 views

Passing array from one template to another in magento2

I have used two template for homepage(template inside another template) I am calling product template inside category template. Now my case scenario is 1. I am declaring one array in category ...
1
vote
1answer
26 views

How to get _data:protected on printing customer data in Magento 2.2.6?

How to access this value from array [value] => 11113610 ? Array ( [is_saml] => Magento\Framework\Api\AttributeValue Object ( [_data:protected] => Array ( ...
0
votes
1answer
20 views

remove BOM byte (“” /ufeff“”) from response

so im using m2e pro extension on magento 2.3 suddenly the synchronizing stopped from working. thats because that m2e pro uses their own cron job and they sends curl calls to the server, but my server ...
1
vote
4answers
555 views

How to convert this object data into array?

I have this Data Object value. Magento\Customer\Model\Data\AttributeMetadata Object ( [_data:protected] => Array ( [frontend_input] => boolean [input_filter] ...
2
votes
0answers
24 views

How to show all data in array using jquery. Magento 2

I'm getting all the Data from Array in Jquery when I console.log() it then it shows me all the data of the array but when I append the data with <div> then it only returns me the last value I ...
0
votes
2answers
27 views

Remove a city from being able to purchase product

So in my explorations I've found that Magento only has the States stored in the back end, but I don't want to remove the entire state, just one city in that state. I've seen options to include a city ...
1
vote
1answer
740 views

How can we return an array of search results in APIs Magento 2

I need to return array of search results and so far I did this. DashBoardInterface.php <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ ...
0
votes
0answers
19 views

Difference between Magento Collection ,object , array

Please clear the main difference between Magento Collection , object , array and arraylist also ?
0
votes
0answers
64 views

IN magento 2.2.5, Filter Array column value by Id

In Magento 2.2.5, I am using my custom collection. It has the field with array of values(Customer Ids). I want to filter it using single value(LoggedIN Customer Id). Its almost same like this. But it ...
0
votes
3answers
27 views

Sorting went fail for array

I am having the array of color attribute options... I would like to sort the array based on 'store0' key... I have used multisort and usort but its not working [821] => Array ( [...
1
vote
0answers
34 views

Why would you add the modules array in app/etc/config.php to source control?

As of Magento 2.2 it's recommended to add config.php to your source control to facilitate pipeline deployment. I have some questions and issues with this. I'm hoping somebody can share their ...
0
votes
1answer
40 views

Magento2: How can I access Zend\Stdlib\Parameters Object array?

I have below result: echo "<pre>"; print_r($data); die(); Result Zend\Stdlib\Parameters Object ( [storage:ArrayObject:private] => Array ( [success_url] => ...
-1
votes
1answer
29 views

Array Get Value in magento2

i want to get profile id from this array [2019-05-21 07:30:24] main.DEBUG: array ( 'url' => 'https://api-3t.sandbox.paypal.com/nvp', 'CreateRecurringPaymentsProfile' => array ( '...
0
votes
1answer
38 views

array convert into Magento 2 collection

I have 2 collection 1 is $bestsalecollection that show in dashboard . second is product collection. After filter collection when i return it generate error Call to a member function isLoaded() on ...
0
votes
1answer
65 views

Magento 2: my_variable is not defined in ArraySerialized

I'm trying to make a custom store configuration with ArraySerialized But at first, i try with 2 column and it working fine, i've successfully in created and get data from it, but then, i created 1 ...
4
votes
3answers
76 views

How to Find out where it Is made Breadcrumb Array in Magento 2.3.1

where it Is made Breadcrumb Array in Magento 2.3.1? In Detail page has show Breadcrumb but i m not able to find where it Is made Breadcrumb Array Can somebody help me? Thanks
0
votes
1answer
22 views

Multiple For each loop value to Json string

$data= array(); foreach($itfdatas as $key=>$itfdata){ $checkemps = explode(',',$itfdata['employee_id']); $data[] = array( 'id'=>mysql_real_escape_string($itfdata['P_id']), ...
1
vote
5answers
309 views

Magento 2.2: Weird $_files array after image upload

currently I'm trying to develop an image upload in the Magento admin area with ui components. My fieldset declarations looks like this: <fieldset name="slide"> <argument name="data" ...
1
vote
1answer
33 views

Custom report without using collection

I have a request which to make custom report, and data for the report need to calculate by helper function and will generate a data array with row and columns. Is there any solution to let data array ...
3
votes
3answers
66 views

Need to get array values

Array ( [requestId] => 69a6#16a49c12847 [result] => Array ( [0] => Array ( [seq] => 0 [marketoGUID] =>...
0
votes
0answers
21 views

Magento 2 how to match one item from one collection to another item in another collection if both are same then add to an array

I'm trying to compare two values from collection to another two values from another collection if they both are same then add that row to a array. How to achieve it. Can I get help? Thank you in ...
1
vote
3answers
445 views

Multiple url name and field addcolumn action

I have this code: $grid->addColumn('action',array( 'header' => $this->__('Action'), 'type' => 'action', 'action' => array( ...
4
votes
2answers
302 views

How to resolve Exception #0 (Exception): Notice: Array to string conversion Mailchimp Error

Exception #0 (Exception): Notice: Array to string conversion in /public_html/vendor/magento/framework/View/Element/Html/Select.php on line 244 line 235-244 of the Select.php public function ...
3
votes
1answer
90 views

Magento2 : How to show button in admin for custom module page?

I want to show the button in my custom module (admin page) but I am getting an error I want to add a button and how I add action process for that button i already tried this answer : (https://...
-1
votes
1answer
173 views

Warning: strpos() expects parameter 1 to be string, array given in vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php on line 157

1 exception(s): Exception #0 (Exception): Warning: strpos() expects parameter 1 to be string, array given in /home/equpo/public_html/demo/vendor/magento/module-eav/Model/Entity/Attribute/Source/Table....
1
vote
2answers
91 views

Magento Api request foreach error

I am trying to get attribute option Ids for a sku using this below api call. http://localhost/rest/V1/configurable-products/sh8/options/all I used this curl request: $curl = curl_init(); ...
1
vote
1answer
63 views

How to filter duplicate values in magento array?

I am trying to get attribute option values for specific products. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $baseUrl = $objectManager->get('Magento\...
0
votes
2answers
46 views

Don't execute foreach loop if array is empty

I have the following code, if there are no orders older then $days_ago, I want that the foreach loop won't be executed. I don't know how to do this. $orders = Mage::getModel('sales/order')->...
2
votes
1answer
88 views

Unserialize large data not working in Magento 1.9

I've created a custom module on my Magento 1.4.0 website, which create a csv feed file with all products and you can add dynamically what product attributes to display in the file. Something like in ...
1
vote
1answer
152 views

How to add dynamic multi-select list drop-down in admin edit.php file

I have create Model/Source But I want to add this in admin multiselect dropdown list Like: $fieldset->addField( 'special', 'multiselect', [ 'label' => __(...
1
vote
1answer
95 views

How to implode a array object

Here my code: public function getTime(){ $store = $this->getStoreId(); $mapping_time = $this->scopeConfig->getValue(self::XPATH_HOURMAX, ScopeInterface::SCOPE_STORE, $store); ...
2
votes
3answers
68 views

In Magento 2 how to unserialized the array to get a data?

my code: <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $data = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface')->getValue('...
2
votes
2answers
49 views

How can Select arrays from associate array in php on the basis on element [closed]

I have an array "$arrItems['items']" in which 5 more arrays(associate array) and each array contain 5 element(f_name,l_name,contact,address,seller_id). Actually I want to get all those arrays(from "$...
0
votes
2answers
48 views

Accessing Array with space in key Value

I have an array in this format $dataArray = "array ( 0 => array ( 'Field Val' =>'val1', 'Field Val2' =>'val2', ), 1 => array ( 'Field Val' =>'val1', 'Field ...
0
votes
0answers
88 views

How to read data in CSV file and store it to database in Magento 2

$data = [ [ 'data_id' => 1, 'name' => 'Name1', 'bonus_points' => 123.45 ], [ 'data_id' =>...
-1
votes
1answer
24 views

How to display created dynamic attibute into the customer array?

We already created dynamic attribute and that attribute display on the admin side Account information tab of admin. But when we need to add some value on that feild at that time we find that, that ...
1
vote
0answers
298 views

AbstractFieldArray with Image Upload

I have an issue with getting the AbstractFieldArray class to work with an image upload for Magento Backend. Basically I have a settings grid with 4 columns. 1 of them contains a dropdown field, the ...
1
vote
0answers
29 views

Forms not working with array fields

Don't know something has gone wrong. Suddenly on my magento (1.9) site forms which have array fields are not working. for example :- <input type="text" name="inputfield['first']" id="...
0
votes
2answers
224 views

Split array in ko template

I have a array with following structure in ko template styleBasedProductsDetails = {{ "image_url": "media/images/home-page/1.jpg", "link_url": "push-up-bra-online/" ...
0
votes
1answer
63 views

Magento 1.9.x Quantity Select Box Increments - How can i limit them?

We currently display product quantities in select box <select><option> type inputs and limit the select dropdown to a maximum Qty of 30. This has been working fine for us however we want ...
3
votes
2answers
1k views

Custom API specify multidimensional parameter

I already created custom api where I am able to pass array item (for example $data = array('date'=>'2013-12-22','operation'=>'import','successful'=>'1', 'requeue'=>'0');) but I would ...
3
votes
1answer
2k views

Magento 2 Modal Popup - Buttons

I'm trying to add more than one button in my Magento 2 modal. I got it to pop up but I can't seem to get another button to appear. and I adding the second button correctly to the array? UPDATED CODE! ...
0
votes
2answers
204 views

addFieldtofilter array not reading

I am trying to filter product collection by ids if I use below code, the filter works ok and the product shows. $this->_productCollection ->addFieldToFilter('entity_id',array('in'=&...
3
votes
1answer
930 views

Array Manipulation

Is there any good example of array manipulation in magento 2 using Class Magento\Framework\Stdlib\ArrayManager and to use their function in my module like marge array, find any nodes etc. I just ...
0
votes
2answers
143 views

how to fetch all order items through loop from json data api ? magento2

Hi i have an array coming from json data of placed order items in my api in this form. let's suppose this example : [items] => Array ( [0] => stdClass Object ...
0
votes
2answers
289 views

Code to Display data on page coming in form of array?

Hi i have a data of table coming in form of array in function inside my block class : What i want basically is to display that array form data on my homepage : here's my code : protected function ...
0
votes
1answer
350 views

Get convert resultJsonFactory response to string in Magento2

I want to log the values of a resultJsonFactory object in php with in Magento 2: How do I get the values I set in the $response object ? $response = $this->resultJsonFactory->create(); $...
1
vote
1answer
379 views

Magento 2 Short array syntax is not allowed while Module testing.

Magento 2 module testing tools gives error "short array syntax not allowed", we do code like following public function toOptionArray() { return [ ['value' => 0, 'label' =&...
0
votes
2answers
2k views

How to get array value in post?

We have develop own module for wedding planner. We post multiple products with description on form submit. How to get the "wedding" array in the below values. Array ( [weeding] => Array ...
0
votes
2answers
313 views

Magento 2 How to fetch rest API array value

I got sales order details from Rest API. How to fetch this values(like When i call base_currency_code it will show USD). Thank you.