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 | |
/******************************************************************** | |
File name: rest_test.php | |
Description: | |
A PHP test script that calls the Coupon AutoGen extension | |
to Magento's REST API. | |
The Coupon AutoGen API takes: | |
-- the rule ID of the "Generate Coupons" rule to execute | |
-- the number of coupon codes to generate | |
-- the length of each coupon code |
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
<?xml version="1.0"?> | |
<layout version="0.1.0"> | |
<checkout_onepage_cadastro> | |
<reference name="root"> | |
<action method="setTemplate"><template>MOIP/onestepcheckout/page/1column.phtml</template></action> | |
</reference> | |
<reference name="head"> | |
<remove name="addthis_smartlayers" /> | |
<action method="addJs" ifconfig="moipall/config/enable_jquery"><script>MOIP/core/jquery.js</script></action> |
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
<?xml version="1.0"?> | |
<!-- license --> | |
<config> | |
<global> | |
<!-- global config --> | |
</global> | |
<frontend> | |
<events> | |
<!-- disble logs --> | |
<controller_action_predispatch> |
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 | |
$order = Mage::getResourceModel('sales/order_collection') | |
->addFieldToFilter('customer_id', $customer_id) | |
->addRecurringProfilesFilter($profile->getProfileId()) | |
->setOrder('entity_id', 'desc') | |
->getFirstItem(); | |
echo '<pre>'; | |
print_r($order->getData()); | |
echo '</pre>'; |
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 | |
$last_recurring_profile_id = $_SESSION['checkout']['last_recurring_profile_ids'][0]; | |
$customer_id = Mage::getSingleton('customer/session')->getCustomerId(); | |
$order = Mage::getResourceModel('sales/order_collection') | |
->addFieldToFilter('customer_id', $customer_id) | |
->addRecurringProfilesFilter($last_recurring_profile_id) | |
->setOrder('entity_id', 'desc') | |
->getFirstItem(); | |
?> |
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
SELECT `main_table`.*, | |
(main_table.base_subtotal_with_discount*main_table.base_to_global_rate) AS `subtotal`, | |
`cust_email`.`email`, | |
`cust_fname`.`value` AS `firstname`, | |
`cust_lname`.`value` AS `lastname`, | |
CONCAT_WS(' ', cust_fname.value, cust_lname.value) AS `customer_name` | |
FROM `sales_flat_quote` AS `main_table` | |
INNER JOIN `customer_entity` AS `cust_email` ON cust_email.entity_id = main_table.customer_id | |
INNER JOIN `customer_entity_varchar` AS `cust_fname` ON cust_fname.entity_id = main_table.customer_id | |
AND cust_fname.attribute_id = 5 |
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 | |
/** | |
* email-tester.php | |
* A tool to test if the SMTP relay is working | |
* | |
* @category Mmm | |
* @package EmailTester | |
* @author Tegan Snyder | |
* | |
*/ |
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
SELECT sub_query.month_ordered, | |
sub_query.year_ordered, | |
AVG(sub_query.base_subtotal) AS average_base_subtotal, | |
AVG(sub_query.discount_amount) AS average_discount_amt, | |
AVG(sub_query.order_qty) AS average_total_item_count, | |
COUNT(sub_query.entity_id) AS total_orders | |
FROM | |
(SELECT so.entity_id, | |
MONTH(so.created_at) AS month_ordered, | |
YEAR(so.created_at) AS year_ordered, |
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
SELECT sub_query.month_ordered, | |
sub_query.year_ordered, | |
AVG(sub_query.base_subtotal) AS average_base_subtotal, | |
AVG(sub_query.discount_amount) AS average_discount_amt, | |
AVG(sub_query.order_qty) AS average_total_item_count, | |
COUNT(sub_query.entity_id) AS total_orders | |
FROM | |
(SELECT so.entity_id, | |
MONTH(so.created_at) AS month_ordered, | |
YEAR(so.created_at) AS year_ordered, |