Open following file :
{root}/vendor/magento/framework/Mail/Template/TransportBuilder.php
and find prepareMessage() function at line number 265
Just echo $body and exit the exceution of code.
Open following file :
{root}/vendor/magento/framework/Mail/Template/TransportBuilder.php
and find prepareMessage() function at line number 265
Just echo $body and exit the exceution of code.
<?php | |
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
$obj = $bootstrap->getObjectManager(); | |
$deploymentConfig = $obj->get('Magento\Framework\App\DeploymentConfig'); | |
$tablePrefix = $deploymentConfig->get('db/table_prefix'); |
// Type one of the next lines and you will obtain jQuery version: | |
console.log(jQuery.fn.jquery); | |
// OR | |
console.log(jQuery().jquery); |
<?php | |
require_once ( "app/Mage.php" ); | |
Mage::app(); | |
umask(0); | |
//echo Mage::getBaseUrl(); | |
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); | |
//exit; | |
$_productCollection = Mage::getModel('catalog/product') | |
->getCollection() | |
->addAttributeToSort('created_at', 'DESC') |
<?php | |
include 'app/Mage.php'; | |
Mage::app(); | |
$productId = 4299; | |
//load the product | |
$product = Mage::getModel('catalog/product')->load($productId); | |
//get all images | |
$mediaGallery = $product->getMediaGallery(); | |
//if there are images |
<?php | |
//increase execution time | |
ini_set('max_execution_time', 900); //900 seconds = 15 minutes | |
//require Magento | |
require_once 'app/Mage.php'; | |
$app = Mage::app('admin'); | |
umask(0); | |
//enable Error Reporting |
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$cart = $objectManager->get('\Magento\Checkout\Model\Cart');
// retrieve quote items collection
$itemsCollection = $cart->getQuote()->getItemsCollection();
// get array of all items what can be display directly
$itemsVisible = $cart->getQuote()->getAllVisibleItems();
New tab in product detail page is very easy task with product attribute. Use below steps and check it out.
Step 1. Create Product Attribute “video”.
Step 2. Create file catalog_product_view.xml in the app/design/frontend/{vender name}/{theme name}/Magento_Catalog/layout
In the file write the below code:
To login into magento admin, using only ftp access is a little tricky. Through FTP open the class Mage_Admin_Model_User located at
app\code\core\Mage\Admin\Model\User.php
Next find the
$this->loadByUsername($username);
<input name="qty" type="text" class="input-text qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" />