zend-framework

Magento quantity field doesn't work

浪子不回头ぞ 提交于 2019-12-24 11:29:48
问题 i simply can't find a solution to my problem! The quantity field worked as it should. After a few months of programming on the whole shop, i wanted to test the quantity field and recognized that it doesn't function. I only can add one product to the cart although i typed “3” in the quantity field. I didn’t change anything in product/view.phtml and addtocart.phtml. Don't know where i have to search for this error. Maybe someone can give me a tip... greets max 回答1: The quantity field is used in

Failed saving metadata to metadataCache

[亡魂溺海] 提交于 2019-12-24 11:28:18
问题 I did a lot digging around for a solution to this problem and was unable to come to a solution. Problem: I have a Zend Framework 1.10.7 application running on the terminal and through a web interface. When it is running over the web it works flawlessly but when I run it through command line it keeps giving me an error Notice: Failed saving metadata to metadataCache I looked at various other topics including Accessing the Zend Application Bootstrap _init Functions After Bootstrapping and I was

Changing the height of ckeditor from a zend form

旧巷老猫 提交于 2019-12-24 10:37:47
问题 I am trying to set the height of a ckeditor I am using. Here is what I currently have: $this->addElement('textarea', 'text_field', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', true, array(0, 3000)), ), 'decorators' => array('ViewHelper'), 'required' => false, 'attribs' => array('class' => 'ckeditor'), 'label' => 'Please enter text below', 'value' => isset($this->_text_data[0]['text']) ? $this->_text_data[0]['text'] : '' )); This comes from my form,

Remove radio button by default checked in zend

拟墨画扇 提交于 2019-12-24 10:37:31
问题 Hi guys I am trying to remove radio button by default checked in my application AS I am new to zend I couldn't able to understand how to do that Here is my code: /** * Get single selection action column for grid. * * @return Bvb_Grid_Extra_Column */ protected function getSingleSelectionActionColumn() { $column = new Bvb_Grid_Extra_Column(); $selection = $this->getView()->render('_partial/selection-order.phtml'); $column->position('left')->name('selection')->title('')->decorator($selection);

Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for db

ⅰ亾dé卋堺 提交于 2019-12-24 10:35:38
问题 i have made a login form. I'm always getting this error in my controller that it was unable to fetch or create an instance for this db. i have read all the documentation about it and why this error occurs. i tried everything to fix this problem, but it is still not working. Can somebody help me. I'm using my database for other things and it can make a connection, but when i want to load the login page, i'm getting this error. This is the code in my global.php return array( 'db' => array(

Zend_Navigation with hidden pages

谁说我不能喝 提交于 2019-12-24 10:28:24
问题 I have my Zend_Navigation loaded from a PHP array (but that's irrelevant...) and I'm using the navigation menu helper to generate a menu based on the loaded navigation. Some menu items must not appear in the outputted menu, so I simply set "'visible' => false" in my array for that page and there you go! But if the URL of an 'hidden' menu is accessed, the findActive($container) view helper method returns an empty array, thus the page from the container is not returned, even if it should (like

Correct Location for Custom Zend_Action_Controller

£可爱£侵袭症+ 提交于 2019-12-24 10:26:10
问题 The ZF Docs reference 'Subclassing the Action Controller' (bottom of the page), but don't reference a standard place to put the new Action_Controller class. Application_Module_Autoloader sets up pats for a bunch of things, but never controllers. I guess putting it on library/APPNAMESAPCE/Action/Contoller would work. But that seems a bit odd since every other application specific file is stored under application/ . 回答1: The class gets autoloaded like any other class, there isn't a 'standard'

Zend Framework 1.12 plugin for checking “Authorization” header

China☆狼群 提交于 2019-12-24 09:58:17
问题 I'm writing REST api using Zend Framework 1.12. I want to check "Authorization" header in controller plugin. I put code in the preDispatch action of the plugin $authorizationHeader = $request->getHeader('Authorization'); if(empty($authorizationHeader)) { $this->getResponse()->setHttpResponseCode(400); $this->getResponse()->setBody('Hello'); die(); //It doesn't work } The problem is that after it controller's action is still being called. I tried 'die()', 'exit'. My question is how to return

mysql select query with php foreach

穿精又带淫゛_ 提交于 2019-12-24 09:57:27
问题 I am trying to write a function where I will get the id's from a table and then I want to have the all the id's in the array so that these id's used in another function to be processed. I wrote the below but it's not array method and also it's printing the id's twice. I searched online and they all suggest to use mysql_fetch_assoc and remove for each..but in my case I am using the zend adapter fetchAll to get the output. Please let me know how I can get the id's in the array and also only

Trim leading and trailing white spaces in JSON values

纵饮孤独 提交于 2019-12-24 09:50:22
问题 All, I make a JSON request to a web server using PHP and it returns me a JSON response in a variable. The JSON response will have lots of keys and values. I would like a function which trims leading and trailing white spaces in each "value" of the key-value pair for the entire JSON response. How can I do that through PHP? Ex: json_decode breaks due to trailing spaces or special characters: { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": { "GlossEntry": {