Skip to content

Instantly share code, notes, and snippets.

View kevincal's full-sized avatar

Kevin Callahan kevincal

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kevincal on github.
  • I am kcal (https://keybase.io/kcal) on keybase.
  • I have a public key ASB_o4BK2B5VqiJhBEqTtdvR7NdKVjdnJolGC7HYpHI8owo

To claim this, I am signing this object:

@kevincal
kevincal / Export.php
Last active June 13, 2018 18:58
Shipstation API Update html/app/code/community/Auctane/Api/Model/Action/Export.php
html/app/code/community/Auctane/Api/Model/Action/Export.php
if (!$gift->isObjectNew()) {
$message = sprintf("%s", $gift->getMessage());
$order->setGiftMessage($message);
}
/** add target ship date */
@kevincal
kevincal / Export.php
Created June 13, 2018 18:57
Shipstation API Updatehtml/app/code/community/Auctane/Api/Model/Action/Export.php
html/app/code/community/Auctane/Api/Model/Action/Export.php
/** add target ship date */
$xml->startElement('shipByDate');
$xml->writeCdata($order->getData("target_ship_date"));
$xml->endElement(); // shipByDate
@kevincal
kevincal / Export.php
Created June 13, 2018 18:57
Shipstation API Updatehtml/app/code/community/Auctane/Api/Model/Action/Export.php
html/app/code/community/Auctane/Api/Model/Action/Export.php
/** add target ship date */
$xml->startElement('shipByDate');
$xml->writeCdata($order->getData("target_ship_date"));
$xml->endElement(); // shipByDate
@kevincal
kevincal / Export.php
Created June 13, 2018 18:57
Shipstation API Updatehtml/app/code/community/Auctane/Api/Model/Action/Export.php
html/app/code/community/Auctane/Api/Model/Action/Export.php
/** add target ship date */
$xml->startElement('shipByDate');
$xml->writeCdata($order->getData("target_ship_date"));
$xml->endElement(); // shipByDate
@kevincal
kevincal / clear_magento_abandoned_cart.sql
Last active March 16, 2017 12:15
SQL to delete old Magento Abandoned Cart Entries: Quote (sales_flat_quote), Quote Item (sales_flat_quote_item), Quote Item Options (sales_flat_quote_item_option), Quote Address (sales_flat_quote_address), and Quote Payment (sales_flat_quote_payment). Does not clear out sales_flat_quote_address_item but you can follow same logic.
DELETE FROM sales_flat_quote_shipping_rate WHERE address_id IN (
SELECT a.address_id
FROM sales_flat_quote q, sales_flat_quote_address a
WHERE a.quote_id = q.entity_id AND q.created_at < '2016-12-31 23:23:59'
);
DELETE FROM sales_flat_quote_address WHERE quote_id IN (
SELECT quote_id FROM sales_flat_quote WHERE created_at < '2016-12-31 23:23:59'
);