texts: Magento 2 module error after version upgrade

texts:
I was recently trying to upgrade our Magento from 2.2.5 to Magento 2.2.7. I thought I succeeded but we're currently getting the following error:

  There has been an error processing your request Exception printing is
  disabled by default for security reasons.

  Error log record number: 335576744754

Having looked at this var log  I can see the following message:

  {"0":"Please update your modules: Run \"composer install\" from the
  Magento root directory.\nThe following modules are
  outdated:\nAmazon_Core db schema version: defined in codebase - 2.1.2,
  currently installed - 2.2.7\nAmazon_Core db data version: defined in
  codebase - 2.1.2, currently installed - 2.2.7\nAmazon_Login db schema
  version: defined in codebase - 2.1.1, currently installed -
  2.2.7\nAmazon_Login db data version: defined in codebase - 2.1.1, currently installed - 2.2.7\nAmazon_Payment db schema version: defined
  in codebase - 2.1.1, currently installed - 2.2.7\nAmazon_Payment db
  data version: defined in codebase - 2.1.1, currently installed -
  2.2.7\nKlarna_Core db schema version: defined in codebase - 4.5.2, currently installed - 4.5.6\nKlarna_Core db data version: defined in
  codebase - 4.5.2, currently installed - 4.5.6\nKlarna_Ordermanagement
  db schema version: defined in codebase - 4.4.1, currently installed -
  4.4.2\nKlarna_Ordermanagement db data version: defined in codebase - 4.4.1, currently installed - 4.4.2\nKlarna_Kp db schema version: defined in codebase - 5.5.1, currently installed - 5.5.4\nKlarna_Kp db
  data version: defined in codebase - 5.5.1, currently installed -
  5.5.4","1":"#0 /var/www/vhosts/mysite.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(121):
  Magento\Framework\Module\Plugin\DbStatusValidator->beforeDispatch(Object(Magento\Framework\App\FrontController\Interceptor),
  Object(Magento\Framework\App\Request\Http))\n#1
  /var/www/vhosts/mysite.com/httpdocs/app/code/Infortis/Cgen/Plugin/Magento/Framework/App/FrontController.php(32):
  Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#2
  /var/www/vhosts/mysite.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(135):
  Infortis\Cgen\Plugin\Magento\Framework\App\FrontController->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor),
  Object(Closure), Object(Magento\Framework\App\Request\Http))\n#3
  /var/www/vhosts/mysite.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(153):
  Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#4
  /var/www/vhosts/mysite.com/httpdocs/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26):
  Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch',
  Array, Array)\n#5
  /var/www/vhosts/mysite.com/httpdocs/vendor/magento/framework/App/Http.php(135):
  Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#6
  /var/www/vhosts/mysite.com/httpdocs/generated/code/Magento/Framework/App/Http/Interceptor.php(24):
  Magento\Framework\App\Http->launch()\n#7
  /var/www/vhosts/mysite.com/httpdocs/vendor/magento/framework/App/Bootstrap.php(257):
  Magento\Framework\App\Http\Interceptor->launch()\n#8
  /var/www/vhosts/mysite.com/httpdocs/index.php(39):
  Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))\n#9
  {main}","url":"/admin_adminname/","script_name":"/index.php"}

I've logged into SSH and tried to run "Composer install" but it says there is nothing to update.

I've tried numerous other commands including:

 php bin/magento setup:upgrade
 bin/magento cache:clean
 php -f bin/magento setup:static-content:deploy

Having looked in the "setup_module" table I can see that the versions in the table do not correspond with the versions in module manager as evidenced in the screenshot below

I could really use some advice if anyone knows how to resolve this


texts:
I'm Validating Address in Customer Register Page, it's working fine Error also displaying in same page. After displaying error message the form is lose viewstate (entered user data).

my code is:

public function createPostAction(){

        $valid = $this->_validation();
        $arguments = $this->getRequest()->getPost();

        if( $valid === true){
            parent::createPostAction();
        }else{

            $this->_redirect('*/*/create',$arguments);
        }
    }

    protected function _validation()
    {
        $errors = array();

        $continue = Mage::helper('addressapi/data')->Address($this->getRequest()->getPost(), 'customer');
        if (!$continue) {
            $errors[] = Mage::getSingleton('core/session')->addError('Please Enter the Correct Address details.');
        }

        if (empty($errors)) {
            return true;
        }

        return $errors;
    }

How can I bind viewstate data after form postback.

Thanks in advance.


texts: Magento2: Images are not shown on second website

texts:
I've created a second website, with separate store and store view, where i wish to show only some of the products of the main website.
I'm having some problem with images, even tho not consistently.
When I assign the product to the second store as well the images are not loaded and I can see only the default Magento Image.
On the main website the image continues to load normally, this happens most of the time, but not all the time.
I've checked and i can tell for sure that this is a problem of cache, looking at the image url i can see that in the second store in using a path that doesn't exist. Creating the folder and filling it with the same images of the "regular" path makes them visible. Of course this can only be a temporary solution, since a refresh of cache deletes the folder.
So I've come to think that there's some options that I've not checked with redirect or something.
Just to be complete, se second website use the same domain (so i have website.com/default and website.com/second)


texts:
When creating an observer you add your model to config.xml like ...

<models>
    <some_name>
        <class>My_Module_Model</class>
    </some_name>
</models>

When adding the event part you can do this

<observers>
    <some_alias>
        <class>some_name/observer</class>
        <method>someMethod</method>
    </some_alias>
</observers>

Or use full class name like

<observers>
    <some_alias>
        <class>My_Module_Model_Observer</class>
        <method>someMethod</method>
    </some_alias>
</observers>

Whats the difference and why should I prefer one over the other?


texts: Magento 2.3 admin is redirecting to this URl domain/admin/admin/denid/key/**** after admin login

texts:
I anonymously added some ACL permissions in Magento 2 and saved.
I know that I have configured wrongly in the process of knowing, how it works since then I am unable to access my Magento 2 admin, I am able to login but later the URL is redirecting to

  domain/admin/admin/denid/key/

result This page isn’t working working error.

clearing cache but didn't work. Suggest me how to resolve this issue.


texts: Why my order missing ship, hold, creditmemo and sendmail

texts:
I have a order that is in status processing but issue is i cannot find these buttons missing ship, hold, creditmemo and sendmail, please find the below link.

This is only for some products in order. But iam unable to find the issue and unable to find the difference between product which are ship and not-shipable.

can anyone help me on this issue. thanks


texts: How to change process to checkout url of minicart in Magento 2.2.1

texts:
I want to change "Process to checkout" url of minicart with custom theme.

I override content.html in my custom theme but I don't know how we change url of button.

        <button
                id="top-cart-btn-checkout"
                type="button"
                class="action primary checkout"
                data-action="close"
                data-bind="
                    attr: {
                        title: $t('Go to Checkout')
                    },
                    click: closeMinicart()
                "
                translate="'Go to Checkout'"
        />


texts:
Magento 1.9.x was reading layouts fine from my local.xml layout file.

After installing some extensions Magento is now ignoring local.xml and is reading from responsive.xml instead.

Is there a way of changing this back to how it was?


texts: Magento 1.9 .2.4 - 404 All Product Pages - 405 On Duplicate Product and Customer Login

texts:
Our Magento 1 installation developed the following issues May 30 after 4:00 PM PST:

All Product Pages - 404 across both .ca and .us store views.
405 error note on duplicating a product in admin panel
405 errors on customer login to account.

We tried full restore from Siteground Cloud May 28, 29, 30 with no change. All errors remain. We tried restore stock htaccess and turn off URL rewrites. No change.

Reindexed, Flush all caches, disable supercasher. We tried links with index.php/ manually added. All with no luck.

When the restores were applied they were full DB and files but the problem follows. The problem did not exist May 30th before end of work. Now it cant be pinpointed.

Any help would be appreciated. Site tested clean from virus.


texts: Import Prices for different store views in Magento 2

texts:
I am importing the prices through CSV for different store views. It does not import the prices properly.

Can you please give me the solution for it?


texts: magento 2 file uploader frontend append files

texts:
From what i know magento 2 already uses file uploader https://searchcode.com/codesearch/view/45780717/ , how can i use it to create something like they have on this page under tab "Basic Plus UI": http://blueimp.github.io/jQuery-File-Upload/index.html

the reason is simple i have a form where user can add multiple files, i want to give user option to add / remove files before user submits the form.

the only thing i was able to find is :
https://devdocs.magento.com/guides/v2.0/ui-components/ui-secondary-uploader.html

which gives us following:

<div class="upload-wrapper" data-bind="scope: 'uploader'">
    <!-- ko template: getTemplate() --><!-- /ko -->
</div>

<script type="text/x-magento-init">
{
   ".upload-wrapper": {
       "Magento_Ui/js/core/app": {
           "components": {
               "uploader": {
                   "component": "Magento_Ui/js/form/element/file-uploader",
                   "template": "ui/form/element/uploader/uploader",
                   "previewTmpl":  "ui/form/element/uploader/preview",
                   "allowedExtensions": "jpg jpeg gif png pdf",
                   "isMultipleFiles": true,
                   "uploaderConfig": {
                        "url": "<?php echo $block->getUrl('controller/fileuploadurl'); ?>"
                   }
               }
           }
       }
   }
}
</script>

but this script starts upload as soon as we have added files.


texts: How to override js file in lib folder for admin theme?

texts:
I need to override js located in lib/web/mage/backend in Magento/backendtheme.

Basically i should get modified js in static content for admin theme.


texts: Magento is not sending emails of new orders

texts:
Magento is not sending emails when there are new orders neither when you comment on the order.
Invoice, credit memo, shipping and contact us are working perfectly.
Queued emails are in core email queues database with posted date NULL.
Used to be able to get it working by editing order.php but it's not working anymore.
Cron job is there but not sure if I need to change anything in cron.php
Spent whole night trying to figure it out and even contacted hosting support, nothing.

Can someone point me in the right direction, please?


texts: Magento 2 - What is use of react JS in Magento 2.3.0?

texts:
What is the use of react JS in Magento 2.3.0?
Will this replace fully knockout.js from Magento 2?
What will be the benefit?


texts: Add/Remove class from div if minicart hasitem/noitem

texts:
I want to add a class in parent div if minicart/cart is empty and remove same class if minicart/cart has an item(s).I made changes in minicart.phtml. below is my code for that.

<div class="block block-minicart"
data-bind="css: { emptyBag: !!getCartParam('summary_count') == false }
                 data-role="dropdownDialog"
                 data-mage-init='{"dropdownDialog":{
                    "appendTo":"[data-block=minicart]",
                    "triggerTarget":".showcart",
                    "timeout": "2000",
                    "closeOnMouseLeave": false,
                    "closeOnEscape": true,
                    "triggerClass":"active",
                    "parentClass":"active",
                    "buttons":[]}}'>

I have added data-bind="css: { emptyBag: !!getCartParam('summary_count') == false }" peace of code to check if cart is empty or not. but when i check console it's giving me an error of getCartParam is not defined. Please help,
I have worked on magento but new in KO so facing problem in that


texts:
I would make a category branch undeletable, my idea is to use an observer on the events catalog_category_delete_before and catalog_category_delete_after.
On catalog_category_delete_before the branch is cloned and stored into an instance variable.
On catalog_category_delete_after the branch is copied again.
I would know if there is a better way to achieve this result.
Example:

class EternalParquet_Category_Model_Observer {
private $cloned_category;

public function copy_category($observer = null) {
    $event = $observer->getEvent();
    $helper = Mage::helper('eternalParquet_macrocategoria');
    $category = $event->getCategory();
    $this->cloned_category = clone $category;
    //copy branch...
}

public function insert_category($observer = null) {
    $event = $observer->getEvent();
    $category = $this->cloned_category;

    /* insert branch... */

}


texts:
I'm after some advice if possible

Since upgrading to 1.9.1 as per a lot of other people emails are not sending from the queue.

The emails are being generated and placed in the core_email_queue table absolutely fine however the processed time remains unchanged and the emails never leave this table. Shipping emails are sent fine as these are not added to the queue so it is not a mail setting.

I am using AOE scheduler to check the cron settings, the schedule is working fine and my cron is running as things such as backup and log clearing is working fine also. running mydomain/cron.php also does not send the mail from the queue.

Other than bypassing the email queue has anyone got any suggestions? below is a copy of my cron.php, the only amendment is the following line which was added on line 49 as initially the cron file wasn't running.

$isShellDisabled = true;

setUseSessionInUrl(false);

umask(0);

$disabledFuncs = explode(',', ini_get('disable_functions'));
$isShellDisabled = is_array($disabledFuncs) ? in_array('shell_exec', $disabledFuncs) : true;
$isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;
$isShellDisabled = true;
try {
    if (stripos(PHP_OS, 'win') === false) {
        $options = getopt('m::');
        if (isset($options['m'])) {
            if ($options['m'] == 'always') {
                $cronMode = 'always';
            } elseif ($options['m'] == 'default') {
                $cronMode = 'default';
            } else {
                Mage::throwException('Unrecognized cron mode was defined');
            }
        } else if (!$isShellDisabled) {
            $fileName = basename(__FILE__);
            $baseDir = dirname(__FILE__);
            shell_exec("/bin/sh $baseDir/cron.sh $fileName -mdefault 1 > /dev/null 2>&1 &");
            shell_exec("/bin/sh $baseDir/cron.sh $fileName -malways 1 > /dev/null 2>&1 &");
            exit;
        }
    }

    Mage::getConfig()->init()->loadEventObservers('crontab');
    Mage::app()->addEventArea('crontab');
    if ($isShellDisabled) {
        Mage::dispatchEvent('always');
        Mage::dispatchEvent('default');
    } else {
        Mage::dispatchEvent($cronMode);
    }
} catch (Exception $e) {
    Mage::printException($e);
    exit(1);
}

?>

The key thing is the emails are being added to the table correctly but not being processed when the cron script runs. Also below is a couple of images of the core_email_queue and cron_schedule tables

cron.sh script

#!/bin/sh
# location of the php binary
if [ ! "$1" = "" ] ; then
    CRONSCRIPT=$1
else
    CRONSCRIPT=cron.php
fi

MODE=""
if [ ! "$2" = "" ] ; then
    MODE=" $2"
fi

PHP_BIN=`which php-5.3`

# absolute path to magento installation
INSTALLDIR=`echo $0 | sed 's/cron\.sh//g'`

#   prepend the intallation path if not given an absolute path
if [ "$INSTALLDIR" != "" -a "`expr index $CRONSCRIPT /`" != "1" ];then
    if ! ps auxwww | grep "$INSTALLDIR$CRONSCRIPT$MODE" | grep -v grep 1>/dev/null 2>/dev/null ; then
        $PHP_BIN $INSTALLDIR$CRONSCRIPT$MODE &
    fi
else
    if  ! ps auxwww | grep "$CRONSCRIPT$MODE" | grep -v grep | grep -v cron.sh 1>/dev/null 2>/dev/null ; then
        $PHP_BIN $CRONSCRIPT$MODE &
    fi
fi

I am currently calling the cron.php via the following at the advice of my web hosting provider

*/5 * * * * /usr/bin/wget -O /dev/null -q http://www.mydomain.co.uk/cron.php > /dev/null


texts:
I would like to active two merchant account In One Store  like that.
1: Paypal Pro  abc@gmail.com
2: Paypal standard  abcd@gmail.com
I mean i want to change Acitve both payment method same time But if user select first Option account should be abc@gmail.com and if user select Second option That should be select abcd@gmail.com


texts: How to get attribute image in Magento2 using product object?


texts: Magento2: Products group by filterable attributes

texts:
Does anyone know how to get an array with the number of products grouped by attributes that can be filtered, in a controller o helper? For example:
["Activity" => [....], "GENDER" => ["MEN" => 5, "WOMEN" => 5, "UNISEX" => 1] ...]

i am trying to use \Magento\Catalog\Model\Layer\FilterList::getFilters()
but throw
use \Magento\Catalog\Model\Layer\FilterList;

class Magento extends Base {

protected $_filterList;

public function __construct(FilterList $filterList) {

    $this->_filterList = $filterList;

}

Fatal error: Uncaught Error: Cannot instantiate interface
Magento\Catalog\Model\Layer\FilterableAttributeListInterface in
C:\xampp\apps\magento\htdocs\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php:93
Stack trace: #0
C:\xampp\apps\magento\htdocs\vendor\magento\framework\ObjectManager\Factory\Compiled.php(88):
Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Catalog...',
Array) #1
C:\xampp\apps\magento\htdocs\vendor\magento\framework\ObjectManager\Factory\Compiled.php(130):
Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Catalog...')
2 C:\xampp\apps\magento\htdocs\vendor\magento\framework\ObjectManager\Factory\Compiled.php(67):
Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\Catalog...')
3 C:\xampp\apps\magento\htdocs\vendor\magento\framework\ObjectManager\Factory\Compiled.php(130):
Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Catalog...')
4 C:\xampp\apps\magento\htdocs\vendor\magento\framework\ObjectManager\Facto
in
C:\xampp\apps\magento\htdocs\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php
on line 93


texts:
Forbidden you don't have permission to access /Magento/pub/static/frontend/Magento/luma/en_US/Magento Ui/templates/modal/modal-popup.html on this server.

Don't know why I am getting this error on magento fresh site.


texts:
Is it possible to use multiple footers for the Transactional Emails?

So I want to use a specific footer for a new order email, and an other footer for the shipment email.

I currently load the footer with this line: {{template config_path="design/email/footer"}}

How can I load a specific template in the transactional email?


texts: Magento 2: how to add css ONLY to custom module

texts:
I created a custom module that overrides the addtocart.phtml file. In that module, I also created a css file.
Here is what I did:

Here is my layout - catalog_product_view.xml:

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Vendor_Module::css/style.css"/>
    </head>
    <body>
        <referenceBlock name="product.info.addtocart">
            <action method="setTemplate">
                <argument class="Magento\Catalog\Block\Product\View" name="template" xsi:type="string">Vendor_Module::product/view/addtocart.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="product.info.addtocart.additional">
            <action method="setTemplate">
                <argument class="Magento\Catalog\Block\Product\View" name="template" xsi:type="string">Vendor_Module::product/view/addtocart.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

and then I put the style.css in /Vendor/Module/view/frontend/web/css

I thought that in this case the css file could be visible ONLY in the module, but it is not.
How can I make it visible ONLY in that phtml file?
I mean, I want the css to be able to edit ONLY the files into the module.

Is it possible?

Thanks


texts:
I need configurable product details like size etc in a specific order.How i can get it from SQL query.Currently using this but it does not show options.
SELECT oi.name, oi.sku, oi.qty_ordered, oi.item_city, oi.product_options, oi.price FROM
    sales_order_item oi JOIN catalog_product_flat_1 flat ON
    oi.product_id = flat.entity_id WHERE
    oi.order_id = 000000043


texts: System.xml "select" with a custom Model not working

texts:
app\code\local\Jurgis\Twilio\etc\system.xml

<language translate="label">
          <label>Voice Language</label>
          <frontend_type>select</frontend_type>
          <source_model>Twilio/Language</source_model>
          <sort_order>92</sort_order>
          <show_in_default>1</show_in_default>
          <show_in_website>1</show_in_website>
          <show_in_store>1</show_in_store>
</language>

app\code\local\Jurgis\Twilio\etc\config.xml

<?xml version="1.0"?>

<config>
    <modules>
        <Jurgis_Twilio>
            <version>1.0.0</version>
        </Jurgis_Twilio>
    </modules>
    <global>
      <helpers>
          <Jurgis_Twilio>
            <class>Jurgis_Twilio_Helper</class>
        </Jurgis_Twilio>
      </helpers>
      <models>
        <Jurgis_Twilio>
                  <class>Jurgis_Twilio_Model</class>
        </Jurgis_Twilio>
      </models>
    </global>

app\code\local\Jurgis\Twilio\Model\Language.php

<?php
class Jurgis_Twilio_Model_Language
{
    public function toOptionArray()
    {
      return array(
            array(
                'value' => 'key1',
                'label' => 'Value 1',
            ),
            array(
                'value' => 'key2',
                'label' => 'Value 2',
            ),
        );
    }
}

When I go to my admin config, I get the error:

  Fatal error: Call to a member function toOptionArray() on boolean in ...\app\code\core\Mage\Adminhtml\Block\System\Config\Form.php on line 463


texts:
I'm having some issues to setup addresses as default shipping addresses for customer.
[
As you can the the addresses exist in the list, but isn't set as default
here is my code (it's a running script that import data using console)
$customer = $this->customerRepository->getById($id_customer);
$customerAddress = $this->addressDataFactory->create();
$customerAddress->setCustomerId($id_customer);
$customerAddress->setLastname($lastname);
$customerAddress->setFirstname($firstname);
$customerAddress->setStreet([$address1,$address2]);
$customerAddress->setCity($city);
$customerAddress->setPostcode($postcode);
$customerAddress->setTelephone($phone);
$customerAddress->setCountryId($countryId);
$customerAddress->setCompany($company);
$customerAddress->setIsDefaultShipping(true);

$this->logger->logInfo('Customer addresses created');

try{
    $shippingCustomerAddress = $this->addressRepository->save($customerAddress);
    $customer->setDefaultShipping($shippingCustomerAddress->getId());
    $this->logger->logSuccess('save success');
    try{
        $this->customerRepository->save($customer);
        $this->logger->logInfo('Save shipping address %s for customer %s',
            [$shippingCustomerAddress->getId(),$id_customer]);
    }catch (Exception $e){
        $this->logger->logError('Customer save address : %s',[$e->getMessage()]);
    }
}catch (Exception $e){
    $this->logger->logError('Save address : %s',[$e->getMessage()]);
}

I don't see what I am missing there, any ideas ?


texts:
I want to get the Order ID in the View.php file. Basically I created a button in view.php in the back-end. now I want to pass the order id through query string to the external URL.

How can I get the Order id in above scenario?
How can I open an external URL in new browser window.

Here is my code:

$this->_addButton('order_reorder', array(
    'label'     => Mage::helper('sales')->__('Print'),
    //  'onclick'   => "setLocation('".$this->getUrl('http://www.google.com')."')"
    'onclick'   => 'setLocation(\'' . 'http://www.exportleftovers.co/leopardmagento/test.php?order_id=$order' . '\')',
    'class'     => 'go'
));


texts: Double content in Blocks (Magento 2.3.5-p2)

texts:
When I add single image in blocks I end up with doubled images on the storefront:
https://military1st.gyazo.com/fe7d99b60680dbc2375734762dd07fc0
Any ideas?


texts: "Add to wishlist" without redirecting to wishlist page

texts: When clicking on the add to wishlist button, I want to remain on the same page & perform the add function without redirecting to the wishlist page - is this possible?


texts: Checking , Applying & Verifying SUPEE Patches

texts:
I have a magento 1.9.2 installed for the past two years and never applied SUPEE security patches. I looked up so many articles online on how to apply these patches but there are some doubts I need to be explained from your experience.

How do I know what patches that are not installed?
Once I install them, how do I know they are actually installed?
Is there a possibility patching can cause issues with the
installation (theme & extension) or it is unrelated?
Sever environment I have is shared, and all articles mention SSH
commands to install the patches. Is there another way around without
SSH to install SUPEEs.
If I am missing several patches, do they need to be installed in a
sequence. Older one first, etc.


texts: Magento 2 : How to refund as per payment method using credit memo?

texts:
Is their any way to refund online to payment method within credit memo ?
Please share your thoughts on this.


texts: How to get Quote Order data in success cms page?

texts: I have to show Quote Order data in success page after checkout in table as clients requirement. This include product, all prices, taxes and discounts in table as shown in checkout last step.


texts:
I just installed Magento with custom free template ( Eros ). what I trying now is to add latest or just list of products to the homepage.
On the CMS->Pages->Home page-> Design (which I think that doesn't work because if I delete everything from there nothing change on the frontend) has this which I think is responsible for this action:

 <block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page">
        <action method="addPriceBlockType">
            <type>bundle</type>
            <block>bundle/catalog_product_price</block>
            <template>bundle/catalog/product/price.phtml</template>
        </action>
 </block>

Then in content I've put this:

{{block type="catalog/product_new" name="home.catalog.product.list" alias="product_homepage" template="catalog/product/new.phtml"}}

And there si nothing on the page.

EDIT:
In content of home-page also is this which is working.

{{block type="customblocks/customblock" alias="root" template="customblocks/customblock.phtml"}}


texts:
In my theme package i create a custom.phtml file in theme_name/default/template/custom/custom.phtml , i want to call this file in static block i try this method :

{{block type="core/template" template="theme_name/default/template/custom/custom.phtml"}}

but nothing appears.


texts: magento is not showing cart products on some pages

texts:
Magento cart showing products on cart and main page correctly, but it is showing empty cart on categories and product pages, actually cart is not empty.

My site cache is disable. My site is dressat.se Please help me.


texts: Extension Submission Expired in magento marketplace

texts:
we are develop magento 2 extension and posted to magento market place, they are  approved Business Review.
After that we have some development with our extension, we doesn't post our code for technical review over a month. Now I check our market place account, our extension removed, I got mail from us,

Rejected from Biz Rev (Submission Expired from Approved from Business Review): This submission was Approved from Business Review over a month ago. As you did not submit code to move this product further (into Technical Review) we cannot review it any further. We have assumed it has been abandoned and thus we have rejected this product. If you wish to proceed with this product after all, please resubmit to business review.

Is there any time limit to submitting steps like business, technical?
and
Is there any way to post code directly to Technical review, because our extension Approved Business Review before?


texts: Adding "Estimated" Shipping & Handling on Checkout

texts: I am trying to add "Estimated" to the Shipping and Handling on my check out. I cannot find the location for the life of me. See screenshot. This is on the final check out and also in the cart.


texts: Solved - Adding Mass Delete Action to the Grid

texts:
I have created a custom module and need to add checkboxes to the grid and be able to delete multiple values with a mass action.
Tried to use number of different articles but nothing worked.
Can anyone help me to do this or maybe you know a good working article about this?

Here is the code in controller file:

    public function massDeleteAction() {
       $requestIds = $this->getRequest()->getParam('id');
       if(!is_array($requestIds)) {
       Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select reqeust(s)'));
       } else {
       try {
        foreach ($requestIds as $requestId) {
            $RequestData = Mage::getModel('cpstest_productcomment/cps_collection')->load($requestId);
            $RequestData->delete();
        }
        Mage::getSingleton('adminhtml/session')->addSuccess(
            Mage::helper('adminhtml')->__(
                'Total of %d record(s) were successfully deleted', count($requestIds)
            )
        );
        } catch (Exception $e) {
        Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
        }
        }
        $this->_redirect('*/*/');
        }


texts: Send email after cancel order from frontend

texts:
I am working on sending email after order has been cancelled by customer. Order status is being changed but I can not send email.

My controllers looks like this:

public function cancelAction()
{
    $order = Mage::getModel('sales/order')->load(
        $this->getRequest()->getParam('order_id')
    );

    if ($order->getId()) {
        if (Mage::helper('cancelorder/customer')->canCancel($order)) {
            try {
                $order->cancel();

                if ($status = Mage::helper('cancelorder/customer')->getCancelStatus($store)) {
                    $order->addStatusHistoryComment('', $status)
                        ->setIsCustomerNotified(1);

                }

                $order->save();
                // If sending transactionnal email is enabled in system configuration, we send the email
                if(Mage::getStoreConfigFlag('sales/cancel/send_email')) {
                    $order->sendOrderUpdateEmail();
                }

                Mage::getSingleton('catalog/session')
                    ->addSuccess($this->__('Your order has been canceled.'));
            } catch (Exception $e) {
                Mage::getSingleton('catalog/session')
                    ->addException($e, $this->__('Cannot cancel your order.'));
            }
        } else {
            Mage::getSingleton('catalog/session')
                ->addError($this->__('Cannot cancel your order.'));
        }

        $this->_redirect('sales/order/history');

        return;
    }

    $this->_forward('noRoute');
}


texts: 'X-Frame-Options' headers with conflicting values when tried to import products

texts:
I have a problem when I tried to import products with a CSV. The loading gif stay spinning and nothing happens. The page don´t show any error. I first thought that could be permissions problem, but I changed all permissions to 777 and the error persists.

Now in Chrome Console and Firebug, I see the next error:

Refused to display 'http://[site]/admin/admin/import/validate/key/bda6ac49ba7066862dd8fe30ca58ded2bffa852bd62c2e7cd43c6971dcf2bcaf/?form_key=xarU1fpOx0MQZPfT' in a frame because it set multiple 'X-Frame-Options' headers with conflicting values ('DENY, SAMEORIGIN'). Falling back to 'deny'.
POST http://[site]/admin/admin/import/validate/key/bda6ac49ba7066862dd8fe30ca58ded2bffa852bd62c2e7cd43c6971dcf2bcaf/?form_key=xarU1fpOx0MQZPfT net::ERR_BLOCKED_BY_RESPONSE

In some pages said that it could be by the x-frame-options value defined in app/etc/env.php. My current value is SAMEORIGIN:

'x-frame-options' => 'SAMEORIGIN',

What value it must be?

Thanks!

EDIT 1: ADDITIONAL INFORMATION
Reviewing the headers of the request of my site, I saw that in every page, nos only Admin, the header X-Frame-Options is duplicated with different values:

X-Frame-Options:SAMEORIGIN
X-Frame-Options:DENY

What could make this happens?


texts: I need duplicate order, I know i will need convert old order to qoute but i cant convert quote to new order.


texts: How can i display subtotal in Add To Cart button Magento 1.9

texts:
I'm using Magento 1.9 and I want to display subtotal in the cart button.
I tried with this code

<?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>

But it still displays 0.00 in the cart, even after I added a product to cart.


texts: How can I determine why the pager is not working for the category view in my template?

texts:
I have installed a templatemonster template and the pager will not display in the toolbar in the category view.  The product_list_toolbar_pager block appears to be correct in the layout/catalog.xml file:

<catalog_category_default translate="label">
    Catalog Category (Non-Anchor)
    <reference name="left">
        <block type="catalog/navigation" name="catalog.leftnav" before="-" template="catalog/navigation/left.phtml"/>
    </reference>
    <reference name="content">
        <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
            <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
                <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                    <block type="page/html_pager" name="product_list_toolbar_pager"/>

...

template/catalog/product/list/toolbar.phtml also appears to call the getPagerHtml method correctly

<?php
/**
 * Product list toolbar
 *
 * @see Mage_Catalog_Block_Product_List_Toolbar
*/
?>
<?php if($this->getCollection()->getSize()): ?>

            <?php if($this->getLastPageNum()>1): ?>
                <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
            <?php else: ?>
                <?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?>
            <?php endif; ?>

            <?php echo $this->__('Show') ?>
            <select onchange="setLocation(this.value)">
            <?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
                <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
                    <?php echo $_limit ?>
                </option>
            <?php endforeach; ?>
            </select> <?php //echo $this->__('per page') ?>

        <?php echo $this->getPagerHtml() ?>

The problem is that $this->getChild('product_list_toolbar_pager') returns false in Toolbar.php.  For some reason $this->_children[$name] in the getChild() function in Abstract.php is not set (where $name is "product_list_toolbar_pager").

public function getPagerHtml()
{
    $pagerBlock = $this->getChild('product_list_toolbar_pager');

    if ($pagerBlock instanceof Varien_Object) {

The pager works fine in the base_default and rwd_default templates.


texts: Magento 2 New Website not displaying in drop down on product page admin

texts:
I've create new website but It's not showing the option the drop down admin for any given product please see screen shoot:

Now Take a look the next screen shoot it Shows everywhere this was taken from a category.

Does any body know what's the deal here cause I am lost any help please.

Thanks.


texts: Magento 2.1 internal server error for specific category when full page cache enable

texts:
I had FPC (full page cache) enabled There is one category containing subcategories and 900+ products. It was working fine but suddenly it started pushing 500 internal server error. I have not add any new product or any major change. so now when I disable the FPC, the category start working and when I re-enable FPC, again internal server error 500.

I have already applied couple of solutions but no success. tried with removing cache at all, reindexing, crons, have check the htaccess also all things are fine, I had try with creating new category but when I assigned the same block to load on that category, again same issue started.

Log is saying that The problem is in the function getIdentities()

Can anyone help with this? thanks in advance.


texts: Magento 2 : add tier price programatically for all customer Group

texts:
How to add Tier Price programatically for all customer group

Tried below not working.

As ALL GROUP id is 32000;

$sku = "test";
$customerGroupId = 32000;
$price = 5.5;
$qty = 2;

$tierPrice = $obj->create('Magento\Catalog\Api\ProductTierPriceManagementInterface')->add($sku, $customerGroupId, $price, $qty);
echo "done";


texts: Replace filter instead of appending for same attribute in catalog layer navigation

texts:
I want to slightly modify the catalog layer navigation function. I have an attribute named "book_type" having four possible values. What I want to do is that; when user selects any value from the four then the filter is performed.

Now the user must again be able to select any value from the above four options but in a way that, the previous filter of the attribute book_type must be removed and replaced with the new filter.

Hence instead of appending , the filter should be replaced for the same attribute type.

What should I do to modify this?? Thanks in advance..


texts: Best method in Magento1 to set search URL's to be no index and no follow

texts:
Looking at Magento1 catalog internal search

Would adding the below to the search file template be the best method to stop URL's indexing in search engines?

    NOINDEX,NOFOLLOW

Any other ways to do?


texts: Call third party module block in CMS page in magento 2

texts: Is there any way to insert custom block in CMS page in Magento 2.2 alike inserting CMS block in CMS page?


texts: How to Remove/Hide unwanted address fields

texts:
I've looked everywhere for an answer to my question.
I'm pretty new to Magento.

For the shipping-address page of my site, I need to have all of the fields removed.
My plan is to have them removed and use the module I purchased to display the fields I want. And it does display everything I want so far. But the original stock checkout fields still remain.

I know you have to override the checkout with a template I believe. I have the skeleton custom module already made. So far I have a module with a Block, etc, and view directory, my composer.json and my registration.php. I also have a checkout_index_index.html file that I want to use to make my custom checkout page.
I'm just confused on how they tie together. And how I could finally get this to work after spending hours on it.

Any help would be greatly appreciated!


texts: Why is the compare functionality linked to the (log)visitor id?

texts:
The first thing I do when starting a project is ask the client if he needs user logs in his website. In technical terms Mage_Log module.  In all the cases so far I got the answer:

  No. We will use Google Analytics.

And the next question is "Do you want compare products?".
I ask these  questions because the log tables tend to become large overtime, and the website gets slow. So I want to avoid fixing speed issues.

The second question I ask is because the compare products section depends on the logs for guest customers. See this in the addAction of the product compare controller:

 if ($productId
        && (Mage::getSingleton('log/visitor')->getId() || Mage::getSingleton('customer/session')->isLoggedIn())
    )

So if the client want's compare products I cannot disable the logging.
I mean I could search for an extension or build one, but the real question is: Why is the compare functionality linked to the visitor id? Any good outcome of this?. The guest quotes function nicely by referencing the id of the quote in the session. Why not the same for compare products?


texts:
I'm getting image for Open Graph protocol with following code:

<meta property="og:image" content="<?php echo $block->escapeUrl($block->getImage($block->getProduct(), 'product_base_image')->getImageUrl()); ?>" />

But it gives me the small image with 80x80px size:

<meta property="og:image" content="https://example.com/pub/media/catalog/product/cache/image/80x80/beff4985b56e3afdbeabfc89641a4582/0/1/01.jpg">

Now I have such folder structure:

How can I get the other size from this folder or non cached images?


texts: Filter product collection which only has image

texts:
i try to filter product collection to get a product collection which only has at least one image like this:

  $collection->addAttributeToFilter('image', array("neq"=>'no_selection'));
  $collection->addAttributeToFilter('small_image', array("neq"=>'no_selection'));

but it's not working at all, it still shows the product with the placeholder image


texts: Magento 2 : How to remove and change My Account Navigation

texts:
I'm trying to remove some tabs and change the navigations title :

As you can see above navigation How to remove some navigation and change the title ? For example removing Address Book change NewsLetter Subscriptons to Subscription

I was looking for the css file nav items and found this :

<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
/** @var $block \Magento\Framework\View\Element\Html\Links */
?>
<?php /** @var $block \Magento\Customer\Block\Account\Navigation */ ?>

        <?php /* @escapeNotVerified */ echo __('My Account'); ?>

                <?php echo $block->getChildHtml();?>

From here I was looking for the \Magento\Framework\View\Element\Html\Links but kinda stuck and have no idea what to do.

I'm new to magento 2 so kinda noob here.


texts:
I customized my pdf invoice. I use graphics for header (logo and company address) and footer (company bank account information, contacts etc.). So my layout on the pdf looks something like this:

As you can hopefully see. The text is cut where the red arrow points. Only if the amount of ordered products is high enough to force the pdf to create a second page, the invoice is correct.

Where exactly does the pdf manage the creation of new pages. Is there a possibility to define the maximum page height, so that in this case, all contents that would collide with the top border of the footer graphic, would force a next page?


texts: Difference between support_report.log VS system.log

texts:
I want to know what is the difference between support_report.log and system.log

Both Logs are same in var/log


texts:
[EDIT]
This is outdated. The translation is not done anymore as described below
[/EDIT]
In Magento 1 the translatable texts needed in javascript were added in the jstranslate.xml file in the etc folder of a module and they were automatically added to the translator js object.
How can I add translatable texts to be used in javascript in Magento 2?
I found how to use text translations in Magento 2 but I don't know how to add new ones.

Here is an example on how to use them:

alert($.mage.__('Text to translate here'));


texts: How to resolve "This webpage has a redirect loop" ERR_TOO_MANY_REDIRECTS

texts:
Kindly assist with my users admin site which previously was displaying There has been an error processing your request - but now the error message when viewed is:
This webpage has a redirect loop
ERR_TOO_MANY_REDIRECTS
https://www.evoneng.com/store_manager/admin/index/index/key/05b032166f4000205779788af46612659fc16ca2312d94e56482590428dfb534/

Please note the following steps i have already taken.
i) cache/var has been cleaned
ii) the database in the cPanel, the core_config_data table, the values in
web/unsecure/base_url, and web/secure/base_url are both.
Meanwhile the front page opens.

Please assist what to do


texts: Magento 2.2.2 - Redirect user to CMS page based on IP using Observer

texts:
events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_predispatch">
        <observer name="GeoIPRedirect" instance="Namespace\Modulename\Observer\GeoIPRedirect" />
    </event>
</config>

Observer-GeoIPRedirect.php

<?php

namespace Namespace\Modulename\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\ObjectManagerInterface;
use Magento\Framework\HTTP\Client\Curl;
use Magento\Framework\UrlInterface;
use Namespace\Modulename\Helper\Data;

class GeoIPRedirect implements ObserverInterface {

    protected $objectManager;
    protected $curl;
    protected $url;
    protected $helper;

    public function __construct(ObjectManagerInterface $objectManager, Curl $curl, UrlInterface $url, Data $helper)
    {

        $this->objectManager = $objectManager;
        $this->curl = $curl;
        $this->url = $url;
        $this->helper = $helper;

    }

    public function getVisitorIP() {
        $remoteAddress = $this->objectManager->create('Magento\Framework\HTTP\PhpEnvironment\RemoteAddress');
        return $remoteAddress->getRemoteAddress();
    }

    public function execute(Observer $observer)
    {

        //fetch config
        $visitorIP = $this->getVisitorIP();
        $redirectUrl = $this->url->getUrl('cms-page');
        $serviceURI = "http://somegeoipurl";

        //set curl options
        $this->curl->addHeader("Content-Type", "application/json");
        $this->curl->get($serviceURI);

        //fetch json response and decode
        $response = json_decode($this->curl->getBody(), true);

        $stateCode = 'CA';

        if($stateCode == 'CA'){
            $observer->getControllerAction()->getResponse()->setRedirect($redirectUrl);
            exit;
        }

        return $this;
    }

}

When above code is executed, the site shows white screen and do not redirect to CMS page.

How do I redirect user to CMS page based on IP using observer i.e. when user access www.site.com redirect to www.site.com/cms-page?
How do I prevent site going into loop if redirected?


texts: addFieldToFilter not returning attribute values

texts:
I have a product attribute called remote_image_link. When I retrieve a product using this code:

$mageProduct = Mage::getModel('catalog/product')
                ->getCollection()
                ->addFieldToFilter('sku',"1234")->getFirstItem();

And then try and get the value of the attribute RemoteImageLink,

$mageProduct->getRemoteImageLink()

Nothing is returned. But when I add this code:

$mageProduct = Mage::getModel('catalog/product')->load($mageProduct->getId());

Then it works and I can get a value for the remote_image attribute.

How come I have to call load, aren't I loading using the addFieldToFileter


texts: updated stock programatically but product filter is not working

texts:
$productId = 8378;
    $totalValue = 5;

    $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);
    if ($stockItem->getId() > 0 and $stockItem->getManageStock()) {
    $stockItem->setData('manage_stock', 1);
    $stockItem->setData('qty', 11);
    $stockItem->setData('is_in_stock', 1);
    $stockItem->setData('use_config_manage_stock', 1);
    $stockItem->setData('min_sale_qty', 2);
    $stockItem->setData('min_qty', 1);
    $stockItem->setData('min_sale_qty', 1);

    $stockItem->setData('use_config_min_sale_qty', 1);
    $stockItem->setData('max_sale_qty', 10);
    $stockItem->setData('use_config_max_sale_qty',1);
    $stockItem->setData('is_qty_decimal', 1);
    $stockItem->setData('backorders', 1);
    $stockItem->setData('use_config_backorders', 1);
    $stockItem->setData('notify_stock_qty', 10);
    $stockItem->setData('use_config_notify_stock_qty', 1);
    $stockItem->save();
    }

updated out of stock product to in stock but Amshopby filters left is not working for that product. what is the problem behind it. please help me.


texts: Check if a payment method is online or offline

texts:
Is there a way to check from the payment model instance (or anywhere else) if a payment method is offline or online?
Is there such a flag, or method?
I'm not talking about a specific method, I'm talking about all of them.


texts: How to use catalog price rules to increase products prices instead of applying a discount

texts:
I want to change prices of products based on the category and the customer group the client belongs.

So to do so I thought using the catalog price rules and instead of set 20% to decrease the price, put 120% to increase it. But it doesn't work.

So if a product costs 100€, to the group A would cost 120€

Any ideas about how to make it work?


texts: Customers ordering both S and M: howto detect and counter ;)

texts:
we have a shop that sells T-shirts

Sometimes we have customers that buy both a S(mall) and M(edium)

captured in an attribute on simple product: shirt_size, that is aggregated in a configurable product

Almost 99% are customers that decide to buy bought, and decide later ....

This leads to many unnecessary RMA's

We would rather warn these customers during checkout, or in cart to call us

My question: How could I capture that two products of the same attribute set were ordered with different simple product identifiers (shirts_size) and if this is true - show a certain cms block in checkout (stating something like "hey, it seems you bought two different sizes. Can we help you choose the rigth size? Call us on 555-HELPME"

(I hope this is clear)


texts: How to save/download an image from my custom phtml page in magento 1.9?

texts:
<?php foreach($image_array as $arr){
$image = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA)."appimages/".trim($arr['newFileName']);
?>

    <img src="<?php echo  $image ?>"/>

        <a href="<?php echo  $image ?>" download>
            <button class="download_img"><img style="display:none;" src="<?php echo  $image ?>"/>Download</button>

   <?php }?>

Used above code, but its not working on safari & IE


texts: Can anyone please explain how the all magento command work in magento2(I want to undesrstand backend process)?

texts:
Can anyone please explain how the all magento command work in magento2(I want to understand backend process)

Like:

IF I am running command
php bin/magento module:status
which file will affect and how it display?

I want to know about all the commands which we mostly use by command line.


texts:
in magento2 , How to remove last name ,Only first name is retained.

I see magento1.x have such a plugins.


texts: How to show unselected language switcher

texts:
Please, I need your help to solve this. If we have 2 view English and french.

So if visitor open example.com/en will show in header English language as text so what i need is if visitor open example.com/en will show french as text.

<?php if(count($this->getStores())>1): ?>
<div class="form-language top-select">
    <select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="window.location.href=this.value" style="width:auto;">
    <?php foreach ($this->getStores() as $_lang): ?>
        <?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?>
        <option value="<?php echo $_lang->getCurrentUrl() ?>" <?php if($lang_flag): ?> data-image="<?php echo $this->getSkinUrl('images/flags/'.$_lang->getCode().'.png'); ?>" <?php endif; ?> <?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
    <?php endforeach; ?>
    </select>
    <script type="text/javascript">
        (function($){
            $("#select-language").selectbox();
        })(jQuery);
    </script>
</div>
<?php endif; ?>


texts: How to check that customer is logged in on frontend in Magento 2.1?

texts:
How to check that customer is logged in?
In authentication-popup.js I found following code:

define([..., 'Magento_Customer/js/customer-data',...],
    function(..., customerData, ...) {
        return Component.extend({
            ...
            /** Is login form enabled for current customer */
            isActive: function () {
                var customer = customerData.get('customer');
                return customer() == false;
            },
        });
    }
);

I copied it to my module, but it seems like isn't works, it still returns false after login.

Any ideas?

Env:
- Magento 2.1.1
- Magento/blank theme


texts: Magento 2: Custom Setup Wizard to be Implemented in Custom Module

texts:
I would like to implement setup the custom steps Wizard in Magento custom module on the Magento admin.

Reference: https://devdocs.magento.com/guides/v2.3/pattern-library/navigation/wizard/wizard.html#1-basic-process-ie-deploy-tool

Wizard should have 4-5 steps. i.e. Step-1 ...Step-5

Does anyone have any ideas which module should I take as a reference in terms of UI and some HTML UI code?

Any related modules available at least JS component?


texts:
We are on migration process, and need to migrate 5000 URL rewrite rules.

Could I do it via SQL? How?

Someone have a suggestion?


texts:
Magento just sent out an email about a new security patch (SUPEE-11219).

https://magento.com/security/patches/supee-11219

Affected versions:

Magento Commerce 1.9.0.0-1.14.4.1
Magento Open Source 1.5.0.0-1.9.4.1

There are 3 remote code execution vulnerabilities for authenticated users.

Problems

The first problem I found is that the patch is not available for CE < 1.9.3.0. Usually they provide patches for all the affected versions. I will get in touch with Magento about that and update this post.


texts: Magento 2 : How to Add Image to Payment Method in Checkout

texts:
I want add images to payment method list on checkout like :

I want add image before these payment methods

Płatność przelewem bankowym
Płatność przy odbiorze

Can anyone help me how I can do it?


texts: Can I Active Two Merchant Accounts With Diffrent Email Address Integration For Paypal

texts:
I would like to active two payapl account in 1 Store like That
1:Payments Pro
2:Payments Standard
Magento Version 1.9.2.4


texts: Running ./bin/magento support:backup:db give me an error

texts:
I'm try to run Magento Command

./bin/magento support:backup:code
./bin/magento support:backup:db

But I keep getting this error

Error: Utility mysqldump not found

the MySql Server is in deferent than Magento 2 server

I try to install mysqldump but I get this error

E: Unable to locate package mysqldump

is there any way to run this command in magento 2 web servers and mysql database in another server.


texts: Magento 2: I just need to add custom product in cart with custom price using observer

texts:
I have used this event for add product with a custom price: checkout_cart_product_add_after

its working fine for cart page. but when I redirect to checkout page then my custom product price has replaced with the original price which is already set in admin.

is there any way to save this custom price for place order whole process?

i used below code for add product with custom price :

            $params = array(
                'product' => $productIds,
                'qty' => 1
            );
            $_product = $this->_productRepository->getById($productIds);
            //echo "<pre/>"; print_r($_product->getData()); exit;
            $_product->setPrice(0);
            $this->_cart->addProduct($_product,$params);
            $this->_cart->save();

is there any event to save this custom price for end of order?
and which one code I used for that?


texts: How does a Customer model object know about the loadByEmail method of the model resource?

texts:
Consider the following code

$customer_email = "customer@example.com";
$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($customer_email);

When looking through Mage_Customer_Model_Customer I could not find a loadByEmail method anywhere in it's inheritance chain. Then I looked at it's resource model, Mage_Customer_Model_Resource_Customer, and there it was.

My question is: how is it possible, that I load the model itself and get access to this method through the $customer_email variable?


texts: GetProductUrl does show Url but it's not a link

texts:
I have made adbanners for my website and the title of the product does have a fine working link by using the following code: <a href="<?php echo $_product->getProductUrl() ?>" title="wefewf">

But using the same code for the image and buy here doesn't work. In element inspect you can actually see the link in the html but it's just plain text. Any Ideas?

EDIT: I found the problem, well not really but I've found a problem. It works if I put it somewhere outside my ad banner. So It might be css but I can't seem to find the issue here. This is the css for the image applied:

.products-grid .product-image {
    display: block;
    float: left;
    height: auto;
    max-width: 270px;
    overflow: hidden;
    position: relative;
    text-align: left;
    margin-left: 10px;
}

But then again, the css for both the working and not working is the same.


texts:
I am new to Magento and I do not yet master the PHP language. (Magento ver. 1.9.4.2 I have a problem with the automatic generation of duplicate urls. I searched several forums but none of the solutions worked.
Modified robots.txt file
I emptied the table of the magento database: core_url_rewrite
...
Note that the site contains a lot of products and is translated into several languages and for each language there are products that differ from other languages. for example: products in www.example.fr may contain products that do not exist in www.example.it and vice versa.
I discovered by chance that there are urls which are automatically generated and are duplicated for example:
example1: https://www.example.fr/NomduProduit.html?utm_source=actu-biemh this duplicate link was generated automatically and he added the? utm_source = actu-biemh at the end.
example2: https://www.example.com/ProductName.html#horizontalTab2 this duplicate link was generated automatically and it added the # horizontalTab2 at the end.
example3: https://www.example.fr/catalog/product/view/id/50157/s/ProductName/ - Catalog catalog / product / view / id / 50157 / s / has been added.
I accidentally discovered about fifteen replicated and generated sites, I would like to know where I can consult these replicated URLS? Is there a specific bdd table or specific file for that?
How do I get rid of these random replications?
PS: for each language the site contains a robots.txt, here is the robots.txt from www.example.es:
Sitemap: https://www.example.es/examplees/sitemap.xml
User-agent: *
Disallow: / *? Aff =
Disallow: / catalogsearch /
Disallow: / *? Dir =
Disallow: / *? Example_rec_
Disallow: / *? Fa =
Do not hesitate to ask me for other information if it will help you better understand my problem in order to find a solution. thank you in advance


texts: Why am I getting a Migration Exception Error?

texts:
I am trying to use the data migration tool to move from 1.9.3.2 to 2.1.6. When I run this command

php magento migrate:settings /files/magento2/project-community-edition/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.3.2/config.xml

I get a

Migration\Exception
Invalid config filesname: /files/magento2/project-community-edition/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.3.2/config.xml

The filepath to that file straight from Filezilla is

/files/magento2/project-community-edition/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.3.2/config.xml

I can see config.xml in that location, I just can't figure it out. Any suggestions?


texts: Product attribute description on the product page

texts:
Is there a built-in way for Magento 2 to show product attribute description on the product page?

I mean something like this site:


texts: Magento 2 PHPSTORM Xdebug Configuration setup

texts: How to setup and use Xdebug in Magento 2 which is very necessary tool for Magento 2.


texts: Applying discount brings grand total to negative 1 cent

texts:
We are seeing a problem where a user has placed an order that totals correctly, but when a discount is applied using a rule that can have a discount more than the total, the grand total goes to (-$0.01)

This order does have tax applied to it and flat rate shipping.  Here are the order details:
item 1: qty 4, price 12.87
item 2: qty 1, price 6.92
item 3: qty 1, price 7.51

Tax is 5.5% and shipping is flat 7.00

When the order is totaled and we view the cart, the numbers are correct, tax and all the grand total is 76.92.

When we apply a discount of 76.92 or less the total is correct based off of what we apply.  We are using a discount that corresponds to the user's giftcard balance, so the discount can be more than the total, and in this case it is.  Any discount OVER 76.92 causes the discount amount to be 76.93 and after the discount the grand total becomes (-$0.01) and Magento asks for a payment type.

We've tried this scenario on a clean 1.6.2.0 install and a 1.8.0.0 install and it appears in all environments.  We've tried changing the rounding action in code/core/Mage/Sales/Model/Quote/Item/Abstract.php to no avail.

Does anyone have any idea where we could look from here?

EDIT:
The problem appears to be that Magento calculates tax for discount purposes on an item by item (and child by child) basis regardless of how you have tax calculations configured.

I am implementing a temporary workaround.  I copied the Store.php file from app/code/core/Mage/Core/Model to app/code/local/Mage/Core/Model and edited the function

public function roundPrice($price)
{
    return round($price, 2);
}

to be

public function roundPrice($price)
{
    return round($price, 5);
}

And I will have to search for every function that calls this roundPrice() function to make sure things are re-rounded before being inserted into the database.  The cart and admin pages already round to 2 decimals, but the database will have unaccounted-for fractions of pennies otherwise.  Still waiting on a better fix.

More info:
Without changing or adding files, I decided to try a different configuration setting.  I changed the “Tax Calculation Method Based On” and had the following results: (original setting was “Total")

With the original cart, (item 1 = 6.92 * 1, item 2 = 7.51* 1, item 3 = 12.87 * 4, Tax = 5.5%, shipping = 7.00, taxable)

Tax Calculation method based on = “Row Total”
Discount Amount matches previous total (76.92) making the grand total correct

Tax Calculation method based on = “Unit Price”
Discount and Total are now 76.93, one cent too much because an extra cent of Tax is being calculated both times

Split children to individual products by creating 3 new products at 12.87, instead of the last item being 12.87 * 4, now it is 12.87, item 4 is 12.87, item 5 is 12.87 and item 6 is 12.87, all one each

Tax Calculation method based on = “Row Total”
Discount amount is 76.92, but the total was 76.93, so now the Grand Total after Discount is $0.01 even though the discount is configured to be way more than 76.93

Tax Calculation method based on = “Unit Price”
Discount and Total are now 76.93, one cent too much because an extra cent of Tax is being calculated both times

Tax Calculation method based on = “Total”
Same as original problem, final Grand total is (-$0.01) because the discount is 1 cent more than it should be

I then made my copy of the Store.php file in local and tested, all above scenarios are working fine, no extra pennies in the discount or the Grand total or tax.


texts: How to get tracking number and its title(FEDEX) for each item in Magento 2

texts:
I need to get a tracking number which resides in sales_shipment_track for each item in an order.
Right now I am iterating all items of an order.

foreach ($_order->getAllItems() as $item) {
  echo $item->getTrackNumber();
}

This didnt work.
How to get a tracking number and its title i.e, FEDEX
so that I can know which carrier is that tracking number.


texts: Magento 1.9 - What is wrong in my Event Observer?

texts:
I just want to display my event name :

  app\etc\modules\Gta_RestrictProductByCountry.xml

<?xml version="1.0"?>

<config>

    <modules>

        <Gta_RestrictProductByCountry>

            <codePool>local</codePool>
            <active>true</active>

        </Gta_RestrictProductByCountry>

    </modules>

</config>

  app\code\local\Gta\RestrictProductByCountry\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Gta_RestrictProductByCountry>
            <version>1.0.0</version>
        </Gta_RestrictProductByCountry>
    </modules>
    <global>
        <models>
            <gta_restrictproductbycountry>
                <class>Gta_RestrictProductByCountry_Model</class>
            </gta_restrictproductbycountry>
        </models>
     </global>
    <frontend>
        <events>
            <!-- <sales_order_place_before> -->
            <checkout_cart_product_add_after>
                <observers>
                    <gta_restrictproductbycountry_observer>
                        <type>singleton</type>
                        <class>gta_restrictproductbycountry/observer</class>
                        <method>cartevent</method>
                    </gta_restrictproductbycountry_observer>
                </observers>
            <!-- </sales_order_place_before>       -->
            </checkout_cart_product_add_after>
        </events>
    </frontend>

</config>

  app\code\local\Gta\RestrictProductByCountry\Model\Observer.php

<?php
class Gta_RestrictProductByCountry_Model_Observer
{
    public function cartevent($Observer)
    {

        $cart_product_check = $Observer->getEvent();
        Mage::log($cart_product_check->getName(), null, 'orderproduct.log',true);
    }
}


texts: What is the role of visibility filter in colections Magento 2?

texts: I am getting Order Items, from order collection by Order ID but as from the attached screen shot (Order 15) I am getting one product data two times. Can any body explain the reason and what will be its solution as I need it once.


texts: Magento2 adding bundle product to existing quote not working

texts:
I want to add bundle product with its required options in existing quote in admin,i have added following code to add products to existing quote, its working fine for simple product but bundle products not adding to cart unfortunately, can anyone help me how to achieve this? here is my code:

$qty = 1;
$quote = $this->quoteFactory->create()->load($quote->getId());
$product = $this->productRepository->getById($product->getId());
$quote->addProduct($product, $qty);
$quote->save();


texts: Conditionally Add Body Class Within Module Block?

texts:
I'm currently adding a body class in my module's default.xml but I can't (to my knowledge) conditionally add it within the XML file based on the module's configuration values. See this question -
 Conditionally add CSS class to body tag where they show that attributes don't support ifconfig.

/view/frontend/layout/default.xml

<body>
    <attribute name="class" value="mageziner-loading" />
</body>

However, I do NOT want this body css class to be added if the module is disabled such as ifconfig="design/mageziner/enable_frontend" AND when a config value is not equal to a specific value.

I'm currently conditionally loading a template by checking for specific config values within the block class:

default.xml

<referenceContainer name="before.body.end">
    <block class="Gil\Mageziner\Block\Mageziner" name="gil_mageziner_sidebar"  template="Gil_Mageziner::sidebar.phtml"/>
</referenceContainer>

module's block:

protected function _toHtml()
{
    if ($this->getConfig('design/mageziner/enable_frontend') && $this->withinSelectedGroup()) {
        return parent::_toHtml();
    }

    return '';
}

withinSelectedGroup() inside module's block

 /**
 *
 * Does the current user match the whitelisted groups? (Logged out users have a group ID of 0)
 *
 * @return bool
 */
protected function withinSelectedGroup() {
    $customerGroupId = $this->_customerSession->getCustomerGroupId();
    $whitelistedGroupIds = explode(",", $this->getConfig('design/mageziner/customer_group')); // string is returned with multiple group IDs seperated by a ','

    if (in_array($customerGroupId, $whitelistedGroupIds)) {
        return true;
    }

    return false;
}

of key interested is, $this->withinSelectedGroup() which if it returns false does not render the sidebar.phtml template. How would I add a body class if that value is returned as true?

Also, would it be possible to also conditionally load CSS/JS based on that value? Currently I always load the asset files which is NOT ideal.

Thanks for any help/insight. I've been looking around and can't find any solutions for Magento 2.


texts: Replace minicart (Top-Right) Product Images with own

texts:
I want replace Product images of the minicart (Top-Right) with own.
I have written jQuery to call a service and replace the original images with my own corresponding to the ID.

Is there any other way available and I'm hard coding the minicart file How can I override the minicart images without touching the minicart file (used Vadmin/blanco). Theme independent solution is better.


texts:
The upload image function recently broke on my backend after compiling. I'm running 2.2.7, but it has been an issue for over a year now. I've just haven't compiled until recently I was forced to. Any idea where I start troubleshooting?

I can select my file to upload, but it just returns to browse icon without any file uploaded.


texts:
Magento2.3.2 Soap API issue

Code:-

error_reporting(E_ALL);

ini_set('display_errors', 1);

require('vendor/zendframework/zend-server/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client/Common.php');

$wsdlurl = 'https://domain.com/soap/default?wsdl&services=salesOrderRepositoryV1';
$token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX';//access token

$opts = [
    'http' =>
     [
         'header' => "Authorization: Bearer ".$token
        ],
'ssl' => [
    'allow_self_signed' => true ,
    'verify_peer' => false,
    'verify_peer_name' => false]
];
$context = stream_context_create($opts);

//$context = stream_context_create($opts); //$arguments =
$serviceArgs =
array('searchCriteria'=>
    array('filterGroups' =>
        array ('filters' =>
            array('field' =>'increment_id',
                  'value' => '000000032' ,
                  'condition_type' => 'eq')
            )
     ) );
 $soapClient = new \Zend\Soap\Client($wsdlurl);
 $soapClient->setSoapVersion(SOAP_1_2);
 $soapClient->setStreamContext($context);
 $result = $soapClient->salesOrderRepositoryV1GetList($serviceArgs);
 echo "<pre>"; print_r($result);

Error:-

  Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
  WSDL: Couldn't load from
  'https://domain.com/soap/default?wsdl&services=salesOrderRepositoryV1'
  : failed to load external entity
  "https://domain.com/soap/default?wsdl&services=salesOrderRepositoryV1"
  in vendor/zendframework/zend-soap/src/Client/Common.php:33 Stack
  trace: #0 vendor/zendframework/zend-soap/src/Client/Common.php(33):
  SoapClient->SoapClient('http://domain.com....', Array) #1
  vendor/zendframework/zend-soap/src/Client.php(1070):
  Zend\Soap\Client\Common->__construct(Array, 'https://domain.com....',
  Array) #2 vendor/zendframework/zend-soap/src/Client.php(1245):
  Zend\Soap\Client->initSoapClientObject() #3
  /vendor/zendframework/zend-soap/src/Client.php(1156):
  Zend\Soap\Client->getSoapClient()
  Zend\Soap\Client->__call('salesOrderRepos...', Array) #5 {main} thrown
  in vendor/zendframework/zend-soap/src/Client/Common.php on line 33


texts: Custom discount to customer in admin order create by percentage without coupon code?

texts:
Task:  I need to give option in back-end admin order create page to sale executive so they can provide % discount(text box)  to user when create order for them..

what I ask in this question but this is little bit different what I tried..
How to add custom extra discount(%) to order or override default coupon code when placed from back end only?


texts: How to extend creditmemo save action in magento 2

texts:
I need to extend creditmemo save action:

Update post data before action method call
Update database after creditmemo save.

Which method is better Plugin or preference and if Plugin then how can I update post object?


texts: i am selling events with magento. is it possible to add every product only one time to the shopping basket? When it is already added to the basket, then you can´t add it another time?


texts: How to increase the logo image quality for pdf invoices in Magento 1.9

texts:
I would like to increase the quality of the logo in the PDF invoices. At the moment I upload a logo exactly 200x50 px in size and with JPG quality 99 and it still looks terrible. I also tried PNG24 without any better results. If I upload a larger logo, it is embedded larger but the quality is still shit.

Could anyone point me in the right direction? I'm familiar with PHP and coding, if that is what it takes.

Thanks!


texts: Customising the Magento 2 main navigation (topmenu) javaScript

texts:
I've spent a fair while digging into the theme module and blank templates trying to make changes to the main Magento2 navigation. So far I've made a custom module to control the content rendered into the page (Adding links to subnav) but I can't work out where the navigation menu javaScript is.

I can see a navigation.menu.js file in the blank template and a menu.js in the theme module but neither of these seem to be for the main menu and I can't find any other places to look for the JS.

Because the block is generated by XML and the navigation seems to run on jQuery UI I don't have much I can use to search for. Up until now I've mainly been modifying a custom template thats built on the base template by searching the vendor directory but I'm coming up blank.

I'm running Magento 2.1 with a custom template built off the base template, If anyone could point me in the right direction it would be as great help.

Edit1:

So after more googling and testing I finally found a second menu.js file in lib/web/mage which seems to be the right place, however now I"m unable to override it.

With my new information i actually stumbled across the Magento2 dev docs which has an example on overriding the menu and admin menus. So I added the following to my module

Namespace/Module/view/frontend/require-config.js

var config = {
    map: {
        '*': {
            'menu': 'Test_Topmenu/js/navigation-menu'
        }
    }
};

Namespace/Module/view/frontend/web/js/navigation-menu.js

define([
    'jquery',
    'jquery/ui',
    'mage/menu'
], function ($) {
    "use strict";
    $.widget('Test_Topmenu.navigationMenu', $.mage.menu, {
        _init: function () {
            console.log('new init');
        }
    });
    return $.Test_Topmenu.navigationMenu;
});

Now looking in the vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml file I can see that they have used a data-mage-init of the menu widget. As I understand it this should use the modified version of the file, however it doesn't seem to be working. I added a console log to the default init and have tried numerous connotations of cases and namespaces to make sure I wasn't setting these up wrong (I've seen a lot of examples but people tend to just use  or not in other places), but I'm unable to get the new init to be called.

I have also been emptying the pub/static/frontend directory and redeploying after every change as well to make sure only the correct versions could be getting called.


texts: How to change Flat Rate into price range?


texts: Magento2 How to reduce Reduce server response times (TTFB) & Eliminate render-blocking resources

texts:
How to reduce Reduce server response times (TTFB) & Eliminate render-blocking resources?

Can anyone guide me on these points?


texts: Add a CMS page to menu without creating module

texts:
I am quite new to Magento 2.0 and I feel a bit disappointed how it is hard to add simple page to top menu which should be one of the basics of CMS.

  My page Title and URL key are 'collection'

I tried some solutions as adding this to my default.xml but didn't work.

<referenceContainer name="top.links">
           <block class="Magento\Framework\View\Element\Html\Link\Current" name="collection">
                <arguments>
                    <argument name="label" xsi:type="string">collection</argument>
                    <argument name="path" xsi:type="string">collection</argument>
                </arguments>
          </block>
       </referenceContainer>

Am I missing something ? I don't want to make a module because its a bit advanced to me.
Any help please


texts:
Im want to import my products from a .txt file.
So far no problem. The only issue i have is that i cant link my product with an image ( i have already imported in media/import )

        $data = array(
        array(
            'sku' => $artikel_nr,
            '_product_websites' => array('web1','web2'),
            '_attribute_set' => convertCategorie($category)[2], // siehe auch in Kategorie tabelle
            '_type' => 'simple',
            'ean' =>  $ean_nr,
            'price' => $preis,
            'name' => $prodkttitel." ".$farbe,
            'description' => 'default',
            'short_description' => $prodkttitel,
            'long_description' => $short_description,
            ...
            '_media_image' => $artikel_nr.".jpg",
            '_media_is_disabled' => 1,
            'image' => $artikel_nr.".jpg",
            '_media_lable' => $artikel_nr.' image',
            '_media_position' => 1,
            '_media_attribute_id' => Mage::getSingleton('catalog/product')->getResource()->getAttribute('media_gallery')->getAttributeId(),
            'small_image' => $artikel_nr.".jpg",
            'thumbnail' => $artikel_nr.".jpg",

        )

    );

my images are named after the sku and i already have them in the media/import.
the import is not throwing any exceptions but i cant see any pictures loaded into the produkt.

    $import = Mage::getModel('fastsimpleimport/import');
try {

    $import = Mage::getModel('fastsimpleimport/import');
    $import
    ->setUseNestedArrays(true)
    ->processProductImport($data);
} catch (Exception $e) {
    print_r($import->getErrorMessages());
}


texts:
I'm optimizing the Magento store we have and would like to hear your opinion on the subject.

I have installed mod-pagespeed and now I want to add some aditional cache. I've found a lot of information on the subject and a bit confused witch one is better: APC or mem_cache or both?

Also what are the optimal settings, to minimize server response time.

We use VPN with Max of 4GB(2GB guaranteed) Ram.

Thanks, guys,


texts:
I need to add the ability to back order specific products on my Magento 1.6.2 website.
Inventory is controlled by magento, so when a product sells, the quantity in stock is reduced accordingly. When stock reaches zero, it is marked as out of stock.

I have the back order settings as follows:

System > Config > Inventory > Backorders = Not allowed (the correct general rule for the entire site).

Catalog > Edit Product > Inventory > Backorders = Allow below 0 and notify.

I have written code to display the relevant add to cart/backorder/notify me button - and this is working fine:

<?php if((int)$inventory->getQty()>0 && $_product->isSaleable()): ?>

                    <a class="form-button" style="text-decoration:none" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add To Cart');?>

                <?php elseif($inventory->getBackorders()>0): ?>

                    <a class="backorder form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Back Order');?>

                <?php else: ?>
                    <?php
                    $alertUrl = $this->getUrl().'/productalert/add/stock/product_id/'.$_product->getId().$pageUrl;
                    ?>
                    <a href="<?php echo $alertUrl;?>" class="notify"><?php echo $this->__('Notify Me');?>

                <?php endif; ?>

On my development website (a direct replica of my live website) this all works great and the back ordered item is added to the cart, and the notification text appears on the cart page as expected.

When I push the code live, the buttons appear correctly as expected, but I cannot add the back ordered item to my cart. Instead I get the message "This product is currently out of stock."

I do not understand why the two websites are behaving differently for the same test on the same product? The website settings are the same, except for no caching on the dev site.
I have reindexed and recached the live site, but this same error message keeps appearing.

Can anyone shed some light on this please?

Cheers!


texts: Magento 2.1 : CLI install command failed

texts:
Trying to reinstall Magento in cli.

Run this command

php -d memory_limit=-1 bin/magento setup:install \
--base-url=http://local/ \
--db-host=localhost --db-name=magento \
--db-user=root --db-password=root \
--admin-firstname=Admin --admin-lastname=Adminovich --admin-email=admin@example.com \
--admin-user=admin --admin-password=qwerty --language=de_DE \
--currency=EUR --timezone=Europe/Kiev \
--cleanup-database

And got

[Zend_Db_Statement_Exception]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.store_website' doesn't exist, query was: SELECT `main_table`.* FROM `store_website` AS `main_table` ORDER BY main_table.sort_order ASC, main_table.name ASC

[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.store_website' doesn't exist

Need some help, thanks for response


texts: Add column to gridview in custom extension

texts:
I have a custom extension where the admin user needs to select a customer from the drop down. The extension saves the customer ID to the database.

Currently, on the grid view, in my UI component I have the following:

 <column name="customer_id">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">textRange</item>
            <item name="sorting" xsi:type="string">asc</item>
            <item name="label" xsi:type="string" translate="true">Customer ID</item>
        </item>
    </argument>
</column>

This displays the customer id as expected.

However, my question is how do actually display the customer name instead of just the ID in the grid view?


texts: I just finished a clean installation of Magento 2.2.4. When I try to add a product, it throws an error saying 'Class Dotdigitalgroup\Email\Model\ResourceModel\Catalog\CollectionFactory does not exist' Please help how do I solve this issue?


texts: How to create custom table programmatically(using code) without using installschema.php magento 2?

texts: Actually I have created a custom grid in back-end for creating custom table there I am providing some fields like- table name, Assigned to Module Name, Number of Input text boxes. Now I want to generate table using Generate button.


texts: Different delivery prices for different currencies

texts: I have two currencies. The base currency is GBP, the other one is EUR. The client wants fixed shipping rates - 5 for GBP and 6 for EUR. I've set the one for the base currency but how can I set the rate for EUR to be 6 EUR instead of 5*(current_gbp_to_eur_conversion_rate)?


texts: Installation Error - Redirect loop(Magento 1.9.0.1)

texts:
I had parked http: //example.com/ domain to a sub folder in my server lets say it "/magentofolder"
I want to install magento inside /magentofolder. so far I did,

1)Unzipped magento installation file.

2)Moved all magento files to the root directory, in this case the root directory for the domain
http: //example.com is /magentofolder

when I open http: //example.com it enters into a redirect loop(302) between

http: //example.com/index.php/install and http: //example.com/magentofolder/index.php/install

unable to continue the installation, any help regarding this issue will be appreciated.


texts: How to print or debug array or object in Magento 2?

texts:
I am working on Magento 2.

if ($this->getRequest()->isAjax()) {
    $layout =  $this->_layout;
}

How can I print or debug value of $layout in above code ??


texts: magento 1.9.3 Launguage switcher stuck in specific language

texts: I have a Magento store v1.9.3.8 and the store has 2 store views: Arabic and English, the Arabic is the default one and when I switch the language to English it works fine, but when I click on any other page it returns to Arabic. How to fix this?


texts: Magento 2 - Plugin issue in catalogsearch

texts:
I've created a plugin to override getProductPrice() method of Magento\Catalog\Block\Product\ListProduct class.
This is my app/code/vendorName/moduleName/etc/di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Block\Product\ListProduct">
        <plugin name="vendorName_moduleName_Plugin" type="vendorName\moduleName\Plugin\MyPlugin" />
    </type>
</config>

and this plugin class (app/code/vendorName/moduleName/Plugin/MyPlugin.php):

<?php

namespace vendorName\moduleName\Plugin;

class MyPlugin
{
    public function afterGetProductPrice(\Magento\Catalog\Block\Product\ListProduct $product, $result)
    {
        return $result.'<input type="hidden" class="my-class" />';
    }
}

It works fine when a category page is called but it doesn't override methods when I try to search a product.

Why?


texts: How to change color of header link in Magento 1.9

texts: How to change the color and font size? Thank you


texts: Shipping fields not showing up after upgrade to Magento 2.2.3

texts:
Upgrade from Magento 2.1.6 -> 2.2.3 and PHP 5.6 to 7.0.20

After the upgrade seems like most things are working find except the /checkout/ page which is having trouble loading the shipping field forms:

Expected:

Actual:

Not sure what exactly is causing this, getting this JS error which seems important:

Uncaught ReferenceError: Unable to process binding "if: function (){return isFormInline }"
Message: Unable to process binding "template: function (){return shippingFormTemplate }"
Message: shippingFormTemplate is not defined
    at template (eval at createBindingsStringEvaluator (knockout.js:2624), <anonymous>:3:61)
    at init (knockout.js:5023)
    at knockout.js:2989
    at Object.ignore (knockout.js:1249)
    at knockout.js:2988
    at Object.arrayForEach (knockout.js:151)
    at applyBindingsToNodeInternal (knockout.js:2974)
    at applyBindingsToNodeAndDescendantsInternal (knockout.js:2854)
    at applyBindingsToDescendantsInternal (knockout.js:2836)
    at Object.ko.applyBindingsToDescendants (knockout.js:3052)

The standard Magento module for checkout is used on this page and it's not overwritten by the theme or anything else as far as I know and the JSON data coming from the server seems to be OK.


texts: Is it possible to update or delete the order items from the order with out creating the new order?

texts:
In my case, an order should be modified after the review.
Order items can be removed or quantity will be modified from the order.

I knew the Re order would the do the purpose by manually deleting the old order once re order is completed. But I do not want to change the order id.


texts:
Can anyone tell me how does re indexing work in Magento 2.

Right now there are two options - Update on save and Update by schedule.

But like in Magento 1 there is no option for manual re index.

It is not updating upon save. Cannot choose update by schedule option because i'm running my magento 2 in localhost which doesn't support cron.

Any help would be greatly appreciated.


texts: Get last added product in minicart magento2

texts: After product is added to cart, I want to open minicart and mark it with some styles. I found http://magento.stackexchange.com/questions/141507/magento-2-open-minicart-when-item-is-added how to open it. But dont know how to get last added.


texts:
I have an observer after placed an order, and in that observer, I need to get the customer address id that customer used for shipment and load the customer Address Model that can save and update data. Is there a way to do this:

events.xml

<event name="checkout_onepage_controller_success_action">
    <observer name="namespace_module_sales_order_save_after" instance="Namespace\Module\Observer\AfterOrder"  />
    </event>

Observer/AfterOrder.php

use \Psr\Log\LoggerInterface;
class AfterOrder implements ObserverInterface
{
    protected $_checkoutSession;
    protected $_customerRepositoryInterface;
    protected $_addressInterface;

  public function __construct(
    LoggerInterface $loggerInterface,
    \Magento\Framework\Registry $registry,
    \Magento\Sales\Model\OrderFactory $orderFactory,
  \Magento\Quote\Model\QuoteFactory $quoteFactory
    )
  {
      $this->_logger = $loggerInterface;
            $this->orderFactory = $orderFactory;
            $this->registry = $registry;
      $this->quoteFactory = $quoteFactory;
  }

  public function execute(\Magento\Framework\Event\Observer $observer)
  {
    $orderId = $observer->getEvent()->getOrderIds();
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId[0]);
    $quote = $this->quoteFactory->create()->load($order->getQuoteId());
    echo $order->getQuoteId(); exit;
  }
}


texts: How to translate or change the title off a bundle item

texts:
I am setting up a new store view and i would like to share the products between both store views. The products i am using are for 95% the same for both store views. One of the things i need to change is the title off  the bundle item. Is this possible? I can not fiend any function that does this.

Switching between store views does not work because it translates the title for every store view.

edit answer: Wow, how did i miss that, 1cm below is the store view title.


texts: Uploading an extension on Magento Marketplace

texts: What do I need to know to upload a theme or extension on the Magento Marketplace?


texts:
I want to update minicart count. I was found some code regarding mini cart on sections.xml but it works with products not for item count on toplink with cart item.

Now you can see below code what I'm getting regarding the mini cart.

   <?xml version="1.0"?>
   <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
      <action name="modulename/controler/addProduct">
          <section name="cart"/>
      </action>
   </config>

Can you please suggest how can I implement update cart item qty on toplink?


texts: Can't access admin after update Magento 2.3.1

texts:
I recently updated my Magento 2.3.0 to 2.3.1, and my site works, but I when I try to go to my admin url I get a 504 error. I have tried clearing my cache, and I tried following advice to clear the values of the cookie paths in my database:

The last error I have in my error log is :AH01630: client denied by server configuration. My config.php looks right, but I'm not sure.

'Magento_Cookie' => 1,

I didn't get any errors when I updated. It still doesn't work. What should my next steps be?

EDIT:
After being able to log in I was having a hard time getting to pages, because all the caches were disabled, so make sure to enable them.


texts: How to setup integration between Microsoft office 365 dynamic and Magento2?

texts:
Microsoft office 365 dynamic to magento2 integration by any plugin or other way to possible or not

Can anyone suggest me the way?

Thanks in advance..!


texts:
Our home page is constant, there is no changes in time.

I've generated exact .html copy of home page and it's served much faster.

How can i make magento use my home1.html page as home page?


texts: how to set label like Sale and new on product media in magento 2?

texts:
I have custom design create in magneto front-end and i have set product label for
product image place .

I have no idea how to set label on product image so help and understand this code .


texts: how to remove white space from product name during custom product collection?

texts:
I am getting stuck with white space in set order during product collection in magento 2.

I want to get product details with ascending order via name but name has white space. I have removed white space from admin but it is not removing.

So is it possible to remove white space during getting product collection in ascending order via name?

I am using below code:

$categoryId = 54; // YOUR CATEGORY ID
$category = $categoryFactory->create()->load($categoryId);

$categoryProducts = $category->getProductCollection()
                            ->addAttributeToSelect('*')->setOrder('name','ASC');;

foreach ($categoryProducts as $product)
{

$proname = $product->getName();
echo "<pre>"; print_r($proname);

}


texts: how to delete add to cart option from product page

texts: How to delete add to cart option from the product page? I have tried alot but i didnt find solution for this.


texts: 2.3.4: Update "Custom Layout Update" in Category doesn't work

texts:
I added the file :- app/design/frontend/VENDOR/THEME/Magento_Catalog/layout/catalog_category_view_selectable_[ID]_name.xml

Edited the category in the backend to use the Specific Layout (Catalog->Categories->Design->Custom Layout Update->Select "name" )
Saved. I get the message "You saved the category."
Clear cache.
Refresh category frontend and category backend, but changes have no effect.
Besides, in the category backend, "Custom Layout Update" appears as "No update". So the change is not saved without any error.


texts: All pages and products redirect to wrong store

texts:
Magento CE 1.9.1.0 - Ubuntu 12.04.5 LTS VPS

We had a wholesale store and just recently launched a retail store.  For some reason, now all pages and products from the wholesale store are now redirecting to the retail store.  Under the CMS pages settings for each page, and in the URL rewrite management settings for each product belonging to the wholesale store, I've verified that each page/product is set to use the wholesale store view.  I've also made sure to clear all caches and cache storage along with reindexing all data.  I can confirm that the Apache is not causing the rewrites because hovering over a product or page from the admin page shows the retail store URL.  The homepage for the wholesale store does work, however, any subsequent links are going to the wrong store.  What am I missing?


texts:
I am trying to install magento 1.9.3.4. But there are some problems in magento installation wizard. I am getting following errors in browser console.

Refused to execute script from 'http://<www.domain.com>/js/prototype/prototype.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Refused to execute script from 'http://<www.domain.com>/js/prototype/validation.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Refused to execute script from 'http://<www.domain.com>/js/scriptaculous/effects.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Refused to execute script from 'http://<www.domain.com>/js/mage/translate.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Refused to execute script from 'http://<www.domain.com>/js/varien/js.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Refused to execute script from 'http://<www.domain.com>/js/varien/form.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

And the page is showing like this:

I have checked this forum and tried these:
Click Here
but there are still showing the same error. How can I solve this issue?


texts: Magento 2 display block in product page only when product belongs to specific category

texts:
I have a block showing up near the add-to-cart button, but I would like to display it only in some products from specific categories.

Can i use something like this?

{{conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:1:`4`;]]"}}