zend-framework

Magento: Adding simple products from a bundle to separate lines in the cart

 ̄綄美尐妖づ 提交于 2019-12-18 11:44:20
问题 My client is requesting that each simple product within a bundled product they are selling (Clothing Top and Bottom) be added as a separate line item in the cart whenever a user adds it. Can anyone direct me in how to accomplish this? I am fairly good with MVC and the Zend Framework, but I need a bit of help finding the exact files that control adding bundled products to the cart, or an alternate method for getting these items added separately. Please assume that the only possible product

HTTP vs FTP upload

£可爱£侵袭症+ 提交于 2019-12-18 11:27:30
问题 I am building a large website where members will be allowed to upload content (images, videos) up to 20MB of size (maybe a little less like 15MB, we haven't settled on a final upload limit yet but it will be somewhere between 10-25MB). My question is, should I go with HTTP or FTP upload in this case. Bear in mind that 80-90% of uploads will be smaller size like cca 1-3MB but from time to time some members will also want to upload large files (10MB+). Is HTTP uploading reliable enough for such

What exactly is a baseUrl

时光毁灭记忆、已成空白 提交于 2019-12-18 11:18:18
问题 I have spent sometime trying to understand what a baseUrl is(from learning Zend Framework), but it's surprising that for such a ubiquitous utility, not a single "expert" or blogger has even attempted to define baseUrl so that a learner has an idea what it is about. They all assume you know what it is and then proceed to derive it, each one employing his own method to arrive at his own result. From what I'd read so far: Some think it is a Homepage-Url, which is what I'd naturally think it is

How to use Zend Framework Form Hash (token) with AJAX

人走茶凉 提交于 2019-12-18 11:07:30
问题 I have included Zend_Form_Element_Hash into a form multiplecheckbox form. I have jQuery set to fire off an AJAX request when a checkbox is clicked, I pass the token with this AJAX request. The first AJAX request works great, but the subsequent ones fail. I suspect it may be once the token has been validated it is then removed from the session (hop = 1). What would be your plan of attack for securing a form with Zend Framework Hash yet using AJAX to complete some of these requests? 回答1: I

Zend Framework 1.9 and Doctrine Integration

余生颓废 提交于 2019-12-18 10:57:10
问题 I'm trying to setup Zend Framework and Doctrine. There is this previous discussion with ZF 1.8 Integrate Doctrine with Zend Framework 1.8 app That discussion doesn't take into account the AutoLoader / Bootstrap System. If I generate an application skeleton with ./zh.sh how would I go about integrating Doctrine. 回答1: Found a solution http://pastie.org/481635 http://pastie.org/481633 Setup autoloader and plugin path in application/configs/application.ini: autoloadernamespaces.0 = "Doctrine"

Zend: Where/how can I register custom view helpers?

我的梦境 提交于 2019-12-18 10:56:29
问题 In my layout.phtml file I have : <?php echo $this->Test(); ?> I have created a Test view helper at application/views/helpers/Test.php <?php class My_View_Helper_Test extends Zend_View_Helper_Abstract { public function Test() { return 'test'; } } And my config file @ configs/application.ini : resources.view[] = '' resources.view.helperPath = APPLICATION_PATH "/views/helpers" Error I get: Zend_Loader_PluginLoader_Exception: Plugin by name 'Test' was not found in the registry; used paths: Zend

CMS built on Zend Framework [closed]

假如想象 提交于 2019-12-18 10:41:31
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . Is there a CMS built on Zend Framework? As alternative, are there classes that allow to easier implement a CMS with Zend Framework? If

Zend framework 2 recommended way for error handling

十年热恋 提交于 2019-12-18 10:25:29
问题 I noticed that the Skeleton Application that Zend provides does not handle error 500 . I know that in ZF1 there was an ErrorController that took care of that. I have done some research online, but did not find a clear cut solution for this. So what is the best way for error handling in ZF2. Would it be on per module basis or some global exception/error handler? I know that another solution would be to add ini_set('display_errors', true); to my index.php , but I don't really like that solution

Zend DB Framework examine query for an update

允我心安 提交于 2019-12-18 10:14:37
问题 So you can use something like this: $query = $db->select(); $query->from('pages', array('url')); echo $query->__toString(); to examine the sql that the Zend Db Framework is going to use for that SELECT query. Is there an equivilent way to view the SQL for an update? $data = array( 'content' => stripslashes(htmlspecialchars_decode($content)) ); $n = $db->update('pages', $data, "url = '".$content."'"); ?? 回答1: Use Zend_Db_Profiler to capture and report SQL statements: $db->getProfiler()-

Zend Framework: What are the differences between init() and preDispatch() functions in controller objects?

China☆狼群 提交于 2019-12-18 10:09:21
问题 I think the order of execution is init(), preDispatch() and then action() is called. Should I initialize my variables, which are common among all actions, in init() or preDispatch()? I've seen people using both functions for initialization. Probably as the name suggests it should be done in init() but then what kind of stuff would go in preDispatch()? What happens between init() and preDispatch() function calls? 回答1: First preDispatch() is called for instances of Zend_Controller_Plugin