A blog series for PHP developers working on larger-than-average Laravel projects
Written for projects with a development lifespan of six to twelve months, with a team of three to six developers working on them simultaneously.
| /*================================================================================================== | |
| Application: Utility Function | |
| Author: John Gardner | |
| Website: http://www.braemoor.co.uk/software/vat.shtml | |
| Version: V1.0 | |
| Date: 30th July 2005 | |
| Description: Used to check the validity of an EU country VAT number |
The Magento Session object should be used when querying the current quote. Access it like so:
$checkout = Mage::getSingleton('checkout/session')The getQuote() method is responsible for retrieving the current quote. If a quote ID doesn't exist on the session object then a new quote object (Mage_Sales_Model_Quote) is created and set up with all of the necessary data (customer id, store id, remote ip etc).
If a product has never been added to the cart or the cart isn't being loaded from a previous session, it's likely the cart will never have been saved and will have no id. The cart gets saved when a product is added from the Checkout module's CartController (Mage_Checkout_CartController) in the addAction.
| <?php | |
| namespace Jobs; | |
| use Illuminate\Queue\InteractsWithQueue; | |
| use Illuminate\Redis\Database as Redis; | |
| class Foo extends Job | |
| { | |
| use InteractsWithQueue; |
| <?php | |
| // (c) Tom Van Looy <tom@ctors.net> https://ctors.net/isc_license.txt | |
| // Alle feestdagen kunnen berekend worden, de berekende zijn allemaal | |
| // afhankelijk van pasen. PHP heeft een functie easter_date(). | |
| // Makkie dus. Hoe easter_date() zelf werkt kan je hier raadplegen: | |
| // https://github.com/php/php-src/blob/master/ext/calendar/easter.c | |
| // Geen parameter? Doen we gewoon dit jaar toch. |