Questions tagged [array]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
18
votes
3answers
33k 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?
2
votes
1answer
2k 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
1answer
555 views

Magento 2 - How to print array values in custom html email template by looping?

I want to print multiple coupon/gift codes in the custom email template. I am getting a single code as: $templateVars = array( 'store' => $this->storeManager->getStore(), '...
1
vote
1answer
228 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
0answers
182 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
213 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
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
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
2answers
89 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->...