Skip to main content

Posts

Showing posts from September, 2018

Latest order is not showing in admin sales order grid in magento1

Refresh order grid table in Magento 1 Latest order is not showing in admin grid, but it is saving in database and also showing order id in mail. Recently, we’ve faced a data inconsistency in the Magento sales_flat_order_grid db table. I’ve developed a shell-script, which will refresh the sales_flat_order_grid table to correspond exactly to the sales_flat_order table: create file in shell folder orders_grid_update.php place the below code <?php /**  * @author Pawan  * @copyright Copyright (c) 2018 pawan (https://pawanmagento.blogspot.com/)  * @package Pawan_Shell  */ require_once 'abstract.php'; class Pawan_Shell_Free_Order_Grid_Update extends Mage_Shell_Abstract {     public function run()     {         try {             Mage::getModel('sales/order')->getResource()->updateGridRecords(                 Mage::getResourceModel('sales/order_collection')->getAllIds()             );             echo 'Done!' . PHP_EOL;      

Magento 2 Adding Total Due and Total Paid to PDF order

Hi I am trying to add total paid and total due lines on my Magento PDF Invoice. Firstly you have to create pdf.xml at path : app\code\Pawan\PdfCustomiser\etc   <?xml version="1.0"?>    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Sales:etc/pdf_file.xsd">       <totals>          <total name="total_due">             <title translate="true">Total Due</title>             <source_field>total_due</source_field>             <model>Pawan\PdfCustomiser\Model\Sales\Pdf\Totaldue</model>             <font_size>7</font_size>             <display_zero>false</display_zero>             <sort_order>750</sort_order>          </total>          <total name="total_paid">             <title translate="true">Total Paid</title>