Mage::getSingleton('customer/session')->getId()
or
if(Mage::getSingleton('customer/session')->isLoggedIn()) { $user = Mage::getSingleton('customer/session')->getCustomer(); echo $user->getId(); }
Mage::getSingleton('customer/session')->getId()
if(Mage::getSingleton('customer/session')->isLoggedIn()) { $user = Mage::getSingleton('customer/session')->getCustomer(); echo $user->getId(); }
Mage::getSingleton('admin/session')->getUser()->getId()
Mage::getSingleton('admin/session')->getUser()
$order = new WC_Order( $order_id );
$product_items = $order->get_items();
foreach ( $product_items as $product) {
$product_id = $product['product_id'];
}
$order = Mage::getModel('sales/order')->loadByIncrementId([order_id]);
if(!$order->canInvoice())
{
Mage::throwException(Mage::helper('core')->__('Cannot create an invoice.'));
}
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
$invoice->setTransactionId([last_trans_id]);
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
$invoice->register();
$transactionSave = Mage::getModel('core/resource_transaction')
->addObject($invoice)
->addObject($invoice->getOrder());
$transactionSave->save();
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
# php_value memory_limit 64M
php_value memory_limit 512M
php_value max_input_time 6000
php_value max_execution_time 180000