texts: I get "can't find the quote item" when I add something to cart...why?

texts:
I get

  "can't find the quote item"

when I add something to cart, and then edit it again. I have seen this issue on both chrome, IE, and safari for the site in question, across devices and ISPs. I was able to capture the source code and errors for this happening in the product page, the cart, and a variation on chrome last week. Below I have shared view-only google docs that will allow you to see the code, screenshots of what the issue looks like, and the error that shows up on the page. I have highlighted the section of code that i THINK is the culprit, but please note I am not a coder, so the code below might not be the culprit. The google docs are like 70 pages each but I didn't want to leave anything out. :)

Product Page Error Code: https://docs.google.com/document/d/1n_6_ilrpQFIb_g_4J9Vu-F3s0Jfm-pKDCDrc5P9_9ng/edit?usp=sharing

Product Page red Error Code AND green OK:
https://docs.google.com/document/d/1pc1wWeKKamBFE3oyAyTlBvPjdMrNibsFe-jAEHbYye4/edit?usp=sharing

Cart Error Code: https://docs.google.com/document/d/1wYjCbWgBVzcIsZdLy0MQPDuCou3CMr61Tztt0HFEslE/edit?usp=sharing

No issue in the cart: https://docs.google.com/document/d/1nvxdoOL-Q_HyoZ9qmYu_DDFmluzYSDLJYYfGLKVf-XU/edit?usp=sharing


texts:
Maybe the title is poorly worded please let me know, but here is the scenario.

I have been tasked with migrating a magento store onto a new server and to tidy it up a bit, one thing I have noticed in the database were extensions that arent being used. for example multiple SMTP extensions being installed (looks potentially like a trial and error effort).

Now in an ideal world I would like to send the database over and strip out what would effectively be tables that aren't being used.

Is there a way to see what tables aren't being utilized?


texts:
What is the recommended way to override the contact .phtml template. All I want to do is add HTML tags around the form so I can use bootstrap to give it a nice layout.

As far as I know there is no way to call the contact form in my contact-info page using something like {{block class="..." template="..."}}

So I tried to add the additional HTML code around the form in the .phtml thats being loaded on the contact page. What I've done is creating a form.phtml file in the path below as some answers on SO told me to:

app/design/frontend/VENDOR/THEME/Magento_Contact/view/frontend/templates/form.phtml

Besides that form.phtml the Magento_Contact folder is empty. Am I missing something?


texts:
I have Custom category attribute id for ex 200.

I want to get Attribute Option label from Value in magento 2 if any clue is also much appreciate.


texts: Create New Post link not showing in magento

texts:
I am running magento on localhost and want to create new post. But new post link is not showing. Pages showing under Content > Pages. I can only create pages not posts. But according to this article i can create new post too.

Please let me know how to add new post.


texts: how to calculate sum of selected entries of a column in Magento 2

texts:
I want to calculate sum of all total_purchase values whose ref_by value is 1. Table name is table_name. Can someone please help me.

I want sql query which will return total (200 + 97 + 140)


texts: SQLSTATE[42000]: Syntax error or access violation: 1064 (SUPEE patch)

texts:
After installation of SUPEE patches for Magento, some extensions show "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax"
I am wondering whether such errors make the site vulnerable to SQL injections or other attacks?
Again, these error show only after supee patch installations.


texts: Any way to collect payment after order submit?

texts:
Is there any way for customers to submit an order detailing what they want, not requiring payment during checkout, but then paying AFTER they submit the order?

The reason is because we want to handle scenarios where if customer negotiates a different price, we can figure a final price, edit the order accordingly, and have them pay afterward.

If there's no built-in way to do this in vanilla Magento 2, is there an extension for this?


texts:
I would like to add the magento website name to the top header beside the language switcher.

Magento_Store/templates/switch/languages.phtml

I can get the id by using,

echo $block->getCurrentWebsiteId();

How do I get the website name?


texts:
Issue:-

I have recently taken over a Magento site.  The client would like their home page to be changed to their About Us page.  When I go to the

GENERAL->web->Default Pages and change the CMS Home Page to About Us.

I saved the config for both the default and the Main Web Site but it does not want to change.  I have been searching for days trying to figure this out.  Am I missing something?  Is there something else I can try?

Thanks in advance!


texts: How to create admin custom from using UI in Magento 2 using layout?

texts:
I want to create admin custom from using UI component
But I am not able to understand to structure, can someone please
explain.


texts: Magento 2: Custom Stock Status set manually

texts:
Is there possibility of adding a new "stock status" which would be independent of the stock. It would say something like "On order >14days" or "On order <7days"

They'd be changed only manually.


texts: Auto Show Cart Sidebar when product added to cart

texts:
Is there any way I can make the cart sidebar pop up when a product is added to the cart. As per the below:

As opposed to having to click on the cart button at the top of the page to bring it up.

Thanks in advance!


texts:
I am not able to login admin panel after filling the right credential.
Googling over internet, i found solution.

To resolve this issue, someone suggest:

Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

Find the code:

session_set_cookie_params($this->getCookie()->getLifetime(),$this->getCookie()->getPath(),$this->getCookie()->getDomain(),$this->getCookie()->isSecure(),$this->getCookie()->getHttponly());

& replace with

session_set_cookie_params($this->getCookie()->getLifetime(),$this->getCookie()->getPath()//$this->getCookie()->getDomain(),//$this->getCookie()->isSecure(),//$this->getCookie()->getHttponly());

Is this a proper solution ??

---------xxxxxxx-----------xxxxxxxxxx----------xxxxxxxxxxx---------

Updated 1 =>

Whenever I free up space by manually deleting cache and session things work fine for a day maximum and then again login stop working.

Updated 2 =>
I know , there is space related problem. Whenever i am trying to create new folder in the root using command prompt.
Message:

However, 1.4 GB is available on server.


texts: On payment page Paypal option is not visible

texts: I had configured paypal option. I am able to see paypal button on cart and product detail page.


texts: Magento2: Reset specific indexer by cronjob

texts:
Sometimes the indexer catalog_product_category doesn't automatically run when assigning new products to a category, so products aren't displayed at the shop. I've to manually reset this indexer in the shell before it's reindexed and the products are displayed at new assigned category.

I've tried a lot of things and worked through many forums, but no solution yet. So I want to try the following:

Reset the indexer catalog_product_category every night by a cronjob. However, I'm unable to figure out the right cronjob command to reset the indexer. Does anyone know this? Thanks!


texts: Magento 2.x knockoutjs dispaly data from observable Json Object

texts:
to display data from observable array one can do:

Component:

myObject: ko.observableArray([{name: 'test'}]),

Html:

Display:

How can I Display a simple json object not an array like the above E.G:

Component:

myObject: ko.observable({name: 'test'}),

HTML

Display

What am i missing?


texts:
I'm trying to optimize my website.

On Gtmetrix it is giving me this "warning"

How can I fix this issue "Use cookie-free domains"?


texts: Unable to render custom CC from in magento 2

texts:
I am trying to render the custom phtml file for credit card payment.

Below is my code,

In model file, I have assigned my block file

protected $_formBlockType = \Mypackage\Mytheme\Block\Form\Cc::class;

In block file I have given my custom PHtml file as,

<?php

namespace Mypackage\Mytheme\Block\Form;

class Cc extends \Magento\Payment\Block\Form\Cc {
   protected $_template = 'Mypackage_Mytheme::form/cc.phtml';
}

But this code is not working for me.

Anyone did this kind of task? If so, Kindly help me

Thanks


texts: I need to delete these template areas, having trouble (screenshots)

texts:
With direction, I have turned on 'template path hints'. This means I can see the paths of the template files I should be focusing on.

I have found these files and deleted them completely from the server (i made backups). My problem is, even after deleting the files they still appear on the landing page with the same template hint paths..

Maybe I need to be editing these files, not deleting them. But I wouldn't know where to start.

EDIT: The line of code seen in the inspect element tool, which when deleted has the desired visual effect. In understand that Magento doesn't work in this way, but I am confused at the ease in which this simple div class can give me my desired results when deleted. Yet making this happen in the 'Magento' way is like drawing blood from stone.


texts: What is the equivalent of the following from Magento 1?

texts:
What is the equivalent of the following from Magento 1

Mage_Core_Controller_Request_Http


texts:
Is it ideal to IP protect the Magento cron.php? instead of folder protecting it (as referred in the http://devdocs.magento.com/guides/v2.0/config-guide/secy/secy-cron.html) because we want to harden the Magento security as best possible way.

FYI: I'm using Magento 1.9.2.2v


texts: Magento 2 Use Filters on Custom Columns that are not attributes in the db-schema

texts:
I got a custom grid table in ui components

I got a column ("Cifra Corrente" -> current_amount) that IS NOT an attribute in my db-schema, it's calculated in my dataProvider getData(), I calculate it with a join, I can order it but I can't apply filters (Something went wrong with processing current custom view and filters have been reset to its original state. Please edit filters then click apply.).
How can I use filters on this column?

Ui\Component\Listing\DataProviders\Objective\Grid:

public function getData()
{
    $this->getCollection()->getSelect()
        ->joinInner(
            [
                'objective' => $this->getCollection()->getTable('vendor_module_objective')
            ],
            "(objective.supplier_id = main_table.supplier_id)",
            [
                'objective_id' => 'entity_id',
                'import' => 'import',
                'start_date' => 'start_date',
                'end_date' => 'end_date',
                'start_amount' => 'start_amount',
                'target_amount' => 'target_amount',
            ]
        )
        ->joinInner(
            [
                'supplier' => $this->getCollection()->getTable('vendor_module_supplier')
            ],
            "(supplier.entity_id = main_table.supplier_id)",
            [
                'business_name' => 'business_name'
            ]
        )
        ->where('objective.start_date <= main_table.date')
        ->where('objective.end_date >= main_table.date')
        ->columns(['current_amount' => new \Zend_Db_Expr('SUM(amount)')])
        ->group('objective.entity_id');

Column in my form.xml

<column name="current_amount">
        <settings>
            <filter>textRange</filter>
            <dataType>price</dataType>
            <label translate="true">Cifra Corrente</label>
        </settings>
    </column>

I want to use this


texts: Lazy load Js not working in Magento2.2.0/1/2 Version

texts:
I have https://www.magebees.com/lazy-load-images-extension-for-magento-2.html

this one extension, but not working properly- js errors like window undefined..


texts: Magento 2: Data printed in Controller but display null in observer

texts:
Controller file
$collection = $this->investmentFactory->create()->load($id);
        $collection->getData();

        // echo '<pre/>';
        // print_r($collection->getData());
        $this->eventManager->dispatch('trigger_order_place',['collection', $collection]);
        exit;

In this observer file data is null
$collection = $observer->getEvent()->getCollection();
        var_dump($collection);


texts:
I am trying to rewrite url in routes.php with magento 2.2.2 version. url key is dynamically set from configuration.
got this error :: Front controller reached 100 router match iterations

$urlKey = trim($this->scopeConfig->getValue('section/group/url_key', $storeScope), '/');
            $identifier = trim($request->getPathInfo(), '/');
            if ($identifier == $urlKey) {
                $request->setModuleName('search')->setControllerName('index')->setActionName('index');
                $request->setAlias(\Magento\Framework\Url::REWRITE_REQUEST_PATH_ALIAS, $identifier);
            } else {
                return false;
            }
            return $this->actionFactory->create(
                'Magento\Framework\App\Action\Forward',
                ['request' => $request]
            );


texts: magento 2 custom option price don't want to show?

texts:
Magento 2 don't want to show the custom option price in the cart page, customer dashboard and admin end.

Please suggest me thanks


texts: Magento 2 Issue with Minicart product price when price is set Including tax

texts:
Issue: Minicart is showing price excluding Taxes even if it is set in the backend to show product price including taxes
Backend Settings: Product price is set to show including taxes: it is working fine on products listing, details pages, check out and cart pages except for mini cart

I tried to debug knockout response even there I can not find the option to show pricing including taxes. How can I show the price in minicart with taxes?


texts: Preventing specific section of home page from being cached Magento CE 1.9

texts:
I've been able to prevent caching of my footer and some other sections, but am having trouble doing so with one specific section of my home page. On my home page, the section in question is called using:

{{block type="core/template" name="homepage-highlights" alias="homepage-highlights" template="jl/homepage/homepage-highlights.phtml"}}

In my local.xml file, I already have another section defined:

<cms_index_index>

    <reference name="root">
         <block type="core/template" name="homepage-billboardSection" as="homepage-billboardSection" template="jl/homepage/homepage-billboardSection.phtml" />
         <action method="setBlockId"><block_id>homepage-billboardSection</block_id></action>
    </reference>

    <reference name="homepage-billboardSection">
        <block type="core/template" name="billboard" as="billboard" template="jl/modules/billboard/billboard.phtml" >
        <action method="setBlockId"><block_id>billboard</block_id></action>
        </block>
    </reference>

</cms_index_index>

The phtml file that contains what I'm trying to exclude from getting cached is in

jl/homepage/homepage-highlights.phtml

I was able to disable caching of the footer by adding:

<reference name="footer">
    <block type="core/template" name="js_files" template="page/html/js.phtml"/>
    <action method="unsetData">
       <key>cache_lifetime</key>
    </action>
</reference>

to local.xml but I'm not seeing how to do the same for this section of my home page. Any thoughts would be welcomed.


texts: Add database field to model and make it editable using Varien_Data_Form

texts:
I have a model in an extension. I want to add a new database attribute and make this value editable through Magento admin using Varien_Data_Form. I have added the field to the database through installer script, the field is displayed on the admin, but I don't know how to save it.

The form data is posted and saved to a $data variable, the model is loaded and has a setData($data) called, and after that the model is saved, but to no avail. Dumping $data just before the setData() call shows the variable is fine.

Saving occurs inside a try block, no errors are thrown/catched.

...

$model = Mage::getModel('cmspro/category');
$model->setData($data)->setId($this->getRequest()->getParam('id'));

...

try {

...

$model->save();

...

} catch (Exception $e) {

...

}


texts: Is it possible to get the Magento indexer to display % complete?

texts:
Right now you are left wondering what is going on during indexing, especially on large catalogs where it takes hours to complete just one index.

Is there an easy way to get the command line indexer.php to display a percent complete when re-indexing the store indexes?


texts: Searching takes user directly to a page?

texts:
When searching on our site, some reason the user is sometimes sent directly to a page (kind of like Google's "I'm Feeling Lucky" but random and even less helpful) instead of the search results page.

Any ideas on where to look or what to troubleshoot would be greatly appreciated.


texts: Problem with Mage_Sales_Model_Quote::addProduct() and Bundled Products

texts:
So I'm trying to add a bundled product to a quote programmatically in a module.  When I add an item to the cart directly from the front-end, it works just fine.  However, when I do it programmatically, I get an error message:

Please specify product option(s).

The function invocation I'm doing looks a little like this:

$productID = Mage::getModel('catalog/product')->getIdBySku('PKGTEST');
$product = Mage::getModel('catalog/product')->load($productID);

$result = $quote->addProduct($product, new Varien_Object([
    'product' => $productID,
    'qty' => 1,
]));
if ($result) {
    throw new Exception($result);
}

What is going on here?  How do I add this bundled product to my quote?

As an aside, I did notice that some answers to questions about bundled products on this site have bundle_option as a part of the Varien_Object.  However, the way I have my bundled product set up - the bundle actually has no user-selectable options - means I can skip that field.


texts: My first Hello World from a module and model and I can't load the model

texts:
This is my first module. The module loads and the index controller executes. I am failing loading my first "hello world" model.
I cleared the cache and turned off caching.

I included all the code below, the 2 config files, the controller and the model

I have been working on this for 2 days reading all I can trying every version of upper and lower case. It must be something simple that I am overlooking. Help

thanks

app/etc/modules/Nat_Products.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Nat_Products>
            <active>true</active>
            <codePool>local</codePool>
        </Nat_Products>
    </modules>
</config>

=====

app/code/local/Nat/Products/etc/config.xml

<?xml version="1.0" encoding="UTF-8"? >
<config >
    <modules >
        <Nat_Products >
            <version >0.1.0</version >
        </Nat_Products >
    </modules >

    <global >
        <models >
            <nat_products >
                <class >Nat_Products_Model</class >
            </nat_products >
        </models >
    </global >

    <frontend >
        <routers >
            <addproduct >
                <use >standard</use >
                <args >
                    <module >Nat_Products</module >
                    <frontName >addproduct</frontName >
                </args >
            </addproduct >
        </routers >
    </frontend >
</config >

=====

app/code/local/Nat/Products/controllers/IndexController.php

<?php

class Nat_Products_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction() {

        echo 'Hello World from ' . __CLASS__ . "<br\>";

        $product = Mage::getModel("products/addproduct");  // returns false
        echo $product->hello();
    }
}

=====

app/code/local/Nat/Products/Model/Addproduct.php

<?php
class Nat_Products_Model_Addproduct extends Mage_Core_Model_Abstract
{

    public function hello()
    {
        return "hello world from " .__CLASS__;
    }

}

=========

I run maglocal.com/addproduct
 result of run is:

  Hello World from Nat_Products_IndexController   ( ! ) Fatal error:
  Call to a member function hello() on a non-object in
  maglocal.com\app\code\local\Nat\Products\controllers\IndexController.php
  on line 9


texts: Configurable Product Sizes with Image Color

texts:
I have configurable product type that has color and size in my store.
I make one configurable product and 6 simple products.
URL:
http://imageplus.pk/men-9/tees/men-s-reebok-kix-ready-or-not-regular-fit-tee.html

In this URL Color "Charcoal" with size 'S' and 'XXL' show charcoal color shirt image but on the 'L' size it show Red Color Shirt image. I want on the 'L' size its also show charcoal color shirt image.

Please let me know how can i do this?

thanks
MUNEEB


texts: Get Email Address for a user from outside of Magento

texts:
In Magento 1, we could simply,

umask(0);
Mage::app('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));

if (empty($sessionCustomer)) {
  $sessionCustomer = Mage::getSingleton("customer/session");
  myLog("Tried to get session.\n");
}

$eml = $sessionCustomer->getCustomer()->getEmail();

In Magento 2, we are supposed to do this,

function getCustomerId() {
    require __Dir__ . '/app/bootstrap.php';
    $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
    myLog("Ready to createApplication()\n"); // This logs
    $app = $bootstrap->createApplication('GetMageEml');
    myLog("Returned GetMageEml app\n"); // This doesn't log
    return $bootstrap->run($app);
}

So the code silently fails on

    $app = $bootstrap->createApplication('GetMageEml');

I'm running all of this from root directory of Magento which is one directory above bootstrap.php.

I have tried many code combinations in GetMageEml.php, but $bootstrap->createApplication() was never successful. My current version of GetMageEml.php is,

<?php
use Magento\Framework\App\Helper\AbstractHelper;
protected $objectManager;
protected $customerSession;

class GetMageEml extends \Magento\Framework\App\Helper\AbstractHelper {

    public function __construct(
        \Magento\Framework\ObjectManagerInterface $objectManager,
            \Psr\Log\LoggerInterface $logger
    ) {
            $this->logger = $logger;
            $this->objectManager = $objectManager;
            $this->customerSession = $this->objectManager->create('Magento\Customer\Model\SessionFactory')->create();
    }

    public function getCustomerSession()
    {
       return $this->customerSession;
    }

    public function launch() {
        $this->logger->debug("Test whether the AIO logger is functional\n");
        $customer = $this->_customerSession->create();
        return array($customer->getCustomer()->getEmail(), $this->getCustomerSession()->isLoggedIn());
    }
}
?>

So I have 2 questions. The first question is whether the failure of

$app = $bootstrap->createApplication('GetMageEml');

is logged somewhere. It is not logged in the Apache log, my log, or the logs at Dir . /var/log that Magento uses. When something like this fails, you would think it logs somewhere. Where is that log?

The second question, is why does the line,

$app = $bootstrap->createApplication('GetMageEml');

fail?

//********************* Update *****************************

The system had no logging because it was missing the line,

require '/var/www/html/magento2/GetMageEml.php';

With logging, it almost worked, but the class injection had constant context issues according the apache log. I tried about 50 things to try to fix this. Then I found instructions that said when the class injection was changed that the command,

php bin/magento setup:di:compile

needed to be run. The command ran fine, and it said that it completed successfully. Yet, it completely ruined the shopping cart in that both the frontend and backend have the error,

Permission denied in /var/www/html/magento2/vendor/colinmollenhour/cache-backend-file/File.php on line 663

Neither the admin or shopping cart displays. Both the shopping cart and admin fail with the same error.

I'll probably go back to Magento 1 which seems more stable.


texts: Magento 2 - Disable Custom Payment Method and Show Custom Message

texts:
In my Observer I check the customer attribute for a value. If the value matches I disable the method.  This is working just fine in my observer:

namespace Vendor\Module\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;

use Psr\Log\LoggerInterface;

class DisablePayment implements ObserverInterface
{
  protected $_logger;

  public function __construct(
    \Magento\Customer\Model\Session $customerSession,
    LoggerInterface $logger
  ) {
    $this->_customerSession = $customerSession;
    $this->_logger = $logger;
  }

  /**
   * @param Observer $observer
   *
   * @return void
   */
  public function execute( Observer $observer )
  {
    $result = $observer->getEvent()->getResult();
    $method_instance = $observer->getEvent()->getMethodInstance()->getCode();
    $quote = $observer->getEvent()->getQuote();

    if($method_instance == 'payroll')
    {
      $customerAttribute = $this->getCustomAttribute();
      // enter the value of the customer attribute field here you are testing against
      if($customerAttribute == 'User')
      {
        $result->setData('is_available', false);
      }
    }
  }

  public function getCustomAttribute(){
     if($this->_customerSession->isLoggedIn()):
       // enter the name of the field you want to check
       return $customerAtt = $this->_customerSession->getCustomer()->getData('lastname');
     endif;
  }
}

I want to show a custom message if the payment is not supposed to show. I can't figure out how to show my custom message. When the method is disabled in my observer, I want to show a message to the user explaining that it was disabled and provide a reason why - ie. I'm sorry but your credit balance is XX and not enough for this transaction. I hope that makes sense.


texts:
In the navigation menu there are 2 different menus with EM Megamenu.
I set the top one via the widget section, but the one below I do not know how to remove it.


texts: US Tax Rates based on Zip+4 and performance

texts:
I have been looking at various solutions for applying proper sales tax to orders in the US. Looking at one of the simplest solutions, I worry that MySQL performance will struggle.

This solution is basically nothing more than importing a CSV into Magento's tax rates tables. The CSV would look just like any other you've used to import tax rates, with the only noticeable difference being that instead of a five digit Zip code, I would instead use a Zip+4 value (or possibly a Zip+4 range, but that is dependent on the data-set being imported).

A sample set of data comes courtesy of the State of Washington. They provide a number of different data tables to help businesses collect sales tax and one of those tables is a ~4Mb tabular file that provides detailed sales tax information for every valid Zip+4 in the state. As you can imagine, this file has lots and lots of rows. So many, in fact, that it exceeds the max allowable by LibreOffice (1,048,576),

Alternatively, they do provide a data-set that is shorter due to each row being a Zip code with a +4 high/low range (ie. 98506 3301-4211). This file may be more appropriate, but is not going to be available for all states ... regardless ...

Let's say I were to simply import a single state, Washington, and that the total rows were the max allowable in LibreOffice/Excel that I mentioned above. Should I expect terrible performance (assuming typical hardware) during every single collect_totals call due to this massive table size? Likewise, if I add several more states (growing the table size into millions of rows) should I simply expect more choking?

If this is indeed the case, what other techniques might I use to alleviate these problems? I was thinking of something along the lines of a separate machine that would index all these values in Solr and provide them back to Magento during tax_rate_data_fetch (or some other appropriate event).

Are there others out there who are using Zip+4 values in their tax rates? What kind of performance effects do you see and what have you done to make sure the store performs well despite these massive table sizes?


texts:
I am trying to edit a credit memo email template. Currently when a credit memo is submitted the template renders all of the products from the order.

  <?php $i=0; foreach ($_order->getAllItems() as $_item): ?>
       <?php if($_item->getParentItem()) continue; else $i++; ?>
       <tbody<?php echo $i%2 ? '' : '' ?>>
       <?php echo $this->getItemHtml($_item) ?>
       </tbody>
  <?php endforeach; ?>

I need to get the returns data so I can tell the loop to ignore products with the id of any returned items from an order. As far as I can see return details are not included in the order object. So how, using the order id, can I get a list of returned products from an order.

Any alternative methods/suggestions welcome also.


texts: Product Attributes are not working after upgrade to 1.9.2.3

texts:
I just upgraded from 1.9.1 and our configurable.phtml was working fine before that. Now it's showing the pricing as "$0.00". I've replaced our configurable.phtml with the "Default" and it worked, but is giving us the ugly "Drop Down" menus. I'd like to get all our color swatch images and sizing to display again.  Here's our original configurable.phtml code that worked before the upgrade.

<?php
$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
$_jsonConfig = $this->getJsonConfig();
$_renderers = $this->getChild('attr_renderers')->getSortedChildren();
?>
<?php if ($_product->isSaleable() && count($_attributes)): ?>

        <?php foreach ($_attributes as $_attribute): ?>
            <?php
            $_rendered = false;
            foreach ($_renderers as $_rendererName):
                $_renderer = $this->getChild('attr_renderers')->getChild($_rendererName);
                if (method_exists($_renderer, 'shouldRender') && $_renderer->shouldRender($_product, $_attribute, $_jsonConfig)):
                    $_renderer->setProduct($_product);
                    $_renderer->setAttributeObj($_attribute);
                    echo $_renderer->toHtml();
                    $_rendered = true;
                    break;
                endif;
            endforeach;

            if (!$_rendered):
                ?>

                *<?php echo $_attribute->getLabel() ?>

                <dd<?php if ($_attribute->decoratedIsLast)
            { ?> class="last"<?php } ?>>

                        <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>_<?php echo $_product->getId() ?>" class="required-entry super-attribute-select_<?php echo $_product->getId() ?> no-display">
                            <option><?php echo $this->__('Choose an Option...') ?></option>
                        </select>

            <?php endif; ?>
    <?php endforeach; ?>

    <?php echo $this->getChildHtml('after') ?>
<?php endif; ?>

So after some research, I've found that I am getting a ReferenceError: spConfig is not defined error. I'm assuming there's an issue with my js file?


texts: product pages under one category are blank

texts:
On our web site we have thousands of products.but the problem is product page under some category are blank.I am unable to see any error. I try all the method to see error but failed.

Please help me to see the error message on product detail page.
Here is the page.html click on any product under this category you will see the blank page.Now go to this page here click on any product it will work fine.


texts: Change standard quantity on product page from 0 to 1 (Magento 2)

texts:
When a customer visits a product page, the order quantity is standard set to 0.
I want it to be automatically set to 1, but I have no clue how to do this. How do you do this?

Translation: Normale prijs = Normal price; Aantal = Amount/Quantity; Aan winkelwagen toevoegen = Add to cart

Thanks in advance.


texts: Getting Fatal error: Class 'IntlDateFormatter' not found in Magento2

texts: I am getting Fatal error Class 'IntlDateFormatter' not found in /home/sanjeevkahali/public_html/sanjeev/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111:


texts: Getting a CLI error when trying to compile

texts:
I am getting this error on terminal:

PHP Fatal error:  Class 'Cli' not found in /opt/bitnami/apache2/htdocs/bin/magento on line 31

when trying to run these commands:

sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile

Can anyone help?


texts:
We want to add this text
"Click here to check the bank information" to the checkout success page and link it with URL a on the site.

How to do that?

We're running Magento 1.9


texts: Magento2 The entity that was requested doesn't exist

texts:
i am trying to create object of class

Magento\Braintree\Model\Adapter\BraintreeAdapter

when i creating object like

$this->adapter = \Magento\Framework\App\ObjectManager::getInstance()->create('Magento\Braintree\Model\Adapter\BraintreeAdapter');

it gives error The entity that was requested doesn't exist. Verify the entity and try again.

how can i solve this?


texts: How redirect the "no-route" cms page to home page after 10 second (not through server side)

texts: How would be possible using js (in admin,cms-page) to redirect the 404 page to home page?


texts: Dispatch custom event during customer account create in guest checkout

texts: Where do I dispatch my custom event during customer account create in guest checkout.


texts: Export Products Error - Entity is unknown

texts: I tried to export my products with images but i am getting the error "Entity is unknown" occurs. Someone knows how to export manually or how to solve this?


texts: Magento 2.3 Minicart check if subtotal is above value

texts:
I want to check inside my /app/design/frontend/theme/theme/Magento_Checkout/web/template/minicart/subtotal/totals.html file if the subtotal is larger than 29.95.

I want to display some additional text if subtotal is larger or smaller than 29.95. The problem is that it is loaded inside a .html file so I cannot use php for this.

How can I achieve this?


texts: Magento 2 Configurable Product - Select Default Swatch

texts:
So we have text swatches for an attribute that is set up on a series of configurable products. The attribute has a default selected but evidently selecting a default does nothing at all? I don't get the point.

I'd like to have the default swatch selected when a visitor hits the product page. At the very least I'd like to have the first swatch selected, I don't want nothing selected because it's confusing.

I had a fix for the swatch-renderer.js file in 2.1.4, but the fix no longer works in 2.2.1 I'm not sure what's going on.


texts: Issue using "having" in Magento collection

texts:
I am trying to build a custom collection for a grid in Magento admin module. I have created a new collection method  called "addAttributeHaving" which just does the following:

public function addAttributeHaving($value)
{
    $this->getSelect()->having($value);
    return $this;
}

See collection code:

$collection->addFieldToSelect(
    array(
        'entity_id',
        'created_at',
        'increment_id',
        'customer_email',
        'customer_firstname',
        'customer_lastname',
        'grand_total',
        'status'
    )
);

$collection->getSelect()->joinLeft(array('sfop' => 'sales_flat_order_payment'), 'main_table.entity_id = sfop.parent_id', 'sfop.amount_authorized');
$collection->getSelect()->columns('sum(sfop.amount_authorized) AS AUTHD');
$collection->getSelect()->columns('grand_total - sum(sfop.amount_authorized) AS DIF_AU');
$collection->addFieldToFilter('main_table.state', array('in' => array('new','payment_review')));
$collection->addFieldToFilter('main_table.sd_order_type', array('neq' => 7));
$collection->addFieldToFilter('sfop.method', array('neq' => 'giftcard'));
$collection->addFieldToFilter('main_table.created_at', array('gt' => $this->getFilterDate()));
$collection->getSelect()->group(array('main_table.entity_id'));
$collection->addAttributeHaving('DIF_AU <> 0');
$collection->load(true,true);

$this->setCollection($collection);

This produces the following SQL which executes perfectly fine and produces the expected results when ran outside of Magento.

  [METHOD=Varien_Data_Collection_Db->printLogQuery] SELECT `main_table`.`entity_id`, `main_table`.`entity_id`, `main_table`.`created_at`, `main_table`.`increment_id`, `main_table`.`customer_email`, `main_table`.`customer_firstname`, `main_table`.`customer_lastname`, `main_table`.`grand_total`, `main_table`.`status`, `sfop`.`amount_authorized`, sum(sfop.amount_authorized) AS `AUTHD`, grand_total - sum(sfop.amount_authorized) AS `DIF_AU` FROM `sales_flat_order` AS `main_table`
   LEFT JOIN `sales_flat_order_payment` AS `sfop` ON main_table.entity_id = sfop.parent_id WHERE (main_table.state in ('new', 'payment_review')) AND (main_table.sd_order_type != 7) AND (sfop.method != 'giftcard') AND (main_table.created_at > '2013-04-07') GROUP BY `main_table`.`entity_id` HAVING (DIF_AU <> 0)

However, when I try to load the grid inside Magento I get the following error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'DIF_AU' in 'having clause'

Additionally, if I remove the having clause (which breaks my results), I am able to use the DIF_AU column for a datasource in the Grid.


texts: Magento 2 not working on Samsung Internet

texts:
Currently experiencing an issue with Magento 2 on the Samsung Internet browser. This occurs on most pages, though it's more prominent (and a bigger problem) on the checkout.

The checkout takes roughly 40 seconds to load. There are multiple console logs stating [Violation] 'load' handler took (X)ms, with (X) being around 500-700ms. I have tested this with blank Magento 2 installations and it seems to be consistent.

This doesn't seem to affect larger Magento sites such as Nike.

Is there anything that you could recommend?

Thanks!


texts: Magento2 how to check if cronjobs are correctly set?

texts:
I'm pretty sure my cronjobs doesn't work properly. All catalog rules that I created are resetting every day. I checked the cron_schedule table in my db and its empty. Is there a way to test or check if the jobs are well executed?

According to the Magento 2 documentation, I have created a crontab like the following:

* * * * * /usr/bin/php /var/www/prod/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/prod/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/prod/update/cron.php >> /var/www/prod/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/prod/bin/magento setup:cron:run >> /var/www/prod/var/log/setup.cron.log

When I search for "How to create a cronjob for M2", I find a lot of answers. For example, some adds the php.ini path or */1 for schedule.

*/1 * * * * /usr/bin/php -c /etc/php/7.0/cli/php.ini /var/www/prod/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/prod/var/log/magento.cron.log
*/1 * * * * /usr/bin/php -c /etc/php/7.0/cli/php.ini /var/www/prod/update/cron.php >> /var/www/prod/var/log/update.cron.log
*/1 * * * * /usr/bin/php -c /etc/php/7.0/cli/php.ini /var/www/prod/bin/magento setup:cron:run >> /var/www/prod/var/log/setup.cron.log

Which one should I use?


texts: How to find the English words "Shipping" and "Review & Payments"

texts:
In the screenshots below, you can see the strings "Shipping" and "Review & Payments". I want to translate these strings to Chinese, but I don't know where I can find the source of these strings.

picture 1

picture 2


texts: Magento 2 - Edit Price/Quantity from Catalog > Products main view

texts:
Is it possible to edit information for products (such as the quantity
  or price) on the overview page?

For instance, I have 15 products pulled up, and need to add stock to all of them (but different amounts). I was hoping you could do it without going into each item (by clicking edit) and entering it there. I hope that makes sense. If anyone is familiar with Solid Commerce or Collusion, that capability is there.
Attached is a screenshot of the page I am referring to. Would be amazing if there was a way to just edit the information for all items right there, click save and then be done without having to go into each one individually.


texts: How to unlock admin in magento 1.9.3.3 using database?

texts:
After entering the wrong password Magento has locked my admin account, How can I unlock this using database?

If there is another way of unlocking admin account please tell me. My Magento version is 1.9.3.3


texts: In Installer.php line 545: Missing following extensions: 'zip'

texts: I am installing magento 2.4.1,it is giving zip extension is missing, but zip extension is already installed.


texts: How can I get the default title of the bundle item from a quote, product, or item object?

texts:
I can get the item's bundle option id using

        foreach ($item->getQtyOptions() as $optionQty) {
            $optionId = $optionQty->getOptionId();
        }

but I am having a hard time getting the default title. Do you have any idea how to retrieve the default title? Thank you.


texts:
I am trying to override ErrorHandler class using preference but it is not working.
di.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
   <preference for="Magento\Framework\App\ErrorHandler" type="Pulsestorm\HelloWorldMVVM\Model\ErrorHandler"/>

</config>

ErrorHandler.php

<?php
namespace Pulsestorm\HelloWorldMVVM\Model;

class ErrorHandler extends \Magento\Framework\App\ErrorHandler{
    public function getHandler()
    { echo"hii"; exit;
        if (strpos($errorStr, 'DateTimeZone::__construct') !== false) {
            // there's no way to distinguish between caught system exceptions and warnings
            return false;
        }

        $errorNo = $errorNo & error_reporting();
        if ($errorNo == 0) {
            return false;
        }

        $msg = isset($this->errorPhrases[$errorNo]) ? $this->errorPhrases[$errorNo] : "Unknown error ({$errorNo})";
        $msg .= ": {$errorStr} in {$errorFile} on line {$errorLine}";
        throw new \Exception($msg);
    }
}

I used echo exit to check preference is working or not. When any error or exception comes it doesn't echo and exit. Please let me know what I am doing wrong. Thank you in advance.


texts: Item not added to the Wishlist if the user is not logged in Magento 2.3.4

texts:
Item is not adding to wishlist if user is not logged-in.
Scenario:

User is not logged-in
Click on Wishlist Button
Redirect to login page and showing error message to login.
After login customer redirect to My account Dashboard but product is not adding to wishlist.

How can I fixed the issue? I am using magento 2.3


texts: What is the difference between Product ID and SKU?

texts: What is the difference between Product ID and SKU in Magento 2?


texts: Uncaught TypeError: Cannot read property 'value' of null(...) on Onepage checkout page

texts:
I can't progress to the payment step when I click continue:

  UncaughtTypeError: Cannot read property 'value' of null : getting
  error on click continues button.

Can someone assist me, please?


texts: Google API Error : User profile request failed! Google returned an invalid response

texts:
I'm using Social Login Extension in Magento 226 trying to login with Google but it's showing below error.

  Ooophs, we got an error: User profile request failed! Google returned
  an invalid response:stdClass::__set_state(array( 'error' =>
  stdClass::__set_state(array( 'code' => 403, 'message' => 'Legacy
  People API has not been used in project 36088930720 before or it is
  disabled. Enable it by visiting
  https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=36088930720
  then retry. If you enabled this API recently, wait a few minutes for
  the action to propagate to our systems and retry.', 'status' =>
  'PERMISSION_DENIED', 'details' => array ( 0 =>
  stdClass::__set_state(array( '@type' =>
  'type.googleapis.com/google.rpc.Help', 'links' => array ( 0 =>
  stdClass::__set_state(array( 'description' => 'Google developers
  console API activation', 'url' =>
  'https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=36088930720',
  )), ), )), ), )), ))

Sometimes Error Changes to below error,

  Ooophs, we got an error: User profile request failed! Google returned
  an invalid response:stdClass::__set_state(array( 'error' =>
  stdClass::__set_state(array( 'code' => 401, 'message' => 'Request had
  invalid authentication credentials. Expected OAuth 2 access token,
  login cookie or other valid authentication credential. See
  https://developers.google.com/identity/sign-in/web/devconsole-project.',
  'status' => 'UNAUTHENTICATED', )), ))

Things I've tried but didn't work,

I've tried visiting URL that suggested in Error but it shows

Creating new Credentials.
Tried enabling google+, contacts, script
APIs.

Can anyone tell me how to resolve this error?


texts: Magento 2.2 Inventory not getting decreased when orders are created using REST API

texts:
I am new to Magento 2.2 and I want to create orders using REST API. Orders are getting created. But the stock value of the Product is not getting decreased. I have made the necessary settings in Configuration. But still, the problem persists. It is getting decreased for orders created via Admin Panel.

Thanks in advance for a favorable solution.


texts: In which database table are products and categories coupled

texts: Each product can be assigned to a category. I was wondering in which database table these products and categories are coupled.


texts: Magento 2.4 + Paypal Express Checkout + Supro Template problem after paypal confirmation

texts:
I have the same issue, but on a different page, also the Supro template and Magento 2.4. In my case the error is on the checkout express confirmation page after paypal express confirmation: https://m2.rafaelabad.com/paypal/express/review/. This is my system.log trace, no exception.log.
[2021-03-18 14:39:11] main.CRITICAL: Error: Call to a member function getData() on null in /var/www/virtual/rafaelabad.com/m2/htdocs/vendor/magento/module-catalog/Helper/Image.php:501

Stack trace:
#0 /var/www/virtual/rafaelabad.com/m2/htdocs/vendor/magento/module-catalog/Helper/Image.php(471): Magento\Catalog\Helper\Image->initBaseFile()
#1 /var/www/virtual/rafaelabad.com/m2/htdocs/vendor/magento/module-catalog/Helper/Image.php(529): Magento\Catalog\Helper\Image->applyScheduledActions()
#2 /var/www/virtual/rafaelabad.com/m2/htdocs/app/design/frontend/Mgs/supro/Magento_Catalog/templates/product/image_with_borders.phtml(30): Magento\Catalog\Helper\Image->getUrl()
#3 /var/www/virtual/rafaelabad.com/m2/htdocs/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/virtua...')
#4 /var/www/virtual/rafaelabad.com/m2/htdocs/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render()
#5 /var/www/virtual/rafaelabad.com/m2/htdocs/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView()
#6 /var/www/virtual/rafaelabad.com/m2/htdocs/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml()

If I comment out lines 29 and 30 of the file:
app/design/frontend/Mgs/supro/Magento_Catalog/templates/product/image_with_borders.phtml

//$imageProduct = $themeHelperImage->init($product, 'category_page_grid')->getUrl();
//$productImageHover = $themeHelperImage->init($product, product_base_image')->getUrl();

I get the Checkout express page loaded, but no products are displayed on the cart.
Any help?


texts: Override CSS Per Store View (Multiview Store)

texts: I need to change the layout to RTL for one store view. How do I overwrite the CSS files for a specific store view. That is, English store will be the same as the theme I am using. In Arabic or Urdu Store view, I will be changing the directions to RTL (Right to Left) and layouts.


texts:
If I re-index catalog_category_product, shouldn't the tables catalog_category_product and catalog_category_product_index have the same amount of entries afterwards?

If not, what is the difference or what explains it?

If yes, how come they are still different?

Thanks in advance!


texts: magento 2 Add custom field in cart Estimate Shipping and Tax

texts:
I want to remove the state field from cart page and add the new field with autocomplete.
I want to add code like
file - vendor/Block/Cart/LayoutProcessor.php
code

$elements = [
            'city' => [
                'visible' => $this->isCityActive(),
                'formElement' => 'input',
                'label' => __('City'),
                'value' =>  null
            ],
            'country_id' => [
                'visible' => true,  //Remove the country
                'formElement' => 'select',
                'label' => __('Country'),
                'options' => [],
                'value' => null
            ],
            'region_id' => [
                'visible' => false,  //Remove the state
                'formElement' => 'select',
                'label' => __('State/Province'),
                'options' => [],
                'value' => null
            ],
            'postcode' => [
                'visible' => true,
                'formElement' => 'input',
                'label' => __('Zip/Postal Code'),
                'value' => null
            ],
            'td_postcode' => [
                'visible' => true,
                'formElement' => 'input',
                'label' => __('Zip/Postal Code'),
                'value' => null
            ]
        ];

        if (!isset($jsLayout['components']['checkoutProvider']['dictionaries'])) {
            $jsLayout['components']['checkoutProvider']['dictionaries'] = [
            'country_id' => $this->countryCollection->loadByStore()->toOptionArray(),
            'region_id' => $this->regionCollection->addAllowedCountriesFilter()->toOptionArray(),
            ];
        }

        if (isset($jsLayout['components']['block-summary']['children']['block-shipping']['children']
            ['address-fieldsets']['children'])
            ) {
            $fieldSetPointer = &$jsLayout['components']['block-summary']['children']['block-shipping']
        ['children']['address-fieldsets']['children'];
            $fieldSetPointer = $this->merger->merge($elements, 'checkoutProvider', 'shippingAddress', $fieldSetPointer);
            $fieldSetPointer['region_id']['config']['skipValidation'] = true;
        }
        return $jsLayout;


texts: error : Invalid Form Key. Please refresh the page

texts:
Getting this message when I am trying to save some fields' information for a custom form, this has happened I think when I have upgraded to Magento 2.3, so this problem still happens also for the deployment instance not just in my local

can anyone tell me where is the problem?


texts:
I created a custom form to allow people to ask a catalog, the form works, but when I try to send a mail confirmation to the customer with the catalog link, I see the html tag on the mail.

How fix that ?

$message_customer = __('Votre demande de catalogue a bien été prise en compte. Vous pouvez visualiser votre catalogue ici.',
    $mediaBaseUrl,
    'catalogue.pdf'
);

and the template is

            {{var message_customer}}


texts: Product URL going on 404 page after data migration in magento2

texts: After Data Migration M1=>M2 (1.9.2.4=>2.2.6). Add to cart and Product Page is not working. Product Page Url is going on 404 page. Please Help me if any one have solution.


texts: What does the exclude checkbox do on the product image creation page?

texts:
What does the exclude checkbox, which is next to the delete ckeckbox do on the product image creation page?

Thanks!


texts: Cancelling order from Admin gives error You cannot cancel the order(s)

texts:
In magento2 I am trying to cancel orders via script & from admin, but getting following error

You cannot cancel the order(s).

My orders are in Pending payment status


texts: Free shipping method removing previous shipping fee

texts:
I have created a new shipping module that allows free shipping.

We offer a flat shipping fee with all orders. Often it will happen that a customer wants to add an item to their order if it hasn't been shipped yet, instead of creating a new order and incurring an additional shipping fee.

When this happens, our admin users will edit the order (choosing to keep the existing invoice - 1. example of newly invoiced order), and add a product to the order.

2. The idea is that they select the "Free Shipping" method and then submit that info, after which they will invoice the order again after the customer has paid.

This is where we run into a problem - 3. before re-invoicing the order, you can already see that the shipping fee is not calculated into the order's totals anymore. After invoicing, 4. the grand total paid for the order also does not include our flat shipping fee.

This is also an issue on the front end, because the users no longer see that they have also paid a shipping fee, 5. instead only seeing the amounts paid for the ordered items.

Can anyone help me understand why the shipping fee (that was paid with the original invoice) is vanishing, leaving us with misleading totals?

***** EDIT *****

The reason we are doing this (trying to add a free shipping method and removing the fee from the second invoice) is as follows (example):

1. Here is a new order before being invoiced.. When invoicing the order, you can see that 2. the original item cost 359, with an additional shipping fee of 45 being added on, as expected.

We only invoice an order after recieving payment, which means that 3. we invoiced this order after recieving 404 (359 + 45) from the customer.

Now, lets say the customer asked us to add another of the same item to the order, instead of creating a new order and incurring another shipping fee. We edit the order, choosing to keep the existing invoice (because we have already received the initial payment + the shipping fee), and add the new item. Before we had the free shipping module, 4. it would look like this right before submitting the edited info, with our standard shipping fee..

As you can see, the second item's price also has a shipping fee added to it, which is not what we want since we have already received a shipping fee from the customer, 5. but now it shows that the customer owes 404 (359 + 45) again.

When we invoice this order after the customer pays for the additional item (we do not charge an additional shipping fee even though magento shows that it is due) however, 6. the shipping fee does not get invoiced. We don't do anything to make it not get added, magento automatically only invoices JUST the new item's price.

Once invoiced for the second item, however, 7. the order still has a 45 shipping fee due on it, and shows only 718 (the 2 items' prices added together) as paid, for some reason. If we can just have that shipping fee not be DUE, but be PAID, that'd solve all our issues.


texts: I'm pulling the style number for configurable products instead of the sku (simple) in my data array

texts:
For u2 it populates the style number and I'm trying to pull the sku/upc.

Here's what i have:

    if ($module === 'website_checkout' && $controller === 'onepage' && $action === 'success') {
        $order = Mage::getSingleton('checkout/session')->getLastRealOrder();
        if ($order->getId()) {
            $items = $order->getAllVisibleItems();
            $itemIds = array();
            $itemNames = array();
            $itemPrices = array();
            $itemMargins = array();
            $itemTypes = array();
            $itemGenders = array();
            $itemSports = array();
            $itemCategoryIds = array();
            $itemCategoryNames = array();
            /** @var Mage_Sales_Model_Quote_Item $item */
            foreach ($items as $item) {

                // Get the parent item - it is NOT included in the quote due to
                // customizations made by the OrganicInternet module for simple
                // product pricing. So I had to come up with another way to get it.
                $options = $item->getProductOptions();
                $parent = $item->getProduct();
                if (array_key_exists('info_buyRequest', $options)) {
                    if (array_key_exists('cpid', $options['info_buyRequest'])) {
                        $parentId = $options['info_buyRequest']['cpid'];
                        $parent = Mage::getModel('catalog/product')->getCollection()
                            ->addAttributeToSelect('name')
                            ->addAttributeToSelect('season')
                            ->addAttributeToSelect('gender')
                            ->addAttributeToSelect('sport')
                            ->addAttributeToFilter('entity_id', $parentId)
                            ->getFirstItem();
                    }
                }

                $itemIds[] = $item->getSku();
                $itemNames[] = $parent->getName();
                $itemPrices[] = $item->getBasePrice() ?: 0;
                $itemMargins[] = $this->_calculateMargin($parent, null, $item);
                $itemTypes[] = $parent->getAttributeText('season');
                $itemGenders[] = $parent->getAttributeText('gender');
                $itemSports[] = $parent->getAttributeText('sport') ?: 'Other';
                $categories = $this->_getAllCategoryIdsAndNames($item->getProduct());
                $itemCategoryIds[] = $categories['id'];
                $itemCategoryNames[] = $categories['name'];
            }

            // # Products

            $data['u1'] = count($items);

            // Product(s) Ids
            $data['u2'] = $itemIds;

Output is like so:

<script>dataLayer = [{"u1":"2.0000","u16":"2","u14":"Product","u2":"A0141602","}];</script>

What have i done wrong? Why is it not pulling the actual sku but the style number???


texts: Magento 2 to add link with current url as href inside head section

texts:
need to add alternative link in head with current URL as Href.
example
<link  rel="aletrnative" href="{current page url}" />


texts:
I was using Magento 1.7 but updated to 2.0 and now this is not working...

{{block type="catalog/product_list" column_count="5" category_id="39" template="catalog/product/list2.phtml"}}

Please help


texts: Loading wrong Shipping Method - By default on Checkout Page ( M2.4.0 )

texts:
I am using this extension Magento 2 Multiple Flat Rate Shipping I have 2 shipping methods.
Shipping Method 1: Free Shipping Method - Only For PK
Shipping Method 2: Flat Rate  - Only For USA
Now in frontend after adding product to cart, When going to checkout page there by default PK as country selected under SHIP TO. But Shipping method 2 is loaded By default. That is wrong.
But I want if PK country is loaded by default then must be Shipping Method 1 should be auto loaded.
You can attached screenshot.

If someone know about this issue, how to I can figure out ? Kindly guide me.
Thanks


texts: I need to pass information from the Magento Contact Form to a CRM system. I was wondering does anyone know if there is an observer that can be triggered to pass the form information to the CRM via the SOAP API?


texts: How can I show specific products on homepage in Magento 2?

texts: How can I show specific products on homepage? It has to be client friendly to do in CMS. I tried displaying a category then changing the sort order on products in category.


texts: Admin page just keeps refreshing after php update to 7.0

texts:
I was running a magento website on my localhost, and recently ubuntu asked me to update to 16.04LTS, since it is LTS I choose to upgrade. But, Unfortunately It upgraded my PHP version to 7.0.

I am sure that is the only change after which The admin page stopped working. It does not give me any error, but just refreshes the admin login page.

I have googled a lot, but many suggest change in Varien.php, which I have never touched.
And also about permissions for /var/sessions, which is also untrue in my case.
And many more, but none of the scenarios as that of mine. Any help would be highly appreciated.


texts: Magento FPC - What makes this stay up to date?

texts:
See below for a rewrite of this question.

A Magento EE 1.13.1.0 site that I'm working on is having some issues with Banners (powered by widgets.) The banners are caching when FPC is turned on, and even placing the call to the banner block in an uncached placholder/container is still pulling a cached banner block.

After talking to Magento support, they basically said that they couldn't help, but that I could look into the Related Products/Upsells to see how they stay uncached.

I know that the block catalog.product.related and it's child block catalog.product.related.item are both uncached. (Or rather, that they exist in the cache but are refreshed on each page load, not that I understand the difference.) But looking at Enterprise_PageCache_Model_Container_CatalogProductItem I can't see what it is about this that keeps these blocks from caching indefinitely. Especially as it relates to Enterprise_PageCache_Model_Container_Banner, which seems very similar.

Can anyone tell me how I can get Banners to not cache at all or give me a way to pull the content for a banner from the database directly, and bypass the cache?

Edit:

The problem that I was faced with is this: In Magento EE there is a Banner system tied to the Widget system in the CMS. The homepage of the site in question had 4 banners/widgets which were assigned to blocks. Those blocks were then called in the homepage template like so:

<block type="core/text_list" name="home_banner_carousel_one" as="home_banner_carousel_one">
    Homepage Banner Carousel One
</block>
<block type="core/text_list" name="home_banner_carousel_two" as="home_banner_carousel_two">
    Homepage Banner Carousel Two
</block>
<block type="core/text_list" name="home_banner_carousel_three" as="home_banner_carousel_three">
    Homepage Banner Carousel Three
</block>
<block type="core/text_list" name="home_banner_carousel_four" as="home_banner_carousel_four">
    Homepage Banner Carousel Four
</block>

<?php echo $this->getChildHtml('home_banner_carousel_one', false); ?>

<?php echo $this->getChildHtml('home_banner_carousel_two', false); ?>

<?php echo $this->getChildHtml('home_banner_carousel_three', false); ?>

<?php echo $this->getChildHtml('home_banner_carousel_four', false); ?>

The problem was that home.phtml was written to hide that section if the first carousel block was empty. Like this:

$carouselOne = $this->getChildHtml('home_banner_carousel_one', false);
if (empty($carouselOne)) {
    echo 'Nothing here';
} else {
    echo $carouselOne;
}

This was written without regard for the Full Page Cache in Magento. When that cache was turned on, this logic suddenly broke.

My solution was to move this logic into it's own block, and then try to uncache that "wrapper" block and all of the carousel blocks inside.

Simply adding <action method="setCacheLifetime" /> to the block definition in page.xml didn't have any affect on the Enterprise Full Page Cache.


texts:
I'm using Magento 2 CE Version 2.1.2

I would like to change Shipping Address to Shipping/Billing Address.

I have already below, but it's not working for me.

Magento 2: Sorry, no quotes are available for this order at this time Change Message

This file magento\vendor\magento\module-checkout\view\frontend\web\template\shipping.html takes value from magento\vendor\magento\module-checkout\i18n\en_US.csv


texts: Need to override the core file in magento 2

texts:
How to override this core file because of real path issue

magento230\vendor\magento\framework\View\Element\Template\File\Validator.php

Can you suggest how can we override this isPathInDirectoriesfunction in this file


texts: How to override login.phtml in a custom module in magento 2

texts: How to override customer login.phtml file in custom module, whenever i try it not doing what I expected


texts: Magento 2 - add Multiselect Store Views in admin Form

texts:
I am developing a custom module in Magento 2.
I would like to add to the editing form a multiselect to allow users to select the store view. In Magento 1.9 it is done in this way:

$fieldset->addField('store_id', 'multiselect', array(
        'name' => 'stores[]',
        'label' => Mage::helper('myhelper')->__('Store View'),
        'title' => Mage::helper('myhelper')->__('Store View'),
        'required' => true,
        'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
    ));

How can this be done in Magento 2?


texts:
I want to add a feature by which I can charge a specific amount to the customer when he use Cash on Delivery but no extra charge when he uses the payment gateway in magento 1.9X.?
kindly provide a solution.


texts: How do you include a custom LESS file inside of a child theme?

texts:
I'm starting a new project using Magento 2.1 and I'm a little confused on how LESS compilation works.

I created a child theme using a purchased theme as the parent. Inside my child theme, I added _custom.less inside

app/design/frontend/MYVENDOR/MYTHEMENAME/web/css/ .

I cleared out everything from pub/static/ and then deployed static content using

bin/magento setup:static-content:deploy

I'm not sure if that's necessary in developer mode, but I'm running it anyways.

I can't figure out if this is compiling and if it is, where it's going. There's a chance that the CSS I've included to change the background-color of body is being overridden by something else, but even if that's the case I can't find the CSS anywhere in the compiled CSS files.

I'm guessing this should be going into styles-m.css, but I'm really not sure. Is there additional configuration I need to do to tell Magento to include _custom.css when it compiles?


texts: Magento2 - Running di:compile stops at 57% in magento 2.3.2

texts:
Class Magento\Framework\Mail\EmailMessageInterfaceFactory does not
exist   Class Vendor\Extension\Model\Mail\TransportBuilder\Interceptor
generation error: The requested class did not generate properly,
because the 'generated' directory permission is read-only. If ---
after running the 'bin/magento setup:di:compile' CLI command when the
'generated' directory permission is set to write --- the requested
class did not generate properly, then you must add the generated class
object to the signature of the related construct method, only.

I found some solutions but none worked.
Thanks in advance,


texts: Duplicate Callout CMS-Block on Home-Page

texts:
I have an issue with my Magento-Store. I added a static cms block as callout to a custom local.xml. The code is working fine a category-pages but not on Home-Page. There the callouts are doubled.
Do you have any Idea how i can fix that?

Category-Pages _ working _

Home-Page _ broken _
Layout code:

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <default>
    <!-- Remove callouts and rarely used stuff -->
    <remove name="right.poll"/>
    <remove name="right.permanent.callout"/>
    <remove name="left.permanent.callout"/>
    <remove name="paypal.partner.right.logo"/>
    <block name="left_column_block" type="cms/block">
        <action method="setBlockId"><block_id>left_column_block</block_id> </action>
    </block>
    </default>
</layout>


texts: Magento (Enterprise 1.14) we have a configurable product that, when you check in the back end, is showing only 3 associated products. However, when you view the product on the frontend, there are 20+ associated. I am trying to edit the associated products for this product but it's not showing anything. Has anyone seen this before?


texts: main.CRITICAL: Email template '' is not defined. at /public_html/vendor/magento/module-email/Model/Template/Config.php:225)"} []]

texts:
in my exception.log i see this error message, I am unable to trace where the exception came from.

magento: 2.2.6

main.CRITICAL: Email template '' is not defined. {"exception":"[object] (UnexpectedValueException(code: 0): Email template '' is not defined. at /public_html/vendor/magento/module-email/Model/Template/Config.php:225)"} []


texts:
I tried to use Magento rest api using oauth signature or token-based, but it's a nightmare.

I followed this guide:
http://devdocs.magento.com/guides/v2.2/get-started/authentication/gs-authentication-oauth.html

This other one:
http://devdocs.magento.com/guides/v2.2/get-started/authentication/gs-authentication-token.html

But, I can retrieve is this message

{
  message: "Client is not authorized to access resources",
  parameters: "Magento_Catalog::products"
}

Even if I have admin access.

I tried to activate an integration with callback and identity link but it always says: "Failed to send the necessary data due to an unexpected error"

I' m using a node.js app and I'm trying to retrieve products, but nothing seems to work, I actually don't have an identity link, what does it mean " application login's page " ? I don't have an application login page.

Any help would be appreciated.


texts: show a static block just when visitor's GeoIP is from GB

texts:
I need to change the content of a static block in magento for visitors from some special countries.

This is the JavaScript embedded into the Magento:

I use the following code in my static block :

if (geoip_country_code() == 'GB')
    {
      alert("Hello, you are in Great Britain");
    }

But when i save this static block, magento changes it to this:

if (geoip_country_code() == 'GB') { alert("Hello, you are in Great Britain"); }

??!!

What should i do to determine the GeoIP of the visitors and change the Content to be shown in an static block?


texts: Phtml block in sales email template from admin

texts:
I'm trying to add a phtml block to the sales email using the admin area to edit the template. In Magento 1.x this worked fine, however I'm not sure how to do this the same way in Magento 2.3x?
I've added {{block class='Magento\\Framework\\View\\Element\\Template' area='frontend' template='Vendor_Module::email/ordertrustpilot_afs.phtml'}}
to the template, however I get an error in the log for main.CRITICAL: Invalid template file: 'Vendor_Module::email/ordertrustpilot_afs.phtml' in module: '' block's name: 'magento\framework\view\element\template_0' [] []
Where should I place the phtml file in Magento 2.3x for this to work as intended?
Many thanks
EDIT:
Following Amitkumar's advice I can now output using phtml, however I now need to see why the code in the phtml does not work. I'm using the same code as I did in Magento 1.x which is now obviously wrong.
echo "START"; works at the beginning of the phtml and shows in the email content, however the rest of the code doesn't seem to execute or produce an output or an error.
The code used is below and should output various order details needed to send to Trust Pilot to automate product reviews:
<?php echo "START"; ?>
<?php $finalorderid = $this->getIncrementId() ?>
<?php $_order = $this->getOrder(); ?>
<?php if (!empty($_order)): ?>
<?php $orderId = $_order->getIncrementId(); ?>
<?php $orderRecipientName = $_order->getCustomerName(); ?>
<?php $orderRecipientEmail = $_order->getCustomerEmail(); ?>
<?php $productsData = ""; ?>
<?php $i=0; foreach ($_order->getAllItems() as $_ship): ?>
<?php $_item = Mage::getModel('catalog/product')->load($_ship->getProductId()); ?>
<?php $productsData .= ($i == 0) ? "{" : ",{" ?>
<?php $productsData .= '"productUrl": "'.Mage::getBaseUrl().$_item->getData('url_key').'.html",'; ?>
<?php $productsData .= '"imageUrl": "'.$_item->getImageUrl().'",'; ?>
<?php $productsData .= '"name": "'.$_item->getName().'",'; ?>
<?php $productsData .= '"sku": "'.$_item->getSku().'",'; ?>
<?php $productsData .= '}'; $i++;?> <?php endforeach; ?>
<?php echo '<script type="application/json+trustpilot">{'; ?>
<?php echo '"templateId": "599c4755e05df80becabb8ae",'; ?>
<?php echo '"locale": "en-GB",'; ?>
<?php echo '"recipientEmail": "'.$orderRecipientEmail.'",'; ?>
<?php echo '"recipientName": "'.$orderRecipientName.'",'; ?>
<?php echo '"referenceId": "'.$orderId.'"'; ?>
<?php if (!empty($productsData)): ?>
<?php echo ', "products": ['; ?>
<?php echo $productsData; ?>
<?php echo ']'; ?>
<?php endif; ?>
<?php echo '}'; ?>
<?php echo '</script>'; ?>
<?php endif; ?>


texts: Magento 1.9.2 : How to remove sub category in the menu bar?

texts:
I have a site PREMIER HOME in Magento 1.9.2.

In the top menu bar, I've some parent categories and the child categories in the drop down.

I've deleted 2 sub-categories by going into "manage categories" and they become disappeared but still in my menu bar these categories are showing. As you see in my site "Kitchen" category travel mugs and pets are there but I have removed them. These categories when clicked redirect to a link

http://www.premierhome.com.pk/catalog/category/view/s/travel-mugs/id/2669/.

Also I clear cache but no luck.


texts: paypal payment standard payment method is not visible

texts:
I enabled "paypal payment standard" payment method in admin panel but still I can't see the option when I am in Checkout page.

See how my checkout page is visible without the paypal payment method.

I am thinking the paypal method should be visible there as I mentioned in image.

what should I do more to make paypal payment method option visible?


texts: How to allow HTML Message On Magento\Framework\Exception\StateException?

texts:
HTML Print Issue
$citySuggetion = "ABC,XYZ";
throw new StateException(
                __('<b>Please enter valid city/suburb for this address. Relative suggesstion are </b>: '.$citySuggetion));


texts: Is it possible to have different price and currency per product and per store view?

texts:
I have setup multi-site in Magento. I have one Website with two Stores and one storeView per Store.

StoreA is in GBP, StoreB is in Euros. I have productA which I would like to sell for £99.99 from StoreA but I would also like to sell ProductA from StoreB for €99.99 which is a custom price not a conversion rate.

I have tried changing the scope in Manage products page (Admin) but it still displays GBP not matter which storeView I have selected.

I'd be grateful if anyone could explain to me how I can achieve this relatively simple task that appears to be having me in a bit of bother....

Thanks in advance.


texts:
All of a sudden I'm getting a white screen when trying to login into my site. I had a look at my apache error log and found the following. Is anybody able to give me a clue on what the problem is and how to solve it?

  PHP Fatal error: Uncaught exception
  'Magento\Framework\Exception\LocalizedException' with message 'Can't
  create directory
  /var/www/html/magento/var/generation/Magento/Framework/App/ResourceConnection/.'
  in
  /var/www/html/magento/vendor/magento/framework/Code/Generator.php:103\nStack
  trace:\n#0
  /var/www/html/magento/vendor/magento/framework/Code/Generator/Autoloader.php(35):
  Magento\Framework\Code\Generator->generateClass('Magento\Framewo...')\n#1
  [internal function]:
  Magento\Framework\Code\Generator\Autoloader->load('Magento\Framewo...')\n#2
  [internal function]: spl_autoload_call('Magento\Framewo...')\n#3
  /var/www/html/magento/vendor/magento/framework/Code/Reader/ClassReader.php(19):
  ReflectionClass->__construct('Magento\Framewo...')\n#4
  /var/www/html/magento/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44):
  Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Framewo...')\n#5
  /var/www/html/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(71):
  Magento\Framework\ObjectManager\ in
  /var/www/html/magento/vendor/magento/framework/Code/Generator.php on
  line 103


texts: Remove shipping from transactional email totals

texts:
In Magento's transactional emails at the bottom of the mail you will see an overview of the order (totals.phtml). This has an output of something like:

Subtotal € 99,00
Shipping & Handling € 0,00
Total (Excl. Belasting) € 99,00
Tax € 0,00
Grand total (Incl. Belasting) € 99,00

Shipping & Handling is set to € 0,00. But not actually free (it is just not paid online). So I want to remove the line containing:

shipping & handling - € 0,00.

I cannot seem to find the lines to edit.

Totals.phtml loops true all available options. It seems that editing this will  also change other options and layouts

I could also make changes in sales.xml (of course a copy). But also I cannot find the desired line. Is there any way to remove only this line.

<sales_email_order_items>
    <block type="sales/order_email_items" name="items" template="email/order/items.phtml">
        <action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action>
        <action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/order/default.phtml</template></action>
        <block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
            <action method="setLabelProperties"><value>colspan="3" align="right" style="padding:3px 9px"</value></action>
            <action method="setValueProperties"><value>align="right" style="padding:3px 9px"</value></action>
            <block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml">
                <action method="setIsPlaneMode"><value>1</value></action>
            </block>
        </block>
    </block>
</sales_email_order_items>


texts: Could Anyone tell me the magento vanilla version number?

texts: I am new for magento frame work could anyone tell me magento vanilla version number


texts: Sitewide % Off Promotion to show discount on PDP

texts:
We are creating a 10% off sitewide promotion. Some items are at original price others are at a discount. How would we need to setup the promotion if we wanted the 10% off price to reflect on the Product Detail Page whether the item is at original price or at a discounted price? We want the 10% to display off of the lowest price and show on the PDP without having to add the item to the cart.

Also, we would also in this instance like to be able to exclude items that are not applicable.


texts: Magento 1.9 : Get final price and discount in shopping cart

texts:
I need help to obtain the following data of the shopping cart products:

First name
Sku
quantity in the cart
final price (after the discount)

I have the following code to obtain that data:

Mage::getSingleton("core/session", array("name" => "frontend"));
$cart = Mage::getSingleton('checkout/session')->getQuote();
foreach ($cart->getAllItems() as $item) {
    $productName = $item->getProduct()->getName();
    $productPrice = $item->getProduct()->getPrice();
    $productSku = $item->getProduct()->getSku();
    $productQty = $item->getQty();
    $productFinalPrice = $item->getProduct()->getFinalPrice();
    $productAmountDiscount = $item->getProduct()->getDiscountAmount();
}

but when I try this code the final price and the discount returns them as null values
How can I get that data with that model?


texts: Shipstation imports both Configurable and Associated Products for just one item

texts: So we work with Shipstation for processing orders and somehow, Magento keeps pushing both the configurable item and the associated item inside said configurable to Shipstation, doubling the item count... My "Import Child Products" option has already been set to "No". Any idea as to what could cause this? Thanks!


texts: Order confirmation and invoice emails are not being sent

texts:
On my E-commerce (CE 1.7), transaction emails work such as Newsletter, share with a friend, etc…

When a shopper places an order, the admins receive the order confirmation, but the shopper doesn’t.

Also when an admin writes a comment about the order and shares it with the shopper, the shopper still doesn’t receive the order.

In Configuration -> Sales emails -> I have enabled all the options.

I am at a loss, does anyone know a solution order method for tracking where the error might come from?

Thanks.!


texts:
I am using below code to display an Widget in Home page.

{{widget type="catalogsale/widget_carousel" products_count="20" template="catalog/product/widget/sale/sale_carousel_list.phtml"}}

But its width is too much. I am getting result like below

I have to edit this Widget. How can I do that ?


texts: Getting simple products from configurable

texts:
I am trying the following code to get the IDs of all the simple products which are children of $collection, which I know to be a collection of configurable products.

foreach($collection as $_product) {
    $_children = $_product->getTypeInstance()->getUsedProductIds($_product);
    print_r($_children);
}

However, all the arrays I am getting are empty. Am I doing something wrong?


texts: Magento 2. Update customer attribute outside Setup [Install|Upgrade]Data

texts:
I'm trying to ad a customer attribute outside a Setup Script.

To be more specific inside a console command using CustomerSetupFactory::updateAttribute method.

I get an error caused by DI.

Argument 1 passed to Magento\Setup\Module\DataSetup::__construct() must be an instance of Magento\Framework\Module\Setup\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 in /var/www/magento/setup/src/Magento/Setup/Module/DataSetup.php on line 57

Is there any reason why not to do what I'm trying to achieve?

Is there any way to fix my problem?

What I did

Cleared cache. Cleared var/generation and var/di manually. Ran setup:di:compile

Thanks

EDIT:

This works if:

1. Clear var/generation manually

2. Do not run setup:di:compile and run my CLI Command

It does not work if setup:di:copile ran. I have to mention that setup:di:compile ran without error

What is causing this behavior is setup:di:compile at fault?


texts: Invalid callback: Model on custom cron module

texts:
I am trying to make a custom module to run a cron job to assign products to categories.
I am however missing something, and I keep getting errors, and the cron job shows up, but doesn't work.
/public_html/app/code/local/Firmname/Catcron/etc/config.xml
<?xml version="1.0"?>
<config>
    <modules>
        <Firmname_Catcron>
            <version>1.0</version>
        </Firmname_Catcron>
    </modules>

    <global>
        <models>
            <firmname_catcron>
                <class>Firmname_Catcron_Model</class>
            </firmname_catcron>
        </models>
    </global>

    <crontab>
        <jobs>
            <firmname_catcron>
                <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
                <run><model>Firmname_catcron/observer::crontask</model></run>
            </firmname_catcron>
        </jobs>
    </crontab>
</config>

/public_html/app/code/local/Firmname/Catcron/Model/Observer.php
<?php

class Firmname_Catcron_Model_Observer {
  public function crontask() {
        // code
    }
}

/public_html/app/etc/modules/Firmname_Catcron.xml
<?xml version="1.0"?>
<config>
  <modules>
    <Firmname_Catcron>
      <active>true</active>
      <codePool>local</codePool>
    </Firmname_Catcron>
  </modules>
</config>

The error:

---EXCEPTION--- Mage_Core_Exception: Invalid callback: Model for Firmname_catcron/observer::crontask does not exist in
/var/www/mysite.com/public_html/app/Mage.php:598 Stack trace:
0 /var/www/mysite.com/public_html/app/code/community/Aoe/Scheduler/Helper/Data.php(298):
Mage::throwException('Invalid callbac...')
1 /var/www/mysite.com/public_html/app/code/community/Aoe/Scheduler/Model/Job.php(143):
Aoe_Scheduler_Helper_Data->getCallBack('Firmname_catcron/...')
2 /var/www/mysite.com/public_html/app/code/community/Aoe/Scheduler/Model/Schedule.php(192):
Aoe_Scheduler_Model_Job->getCallback()
3 /var/www/mysite.com/public_html/app/code/community/Aoe/Scheduler/Model/Schedule.php(582):
Aoe_Scheduler_Model_Schedule->runNow(true)
4 /var/www/mysite.com/public_html/app/code/community/Aoe/Scheduler/Model/Observer.php(39):
Aoe_Scheduler_Model_Schedule->process()
5 /var/www/mysite.com/public_html/app/code/core/Mage/Core/Model/App.php(1358):
Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
6 /var/www/mysite.com/public_html/app/code/core/Mage/Core/Model/App.php(1337):
Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer),
'dispatch', Object(Varien_Event_Observer))
7 /var/www/mysite.com/public_html/app/Mage.php(451): Mage_Core_Model_App->dispatchEvent('default', Array)
8 /var/www/mysite.com/public_html/cron.php(83): Mage::dispatchEvent('default')
9 {main}

I really hope someone has an idea as to why I am struggling so much to get my module to work!


texts: Magento 2: How to check Selling Fast Products?

texts:
Would like to check Selling Fast Products List.
It will be managed Product Wise.

Example:
For Product A, Qty: 50, Limit Qty: 5
For Product B, Qty: 100, Limit Qty: 2

If Product A reached Qty 5 then it will be Selling Fast.

For Product B if it reaches Qty 2 then it will be Selling Fast.


texts: Magento 2.2.4 cart price rules - serious bugs in discount

texts:
I have created a cart price rule as per the following 2 pictures

When I added 3 items to the cart, the discount is given correctly

However, when the quantity is changed to 2, the discount is still given to the customer, which is wrong.

Can anyone advise what I did wrong?


texts: How to override core shipping method system.xml file in magento 2?

texts:
I want to override shipping method system.xml file in my module and to add a new text field there.
How to achieve this ?
thanks


texts: Magento 1.9: How to Add Product Using SOAP Api?

texts: I am new to api. Can anyone guide how to add product using SOAP api.


texts:
Inexperienced with Magento, I am having trouble with a footer script that I am extending, which appears to be evaluating twice. I've confirmed that it's running twice by logging each run through. I'm not sure why this is happening in the first place and haven't found any similar questions on here.

Interestingly, I'm loading a product's page and I can see that

Mage::registry('current_product')

will initially empty and on the second run through, the product appears to be loaded. My problem with this is that I have some front-end stuff I'm trying to build out that is dependent on the product being available.

I'd be happy to provide any more info that would be helpful.

Does anyone have any idea why this footer script is running twice?

It has been added as a reference, in the XML that contains all other components, once.

Footer Script loading in local.xml

<reference name="before_body_end">
<block type="core/template" name="footer.theme.scripts" template="page/html/footer_theme_scripts.phtml" before="-" />
</reference>

Part of my footer theme script:

    <?php
/**
 * Additional scripts
 */
?>

<?php
    //Get grid configuration array
    $theme = $this->helper('ultimo');
    $gc = $theme->getCfgGroup('category_grid');

if (Mage::registry('current_product')) {
            if (empty($_product)) {
                $_product = Mage::registry('current_product');
            }

            if ($_product->getVendorSku() != NULL) {
                $agil_one->setProductId($_product->getData('vendor_sku'));
                $agil_one->setCategoryHex($_product->getData('vendor_sku'));
            } else {
                error_log('Vendor Sku is NULL. Is there a product? ' . $_product);
                return; // return if on product page but there is no product available
            }
        }

?>


texts: Magento2 : I want to show user's profile picture in my account

texts:
user can upload image when

Register
After login, from my account


texts: index.php is on main url after last update

texts:
After we did the last update to Magento our homepage url went from

https://dutchmanaxles.com

to

https://dutchmanaxles.com/index.php

This only appears on the main page, and we have done all the steps in Magento to stop this from happening. Probably why index.php doesn't appear on any other page


texts: automatic add the product's Set Product as New from Date

texts: My aim is to create the product's New From and New To date fields to be filled automatically, We do not have to fill those dates. So basically i want the New From Date should be the same when product is being edited/added and In the field New to date, i want to automatically assign the date after 3 month's date.


texts: How to display only left stock status for configurable products in product detail page magento 2?

texts:
By following this link(https://www.mageplaza.com/kb/show-stock-remaining-items.html), it shows in simple products only.

But I want to display in configurable products also. Please help me.


texts: Show Block class image upload to Ui form image upload

texts:
How can i change from this

To this

My Code to create image upload is below. I don't want to create the form with UI component but i want to make the image upload like it.

    $fieldset->addField(
        'outfit_image',
        'image',
        [
            'name' => 'outfit_image',
            'label' => __('Outfit Image'),
            'title' => __('Outfit Image'),
            'required' => true,
        ]
    );


texts: I'm working on a charity/non-profit site and was considering making some customizations that would combine the product page with the checkout page. An example on an existing charity site can be found here:https://secure3.4agoodcause.com/project-cure/gift.aspx?id=1 . Since the only products on the whole store will be virtual products for making a donation, it's unlikely a customer will want to continue to "shop around" before completing their donation, so it makes sense to put it all on one page. Any idea on how to accomplish this?


texts: How to setup Muti theme for multi website in Magento 2.3.5

texts:
I am going to create multi websites and stores in magento and i want to setup different theme for each store.
so anyone can have idea about it please share with me.
Thank you in Advance.


texts: What is the difference between getChildHtml and getChildBlock?

texts:
In the description of the method of getChildHtml it is said "Retrieve child block HTML"
In the description of the getChildBlock method, it says "Retrieve child block by name".
But what is the difference?


texts: Magento 2 - Order email - template override not working

texts:
I need to style the items table in the order email.

So I have copied

  /vendor/magento/module-sales/view/frontend/templates/email/

to

  /app/design/frontend/[Vendor]/[Theme]/Magento_Sales/templates/email/

Added some content, ran my script that fixes most of the "issues"

rm -R ./pub/static/*
./php bin/magento cache:clean
./php bin/magento cache:flush
./php bin/magento setup:static-content:deploy --force
./php bin/magento setup:static-content:deploy sk_SK --force
./php bin/magento setup:di:compile
./php bin/magento indexer:reindex
./php bin/magento cache:clean
chown zonemediadev.sk:html ./ -R

note: ./php is shortcut to php7 because the server by default has php5 on cli.

I have re-sent the order email from admin, then manually triggered cron. Then I have received the email without the added content.

If I add content in the /vendor/....../templates/email/items.phtml then it works fine.

Also I am receiving the same email multiple times (from 2 times up to 11 times) Why?

Any suggestions why the override does not work?


texts: After merge css and js files are turned on, the files remain not contiguous

texts:
After turning on merge of css and js files in System > Configuration > Developer and clearing the cache, files are not merged

The request numbers do not change


texts:
How to remove Madison Island from magento 1.9 and from database
(Godaddy) / (Cpanel) / (phpmyadmin) ?
I am trying to remove default theme from magento and installing new theme but i don't know how to remove the default.
But i already install new theme on magento


texts: PayPal Checkout with Smart Payment Buttons is not available IPN (notify url)

texts:
I am not able to find A notify url(IPN) for PayPal Checkout with Smart Payment Buttons gateway. Can you please help me how I set? Or PayPal is not providing IPN for this method ?
https://developer.paypal.com/docs/checkout/#try-the-buttons


texts: How to update sku code using Rest API in Magento 2?

texts:
I want to update sku using Rest API in magento 2
Call:

  PUT /rest/V1/products/{sku}

Request:
{
"product": {
"sku": "modified.sku",
"name": "modified name"
}
}

Result:
The name has changed, but the sku is the same. How can I change the product sku?


texts: How to access value of textfield in controller

texts:
Which procedure used for accessing text-field data in block Edit.php ?

For example:- my textfeild is in `Edit.phtml`:

     <div class="input-box">
         <input type="text" name="telephone" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text  <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="telephone" />
     </div>
<input type="submit" name="truemagentosubmit" value="Show Correct Address"  id="save"/>

my javascript function is:-

<script>
jQuery(document)
.ready(
        function() {

            //$('#stage').css("visibility", "hidden");

            jQuery("#save")
                    .click(
                            function() {

        var street = document.getElementById('street_1').value;
        var city=document.getElementById('city').value;
        var state=document.getElementById('region').value;
    var zip=document.getElementById('zip').value;

       // var newcity=document.getElementById('newcity').value;
       // document.getElementById('city').value=newcity;

        var address=<?php echo $this->getcorectAdd()?>
        var str = JSON.stringify(address);
        var newArr = JSON.parse(str);

        var CorrectZip=newArr[9];
        var CorrectStreet=newArr[0]+" "+newArr[1]+" "+newArr[4]+" "+newArr[5];
        var CorrectCity=newArr[7];
        var CorrectState=newArr[8];

        document.getElementById('correctCity').value=CorrectCity;
        document.getElementById('correctStreet').value=CorrectStreet;
        document.getElementById('correctState').value=CorrectState;
        document.getElementById('correctZip').value=CorrectZip;

        var r = confirm("CORRECT ADDRESS IS...\n"+"\nstreet="+CorrectStreet+"\ncity="+CorrectCity+"\nstate="+CorrectState+ "\nzip="+CorrectZip+"\n\nwould you like to save this address?");
       if (r == true) {
           document.getElementById('city').value=CorrectCity;
           document.getElementById('street_1').value=CorrectStreet;
           document.getElementById('region').value=CorrectState;
           document.getElementById('zip').value=CorrectZip;

    }
    // return true;

});
});
</script>

Before saving i need to access user entered address in textbox  to Edit.php block function getcorrectAdd() then it return correct address and then it save in database.

so,it is possible that i access textbox value in block or model before saving.without using any event.

Thanks in advance.


texts: Magento 1.9 CE upgrade product "product-shop" disappears

texts:
I have recently upgraded to magento 1.9 and now for some reason when I add products the description box no longer shows on "new" products, it is still there for the ones that were added before the upgrade.

Looking at the backend I can't really find much of a difference that would cause this.

It appears that the entire "product-shop" div is missing along with all the nested div's below.


texts: How to show the total number of pages in the pagination bar

texts:
I need to change the display of pagination in the category page.

Current format is :
1 2 3 4 5 next page

and i need to be

1 2 3 4 5 ... 20 next page

where 20 is the number of total pages.

Do you know how can i achieve this?


texts: Payment Method Save Config Button Not work magento 1


texts:
I would like to create new Type product (as Configurable, Simple, ...).

Here my code :

module.xml :

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Project_CustomType" setup_version="1.0.0">
    </module>
</config>

product_type.xml :

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd">
    <type name="custom_type" label="CustomType Product" modelInstance="Project\CustomType\Model\Product\Type\CustomType" indexPriority="60" sortOrder="80" isQty="true">
    </type>
</config>

CustomType.php :

<?php
namespace Project\CustomType\Model\Product\Type;

class CustomType extends \Magento\Catalog\Model\Product\Type\AbstractType
{
    const TYPE_CODE = 'custom_type';

    /**
     * @param \Magento\Catalog\Model\Product $product
     */
    public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $product)
    {

    }
}

I created new attributes that I assigned to my new product type.

But here my problem :

When I want to create a new CustomType product in my BO, I need to fill all default attributes + my custom attributes.

But I don't want to fill default attributes : I would like to fill only my custom attributes.

Where do I need to specify that I don't want to create my new CustomType product with default attributes like Enable Product, Attribute Set, Product Name, ... ?

Any idea ?


texts:
What I would like to achieve is to have the invoice number defined as so:

 YYYYMMDDD

Where YYYY represents the current year, MM the current month and DDD the number that increments for each invoice.

The issue is that I don't know how to automatically reset the three digits at the beginning of each month.

Example:

1st invoice of March: 202003001

2nd invoice of March: 202003002

3rd invoice of March: 202003003

1st invoice of April: 202004001