texts: Magento 1.9.2.4 - Call to a member function getId() null in Mage/Sales/Model/Order/Invoice.php:835

texts:
When I generate my invoice and try to save I get a error,

  Fatal error: Call to a member function getId() on null in /var/www/html/app/code/local/Mage/Sales/Order/Invoice.php:835"

And my clients can't complete the order.

public function sendEmail($notifyCustomer = true, $comment = '')
{
    $order = $this->getOrder();
    $storeId = $order->getStore()->getId();

    if (!Mage::helper('sales')->canSendNewInvoiceEmail($storeId)) {
        return $this;
    }
    // Get the destination email addresses to send copies to
    $copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);
    $copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD, $storeId);
    // Check if at least one recepient is found
    if (!$notifyCustomer && !$copyTo) {
        return $this;
    }

    // Start store emulation process
    $appEmulation = Mage::getSingleton('core/app_emulation');
    $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);

    try {
        // Retrieve specified view block from appropriate design package (depends on emulated store)
        $paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment())
            ->setIsSecureMode(true);
        $paymentBlock->getMethod()->setStore($storeId);
        $paymentBlockHtml = $paymentBlock->toHtml();
    } catch (Exception $exception) {
        // Stop store emulation process
        $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
        throw $exception;
    }

    // Stop store emulation process
    $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);

    // Retrieve corresponding email template id and customer name
    if ($order->getCustomerIsGuest()) {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
        $customerName = $order->getBillingAddress()->getName();
    } else {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
        $customerName = $order->getCustomerName();
    }

    $mailer = Mage::getModel('core/email_template_mailer');
    if ($notifyCustomer) {
        $emailInfo = Mage::getModel('core/email_info');
        $emailInfo->addTo($order->getCustomerEmail(), $customerName);
        if ($copyTo && $copyMethod == 'bcc') {
            // Add bcc to customer email
            foreach ($copyTo as $email) {
                $emailInfo->addBcc($email);
            }
        }
        $mailer->addEmailInfo($emailInfo);
    }

    // Email copies are sent as separated emails if their copy method is 'copy' or a customer should not be notified
    if ($copyTo && ($copyMethod == 'copy' || !$notifyCustomer)) {
        foreach ($copyTo as $email) {
            $emailInfo = Mage::getModel('core/email_info');
            $emailInfo->addTo($email);
            $mailer->addEmailInfo($emailInfo);
        }
    }

    // Set all required params and send emails
    // ERROR LINE BELOW
    $mailer->setSender(Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY, $storeId));
    $mailer->setStoreId($storeId);
    $mailer->setTemplateId($templateId);
    $mailer->setTemplateParams(array(
            'order'        => $order,
            'invoice'      => $this,
            'comment'      => $comment,
            'billing'      => $order->getBillingAddress(),
            'payment_html' => $paymentBlockHtml
        )
    );
    $mailer->send();
    $this->setEmailSent(true);
    $this->_getResource()->saveAttribute($this, 'email_sent');

    return $this;
}

Does anyone have an idea about this?


texts: Magento 2 : On cart page checkout button asking for login again no matter I am already login why?

texts:
In Magento 2 on cart page checkout button asking for login again no matter I am already login why ?
How to skip this login if i am already login ?


texts: How should I handle session files that become too numerous?

texts:
I am acting as a sysadmin for a couple of servers that hold Magento sites and occasionally they fill up with session files.

I have been told that managing these files isn't something that can be done from within Magento and I presume their temporary use means they can't just be turned off, but it seems weird that Magento has no way to handle the removal of these files?

My solution is a nightly crontab that performs something like this find /path/to/magento/sessions/ -name "sess*" -type f -delete but it feels inelegant to say the least.

What is the best way to handle these?


texts: Uploading product image not showing on front end

texts:
I have a Magento 1.9.1.0 CE site that was just installed on a Cpanel VPS. Our issue is the site is working fine all except when we go to replace a product image we go to the Magento admin page for a specific product and upload an image using the images tab section in the products admin page. The image gets uploaded and when I move my mouse over it I can see the image just fine.

However, if I now look at the product on the front end of the website the image is just showing the gray Magento logo type image and not the image I uploaded. I also can view the source on the front-end and see the URL for the image is
http://www.******.com/media/catalog/product/cache/1/image/800x608.191808192/9df78eab33525d08d6e5fb8d27136e95/v/h/newimag.jpg and if I go to that location on the server I do not see the image newimag.jpg  ?? So it seems to not really be fully uploaded and I am not sure why.

I made sure all the media and sub directories have a permission of 0777
I cleared the Magento cache and re-indexed |
I cleared my browser cache

I am not sure what else to do to fix it.
When I view the console in Google Chrome I see the below message

coolsocks_multipack:63 Uncaught TypeError: Product.ConfigurableSwatches is not a constructor

The entire directory path exsists but the image does not seem to be making it into the folder? So in my above example url http://www.******.com/media/catalog/product/cache/1/image/800x608.191808192/9df78eab33525d08d6e5fb8d27136e95/v/h/ I do not see the image named newimag.jpg  .


texts: Form Field is not showing in Admin Panel

texts:
I added a custom form field

here my code is

<field name="bannermobileimage">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">string</item>
                <item name="source" xsi:type="string">banners</item>
                <item name="label" xsi:type="string" translate="true">Banner Mobile Image</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                <item name="formElement" xsi:type="string">fileUploader</item>
                <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
               <item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
               <item name="dataScope" xsi:type="string">bannermobileimage</item>
                <item name="required" xsi:type="boolean">false</item>
                <item name="sortOrder" xsi:type="number">16</item>
                <item name="uploaderConfig" xsi:type="array">
                    <item name="url" xsi:type="url" path="banners/banners_image/upload"/>
                </item>
            </item>
        </argument>
    </field>


texts:
Trying to rewrite the "Product Review" (tab) grid inside customer edit page, below my code

my xml:

 <blocks>
          <adminhtml>
                <rewrite>
                      <review_grid>Myc_Adminhtml_Block_Review_Grid</review_grid>
                </rewrite>
           </adminhtml>
 </blocks>

my extended class:

   class Myc_Adminhtml_Block_Review_Grid extends Mage_Adminhtml_Block_Review_Grid
    {

    public function __construct()
    {
        die('test');
        $this->setId('reviewcustomgrid');
        $this->setDefaultSort('created_at');
    }

    protected function _prepareCollection()
    {
       die('test');
       ......rest of collection code...

    }

is not rewriting the grid, i tried to put a die its always loading the Mage_Adminhtml_Block_Review_Grid.

is not the fist time i am doing rewrites, but this time i cant find the solution, there is something i am missing?

Thanks

UPDATE-
Adminhtml is the module, i use this module to place all general rewrites. i have other blockS and modelS rewrites here


texts: URL of subcategories on Magento shows 404 error page

texts:
I'm new on Magento. I don't know what happen with the url of sub category on Magento.

When on www.wow.ng/customer/account/login/ OR www.wow.ng/catalogsearch/result/ OR www.wow.ng/checkout/cart/ I can only link to category or product page but I cannot link to subcategories. This is how it links to subcategories www.wow.ng/checkout/cart/food-drinks.html which gives a 404 error page. Clearly the page URL is not correct. The correct URL is www.wow.ng/food-drinks.html but Magento does not remove the checkout/cart OR catalogsearch/result from the url. Hope you guy can help me to fix this problem.

I am using Magento ver. 1.9.1.0

Any question please feel free to ask. Thank you


texts: Add a extra category attribute under general infomation tab

texts:
I am trying adding a extra category attrbiute to general infomation tab i have tried adding that using the following code ,

require_once("app/Mage.php");
Mage::app('default');
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

$installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId     = $installer->getEntityTypeId('catalog_category');
$attributeSetId   = $installer->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);

$installer->addAttribute('catalog_category', 'nav_left',  array(
    'type'     => 'tinyint',
    'label'    => 'Show in left navgigation',
    'input'    => 'boolean',
    'global'   => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'visible'           => true,
    'required'          => false,
    'user_defined'      => false,
    'default'           => 0
));

$installer->addAttributeToGroup(
    $entityTypeId,
    $attributeSetId,
    $attributeGroupId,
    'nav_left',
    '11'

//last Magento's attribute position in General tab is 10
);

$attributeId = $installer->getAttributeId($entityTypeId, 'nav_left');

$installer->run("
INSERT INTO `{$installer->getTable('catalog_category_entity_int')}`
(`entity_type_id`, `attribute_id`, `entity_id`, `value`)
    SELECT '{$entityTypeId}', '{$attributeId}', `entity_id`, '1'
        FROM `{$installer->getTable('catalog_category_entity')}`;
");

This is just working fine but this is adding an additional information tab named General just to the right of general infomation tab i have tried adding it to first tab using attributeGroupId set to 4 but after testing it is just crashing the site.

Any idea how can i add that attribute to first tab.


texts: Set empty design layout for a controller

texts:
I've created a controller that is displaying some html code retrieved from orders.phtml file :

<?php
class Envato_RecentProducts_OrderController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        echo $this->getLayout()->createBlock('core/template')->setTemplate('newaves/orders.phtml')->toHtml();
    }
}

I usually create pages using CMS with selecting Empty layout in Design section, that way I have css theme classes imported in that page even if the page is empty:

That code retrieves the header and footer, it doesn't help as I only want an empty page :

$this->loadLayout();
$this->renderLayout();

How can I have the controller 'imports' the default theme/ css classes ?


texts: After Migration from Magento 1.9.1.0 to Magento 2.2.4 some product are not visible on category page

texts:
I have migrated All data from Magento 1.9.1.0 to the Latest Magento 2.2.4 after migration I am having an issue like few products are there in admin but those are not visible on the category page. All data are the same like store website stock etc but only a few are not visible on the category page and those products are accessible by their URL.
For Debug issue I have checked data in the following tables but all things are perfect

Can anyone have an idea how we can debug further at the code level..?
Any help appreciate
Thanks


texts: Magento 2: Unable to add delete button in edit form using UI component

texts:
Getting below error while clicking on edit action from Grid.

Fatal error: Uncaught Error: Call to a member function getUrl() on
null in
/var/www/html/myproject/machpack/app/code/Vendor/Module/Block/Adminhtml/Module/Edit/Button/Generic.php:60
Stack trace: #0
/var/www/html/myproject/machpack/app/code/Vendor/Module/Block/Adminhtml/Module/Edit/Button/Delete.php(38):
Vendor\Module\Block\Adminhtml\Module\Edit\Button\Generic->getUrl('//delete',
Array) #1
/var/www/html/myproject/machpack/app/code/Vendor/Module/Block/Adminhtml/Module/Edit/Button/Delete.php(28):
Vendor\Module\Block\Adminhtml\Module\Edit\Button\Delete->getDeleteUrl()
#2 /var/www/html/myproject/magento236/vendor/magento/framework/View/Element/UiComponent/Context.php(285):
Vendor\Module\Block\Adminhtml\Module\Edit\Button\Delete->getButtonData()
#3 /var/www/html/myproject/machpack/vendor/magento/module-ui/Component/AbstractComponent.php(116):
Magento\Framework\View\Element\UiComponent\Context->addButtons(Array,
Object(Magento\Ui\Component\Form)) #4 /var/www/html/myproject/mac in
/var/www/html/myproject/machpack/app/code/Vendor/Module/Block/Adminhtml/Module/Edit/Button/Generic.php
on line 60

Generic.php
<?php

namespace Vendor\Module\Block\Adminhtml\Module\Edit\Button;

use Magento\Search\Controller\RegistryConstants;
/**
 * Class Generic
 */
class Generic
{
    /**
     * Url Builder
     *
     * @var \Magento\Framework\UrlInterface
     */
    protected $urlBuilder;

    /**
     * Registry
     *
     * @var \Magento\Framework\Registry
     */
    protected $registry;

    /**
     * Constructor
     *
     * @param \Magento\Backend\Block\Widget\Context $context
     * @param \Magento\Framework\Registry $registry
     */
    public function __construct(
        \Magento\Backend\Block\Widget\Context $context,
        \Magento\Framework\Registry $registry
    ) {
        $this->urlBuilder = $context->getUrlBuilder();
        $this->registry = $registry;
    }

    /**
     * Return the synonyms group Id.
     *
     * @return int|null
     */
    public function getId()
    {
        $contact = $this->registry->registry('Module');
        return $contact ? $contact->getId() : null;
    }

    /**
     * Generate url by route and parameters
     *
     * @param   string $route
     * @param   array $params
     * @return  string
     */
    public function getUrl($route = '', $params = [])
    {
        return $this->urlBuilder->getUrl($route, $params);
    }
}


texts: How to get cart item details in event observer?

texts:
I'm using an event observer which fires when user clicks on the 'Place Order' button in checkout flow. I want to capture the product details which are in the cart. Actually this moment order object has already created. If I can access order object it is more than enough.

I have tried the followings, but no luck.

I'm using the event checkout_submit_all_after. And that event executes the following function in the observer.

public function galileo_booking_request(Varien_Event_Observer $observer)
    {
       // $product = $observer->getData('product');// returns null object
      //   $order = $observer->getEvent()->getOrder();// returns null object
           $request = $observer->getEvent()->getRequest()->getParams();// returns null object
           Mage::log($request['product'],null,'eventoberver.log',true);
    }


texts: {“success”:true} but fineuploader shows error but uploads the file properly

texts:
The php server script returns {"success":true}, and upload the file correctly, but in the webpage, it shows that there was an error uploading in red.

On Checking the console for the same i got this

fineuploader-3.2.min.js:

  [FineUploader] Error when attempting to parse xhr response text
  (SyntaxError: Unexpected token < in JSON at position 1)

A PHP Error was encountered

Severity: Notice

Message:  Undefined property: stdClass::$relation_value

Filename: libraries/Image_crud.php

Line Number: 527

Backtrace:

            File: /storage/ssd2/410/2722410/public_html/application/libraries/Image_crud.php

            Line: 527

            Function: _error_handler

            File: /storage/ssd2/410/2722410/public_html/application/controllers/<-COntroller name->.php

            Line: 56

            Function: render

            File: /storage/ssd2/410/2722410/public_html/index.php

            Line: 315

            Function: require_once

{"success":true}

**

  Please help me guys i am really in trouble

**
P:S It is working fine in my local (Windows 10) chrome ,FF on wamp server but when i uploaded in free hosting service i got the above error while uploading
this is not duplicate question


texts:
I downloaded the project from bitbucket and extracted files in that and imported database.

I flushed cache.
Deployed static content.
Run upgrade command.
Run compilation and moved to production.

I face below error.

The following modules are outdated:
Magento_Directory db schema version: defined in codebase - 2.0.1, currently installed - 2.0.2
Magento_Directory db data version: defined in codebase - 2.0.1, currently installed - 2.0.2
Magento_Customer db schema version: defined in codebase - 2.0.12, currently installed - 2.0.13
Magento_Customer db data version: defined in codebase - 2.0.12, currently installed - 2.0.13
Magento_Catalog db schema version: defined in codebase - 2.2.3, currently installed - 2.2.4
Magento_Catalog db data version: defined in codebase - 2.2.3, currently installed - 2.2.4
Magento_Quote db schema version: defined in codebase - 2.0.6, currently installed - 2.0.7
Magento_Quote db data version: defined in codebase - 2.0.6, currently installed - 2.0.7
Magento_Sales db schema version: defined in codebase - 2.0.7, currently installed - 2.0.9
Magento_Sales db data version: defined in codebase - 2.0.7, currently installed - 2.0.9
Magento_Newsletter db schema version: defined in codebase - 2.0.0, currently installed - 2.0.1
Magento_Newsletter db data version: defined in codebase - 2.0.0, currently installed - 2.0.1
Magento_Vault db schema version: defined in codebase - 2.0.2, currently installed - 2.0.3
Magento_Vault db data version: defined in codebase - 2.0.2, currently installed - 2.0.3
WeltPixel_Backend db schema version: defined in codebase - 1.0.3, currently installed - 1.1.0
WeltPixel_Backend db data version: defined in codebase - 1.0.3, currently installed - 1.1.0


texts: Magento 2 Multi website for "product_websites" column in CSV file

texts:
I'm using multi website. When I upload products using CSV I set "product_websites" column as "default" instead of "sports". Again I make changes in "product_websites" column as "sports" and tried to Add/Update, products are set in both "default" & "sports" website. How to set my new products only in "sports" website.

I don't want to replace the products..


texts: multiple catalog rules with same price, calculate wrong final price

texts:
I have multiple catalog price rules on same product with same price but different priority, so i suppose that system will apply the lowest (0 is lowest) priority rule to calculate final price.

Rule A:

status: active, Priority:0,  action: to fixed amount, Discount: 223.200, Stop further rule: Yes

Rule B:

status: active, Priority:1, action: to fixed amount, Discount: 223.200, Stop further rule: yes

So I suppose final price has to be 223.200 by using Rule A. But Final price is coming 223.00.

I have no idea whats happening, can anyone has idea what possibly could be reason of this.


texts: How can i override core api interface in my custom module

texts: i am trying to override model and interface of core api in to my custom module for adding new data but i am not able to override interface to add that data contract.


texts: Debuging variables in custom blocks view

texts:
Using var_dump to debug manually objects and arrays in custom module causes blank page instead the dump.

What I do wrong?

in View

if ($currentProduct = $block->getCurrentProduct()) {
    $variants = $block->getVariants($currentProduct);
    $parent = $block->getCurrentProduct();
    var_dump($parent);
    //blank page

} ?>


texts: I am trying to create module in magento2, now i stuck creating grid page in admin side, let me know if any one already did


texts: Terms and conditions from Static block magento2

texts:
I need to show Terms and condition text before place order button of each payment method.

Which file i need to override to show content from static block. As i checked terms and conditions text comes from html and not from phtml file.

So is it possibile to display content from the cms static block?

Please anyone help on this. Thanks


texts: Fatal error Call to a member function insert() on boolean:Magento

texts:
I am facing an error during the checkout process when I select a payment method and press the button continue to next step to place order its an error as follows:

  Fatal error Call to a member function insert() on boolean in /home/buildi59/public_html/app/code/community/Lof/Slideshow/Model/Observer.php on line 58

Here is the code for observer.php:

class Lof_Slideshow_Model_Observer
{

    public function beforeRender(Varien_Event_Observer $observer)
    {
        $controller_name = Mage::app()->getRequest()->getControllerModule();
        $menu_name = $controller_name . "_" . Mage::app()->getRequest()->getControllerName();
        $helper = Mage::helper('lof_slideshow/data');

        if ($helper->checkAvaiable($controller_name)) {
            $config = $helper->get();
            $event = $observer->getEvent();

            if ($helper->checkMenuItem($menu_name, $config)) {
                /*Define slider block*/
                $this->_loadMedia($config);
                $layout = Mage::getSingleton('core/layout'); // we are taking the item with 'object' key from array passed to dispatcher
                $title = $config["title"];
                $position = isset($config["blockPosition"]) ? $config["blockPosition"] : "content";
                $custom_pos = isset($config["customBlockPosition"]) ? $config["customBlockPosition"] : "";

                if (!empty($custom_pos)) {
                    $position = $custom_pos;
                }

                $display = isset($config["blockDisplay"]) ? $config["blockDisplay"] : "after";
                $display = $display == "after" ? true : false;
                $source = $config["source"];
                $block = $layout->createBlock('lof_slideshow/source_' . $source);
                // echo $source;die;
                $layout->getBlock($position)->insert($block, $title, $display);
                /*End defined*/
            } else {

            }
        }
    }

    function _loadMedia($config = [])
    {
        if (!defined('_LOADED_LOFSLIDESHOW_')) {
            $mediaHelper = Mage::helper('lof_slideshow/media');

            if ($config['enable_jquery']) {
                $mediaHelper->addMediaFile("js", "lof_slideshow/jquery.js");
            }

            $mediaHelper->addMediaFile("js", "lof_slideshow/jquery-ui.js");
            $mediaHelper->addMediaFile("js", "lof_slideshow/script.js");
            define('_LOADED_LOFSLIDESHOW_', 1);
        }
    }
}

Can any bobdy tell me how to fix this.

Thanks!


texts: How to use the country set in the shipping estimate in checkout?

texts: I use the shipping estimate in the cart page and select a country, for example Ethiopia. How can I use this country as default in the (billing + shipping) address in the checkout?


texts: CURL request using DELETE method in Magento 2

texts:
I am trying to call a curl request for delete method using  Magento\Framework\HTTP\Client\Curl.php.

In this class makeRequest method is responsible for sending curl request. But as I can see that this method is protected so I can't call it directly.

makeRequest method in Magento\Framework\HTTP\Client\Curl.php

/**
 * Make request
 * @param string $method
 * @param string $uri
 * @param array $params
 * @return void
 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
 * @SuppressWarnings(PHPMD.NPathComplexity)
 */
protected function makeRequest($method, $uri, $params = [])
{
    $this->_ch = curl_init();
    $this->curlOption(CURLOPT_URL, $uri);
    if ($method == 'POST') {
        $this->curlOption(CURLOPT_POST, 1);
        $this->curlOption(CURLOPT_POSTFIELDS, http_build_query($params));
    } elseif ($method == "GET") {
        $this->curlOption(CURLOPT_HTTPGET, 1);
    } else {
        $this->curlOption(CURLOPT_CUSTOMREQUEST, $method);
    }

    if (count($this->_headers)) {
        $heads = [];
        foreach ($this->_headers as $k => $v) {
            $heads[] = $k . ': ' . $v;
        }
        $this->curlOption(CURLOPT_HTTPHEADER, $heads);
    }

    if (count($this->_cookies)) {
        $cookies = [];
        foreach ($this->_cookies as $k => $v) {
            $cookies[] = "{$k}={$v}";
        }
        $this->curlOption(CURLOPT_COOKIE, implode(";", $cookies));
    }

    if ($this->_timeout) {
        $this->curlOption(CURLOPT_TIMEOUT, $this->_timeout);
    }

    if ($this->_port != 80) {
        $this->curlOption(CURLOPT_PORT, $this->_port);
    }

    //$this->curlOption(CURLOPT_HEADER, 1);
    $this->curlOption(CURLOPT_RETURNTRANSFER, 1);
    $this->curlOption(CURLOPT_HEADERFUNCTION, [$this, 'parseHeaders']);

    if (count($this->_curlUserOptions)) {
        foreach ($this->_curlUserOptions as $k => $v) {
            $this->curlOption($k, $v);
        }
    }

    $this->_headerCount = 0;
    $this->_responseHeaders = [];
    $this->_responseBody = curl_exec($this->_ch);
    $err = curl_errno($this->_ch);
    if ($err) {
        $this->doError(curl_error($this->_ch));
    }
    curl_close($this->_ch);
}

I have to call one of public method of this class which is calling makeRequest method.
When I check this I can see 2 public methods for GET and POST request which are calling protected method makeRequest. No other method for DELETE which is calling method makeRequest.

/**
 * Make GET request
 *
 * @param string $uri uri relative to host, ex. "/index.php"
 * @return void
 */
public function get($uri)
{
    $this->makeRequest("GET", $uri);
}

/**
 * Make POST request
 *
 * @param string $uri
 * @param array $params
 * @return void
 *
 * @see \Magento\Framework\HTTP\Client#post($uri, $params)
 */
public function post($uri, $params)
{
    $this->makeRequest("POST", $uri, $params);
}

Now my question is that how can I solve my problem or is this bug in magento 2.1.7 or may be I am getting incorrectly. Please help me if I am doing anything wrong.

class reference  curl.php


texts: Magento 2 Ui Component how to upload image and save it

texts:
<column name="image" class="Vendor\mpdule-name\Ui\Component\Listing\Column\Thumbnail">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/thumbnail</item>
                <item name="sortable" xsi:type="boolean">false</item>
                <item name="altField" xsi:type="string">name</item>
                <item name="has_preview" xsi:type="string">1</item>
                <item name="label" xsi:type="string" translate="true">Image</item>
            </item>
        </argument>
    </column>

This is what i have so far but i am not sure what should be in the class
also i am not sure how to add it into installSchema


texts: I understand that the variable $this is used in object oriented php. I references the current object. Now, looking into phtml files in Magento, how do I know which object is referencing when using the keyword $this.


texts: Magento 2 module development incremental updates

texts:
I am new to Magento, I am trying to create a custom module.
After installing it locally, enable it from command line, run setup and compile, I can use it, although whenever I modify/update one of the php files, the changes are not reflected, although I have set magento into developer mode, disabled all caches from Admin cache management.
I am using php 7.0, apache 2.4.
Thanks


texts: Hamburger menu | How to change the icon to X when expanded

texts:
I found this which was quiet helpful:

how to put close button on hamburger menu click while it is expended

Adding CSS: '\e616' to the .nav-toggle:before class changed the button to X. however, I want to keep the 3 lines when the menu is closed and only to display the X when it's expanded.

I tired adding the property to .nav-toggle:after but that didn't work.

How can I change the icon of the hamburger menu to "X" when it's expanded on mobile?

Menu Closed:

Menu opened:

Magento 2.1.8 and custom theme


texts: Remove observer from third party extension

texts:
I have installed a blog module onto my Magento 2 platform. This blog module has an observer which automatically adds a new menu item into the primary navigation. I wish to stop this.

The events.xml file looks like this:

<?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="page_block_html_topmenu_gethtml_before">
        <observer name="aw_blog_add_topmenu_items" instance="Aheadworks\Blog\Observer\AddBlogToTopmenuItemsObserver" />
    </event>
</config>

As you can see it references the observer that adds the link into the primary navigation. Deleting events.xml solves my problem, but I'm looking for a method that doesn't involve modifying of core module files.


texts:
If there is an error when applying a patch such as:

"1 out of 1 hunk FAILED"

which only applies to one or two particular files, will the rest of the files be patched successfully?

Or will the entire patch fail and each file revert to their original state if there is a error just effecting one or two files?


texts: how to change magento 2 open source from developer to default, and how do i get back in to my dash?

texts:
I changed it to default mode by using this path /apps/magento/htdocs/app/etc/env.php (i am using AWS Lightsail, this is why my path is different)
then find where it says developer, and change it to default.

'MAGE_MODE' => 'default',

I checked in on my SSH and it says Default

now that i have done that and i type my instance ip in the browser... I still can't get into my Magento 2 opensource dash.

Is there another way?

this is what it says when when i try to open magento dash by typing my IP address in the url:
There has been an error processing your request
Exception printing is disabled by default for security reasons.

Thank you


texts: Failing to locate landing page content (screenshots)

texts:
I'm learning as i go with all of this. I have been using the inspect element tool to locate div classes / names / lines of css in order to edit the theme I am working with.

So far so good, apart from the landing page. I am trying to delete a div which contains a featured & new products display. When I open the inspector tool, I see this:

Although I can locate the files to edit almost everything else on the landing page (photo slider, text boxes, animated content) I can't locate where/how to edit any catalogue content which appears.

I have searched through these directories for the class name with no luck:

Any help is appreciated.


texts:
I would like to get more clarity on Magento cache algorithm.

I referred

https://www.nicksays.co.uk/developers-guide-magento-cache/

http://www.demacmedia.com/magento-commerce/magento-tutorials/understanding-full-page-cache/

Still, when I look at var/cache folder I can see mage--0 to mage--9 and mage--a from mage--f.

What are all they?
What do they do?
How do they do?

Can someone explain this concept?


texts: Magento 2 How to get "custom_atribute" Value in product page when atribute color drop down changes?

texts:
I need some suggestion or advise on how to get a custom attribute on product page.

I have my custom attribute code as "is_featured" it's a Yes/No value.

In product page when the user changes the colour drop down I need to check that simple product's "is_featured" value.

How could I achieve that any help is appreciated.

Thank you!


texts: Magento 2.2.6 : Add custom phtml file after product price in catalog search result page

texts:
I want to add custom code in my catalog search page. I don't want to override product/list.phml file .

But, Just display my custom code in catalog search result page after product price.
How to add it?

I have used this plugin code.It's working in only list product. But, when I search that product I can't find content of my custom phtml.

di.xml :

<type name="Magento\Catalog\Block\Product\ListProduct">
        <plugin name="vendor-module-category-timer" type="VendorName\ModuleName\Plugin\CategoryTimer" sortOrder="16"/>
    </type>

CategoryTimer.php :

public function aroundGetProductDetailsHtml(
    \Magento\Catalog\Block\Product\ListProduct $subject,
    \Closure $proceed,
    \Magento\Catalog\Model\Product $product
) {
    return "call2";
}


texts: How can I filter Reviews based on their average rating to only display above a certain amount?

texts:
I'm trying to change up the review list block on our website such that it only displays the top three latest four star or higher reviews.

Currently I am trying to go about this in the following manner:

    $_store_id = Mage::app()->getStore()->getId();
    $_reviews = Mage::getModel('review/review')->getResourceCollection();
$_reviews->addStoreFilter($_store_id)
        ->addStatusFilter( Mage_Review_Model_Review::STATUS_APPROVED )
        ->setDateOrder()
        ->addRateVotes();
// prepare for ratings
$_reviews->getSelect()->join(array('ratings'=>'rating_option_vote_aggregated'), 'main_table.review_id=ratings.primary_id', array('percent_approved'));
$_reviews->getSelect()->where('ratings.percent_approved >= 80');
echo $_reviews->getSelect();
$_reviews->load();
    <?php if (count($_reviews)):?>

<?php echo $this->__('Our Top Favorite Reviews') ?>

        <?php $i=0; foreach ($_reviews as $_review):?>

Each review goes here

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

The gist of it is that I want to perform a join with the aggregated ratings table and have a filter to strip out the reviews with a rating under 80%.  The problem I'm having is that even though the echo $_reviews->getSelect(); outputs the desired SQL, the $_reviews object count does not change or even filter out these reviews that are under 80%.

Here is the outputted SQL:

SELECT `main_table`.*, `detail`.`detail_id`, `detail`.`title`, `detail`.`detail`, `detail`.`nickname`, `detail`.`customer_id`, `ratings`.`percent_approved`
FROM `review` AS `main_table`
INNER JOIN `review_detail` AS `detail`
    ON main_table.review_id = detail.review_id
INNER JOIN `review_store` AS `store`
    ON main_table.review_id=store.review_id
INNER JOIN `rating_option_vote_aggregated` AS `ratings`
    ON main_table.review_id=ratings.primary_id
WHERE (store.store_id IN('1'))
    AND (main_table.status_id=1)
    AND (ratings.percent_approved > 60)
ORDER BY main_table.created_at DESC

Does anybody have a clue why my select statements on Mage_Review_Model_Resource_Review_Collection aren't taking place?  I've already tried modifying to core file app\code\core\Mage\Review\Model\Resource\Review\Collection.php to make these changes through a function call, however that didn't work either.

I'm feeling quite stumped and could use some help.  Thanks in advance.


texts: Product Attributes With Small Differences

texts:
I have a site that will be selling picnic tables, sheds, axes and baseball bats and more.  The client has provided the attributes associated with the products.

Picnic tables have a finish attribute that is searchable but is not filterable.

Sheds have a finish attribute that is not searchable but is filterable.

Axes have a finish attribute that is not searchable nor filterable.

Baseball bats have a finish attribute that is both searchable and filterable.

I have more products that will have the finish attribute in one of those different ways.

Should I enter the finish attribute four times with four different configurations?  Or would you add attributes for each attribute set such as baseballbat_finish, axe_finish?

If anyone has had to make these decisions before, would you please share your decision and why you arrived at it?


texts: Invalid Form Key, Please refresh the page - could not login to magento admin panel

texts: I have implemented Magento 1.9 and whenever I use varnish I am not able to login to the admin-panel. Since I have used Redis to stored session and cache, the folders related to these are empty. I have checked other similar post, but none of those worked.


texts: Get tax class ID by tax rate with REST API

texts:
I'm trying to get a tax class ID with only the tax rate value, all with the API.
I found that I need a first request that returns me the tax rate ID :

/rest/all/V1/taxRates/search?searchCriteria[filterGroups][0][filters][0][field]=rate&searchCriteria[filterGroups][0][filters][0][value]=20

Then I want to request this API : /rest/all/V1/taxRules/search to get the tax class used by the tax rule (in my case we will only have one tax class, one tax rule for one tax rate so we know if a product has a defined tax class, which is its tax rate).

I search on the swagger and tried this :

/rest/all/V1/taxRules/search?searchCriteria[filterGroups][0][filters][0][field]=tax_rate_ids&searchCriteria[filterGroups][0][filters][0][value]=3&searchCriteria[filterGroups][0][filters][0][conditionType]=in

But I have this response : Internal Error. Details are available in Magento log file. Report ID: webapi-5bf536f4a45a5

I went to the logs and found this :

[2018-11-21 10:44:04] main.CRITICAL: Report ID: webapi-5bf536f4a45a5; Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tax_calculation_rate_id' in 'where clause', query was: SELECT COUNT(*) FROM `tax_calculation_rule` AS `main_table` WHERE ((`tax_calculation_rate_id` IN('3'))) {"exception":"[object] (Exception(code: 42): Report ID: webapi-5bf536f4a45a5; Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tax_calculation_rate_id' in 'where clause', query was: SELECT COUNT(*) FROM `tax_calculation_rule` AS `main_table` WHERE ((`tax_calculation_rate_id` IN('3'))) at /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:205, Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tax_calculation_rate_id' in 'where clause', query was: SELECT COUNT(*) FROM `tax_calculation_rule` AS `main_table` WHERE ((`tax_calculation_rate_id` IN('3'))) at /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tax_calculation_rate_id' in 'where clause' at /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

What did I do wrong ?

Thank you by advance


texts: Unable to load theme by specified key: ''?

texts:
I updated to Magento 2.3.5 and now when I open a product in the backend, I am getting Unable to load theme by specified key: ''

I googled it and found solutions where I am supposed to delete entries from core_config_data, but there is no entry with an empty key.

Any ideas how to solve it?


texts: reindexing issue for catalog product flat

texts:
I am facing the catalog product flat reindexing issue in my project. I have tried many solution, but can't get any success. I have tried following solutions around Google:

1- I truncated all the catelog_producr_flat tables(like catalog_product_flat_1, catalog_product_flat_2, catalog_product_flat_3), and then clear all the cache and then reindexing. but not get any success

2- I changed the var/locks folder permission to 777 and empty that folder,then clear all the cache. Then try to reindex, but not success.

3- I tried manually reindex via following code given below and then clear all the cache , but not get any success:

<?php
 require_once 'app/Mage.php';
 $app = Mage::app('admin');
 umask(0);
 for ($index = 1; $index <= 8; $index++) {
     $process = Mage::getModel('index/process')->load($index);
     $process->reindexAll();
 }
 ?>

4- Increase your execution time value in the .htaccess file and then clear all the cache, as below

  php_value memory_limit 128M

  php_value max_execution_time 18000

i have tried all the process but can't get any success, pleas help me.


texts: Magento Architecture - using helper to handle all data & variables

texts:
Is it considered good/bad architecture to set up a helper and let this handle all the constants, variables and data?

I am currently writing a fairly simple extension to do with member/non-member logins - mostly frontend stuff eg. 'remember me' to be checked in certain cases, login box to be open in certain cases, etc. Using cookies quite extensively for this and no real database access with very minimal config options via admin.


texts: Issue with per-store prices and entity_decimal table

texts:
Running CE 1.8.1.0, using Simple Configurable Products (SCP) extension, running 2 stores in Magento, using prices of simple products to be the price for options (size, color, etc...).

Normally an upload is done without explicitly defining a storeid for pricing, but a bad upload was performed and storeids were listed for pricing. This has now caused the system to not allow the price to be updated via admin backend for the simple products in each store view (the price reverts to the original for that store view, but the default price does get updated). The prices on catalog pages and in cart reflect the per-store prices however. No easy way now to make pricing changes via admin now.

Beyond this being a bug / conflict between the setup and extension, my question is: Is it safe to manually delete the entries in the MySQL table "catalog_product_entity_decimal" that are using attribute_id of 75 (price) and have a storeid greater than zero (i.e. not the default). This would fix the issue in the quickest way besides deleting products and re-uploading them.

Are there any drawbacks to doing this? Will it cause db corruption / conflicts with any other tables / relationships?


texts: New URL's not showing up in google search results

texts:
Recently we changed the URL structure. We removed parent category path from the URL's.

For ex: www.example.com/display-cabinets/display-counters has been changed to www.example.com/display-counters

We generated a new sitemap and submitted it to Google webmaster tools.

The problem is, In Google results, we can't able to see the exact URL (www.example.com/display-counters) when we search for it.

Instead Google displays the old cache "www.example.com › Display Cabinets" like these in search results. But when we click, it redirects to the correct page (www.example.com/display-counters).

Please check the below image. You will get an idea of what I was mentioning.

We need the new URL (www.example.com/display-counters) to be shown in Google results. Can you please suggest what we can do for this.

Looking forward for the response.


texts: Shopping Cart Price Rule with two dependent discount rules

texts:
I'm looking for a solution to a very tricky price rule:
The client gives 20% discount to every discountable article (if an article is discountable is set in an article attribute) only for a special customer group.
This far it's easy to set up in Magento, but here we go:
When the discounted subtotal gets higher than 400, a tier discount comes to life: 40% on articles X, 33% on articles Y, 25% on articles Z and 20% on all left discountable articles. The big problem I've got here, is that the tier discount isn't based on the first 20% account, it's based on the original price again.

And I can't figure out any way to do this natively in Magento. Unfortunately catalog price rules and cart price rules are completely independent, so this is also no option.

I'm not afraid to do some extra coding, but I have no idea where to start without messing up the complete Magento installation.

In my opinion there are only 2 and a half ways to get this done but I have no idea how to achieve this:
1. Hard code the rule.
2. Adding a custom condition to the rules editor or nesting the first 20% rule.

At the moment, I'm completely lost on this topic, so please, every Magento expert out there, I'm grateful for every hint, tip or advice.


texts: How to make checkbox Check/Uncheck onchange trigger event to subscribe/unsubscribe customer from newsletter magento 2 on customer/account?

texts:
Basically I have a checkbox on customer/account page adding via code below.
app\design\frontend\Company\porto_base_child\Magento_Customer\templates\account\dashboard\info.phtml

                            <?= $block->escapeHtml(__('Automatic Proofing Approval Options')) ?>

<?= $block->escapeHtml(__('
                            By default, once your file is preflighted OK, you will have 1 hour to approve or make changes to your file. If no action is taken within this hour, your order will automatically go into production.')) ?>

                            Learn More..

                        Yes

                                <input type="checkbox">

                        No

How can I create a functionality so whenever user check/uncheck this checkbox it will call an observer/controller which will pass the value(customer_email) to Magento backend and change the newsletter subscription status?
I hope I am on the right track of understanding cause this is what I am planning to implement. I am still not sure whether I will need a block or not.
Please, anyone, guide me through this it would be really helpful for me to continue my learning and understand Magento 2. Thank you and cheers. Though I am trying my best to implement this and update here if something relevant


texts: Adds 1 unit of an item to the cart with quantity selector set to "0"

texts: Users on a product page with the quantity selector set to "0" units still can add 1 unit to the shooping cart after clicking the "add to the cart" button. The button is not checking for any rule that says that no units are selected therefore you cannot add any product to the shopping cart. Any help to fix this is welcome.


texts: Get an error Terms and Condition message in checkout payment page After Upgrading to Magento 2.4.1

texts:
I enable T&C configuration in My Magento 2.3.4 , after i upgraded to Magento 2.4.1. I got this checkout payment page
The order wasn't placed. First, agree to the terms and conditions, then try placing your order again.

The error message comes from validateAgreements function from vendor/magento/module-checkout-agreements/Model/Checkout/Plugin/Validation.php file. In Magento 2.3.4 this file does not being called at all in the checkout payment page, but in Magento 2.4.1 this file is being called in the checkout payment page calling the beforeSavePaymentInformation  plugin function which use the validateAgreements that triggers the error message


texts: Magento 2.3.5 - Multisite - Bad path for image / CSS / JS

texts:
For the sake of clarity, I will try to describe my configuration as precisely as possible.

Magento 2.3.5-p1
NGINX + FPM - PHP 7.3
Varnish -> Full page cache
Redis -> Session Cache
CDN -> CloudFront with Same distribution for each domain
Theme -> Porto Child Theme for each domain

two domain names :

domain1.com => Main domain through which I also access the administration
domain2.com => Secondary domain created in a second step

These two domains point to the same server (type A redirection), and Nginx takes care of sending each domain to its website.
In the back office, two websites have been created, each with its own "Store" and "Store Views".
In store -> settings -> configuration -> General -> Web -> Base URL

AND
In store -> settings -> configuration -> General -> Web -> Base URL (Secure)

The links have been well provided.
All redirections are working properly.
When I access domain1.com or domain2.com, I have the right site appearing.
Now come the problem :
On domain1.com => NO PROBLEM.
On domain2.com => Path of images / CSS / JS, not working properly.
Instead of having :
domain2.com/media/logo/.../my_logo.png

I have :
domain1.com/media/logo/websites/3/my_logo.png

Result : Don't working due to CSP restrictions. I could easily solve the problem by putting domain1.com on my white list.
But this is not a suitable solution for me.
Indeed, I would like to say:

That the right domain is used, namely domain2.com instead of domain1.com.
Even better, let it go through the CDN like on domain1.com !

On the other hand, it should be noted that some files pass well on the CDN.
Really not knowing where to look for this problem, I turn to you to try to find a solution.
I thank you in advance for all your comments, help, and suggestions that can help me solve this problem.


texts: Bundled product: Max quantity per sub-product, not whole shoppingcart

texts:
I have a bundled product called "Virtual Server" which has three simple products: CPU, Memory and Diskspace. A single server may not have more than 16 Gb of memory, 4 CPU's, etc. I have limited the maximum quantity for CPU, Memory and Diskspace per server ordered by setting the "Maximum Qty Allowed in Shopping Cart" on each simple product.

The problem is: I need people to be able to order multiples of the same virtual server at the same time. For example, a user should be able to order 4 x server with each server having a maximum of 16 Gb of memory. (There is no limit on the maximum number of servers a user can order).

In my current setup, the maximum quantity is enforced per shopping cart. Since 4 x 16 Gb = 64 Gb, Magento complains that the maximum quantity is exceeded.

After extensive googling, I can't figure out how I can do that. Can anybody shine a light on how to accomplish this?


texts:
I'm looking for a way to have  2 Catalog > Product Tabs.

So one would be

Catalog > Product - Sales

Catalog > Products - Internal


texts: Add data to custom order attribute Magento 2

texts:
I have set up a custom field in my admin grid. I am successfully executing following Observer:

<?php
namespace Qxs\OrderedItems\Observer;

class SetOrderAttribute implements \Magento\Framework\Event\ObserverInterface
{
    /**
     *
     * @param \Magento\Framework\Event\Observer $observer
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
      $order = $observer->getOrder();
      $order->setOrderedItems('Test');
      return $this;
    }
}

The observer is triggered on event: sales_order_save_before
However the data is stored in the table sales_order and not in the table sales_order_grid .

As a result the order grid does not show the value. How can i edit the order data so it will be updated in sales_order_grid?


texts:
I have a question regarding the best practices of model overriding.

For instance if I need to create a Me\MyModule\Catalog\Model\Product.php to replace (by inheritance and di.xml settings) the original Magento\Catalog\Model\Product.php to add new methods (for example for processing custom attributes), what is wise to do?

My concerns are about the risk of conflicts. What will happen if another developper create, in another module, its own version of this file?


texts: Custom block fails if I use a __construct with injections

texts:
This is my (updated) code:

<?php

namespace MS\RealReviews\Block;

/**
 * Entity rating block
 *
 */

class Review extends \Magento\Review\Block\Product\View\ListView
{

    protected $customer_id;

    protected $_orderCollectionFactory;
    protected $orders;

public function __construct(
    \Magento\Catalog\Block\Product\Context $context,
    \Magento\Framework\Url\EncoderInterface $urlEncoder,
    \Magento\Framework\Json\EncoderInterface $jsonEncoder,
    \Magento\Framework\Stdlib\StringUtils $string,
    \Magento\Catalog\Helper\Product $productHelper,
    \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig,
    \Magento\Framework\Locale\FormatInterface $localeFormat,
    \Magento\Customer\Model\Session $customerSession,
    \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
    \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
    \Magento\Review\Model\ResourceModel\Review\CollectionFactory $collectionFactory,
    \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory,
    array $data = []
) {
    $this->_orderCollectionFactory = $orderCollectionFactory;
    parent::__construct(
         $context,
         $urlEncoder,
         $jsonEncoder,
         $string,
         $productHelper,
         $productTypeConfig,
         $localeFormat,
         $customerSession,
         $productRepository,
         $priceCurrency,
         $collectionFactory,
         $data
    );
}

    public function getOrders() {

        if (!$this->orders):
            $this->orders = $this->_orderCollectionFactory->create()->addFieldToSelect(
                '*'
            )->addFieldToFilter(
                'customer_id',
                $this->_getCustomerID()
            )->setOrder(
                'created_at',
                'desc'
            );
        endif;
        return $this->orders;

    }

    protected function _setCustomerID($input){
        $this->customer_id = $input;
    }

    protected function _getCustomerID($input){
        return $this->customer_id;
    }

    public function isRealReview($customer_id){
        $product = $this->getProductId();
        $this->_setCustomerID($customer_id);

        return $product;
    }

}

I want to get orders based on the $customer_id variable, found in setCustomerID().

When I add __construct, I get an error:

29-Mar-2017 14:54:24 UTC] PHP Fatal error:  Uncaught TypeError: Argument 9 passed to MS\RealReviews\Block\Review::__construct() must be an instance of MS\RealReviews\Block\ProductRepositoryInterface, instance of Magento\Catalog\Model\ProductRepository\Interceptor given, called in /home/User/public_html/var/generation/MS/RealReviews/Block/Review/Interceptor.php on line 14 and defined in /home/User/public_html/app/code/MS/RealReviews/Block/Review.php

If I use this code the Block doesn't work anymore and the output list.phthml stays empty.  What am I doing wrong here?


texts: Magento 2: Any Difference between TYPE_NUMERIC and TYPE_DECIMAL?

texts:
In Magento 2's migration/data-definition-language, there are two column type constants

#File: vendor/magento/framework/DB/Ddl/Table.php
const TYPE_NUMERIC = 'numeric';
const TYPE_DECIMAL = 'decimal';

Is there any difference in table columns created with these constants?  It doesn't look like the TYPE_NUMERIC constant is used anywhere, so its unclear if its just legacy cruft, or somehow subtly different from TYPE_DECIMAL


texts:
I want to add a new attribute for the customers: continent.

First of all, I have created a new module for this where I'm inserting this new attribute:

<?php

$this->addAttribute('customer', 'continent', array(
    'type'      => 'int',
    'label'     => 'Continent',
    'input'     => 'text',
    'position'  => 120,
    'required'  => true,
    'is_system' => 0,
));

$attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'continent');
$attribute->setData('is_user_defined', 0);
$attribute->save();
?>

There's nothing to show in the frontend, everything in the backend depending on the chosen country.

And now I want to implement the logic when a new user register or edits his personal info. Something like:

if country = US then continent = 1,
if country = UK then continent = 2,
and so on...

I want to kepp a static file (XML?) somewhere with the relationships between countries and continents.

<US>1</US>
<UK>2</UK>


texts: Magento 2 : Overriding CatalogWidget's ProductsList block

texts:
I'm trying to override Magento_CatalogWidget's ProductsList block the following way, but unsuccessfully.

I have created a new module (app/code/MY_NAMESPACE/CatalogWidget), its tree structure is:

├── Block
│   └── Product
│       └── ProductsList.php
├── etc
│   ├── di.xml
│   └── module.xml
└── registration.php

The content of di.xml is:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  <preference for="Magento\CatalogWidget\Block\Product\ProductsList" type="MY_NAMESPACE\CatalogWidget\Block\Product\ProductsList" />
</config>

The content of ProductsList.php is:

<?php

namespace MY_NAMESPACE\CatalogWidget\Block\Product;

class ProductsList extends \Magento\CatalogWidget\Block\Product\ProductsList
{
    public function myTest()
    {
        die('Hello World !');
    }
}

?>

To test it, I have also overridden (in a custom theme) the file grid.phtml from Magento_CatalogWidget module:

vendor/magento/module-catalog-widget/view/frontend/templates/product/widget/content/grid.phtml

The line below has been add to this grid.phtml in order to list the methods of the block:

print_r(get_class_methods($block));

But I can't see the method myTest() in the list, why ?


texts: Body code from DFP is appearing twice on website

texts:
I am new to Magento and trying to implement the DFP code on site. I was able to serve one ad out of three without any issue. But the other two are not serving.

There are two parts head and body. Head tag is implemented correctly.

In CMS under static blocks, I add body part. I added it once but it is appearing twice on site.

Any help, will be appreciated!


texts: How to remove duplicate product images in magento 2?

texts:
When I import product from CSV file. After import success, I check the product detail. The product images are duplicated.

How to fix it?
How to create a script to find all product images duplicated to delete?
Thank you so much,
BienHV


texts: I recently purchased  and installed a Shop By Brands extension from Mageplaza. Once installed I realized the actual Brands Page did not have a Meta Tags (Title, Keywords, Description) section. Is it possible to create a file for that page that can have this feature. The actual individual brands do have the tags. Need the main Shop By Brands page to display the tags.


texts: Magento 2 Update cart automatically on carty quantity update gives error "Mismatched anonymous define() module"

texts:
I have done everything mentioned in this post, however, it gives me an error in console:

require.js:166 Uncaught Error: Mismatched anonymous define() module: function ($, getTotalsAction, customerData) {

$(document).ready(function(){
$(document).on('change', 'input[name$="[qty]"]', function(){
    var form = $('form#form-validate');
    $.ajax({
        url: form.attr('action'),
        data: form.serialize(),
        showLoader: true,
        success: function (res) {
            var parsedResponse = $.parseHTML(res);
            var result = $(parsedResponse).find("#form-validate");
            var sections = ['cart'];

            $("#form-validate").replaceWith(result);

            // The mini cart reloading
            customerData.reload(sections, true);

            // The totals summary block reloading
            var deferred = $.Deferred();
            getTotalsAction([], deferred);
        },
        error: function (xhr, status, error) {
            var err = eval("(" + xhr.responseText + ")");
            console.log(err.Message);
        }
    });
   });
  });
}

No idea how to solve this...

UPDATE:

I am not using a custom module, all the code is being added to the custom theme directory.


texts: Custom Add to Cart button - Change product description/title

texts:
I have a simple product in my Magento 2, also I have many landing pages in different domains that are external from Magento platform and all of them has a Button "Buy now" that I want to direct to my shopping cart.

So far I think so is not too complicated, however, I want to customize the name of the item to add to shopping cart, is it possible? How to do it? Is there any hidden field that I could change the name of the product?

Thanks


texts: Are Magento Object propertyNames that are prefixed by "_" different from ones that aren't?

texts:
what does this tell me ? Is there a place in the devdoc's I wasn't able to find or is this a convention I don't know about?
thanx for your help...


texts: Have problem to display blocks after applied SUPEE-6788 ,

texts: After I applied the security patch SUPEE-6788 , some of the "non-static" blocks( like newsletter signup form and blocks that call functions) disappeared and I have tried empty cache many times. Anyone knows what is the cause? I use Magento 1.9.1.0


texts: Element 'argument': The type definition is abstract and The state object to be removed is not the first in the list

texts:
I'm throwing this error on my /success/ page and it seems like such a generic error. It looks like further down the trace it's pointing to stuff like GoogleTagManager and other third-party modules associated with checkout but I've disabled nearly everything and it still fires this exception on checkout.

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'argument': The type definition is abstract.
Line: 1024

Internal error: xmlSchemaXPathProcessHistory, The state object to be removed is not the first in the list.
Line: 1022

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'argument': The type definition is abstract.
Line: 1024

Internal error: xmlSchemaXPathProcessHistory, The state object to be removed is not the first in the list.
Line: 1022

#0 /chroot/home/m2.staging/html/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 /chroot/home/m2.staging/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/chroot/home/zt...', '%message%\nLine:...')
#2 /chroot/home/m2.staging/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /chroot/home/m2.staging/html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#4 /chroot/home/m2.staging/html/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)

Now if I edit this file here like so:

protected function _initDom($xml) line 382 of vendor/magento/framework/Config/Dom.php

+// Note: Ignore validations. Yes the errors/warnings should be fixed but I don't know where to fix them and just want to get things done, can fix up "Later... TM".
+$skipDomValidation = true;
+if ($skipDomValidation === false) {
    if ($this->validationState->isValidationRequired() && $this->schema) {
        $errors = $this->validateDomDocument($dom, $this->schema, $this->errorFormat);
        if (count($errors)) {
            throw new \Magento\Framework\Config\Dom\ValidationException(implode("\n", $errors));
        }
    }
+}

Which is not good practices but it subdues the original error message and now throws this error message.

1 exception(s):
Exception #0 (InvalidArgumentException): Value for key "xsi:type" is missing in the argument data.

/chroot/home/m2.staging/html/vendor/magento/framework/View/Layout/Reader/Block.php(370): Magento\Framework\Data\Argument\Interpreter\Composite->evaluate(Array)
#1 /chroot/home/m2.staging/html/vendor/magento/framework/View/Layout/Reader/Block.php(169): Magento\Framework\View\Layout\Reader\Block->evaluateArguments(Object(Magento\Framework\View\Layout\Element), Array)

Such a generic error message. Any help would be greatly appreciated. Thank you.

magento 2.2.5


texts: Layout handle not working in creditmemo admin email template

texts:
I'm trying to setup a creditmemo email template in M2 Admin, but the layout handle for displaying the creditmemo items isn't getting the order and creditmemo params.
{{layout handle="sales_email_order_creditmemo_items" creditmemo=$creditmemo order=$order area="frontend"}}

When using the default creditmemo template, everything works fine:

However when using the same layout handle in an Admin email template, creditmemo and order are always null! I also tried calling the block/template directly but the same issue persists:

The same thing is happening for the invoice email, but layout handles work perfectly fine in the new-order-confirmation email template in admin. First thought is that some other module is overriding this block incorrectly, but I haven't found any overrides.
Obviously I can override the built-in template in code and work with that, but I'd prefer to manage all the transactional emails in admin.
Any ideas or guidance would be greatly appreciated, thank you!
Magento Commerce 2.3.5


texts: As it seems I cant upload images to the site i am currently building. I am a magento newbie. when adding a new product in the image tab there is no upload nor browse tab and there's a message "Image type and information need to be specified for each store view." as you can see in the image below.


texts: Buy multiple of the same product in different sizes

texts:
I am creating a store for a brewery. They would like to sell a type of beer in small bottles and large bottles. So on the frontend I would like them to enter a quantity number next to a size option.

For example:

BEER NUMBER ONE
|3| x 250ml Bottle
|0| x 500ml Bottle

Can anyone suggest how I might set this up in the admin?

Thanks


texts: Getting error while running magento deploy command

texts:
I am installing magento2 claue theme, while running deploy command I am getting below error

After following all the steps final theme looks like below which is not proper.

Please help me to resolve this issue ASAP. I am using magento version 2.3.4.


texts: magento 2 admin unable to submitshipment

texts: I have placed order created invoice and I am trying to create shipment but getting the error in console Can anyone pls help me?


texts: Error individual price when maximum Qty Allowed in Shopping Cart are exceced

texts:
I set max qty allowed in the shopping cart to 3 products but when I add more than 3 products to cart, the individual prices reduce.
Example product priced at 15 when you add more that 3 the price shows as 5 each.
I don't have any tier price or cart promotion there, any solution?


texts: Magento 2 : Admin shipment add custom field

texts: i want to add custom field to admin ship order , i want to add dropdown value of same will come from custom table , is there way to do same , i am clueless about way to do it , please help with it


texts: problem getting current url when cache is turned on

texts:
Summary

This problem is affecting my Venus Theme Mega Menu module.
When caching is turned on the menu no longer shows correct .active classes for the current page.
I'm looking in the module code where the .active page is set (app/code/Ves/Megamenu/Helper/Data.php)
The default magento menu does not suffer this problem.
I'm using SSL for storefront pages

Details

When caching is turned off the following two vendor methods both return the correct current url:

$this->_storeManager->getStore()->getCurrentUrl()

and

$this->_urlInterface->getCurrentUrl()

When caching is turned on both methods return only the URL of the first page that is loaded after the cache is turned on.

Example

cache:enable then cache:flush
first page loaded is https://myurl/first-page
both methods return this as the current url
go to page https://myurl/next-page
both methods still return https://myurl/first-page as the current URL
and the same URL is returned by both methods for all subsequent pages I visit

Does anyone know why the caching should interfere with these methods and if there is anything I can do to correct it.


texts: Which template or layout does this line load $this->loadLayout( array('default','marketplace_account_dashboard'));

texts:
Magento beginner here. What does this line do:

$this->loadLayout( array('default','marketplace_account_dashboard'));

? I need to know what does this line do (maybe which controller/layout/template does it load), so that I can go in it and change it.


texts: usatilea.nextmp.net is currently unable to handle this request

texts:
I just moved my site from local to live server it was working fine on local but as its moved over live start giving the error

is currently unable to handle this request.

This is the domain that i am using : http://usatilea.nextmp.net/

I have cleared all the cache by deleting the var/cache and also updated the secure and unsecure urls in database too.

Print Errors on front end and gives this:

Fatal error: Uncaught Error: Function name must be a string in /chroot/home/usatilea/usatileandmarble.net/html/app/code/core/Mage/Core/Model/Layout.php:555 Stack trace: #0 /chroot/home/usatilea/usatileandmarble.net/html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput() #1 /chroot/home/usatilea/usatileandmarble.net/html/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout() #2 /chroot/home/usatilea/usatileandmarble.net/html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home') #3 /chroot/home/usatilea/usatileandmarble.net/html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home') #4 /chroot/home/usatilea/usatileandmarble.net/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction() #5 /chroot/home/usatilea/usatileandmarble.net/html/app/code/core/Mag in /chroot/home/usatilea/usatileandmarble.net/html/app/code/core/Mage/Core/Model/Layout.php on line 555

Server Error log also not have any error in it. check the following image:

Please help to solve the issue


texts: Need to add custom attribute along with order

texts:
I need to set custom attribute along with order,

This attribute will have random values with each order,  I need to  show this value on the sales/order grid in admin.


texts: Magento 2 - Is it possible to enable "Customizable Options" feature in Bundle products?

texts:
I want custom option feature in bundle products in Magento 2. So anyone can help here. How I can enable this feature in admin for bundle product creation.

Thanks


texts: I am looking for Px Fusion extensions for my online store. any suggestions ?


texts: Display product attribute value if any grouped products have a particular attribute value on a grouped products view that are shown?

texts:
I was wondering how I could grab a custom attribute lets say "has_lowprice" and pass this along to a grouped product page.

What I'm doing on my product pages is grabbing this attribute and displaying information if this product has a certain attribute.

<div id="lowPrice" data-type="<?php print $_product->gethas_lowprice(); ?>">

The above code will display the "has_lowprice" attribute.

What I need to know is how to pass this on to a grouped product page if any of the products on the page have this has_lowprice attribute.

Thanks for any help on this matter.


texts: Magento : How to Display Products as Default Display Product

texts:
I want to display product same as magento displays in default when product is added. I added tab and when clicks on that tab it displays products but not with systematic design. I want to display product like this:

I added a tab in customer.xml

<customer_account>
        <reference name="customer_account_navigation">
            <action method="addLink">
                <name>offer_product</name>
                <path>user/index/index</path>
                My Offer Product
            </action>
        </reference>

    </customer_account>

This is my phtml file through which I displayed my products when clicked on my customised tab:

<?php
  $products = Mage::getModel("catalog/product")->getCollection()->addAttributeToSelect('*') ->setOrder('entity_id', 'DESC')->setPageSize(10);
  foreach($products as $product):
    $_product = Mage::getModel('catalog/product')->load($product->getId());
    $attribute_value = $_product->getResource()->getAttribute('customerproduct')->getFrontend()->getValue($_product);
     if($attribute_value == 'Yes')
      {
       ?>
        <img alt="" class="img-responsive" src="<?php echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(200,200); ?>">
       <?php
       ?>

       <?php
       echo $product->getName().'
';
       echo $product->getPrice();
      }
  endforeach;
?>

and this is my controller code :

<?php
class Test_User_IndexController extends Mage_Core_Controller_Front_Action
{
 public function indexAction()
    {
        $this->loadLayout();
        $this->_initLayoutMessages('customer/session');
        $this->_initLayoutMessages('catalog/session');

        $this->getLayout()->getBlock('content')->append(
            $this->getLayout()->createBlock('user/account_dashboard')
        );
        $this->getLayout()->getBlock('head')->setTitle($this->__('My Account'));
        $this->renderLayout();
    }
}
?>

I got idea that, I have to include list.phtml to display my products as magento displays in default after adding products. But I don'y know how to do it.Please help.


texts: An element with a "root" ID already exists. magento/framework/Data/Structure.php:157

texts:
I have been receiving this error for a while in the exception.log. It links to Framework/Data/Structure.php

 /**
 * Create new element
 *
 * @param string $elementId
 * @param array $data
 * @return void
 * @throws LocalizedException if an element with this id already exists
 */
public function createElement($elementId, array $data)
{
    if (isset($this->_elements[$elementId])) {
        throw new LocalizedException(
            new \Magento\Framework\Phrase('An element with a "%1" ID already exists.', [$elementId])
        );
    }
    $this->_elements[$elementId] = [];
    foreach ($data as $key => $value) {
        $this->setAttribute($elementId, $key, $value);
    }
}

I have searched in the Database for "root" but nothing showed up. Can anyone help me please.

Thank you


texts:
I want set ALL Porduct List page in 2-colums-left.phmtml for what i want to change i am do in page.xml is it right?

<catalog_category_default translate="label">
 <reference name="root">
     <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
 </reference>
    Catalog Category (Non-Anchor)
    <reference name="left">
        <block type="catalog/navigation" name="catalog.leftnav" after="currency" 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"/>

                </block>
                <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
                <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
                <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
            </block>
        </block>
    </reference>
</catalog_category_default>


texts: Number of Customers Total Spend in the Past Year Output into £20 Ranges

texts:
I'm basically looking to build a query that'll return the number of customers in sales_flat_order who have spent in total year to date:

Between £0 and £20
Between £20.01 and £40
Between £40.01 and £60
etc, to the maximum total spend by a customer this year


texts: How to change custom UI grid collection based on custom attribute value in magento 2

texts: I have created custom field in admin user creation form.Based on the value in this field,My custom module grid collection will  be loaded.How to acheive this?


texts:
I used the following project and created a custom report: https://github.com/technodelight/magento_custom_reports_example

I changed stuff in the report. mainly there is another table joined to the data and the csv-export is customized.

So now I have the report at https://shop.tld/index.php/admin/admin/my_reports/index/

I now want another report that just changes the table joined to the data and the csv export.
So I need to change \code\local\My\Reports\Model\Mysql4\Report\Collection.php and \code\local\My\Reports\controllers\Adminhtml\My\ReportsController.php
I want to crate two new classes and inherit from the existing two.

What I don't know is how I have to name my classes and add them to the adminhtml.xml, so it is visible at a new menu point.

It should be available at https://shop.tld/index.php/admin/admin/my_reports/[something]/ or https://shop.tld/index.php/admin/admin/[something]/index/

The adminhtml is now

                <children>
                    <my_reports translate="title">
                        <title>My Custom Report</title>
                        <action>adminhtml/my_reports</action>
                        <sort_order>100</sort_order>
                    </my_reports>

I can add another part like:

                    <my_report_two translate="title">
                        <title>Another Report</title>
                        <action>adminhtml/my_report_two</action>
                        <sort_order>120</sort_order>
                    </my_report_two>

And it will open the url https://shop.tld/index.php/admin/admin/my_report_two/index/

But there is just a 404 error, obviously.


texts: Compilation error due to final class Vault in Magento version before 2.2.0

texts:
I am writing a plugin on class Magento\Payment\Model\MethodInterface:

<type name=“Magento\Payment\Model\MethodInterface”>
   <plugin name=“mageworx_ordereditor_change_title_print_order”
           type=“MageWorx\OrderEditor\Plugin\Block\Sales\Adminhtml\Order\View\Payment”/>
</type>

In Magento before 2.2.0 class Magento\Vault\Model\Method\Vault
has "final class Vault"
but after 2.2.0 the class is "class Vault"

When I launch the following command in Magento 2.1.9
bin/magento setup:di:compile
I get error:

Class Magento\Vault\Model\Method\Vault\Interceptor may not inherit from final class (Magento\Vault\Model\Method\Vault) in /home/zalescky/web/m219e/var/generation/Magento/Vault/Model/Method/Vault/Interceptor.php on line 7
PHP Stack trace:
PHP   1. {main}() /home/zalescky/web/m219e/bin/magento:0
PHP   2. Symfony\Component\Console\Application->run() /home/zalescky/web/m219e/bin/magento:23
PHP   3. Magento\Framework\Console\Cli->doRun() /home/zalescky/web/m219e/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRun() /home/zalescky/web/m219e/vendor/magento/framework/Console/Cli.php:96
PHP   5. Symfony\Component\Console\Application->doRunCommand() /home/zalescky/web/m219e/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   6. Symfony\Component\Console\Command\Command->run() /home/zalescky/web/m219e/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   7. Magento\Setup\Console\Command\DiCompileCommand->execute() /home/zalescky/web/m219e/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP   8. Magento\Setup\Module\Di\App\Task\Manager->process() /home/zalescky/web/m219e/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:188
PHP   9. Magento\Setup\Module\Di\App\Task\Operation\Interception->doOperation() /home/zalescky/web/m219e/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
PHP  10. Magento\Setup\Module\Di\Code\Generator->generateList() /home/zalescky/web/m219e/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Interception.php:100
PHP  11. Magento\Framework\Code\Generator->generateClass() /home/zalescky/web/m219e/setup/src/Magento/Setup/Module/Di/Code/Generator.php:70
PHP  12. Magento\Framework\Code\Generator\Io->includeFile() /home/zalescky/web/m219e/vendor/magento/framework/Code/Generator.php:118
PHP  13. include() /home/zalescky/web/m219e/vendor/magento/framework/Code/Generator/Io.php:158

In my extension I want to write a plugin for each payment method, but the final payment method class doesn’t allow me to do this. How will it be better to cope with this?


texts: Magento - Checking if a module is installed?

texts: How can i check the module installed or not in magento and also the module are enabled or disbled.


texts:
I want to echo the tier prices on the list.phtml?

I have taken a look at tier_prices.phtml but the code can't just be copypasted, because then you'd get a notice error and it'll stop working.

$tierprice = $_product->getData('tier_price'); just gives you the "lowest price" for the specific product.

How can I achieve to get the tierprices displayed on list.phtml?


texts: INR Symbol with Tamil font in Magento invoice PDF

texts: I am using Magento version 1.9.2.2. By default, it supports Rupee symbol and Tamil font in both frontend and admin panel. But, When i have printed the order invoice, it appears as boxes. Which (tamil) font supports for Rupee symbol as well as Tamil words in generated invoice PDF in magento.


texts:
I created a new page layout for my home page.
I want it to display 3 blocks next to each other.

It should look like this:

I created the blocks in backend but with the below code they don't show up.

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>

    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer"/>
    </referenceContainer>

    <referenceContainer name="columns">
        <!--
        <container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main" after="main">
            <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
        </container>
        <container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional" after="div.sidebar.main">
            <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
        </container>

        <container name="fourth.column" htmlTag="div" htmlClass="fourth-column" after="-">
            <block class="Magento\Framework\View\Element\Text">
                <arguments>
                    <argument name="text" xsi:type="string">Nummer 3</argument>
                </arguments>
            </block>
        </container>
        -->

        <container name="column1" htmlTag="div" htmlClass="column-float-left" after="-">
          <block class="Magento\Cms\Block\Block" name="startseite_links">
            <!--
            <arguments>
                <argument name="startseite_links" xsi:type="string">cmsblock-identifier</argument>
            </arguments>
            -->
        </block>
        </container>

        <container name="column2" htmlTag="div" htmlClass="column-float-left" after="-">
          <block class="Magento\Cms\Block\Block" name="startseite_mitte">
            <!--
            <arguments>
                <argument name="startseite_mitte" xsi:type="string">cmsblock-identifier</argument>
            </arguments>
            -->
        </block>
        </container>

        <container name="column3" htmlTag="div" htmlClass="column-float-left" after="-">
          <block class="Magento\Cms\Block\Block" name="startseite_rechts">
            <!--
            <arguments>
                <argument name="startseite_rechts" xsi:type="string">cmsblock-identifier</argument>
            </arguments>
            -->
        </block>
        </container>

    </referenceContainer>

</layout>

Any idea why this is happening?

Thanks for any help!


texts: Upgrade from 2.3.5 to 2.4.0 error related to scconnector_google_feed_cl

texts:
I'm upgrading Magento 2.3.5 to 2.4.0, but I'm getting this error when trying bin/magento setup:upgrade:
Unable to apply data patch Magento\CatalogUrlRewrite\Setup\Patch\Data\UpdateUrlKeyForProducts for module Magento_CatalogUrlRewrite. Original exception message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'DBNAME.scconnector_google_feed_cl' doesn't exist, query was: INSERT  INTO catalog_product_entity_varchar (entity_id,attribute_id,store_id,value_id,value) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE value = VALUES(value)
I already tried to apply this patch, but it did not help: https://github.com/magento/magento2/pull/29804/files
Also removed three triggers from some media gallery table as somebody suggested and that did not work. Then I removed the Google Shopping Ads module, but I still get the error. Any ideas?


texts: How to Override Construct function of Magento without violating "

texts:
I created a class with the construction:

public function __construct(
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        array $data = []
    ) {

        parent::__construct($data);
        $this->storeManager       = $storeManager;
    }

But it get the warning:

  Only dependency assignment operations are allowed in constructor.
  (using PHPCS)

Is there anyway I can rewrite construct function, still call the parent construct and do not get that warning.
(It happen with ALL construct rewriting functions, and only happened lately, the warning is kinda new).


texts: Magento 2 Stripe module changes price of product over custom price

texts:
I'm trying to add to cart a product with custom and base price. It's working file.
The problem is that Stripe checkout module has an update button that adds the address of a guest customer to billing address, and when that happens my product's price get backs to original.
Here is my controller where I set the custom price.
public function execute(){
        $request = $this->getRequest()->getPostValue();
        $product_id = $request['product_id'];
        $price = $request['grand_total'];
        $params = array(
            'formKey' => $this->formKey,
            'product_id' => $product_id,
            'qty' => 1
        );

        $productFactory = $this->product->create();
        try{
            $product = $productFactory->load($product_id);

            $product->setPrice($price);
            $product->setBasePrice($price);
            $product->setIsSuperMode(true);
            $this->cart->addProduct($product,$params);
            $this->cart->save();
        }
        catch(\Exception $e){
            return $request;
        }
    }

Is there any solution for this that does not involves modifying Stripe's module ?
Maybe changing product's price from database dinamically?
Thanks and greetings!


texts: Magento product collection fetch based on special price end date in desc order of created date

texts:
I want to fetch product collection sorted in desc order of created date and filter it out if the special price end date is lower than current date.
I am able to sort it using this code.

if ($this->getCurrentOrder()) {
    if(($this->getCurrentOrder())=='position'){
        $this->_collection->setOrder('entity_id','desc');
    } else {
       $this->_collection->setOrder($this->getCurrentOrder(),$this->getCurrentDirection());
    }
}

But I cant filter this out further with special price end date < today's date.
Can anyone help? I will really appreciate it.

Thanks.


texts: Update CMS Blocks Status Programmatically issue

texts:
I have created a cron that in configured date enables or disables some CMS blocks.

It works fine only for disabling action and not for enabling.
It's so strange because I call the same method:

Mage::getModel('cms/block')->setStoreId($storeId)->load($block)->setData('is_active', 1)->save();

to enable DOESN'T WORK

Mage::getModel('cms/block')->setStoreId($storeId)->load($block)->setData('is_active', 0)->save();

to disable WORKS

What is wrong?


texts:
When I try to create an order from the sales grid I get a console error when trying to add the items to the order. TypeError: newPopupContainer is null in giftmessage.js on line 160

Code snippet from that file:

var newPopupContainer = $('gift_options_configure_new');
 $(document.body).insert({top: newPopupContainer});
 newPopupContainer.id = 'gift_options_configure';

I have compared that file to the same from a fresh installation package and there is no difference.

Any ideas on how to get round this?


texts: How do I upload images to a slideshow in Magento 1.9?

texts:
I asked my developer to send over a tutorial on how to upload pictures and banners to the slideshow, and I am not seeing the same information he is.

When I get to the area where I need to browse for a banner, there are no "Browse" buttons. Only a "Create Folder..." button. The screenshots below show what I am having problems with locating the "browse" button.


texts: Catalog Inventory Stock Indexer not working

texts:
I have an issue with the cataloginventory_stock index.

Base table or view already exists: 1050 Table '/cataloginventory_stock_status_outdated' already exists, query was: RENAME TABLE cataloginventory_stock_status TO cataloginventory_stock_status_outdated,cataloginventory_stock_status_replica TO cataloginventory_stock_status,cataloginventory_stock_status_outdated TO cataloginventory_stock_status_replica

Can anyone help me for this?

Any help would be appreciated

Thanks


texts: Magento 1.9.1.0v4 - exact clone is extremely slow on local machine - only frontend

texts:
I cloned my server version of a Magento install locally. I changed nothing (besides the base url) and it is extremely slow.  With extremely I mean loading is almost not possible (up to a minute and more). The version on the server is just fine.

This only affects the frontend. The backend works fine.

I run it on a Mac with MAMP Pro with PHP 5.6.2 and MySQL 5.5.38. Machine is a new macbook pro with 16GB RAM and 2,8 GHz Intel Core i7.

PHP config:

max_execution_time = 600
max_input_time = 600
memory_limit = 512M

MySQL config:

# The MySQL server
[mysqld]
socket      = /Applications/MAMP/tmp/mysql/mysql.sock
key_buffer = 1024M
max_allowed_packet = 512M
table_cache = 1024
sort_buffer_size = 4096K
net_buffer_length = 512K
read_buffer_size = 4096K
read_rnd_buffer_size = 4096K
myisam_sort_buffer_size = 1024M

log = /Applications/MAMP/logs/mysql_sql.log

[mysqldump]
quick
max_allowed_packet = 256M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 64M
sort_buffer_size = 64M
read_buffer = 8M
write_buffer = 8M

[myisamchk]
key_buffer = 64M
sort_buffer_size = 64M
read_buffer = 8M
write_buffer = 8M

Other sites on this Mac run just fine and fast.

Magento cache is activated and the indexes and the cache are up to date.

What could cause this?


texts: Magento 2 : Parent product in result on searching child product sku

texts:
I am using magento version 2.3.3

My requirement is when i search with child product sku (which is visibility none) so parent (configure) product show in search result

For example

Parent product Sku = configursku

child 1st product sku = abc

child 2nd product sku = xyz

child 3rd product sku = pqr

so requirement is when i search "abc" so its no result found in search
but it should be showing parent product (configursku) in result

any one help here

thanks in advance


texts: FireGento_GermanSetup inline translation does not work

texts:
If I open the translation for "Incl. 7% Tax, plus Shipping Cost" it says:

Location:  Span element
Scope:  FireGento_GermanSetup
Shown:  19%
Original:  %s%%
Translated:  %s%%
Store View Specific:
Custom:  %s%%

How can I change the translation text?

Found the source file price_info.phtml

<?php echo $this->__('Incl. %s Tax, plus Shipping
   Cost', $this->getFormattedTaxRate(), $shippingCostUrl) ?>

This is the same problem, but the solution does not work for me or I can not make it work.


texts: Change the text box value onchange of select in system.xml of custom magento extension

texts:
I have added select option SFTP host with values production, sandbox in my system.xml file of custom extenstion. There is one text field SFTP port in system.xml. I want to set the text field value on change of selection.

If I select production , then port value = 22
If I select sandbox ,  then port value  = 21

<ftphost translate="label">
SFTP host
<frontend_type>select</frontend_type>
<source_model>gb/system_config_source_sftp</source_model>
<sort_order>60</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</ftphost>
<ftpport translate="label">
 SFTP port
 <frontend_type>text</frontend_type>
 <sort_order>70</sort_order>
 <show_in_default>1</show_in_default>
 <show_in_website>1</show_in_website>
 <show_in_store>1</show_in_store>
 </ftpport>

new system.xml

<liveenvironment translate="label">
                            Live environment
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                             <comment><model>gb_gbgsp/system_config_source_sftpcomment</model>
     </comment>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </liveenvironment>

comment.php

<?php
class gb_gbgsp_Model_Adminhtml_System_Config_Source_Sftpcomment extends Mage_Core_Model_Config_Data
{
    public function getCommentText(Mage_Core_Model_Config_Element $element, $currentValue)
    {

    $result = "";

        return $result;
    }
}


texts: Magento 2 : get all store list by sort order

texts:
I want to get store list sort by sort order. How to get it?

I just use this code. Which code i need to add ?

$stores = $this->storeManager->getStores();


texts: how to make a page in customer my account in magento 1.9

texts: i want a tab with upload from in customer my account in magento 1.9.2,Can anybody guide me how to make it step by step.


texts:
When i disable tinyMce, i got

I don't know why...


texts: Alternative for Cart::updateItems method

texts:
In Magento 2.4 (maybe earlier also) the class Magento\Checkout\Model\Cart is deprecated.
This class contains a very convenient method updateItems which updates the qty of the items in the cart based on an array.
I need something similar in my custom code and I'm trying to avoid calling deprecated methods.
Is there an alternative to the Magento\Checkout\Model\Cart::updateItems that is not deprecated?


texts: Magento 2 How can I remove tabs in order view?

texts:
It is able to remove the block by using
But how can I remove the tab which is added by using argument? Thanks.

<block class="Magento\Sales\Block\Adminhtml\Order\View\Tab\Creditmemos" name="sales_order_creditmemo.grid.container"/>
<action method="addTab">
                            <argument name="name" xsi:type="string">order_creditmemos</argument>
                            <argument name="block" xsi:type="string">sales_order_creditmemo.grid.container</argument>
</action>


texts:
I must to make a slider products.

My theme is venedor.

I used this code

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="10" products_count="4" template="catalog/product/list/featured_slider.phtml"}}

but i see 3 products. for see 4 product i need to use arrow.

My code is erroneous


texts: Magento 2.1 :: Custom Option Drop Down :: Add Image Upload Field

texts:
How can we add image upload option specially for dropdown,
and show it on frontend,
which i did on magento 1.9


texts: Where is the "add product logic" in smart category rule - Magento 2 EE

texts:
I need to alter the logic of "add product in a category" based on category rule.

My effort:

After add rule, When I save category, it redirects to http://host/admin/catalog/category/save/key/cae5eaa5332d3c8a4be400eb667530bfba2727445ce1a072d5f006f4a9f10be4/ but in that controller I'm not seeing any add product logic, in that controller dispatch event catalog_category_prepare_save while check I found one observer vendor/magento/module-visual-merchandiser/Observer/CategorySaveMerchandiserData.php are listening to this event, I have checked that observer too but I can't found where it is the add product logic.

Please help me to identify.

Thanks!