1. Use WooCommerce Built-in Export (limited) Go to WooCommerce → Products → Export. Default fields don’t include cross-sells/upsells. You’ll only get product basics (ID, SKU, price, stock, etc.). Not enough if you need the relationships. 2. Export via SQL Query WooCommerce stores these in post meta fields: _crosssell_ids _upsell_ids _related_ids You can run a query like this in phpMyAdmin (or WP-CLI): …
Read More »Create Csv Magento Admin
Magento 2 Admin Capabilities In Adobe Commerce (paid version):There’s an Export button in Content > Elements > Pages and Content > Elements > Blocks. This allows you to export CMS pages/blocks into a CSV/XML file straight from the admin. In Magento 2 Open Source (free version):Unfortunately, there’s no built-in “Export to CSV” button for CMS pages or blocks in the …
Read More »Export Cms Pages Magento
1. Export CMS Pages via Admin (Commerce only) If you’re on Adobe Commerce, you can: Go to Content > Elements > Pages. Use the Export option (CSV or XML). This feature is not available in Magento Open Source by default. 2. Export via CLI (for both Open Source & Commerce) You can use n98-magerun2 (a powerful CLI tool for Magento). …
Read More »Assign related products magento 1
This tutorial explains how to assign related products magento 1 programmatically. The CSV file contain the products sku and related product sku’s Please also refer how to import product programmatically and other magento tutorials.The below code assign the related product as shown below. Initialise database connection Read CSV data Assign related products magento 1 Initialise database connection Create the relatedproducts.php inside the root and add the …
Read More »Export Static Blocks Magento
This tutorial explains how to export static blocks Magento. Here I am showing how to export static blocks in CSV. Export Static Blocks Magento The following code export all the cms pages from Magento 1. Initialise Script require_once '../app/Mage.php'; ini_set('display_errors', 1); Mage::app('admin'); Mage::setIsDeveloperMode(true); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); getCmsblocks(); Export Static Blocks function getCmsblocks() { $blocks = Mage::getModel('cms/block')->getCollection(); echo "block here".PHP_EOL; foreach ($blocks as …
Read More »SMTP email code magento
This tutorial explains how to configure SMTP email code magento 1.9. SMTP email code magento public function getMail( $html ) { try { $smtp_host = Mage::getStoreConfig('smtppro/general/smtp_host'); $smtp_port = Mage::getStoreConfig('smtppro/general/smtp_port'); $config = array( 'port' => $smtp_port, 'auth' => 'login', 'ssl' => Mage::getStoreConfig('smtppro/general/smtp_ssl'), 'username' => Mage::getStoreConfig('smtppro/general/smtp_username'), 'password' => Mage::getStoreConfig('smtppro/general/smtp_password') ); $transport = new Zend_Mail_Transport_Smtp($smtp_host,$config); Zend_Mail::setDefaultTransport($transport); $this->_mail = new Zend_Mail('utf-8'); $this->_mail->setBodyText($html); $this->_mail->setFrom(Mage::getStoreConfig('call_back/call_back_details/from_email_address'), Mage::getStoreConfig('call_back/call_back_details/send_email_name')); …
Read More »Uncancel order magento
This tutorial explains how to uncancel order magento 1.9. Uncancel order magento load(86066); echo $order->getStatus().PHP_EOL; echo $order->getState().PHP_EOL; //$order->setState(Mage_Sales_Model_Order::STATE_COMPLETE); $order->setStatus(Mage_Sales_Model_Order::STATE_COMPLETE); echo $order->getData('state').PHP_EOL; $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_COMPLETE); $order->setData('state', Mage_Sales_Model_Order::STATE_COMPLETE); $order->save(); foreach ($order->getAllItems() as $item) { $item->setQtyCanceled(0); $item->save(); } echo $order->getStatus(); echo $order->getState().PHP_EOL;
Read More »Cancel Pending Payments Magento
This tutorial explains how to cancel pending payments Magento 1 automatically. Filter Pending Payments Magento private function cancelPendingPayments() { $fromDate = date('Y-m-d H:i:s', strtotime('-2 hour')); $toDate = date('Y-m-d H:i:s', strtotime(now())); $orderCollection = Mage::getResourceModel('sales/order_collection'); $orderCollection->addFieldToFilter('status', 'pending_payment') ->addFieldToFilter('updated_at', array( 'from' => $fromDate, 'to' => $toDate, 'date' => true )) ->getSelect() ->order('entity_id') ->limit(20); if( count( $orderCollection ) < 1 ) { return; } …
Read More »Google Invisible reCaptcha Magento
This tutorial shows how to add Google Invisible reCaptcha Magento 1. Google Invisible reCaptcha Magento <?php class Addpeople_Validatecaptcha_Model_Observer lớp Addpeople_Validatecaptcha_Model_Observer { { public function loginValidateCaptcha(Varien_Event_Observer $observer) hàm công khai loginValidateCaptcha(Varien_Event_Observer $observer) { { try { thử { $action = $observer->getControllerAction(); $action = $observer->getControllerAction(); $request = $action->getRequest(); $request = $action->getRequest(); if( ($request->getActionName() == ‘loginPost’) && ( Mage::getStoreConfig(‘validate_captcha/server_side_validation/enabled_login’) ) ) { nếu( …
Read More »Invisible recaptcha register form magento
This tutorial explains how to add Invisible recaptcha register form magento 1.9. Please use the server side validation. Invisible recaptcha register form magento <?php class Addpeople_Validatecaptcha_Model_Customer_Customer extends Mage_Customer_Model_Customer lớp Addpeople_Validatecaptcha_Model_Customer_Customer mở rộng Mage_Customer_Model_Customer { /** /** * Validate customer attribute values. * Xác thực giá trị thuộc tính của khách hàng. * For existing customer password + confirmation will be …
Read More »-
Export Woocommerce Related Crosssell Upsell Products
1. Use WooCommerce Built-in Export (limited) Go to WooCommerce → Products → Export. Default fields …
Read More » -
Create Csv Magento Admin
-
Export Cms Pages Magento
-
Assign related products magento 1
-
Export Static Blocks Magento