Questions tagged [array]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
18
votes
3answers
31k views

How to print array contents in log file?

How to print array contents into a log file in magento CE 1.7 without iterating through a loop?
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. */ ...
1
vote
0answers
157 views

Push an array of all sku's on a category page into my $data = array();

I want to list all sku's on a category page in a data array. Currently if i'm on a product detail page i can push the sku into my data array like this: if ($module === 'catalog' && $...
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); ...
1
vote
1answer
189 views

something is wrong in the code. theows an error->getNodeChildrenData() must be an instance of Varien_Data_Tree_Node,on line 18 [duplicate]

<?php class Ab_CategoryObserver_Model_Observer{ public function updateTopMenuJson(Varien_Event_Observer $observer){ $_helper = Mage::helper('catalog/category'); $_categories = $...
0
votes
3answers
4k views

Programatically get parent ids of products of array

I am working on module and want to fetch parent product ids of child product. If it exists. I am using following line of codes, $parentIds = Mage::getModel('catalog/product_type_configurable')->...
0
votes
1answer
4k views

GetStreet() endup into an error Array to string conversion?

I am trying to call all the customer info after placing an order and insert all these info into a database. All the parameters are passing ok beside getStreet() which ends up as array into database, ...
0
votes
2answers
81 views

What to do exactly? my code throw an error -> 'Call to undefined function getNodeChildrenData()'

class Ab_CategoryObserver_Model_Observer{ public function updateTopMenuJson(Varien_Event_Observer $observer){ $_helper = Mage::helper('catalog/category'); $_categories = $_helper->...