This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function queuePromises({ promises, param, index = 0, total = 0, results = [] }) { | |
| // promisesArray, _item | |
| if( total === 0 ) { | |
| total = promises.length; | |
| } | |
| console.log( `index is ${index}` ); | |
| return new Promise( ( resolve, reject ) => { | |
| if( promises[ index ] !== undefined ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $orderBuilder = new OrderReceiptBuilder( 30 ); // where 30 is the order id | |
| $order = $orderBuilder->get(); | |
| // Looping Over Products | |
| $order->products->each( function( $product ) { | |
| $product->price; | |
| $product->gross_price; | |
| $product->tax; | |
| $product->total_tax; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Actions extends Tendoo_Module { | |
| public function load_frontend() | |
| { | |
| include_once( dirname( __FILE__ ) . '/../file/to/your/controller.php' ); | |
| $controller = new YourController; | |
| if ( $this->uri->segment(1) === '' && $this->uri->segment(2) === null ) { | |
| return $controller->index(); |
OlderNewer