Questions tagged [programming]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
1k views

create bundle order programmatically

I have this code: http://pastebin.com/iFwyKM7G Inside an event-observer class which executes after the customer registered. It creates an order automatically and it works for simple products. ...
5
votes
3answers
4k views

Get new empty item on model method

Collections provide a handy means of getting a blank model - e.g.: $quote->getItemsCollection()->getNewEmptyItem(); Is there any means of doing this from an existing model without having to ...
1
vote
1answer
366 views

Design Strategy - Helper methods that throw Exceptions

I am implementing a plugin for a client that will use the 'Max Sale Quantity' value of a Magento Stock Item on a product as a means of setting an upper-bound on total customer purchases. Because I ...
27
votes
4answers
3k views

Returning $this after observer

I see some conflicting information on the internet and in 3rd party modules alike - is it a requirement or best practice to return $this at the end of an observer method? E.g.: ...
3
votes
3answers
1k views

Provide properties to views in Magento

In Zend Framework we provide properties to layouts which are then consumed in the view. An example of this would be: $this->layout = new Zend_Layout(); $this->layout->username = 'John'; $...
-2
votes
1answer
174 views

Is it possible to render a page programmatically via url? [closed]

I am interested in rendering a page programmatically via URL so that it is stored in the cache... Any ideas are greatly appreciated!
3
votes
3answers
9k views

How to remove the Breadcrumbs from the homepage

When Full Page Cache is on the breadcrumbs show up on the home page, i've tried changing the line <?php if($crumbs && is_array($crumbs)): ?> to <?php if($crumbs && is_array($...
21
votes
4answers
15k views

Get Config Value for Website Scope

How can I get a configuration value for a specific website? There is Mage::getStoreConfig() but no Mage::getWebsiteConfig(). edit: I am exporting configuration data on website level - so somehow I ...

1
2