zend-framework

Magento Custom Left Navigation Template displaying twice

I created a custom template (mytheme/template/catalog/navigation/left_parent_category.phtml) to display the parent categories of the current category. <?php echo '<div class="box base-mini">'; echo '<ol>'; $currentCat = Mage::registry('current_category'); if ( $currentCat->getParentId() == Mage::app()->getStore()->getRootCa...

How to use a layout for emails in Zend Framework

I would like to use a layout for the emails I'm sending out. I'm currently usine Zend Layout for the web pages, but would like to theme my emails as well. Here is what I've tried. This is my function that sends the email $layout = Zend_Layout::getMvcInstance(); $this->_view->render($template); $html = $layout->render('emai...

Zend Navigation - Best Practices?

I would like to know how people use Zend_Navigation, what are the best practices to employ to get the most out of it? My company has built our last 2 major projects using Zend Framework, we have used a combination or Zend_Navigation the url view helper. Using the url view helper has caused lots over extra work when having to refactor c...

Zend_Form: Database records in HTML table with checkboxes

Hi, I am trying to add a HTML multi-column table to a Zend_Form. The table would be populated by data from the database and each row should be preceded by a checkbox, as shown in the ASCII below: +-----+-------------------------+-----------------------+--------------+ | | Column_1 | Column_2 | Column_3 ...

Multidimensional Array based Elements

Using Zend_Form, how would I create form elements like this <input type="text" name="element[1]" value=""/> <input type="text" name="element[2]" value=""/> ...

Apache is lagging or something else is bad

Hi! I have a website. It's my first website with Zend Framework but I think it's written good. Generatiom time is about 0.9s now. I'll do it something like 0.2 but leave it now. When you press any link on the website it tooks about 1,5-2s before web browser is loading page. Then it tooks 0.15s to show it. So if execution time is 0.9 wher...

Zend_Form: Duplicate decorator IDs on subforms

I'm using Zend_Form from Zend Framework 1.10.6 to render a html form. In this form 'z', there's a subform with a field 'a'. The subform is added to the main form twice, once with the name 'x' and once as 'y'. Below is the html rendered by the Zend_Form-object. <form id="z" enctype="application/x-www-form-urlencoded" method="post" actio...

Zend Framework: How to remove a request parameter from the URL?

I would like to remove a request parameter from the URL that is displayed in the browser window. I am creating links with special parameters that I want to retrieve in the controller, but aren't necessary after they have been retrieved. I tried doing this, but it did not work: $params = $this->_getAllParams(); if (!empty($params['acti...

Zend DB Selecting constants - columns that do not exist in table

Hey I'm trying to do this query using Zend DB select but I'm not able to do so This is the sql query select shopping_id,shopping_details,"friend" as type from shopping Notice here how I'm specifying "friend" as type and friend is not a column in the shopping table. Now how do I do this in Zend. I have tried this but it gives me an...

Zend Framework and MSSQL database

Hi, Is it possible to take advantege of MSSQL in Zend Framework? I tried run my zend server with pdo_mssql, sqlserver and odbc and failed each time. Did you menage to use Microsoft database in your project? Kind Regards, ...

Zend Framework - How to do custom redirect with the redirector helper?

I want to use the URL schemes in Zend Framework like /list?id=2&name=test, something like that, when I do redirection, I call this way: $this->_helper->redirector('index','list','',array('id' => 2, 'name' => 'test'));. But the URL generated will be /list/index/id/2/name/test which makes it inconsistent. How do I prepare a URL scheme like...

How do I set the mime type in zend framework?

I would like to set the repsonse mime type to application/xhtml+xml How and where do I set that in Zend Framework? Thanks for your help. ...

Dynamic Website Navigation Using Zend Framework - XML vs MySQL

I am about to create a menu for a project of mine, and I need to make a dynamic navigation. In my Admin back end, I will create a form for URI entry, so that the admins can create links and define the parent of the link and their ordering in relation to other links in the parent. I will be doing this with a MySQL database. The question ...

400 Bad Request With CSS .htaccess rule

Hello, I'm trying to whitelabel the Zend framework, so I've created folder in application called Site. This url: http://local.branch.test.com/site-css/1/layout.css returns a 400 Bad Request. With the following rule: RewriteRule ^site-css/([0-9]+)/(.*)$ ../application/site/$1/design/css/$2 [L] Full .htaccess RewriteEngine on Re...

Zend View Action Helper $params questions

i am wondering by what method are the params of a zend view action helper passed by? get or post. is is becos i cant seem to access them via $_GET & $_POST but i can with $this->getRequest()->getParam("xxx") then i want to check if the variable exists 1st before using it so i did $itemsPerPage = isset($this->getRequest()->getParam("ite...

using Zend View Action Helpers & disabling layout

i am just reading on zend view action helpers on zend framework docs. so i created an index action // index.phtml ... echo $this->action( $action = "widgetenabledoutput", $controller = "index", $module = null, array( "noLayout" => true, "itemsPerPage" => 15 ) ); // index controller (IndexController.php) public funct...

What Zend View Partial setObjectKey do?

i am reading zend framework docs on zend view partials If your model is an object, you may want to have it passed as an object to the partial script, instead of serializing it to an array of variables. You can do this by setting the 'objectKey' property of the appropriate helper: // Tell partial to pass objects as 'mod...

Zend Framework layout or view lag

I have a website built on ZF. I don't know why but is lagging as hell. Loading simple page tooks 4s. Time is going down when I disable layout. When rendering is enabled it's working normally. So I can use action views but I can't use layouts. Can it be someting bad with layout? Or I'm not setting up layout properly? Site: http://zgarnij...

how to obtain $_GET object from zend framework

So suppose I have the url: http://url?x=1&amp;y=2 Then I can just get all the get parameters via PHP using the $_GET variable so print_r($_GET) will echo all the get variables Now suppose I'm using zend framework and i'm trying to take advantage of the /var/value/var/value feature: so now my url is http://url/controller/action/x/1...

Good way to initialize pages using Zend_Navigation

i am reading up on zend navigation and was wondering whats good way to set it up. Where do i setup up? can i do it using application.ini - but it may make application.ini too long to read. maybe using a resource method? maybe a plugin? do i hardcode all pages? eg. $pages = array( array( 'label' => 'Home', 'title' => 'Home p...