texts: How to change the order status cancel in magento after payment cancelled from ccavenue MCPG Payment Gateway?

texts:
integrate my website with ccavenue MCPG payment Gateway. I have an issue on orders, if customer cancel the payment from payment gateway successfully return to website and show the order as cancelled but from the admin panel order status shows as pending.
How can i update order status as cancelled.


texts: Magento 2: How add dropdown in admin form?

texts:
I have set dropdown in form.xml like

<argument name="data" xsi:type="array">
    <item name="options" xsi:type="string">Book\Flip\Model\Category\Attribute\Source\Category</item>
    <item name="config" xsi:type="array">
        <item name="dataType" xsi:type="string">text</item>
        <item name="label" translate="true" xsi:type="string">category</item>
        <item name="formElement" xsi:type="string">select</item>
        <item name="source" xsi:type="string">flip</item>
        <item name="sortOrder" xsi:type="number">20</item>
        <item name="dataScope" xsi:type="string">category</item>
        <item name="validation" xsi:type="array">
            <item name="required-entry" xsi:type="boolean">false</item>
        </item>
    </item>
</argument>

and create model

namespace Book\Flip\Model\Category\Attribute\Source;

    class Category extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
    {
        protected $_optionsData;

        public function __construct(array $options)
        {
            $this->_optionsData = $options;
        }

        public function getAllOptions()
        {
            if ($this->_options === null) {
                $this->_options = [
                    ['value' => '1', 'label' => __('science')]
                ];
            }
            return $this->_options;
        }
    }

But in admin form it's shown a blank dropdown.


texts:
I am getting the below error on updating a marketplace extension in backend (System->Websetup Wizard->Extension Manager).

  Check Cron Scripts Cron script readiness check failed. Hide detail

  Error from Setup Application Cron Script: Cron job has not been
  configured yet Other checks will fail as a result (PHP version, PHP
  settings, and PHP extensions)

  Error from Updater Application Cron Script: Cron job has not been
  configured yet

  For additional assistance, see cron scripts help.

  Check Component Dependency We found conflicting component
  dependencies. Hide detail

  Command "update" failed: Loading composer repositories with package
  information Updating dependencies (including require-dev) Your
  requirements could not be resolved to an installable set of packages.

  Problem 1
  - Installation request for dotmailer/dotmailer-magento2-extension 3.2.0 -> satisfiable by dotmailer/dotmailer-magento2-extension[3.2.0].
  - dotmailer/dotmailer-magento2-extension 3.2.0 requires magento/framework >=100 <103 -> no matching package found.

  Potential causes:
  - A typo in the package name
  - The package is not available in a stable-enough version according to your minimum-stability setting see
  https://getcomposer.org/doc/04-schema.md#minimum-stability for more
  details.

  Read https://getcomposer.org/doc/articles/troubleshooting.md for
  further common problems.

  For additional assistance, see component dependency help .

  PHP Settings Check * For additional assistance, see PHP settings check
  help .

  Need Help?

  PHP Extension Help PHP Extensions Check missing PHP extensions. Hide
  detail

  The best way to resolve this is to install the correct missing
  extensions. The exact fix depends on our server, your host, and other
  system variables.  Our PHP extension help can get you started.

  For additional assistance, contact your hosting provider.

How to Fix it?


texts: Invalid template file in a custom module

texts:
Issue:

  Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid
  template file: 'Toogas_Easypay::info/multibanco.phtml' in module:
  'Toogas_Easypay' block's name: 'multibanco\info_0'

Layout Location:

  public_html/app/code/Toogas/Easypay/view/frontend/templates/info/multibanco.phtml

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * @var \Magento\Payment\Block\Info $block
 * @see \Magento\Payment\Block\Info
 */
$specificInfo = $block->getSpecificInformation();
$title = $block->escapeHtml($block->getMethod()->getTitle());
?>

<?php /* @noEscape */ echo $title; ?>

<?php if($specificInfo): ?>

<img src="<?php echo $block->getLogoSrc() ?>" style="height:64px;"/>

<?php echo $block->escapeHtml(__('Entity'))?>:	<?php echo $block->escapeHtml($specificInfo['entity'])?>

<?php echo $block->escapeHtml(__('Reference'))?>:	<?php echo $block->escapeHtml($specificInfo['reference'])?>

<?php echo $block->escapeHtml(__('Amount'))?>:	<?php echo $block->escapeHtml($specificInfo['amount'])?>

<?php endif; ?>

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


texts: Bug in _getEncodedApiKey($apiKey) since 1.9?

texts:
I was (and still am) struggling to login using the magento api. Thereby I noticed, that

Mage_Api_Model_User::_getEncodedApiKey($apiKey)

got slightly changed

from:

protected function _getEncodedApiKey($apiKey)
    {
        return $this->_getHelper('core')->getHash($apiKey, 2);
    }

to

protected function _getEncodedApiKey($apiKey)
    {
        return $this->_getHelper('core')->getHash($apiKey, Mage_Admin_Model_User::HASH_SALT_LENGTH);
    }

In my case, this always leads to false in

if ($this->authenticate($username, $apiKey))

Any thoughts?


texts:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`bikeplus`.`eav_attribute`, CONSTRAINT `EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CA), query was: INSERT INTO `eav_attribute` () VALUES ()

Plz, list all table are affected by eav_attribute.


texts:
When customer ask cancel order and refund, I refund payment on 3rd party payment admin page

the order status is still processing in magento admin and when I try to cancel , I got

  The order(s) cannot be canceled

I checked the invoice page of the order but there is no button like refund

How can I cancel order after payment complete?


texts: Magento 2 REST API placing order with Braintree Credit Card error

texts:
Magento version: 2.2.0

I'm trying to place order with Braintree credit card.
The payload I send is:

{
  "paymentMethod": {
    "method": "braintree",
    "additional_data": {
      "cc_cid": "000",
      "cc_type": "VI",
      "cc_exp_year": "2019",
      "cc_exp_month": "2",
      "cc_number": "xxxxxxxxxxxxx"
    }
  }
}

But I've got error "Transaction has been declined. Please try again later."

The data I use is valid, because I can successfully place order with these data via frontend.
Also, I'm sure that my API calls are valid, because I can place order via API using other payment method like "Check / Money order"


texts: What is the correct way to modify Product Page

texts:
I have a 3rd Party theme (Ves-Fasony) installed and I need to remove the following in Product Page:

Breadcrumps
Review
Add to Wish List
Add to Compare
Email

I removed the 「Add to Wish List」and「Review」by disabling it in Admin Panel.But I am not sure about others, I tried to remove the breadcrumps by doing the following:

I created a layout folder under the following directory

[magento_dir]/app/design/frontend/[vendor_name]/[theme_name]/
Then under layout folder, I created default.xml which has the following code

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->

    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="page.top" remove="true" />
</body>

I am certainly wrong because it is not working. I am a newbie and I am really having a hard time understanding Magento. Please tell me where I went wrong and what should I do to remove those.


texts: Sense for splitting shipping text into title and method name

texts:
For Shipping "table rate" I have to define a title and the method name. Why are there two fields available? I need only one text for checkout/cart like "depends on balance".
I try to find a sense for splitting this into two fields or good examples and I try to avoid customizing the code of my installation for this.


texts:
I just started learning Magento2. I was able to override template, assign new ones etc.

But I found it too typical to understand the price rendering. Specially after looking at the following:

https://mage2.pro/t/topic/352

Is there no way to do something like:   $_product->getPrice()

Why it is so typical?


texts: Magento 2 add multiple variations configurable product to cart at one time

texts:
I am trying to add multiple variations configurable product to cart at one time but it shows following error

  jquery.js:9666 POST http://127.0.0.1/magento216/checkout/cart/add/uenc/aHR0cDovLzEyNy4wLjAuMS9tYWdlbnRvMjE2LzI1MDMtbWVucy1zaGlydHMuaHRtbA,,/product/62/ 500 (Internal Server Error)

My code is:

  public function execute()
{
    if (!$this->_formKeyValidator->validate($this->getRequest())) {
        return $this->resultRedirectFactory->create()->setPath('*/*/');
    }
    //$params = $this->getRequest()->getParams();
    $eparams =    array ('uenc' => 'aHR0cDovLzEyNy4wLjAuMS9tYWdlbnRvMjE2LzI1MDMtbWVucy1zaGlydHMuaHRtbA,,',
        'product' => '62',
        'selected_configurable_option' => '',
        'related_product' => '',
        'form_key' => 'ZTLmXAr9YrxjJM9U',
        'super_attribute' =>
            array (
                93 => '5',
                199 =>
                    array (
                        1 => '11',
                        2 => '10',
                        3 => '9',
                        4 => '8',
                    ),
            ),
        'qty' => '1',
    );

    $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/step1.log');
    $logger = new \Zend\Log\Logger();
    $logger->addWriter($writer);
    $logger->info($eparams['super_attribute']['199']);

    foreach($eparams['super_attribute']['199'] as $item){

        $params =  array ('uenc' => 'aHR0cDovLzEyNy4wLjAuMS9tYWdlbnRvMjE2LzI1MDMtbWVucy1zaGlydHMuaHRtbA,,',
            'product' => '62',
            'selected_configurable_option' => '',
            'related_product' => '',
            'form_key' => 'ZTLmXAr9YrxjJM9U',
            'super_attribute' =>
                array (
                    93 => '5',
                    199 => $item
                ),
            'qty' => '1',
        );

        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/step2.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info($params);

        if (isset($params['qty'])) {
            $filter = new \Zend_Filter_LocalizedToNormalized(
                ['locale' => $this->_objectManager->get('Magento\Framework\Locale\ResolverInterface')->getLocale()]
            );
            $params['qty'] = $filter->filter($params['qty']);
        }

        $product = $this->_initProduct();
        $related = $this->getRequest()->getParam('related_product');

        /**
         * Check product availability */

        if (!$product) {
            return $this->goBack();
        }

        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info($params);

        $this->cart->addProduct($product, $params);

    }

    if (!empty($related)) {
        $this->cart->addProductsByIds(explode(',', $related));
    }
    //$this->newProduct();

    $this->cart->save();
    //exit;

    /**
     * @todo remove wishlist observer \Magento\Wishlist\Observer\AddToCart
     */
    $this->_eventManager->dispatch(
        'checkout_cart_add_product_complete',
        ['product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse()]
    );

    if (!$this->_checkoutSession->getNoCartRedirect(true)) {
        if (!$this->cart->getQuote()->getHasError()) {
            $message = __(
                'You added %1 to your shopping cart.',
                $product->getName()
            );
            $this->messageManager->addSuccessMessage($message);
        }
        $this->newProduct();
        return $this->goBack(null, $product);
    }
}


texts: chcon -R -t httpd_sys_rw_content_t /var/www/html/magento/ SAFE?

texts:
to fix an issue in Magento I found this solution here on Stackexchange:

I used this command line in Putty:

So after that I could fix the issue.


texts:
I want to add "laba cena" (attribute) in catalog price rule dropdown
I am using data patch but its not working

any tips?

now using

 <?php
 namespace Devall\SpecialPrice\Setup\Patch\Data;

  use Magento\Framework\Setup\Patch\DataPatchInterface;
  use Magento\Eav\Setup\EavSetup;

      class AddLabaCenaAttribute implements DataPatchInterface
     {
   protected $eavSetupFactory;

public function __construct( EavSetup $eavSetupFactory)
{
    $this->eavSetupFactory = $eavSetupFactory;
}

/**
 * @inheritDoc
 */
public static function getDependencies()
{
    return [];
}

/**
 * @inheritDoc
 */
public function getAliases()
{
    return [];
}

/**
 * @inheritDoc
 */
public function apply()
{
    $this->eavSetupFactory->updateAttribute(4,184,'is_used_for_promo_rules',1,null);
}

      }`

still no success .


texts: I am not sure how quotes work in Magento. I saw that a quote id is assigned to customer when is created. Sometimes I see in sales_flat_quote table that for one customer there are 2 lines there...I mean there are 2 quotes.(actually one has store_id=0 and one store_id=1) When a users log in through API (custom code) it seems that a new quote is assigned to. I don't get what is happening..or how should this work..


texts: Magento 2.4.1: We cannot retrieve payment information object instance

texts: The store has recently been upgraded to Magento 2.4.1. When trying to move to payment methods page from checkout by clicking the next button, message "We cannot retrieve payment information object instance" is displayed. I don't seem to find any setting that I can check in the admin to fix this. Please advise what can I try to fix it?


texts: Magento2 Installtion errors on windows through composer

texts:
I am facing a problem while making a installation of magento2 by composer i got the following error after a consecutive successful downloading of some modules. Can one please help me to sort out this.

Thanks in advance.


texts:
There is this code in Magento 2 in

  Magento\Catalog\Controller\Adminhtml\Product\Save.php

if ($redirectBack === 'new')
{
   $resultRedirect->setPath('catalog/*/new'
                           ,['set' => $productAttributeSetId
                                ,'type' => $productTypeId]);

Can anyone tell me what does 'catalog/*/new' refers to? I have checked the controller folder and haven't found new.php file anywhere.


texts: Get attributes of simple products which consist in configurable product

texts: How i can get attributes of simple products which consist in configurable product ?


texts:
I have updated Magento 1.9.X to Magento 2.1.3. I have used magento2_data_migration-0.1.25 When i was importing I got an error in customer_group table so I have manually imported it from previous database.
Now when I logged in at back-end in Magento 2 there is no customer data. I checked tables data is there. When I am trying to re-index I got an error.
Attached the screen shot for indexing.

Anyone give me a suggestion?


texts:
I've been poking around the RMA class file to try and find a way to close it, and it would seem that simply running $rma->close(); should be enough, but that fails without displaying an error.

Has anyone found another way to close an RMA through PHP?


texts: How to add admin user role programatically?

texts: I need to add user role and set that user to edit/add/view only specific products on admin page.


texts: "Magento supports PHP 7.0.2, 7.0.4, and 7.0.6" error message when I have PHP 7.2.12

texts:
Having installed the DB for Magento 2.2.6 I get this error message when trying to initiate setup;

http://www.ben-grant.co.uk/magento226/

"Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read Magento System Requirements."

The version of PHP I am running is 7.2.12 so wondered if anyone would know why this error is occurring?


texts: Magento 2 Payment Gateway - Howto show Gateway errors in Frontend?

texts:
we are about developing a custom payment gateway plugin for one of our customers using the magento-sample-gateway-payment plugin as a draft in a Magento 2.1.4.

We have already successfully implemented the payment and if the gateway say's ok all works fine.

Our problem now is, that if the gateway refuses the payment, it will deliver one of many error messages. We want to show this error messages to the customer in the frontend.

Our Validator looks like this:

/**
 * Performs validation of result code
 *
 * @param array $validationSubject
 * @return ResultInterface
 */
public function validate(array $validationSubject)
{
    if (!isset($validationSubject['response']) || !is_array($validationSubject['response'])) {
        throw new \InvalidArgumentException('Response does not exist');
    }
    $response = $validationSubject['response'];
    if ($this->isSuccessfulTransaction($response)) {
        return $this->createResult(
            true,
            []
        );
    } else {
        // We have also tryed to throw a LocalizedException here like i saw in other payment plugins on github
        return $this->createResult(
            false,
            [__('My custom error message later out of $response')]
        );
    }
}

The problem is, no matter what we tryed the frontend always shows 'An error occurred on the server. Please try to place the order again.' and the actual error message gets only logged to the system.log

I hope someone is able to help me,

Greetings Sven


texts:
Hi I'm trying to replace a link to a cms page "review" in a .phtml file like so:

<?php echo $this->getUrl('review'); ?>

But this returns www.mydomain/shop/review/ as "shop" is our store view code.

How can I change it to return www.mydomain/review/ ?


texts: How to create Magento Webservices for mobile application?

texts:
We have 1 magento e-commerce website and we need to create mobile application (android) for that.
can you please tell me how can we create web services for that website. please give me setps and any code documentation for that.


texts: How to disable fotoroma fullscreen image gallery?

texts:
I want to disable fotoroma fullscreen image and I did that by disabling the fullscreen in view.xml in the theme but it doesn't make any effect.

Any help is appreciated.


texts: How i can add customer grid at highlighted place ?


texts: After Upgrade Magento version 2.3.5 to 2.4.0 front-end and backend not work

texts:
i have upgrade magento 2.3.5 to 2.4.0, after upgrade i get error in front-end and backend,
like An error has happened during application run. See exception log for details.
i have see in exception.log, in exception.log file error shows
Magento_GoogleShoppingAds data: current version - 3.0.1, required version - 4.0.1
Magento_Securitytxt schema: current version - none, required version - 1.0.0
Magento_Securitytxt data: current version - none, required version - 1.0.0
Amazon_Core schema: current version - 3.3.1, required version - 4.0.2
Amazon_Core data: current version - 3.3.1, required version - 4.0.2
Amazon_Login schema: current version - 3.3.1, required version - 4.0.2
Amazon_Login data: current version - 3.3.1, required version - 4.0.2
Amazon_Payment schema: current version - 3.3.1, required version - 4.0.2
Amazon_Payment data: current version - 3.3.1, required version - 4.0.2
Dotdigitalgroup_Email schema: current version - 4.1.0, required version - 4.6.0
Dotdigitalgroup_Email data: current version - 4.1.0, required version - 4.6.0
Dotdigitalgroup_Chat schema: current version - 1.0.0, required version - 1.1.0
Dotdigitalgroup_Chat data: current version - 1.0.0, required version - 1.1.0
Klarna_Core schema: current version - 5.2.3, required version - 6.0.1
Klarna_Core data: current version - 5.2.3, required version - 6.0.1
Klarna_Ordermanagement schema: current version - 5.0.7, required version - 6.0.2
Klarna_Ordermanagement data: current version - 5.0.7, required version - 6.0.2
Klarna_Onsitemessaging schema: current version - none, required version - 1.0.1
Klarna_Onsitemessaging data: current version - none, required version - 1.0.1
Klarna_Kp schema: current version - 6.4.0, required version - 7.0.1
Klarna_Kp data: current version - 6.4.0, required version - 7.0.1
PayPal_Braintree schema: current version - none, required version - 4.0.3
PayPal_Braintree data: current version - none, required version - 4.0.3
Yotpo_Yotpo schema: current version - 3.0.1, required version - 3.1.1
Yotpo_Yotpo data: current version - 3.0.1, required version - 3.1.1 at /home/martialartsmart/public_html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php:66)"} []
[2020-09-15 03:58:19] main.CRITICAL: Notice: Trying to get property 'channel' of non-object in /home/martialartsmart/public_html/app/code/Mageplaza/Core/Model/Feed.php on line 74 {"report_id":"665d2447365606b732ecc8f51e1b9c6ea702891fea54ad2f53e5ce1334f806e2","exception":"[object] (Exception(code: 0): Notice: Trying to get property 'channel' of non-object in /home/martialartsmart/public_html/app/code/Mageplaza/Core/Model/Feed.php on line 74 at /home/martialartsmart/public_html/vendor/magento/framework/App/ErrorHandler.php:61)"} []

but when i check in database table setup_module all the modules are up to date,
when i run php -dmemory_limit=8G bin/magento setup:di:compile command its give me error like.
In ClassReader.php line 43:

  Class Magento\Braintree\Model\Adapter\BraintreeSearchAdapter does not exist

In ClassReader.php line 36:

  Class Magento\Braintree\Model\Adapter\BraintreeSearchAdapter does not exist

please help me on this, what should i check? next


texts: Blank page when trying to configure payment methods in Magento 2

texts:
I'm using Magento 2, when navigating to Stores > Configuration > Sells > Payment Methods it shows a completely blank page. I've already enabled dev mode and in other situations errors shows directly in the browser, in this case it only displays a total blank page.
Why this is happening and how i can fix it??
I've looked through the logs but found nothing. Even in the /var/logs/report folder, none file is created.


texts: Magento 2: How to update mini cart after add product to cart from API?

texts:
I'm working on a task that need an API endpoint for adding product to cart in Magento 2.

My code do the job "add product to cart" properly (it add product to cart and when I go to .../checkout/cart I can see it.

$params = array('product' => $cardId, 'qty' => 1);

$product = $this->productRepository->getById($cardId);
$this->cart->addProduct($product, $params);
$this->cart->save();

But I need to update the mini cart also.
I searched google and this is the best solution that I found:

Create file etc/frontend/sections.xml:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
    <action name="rest/V1/badgemakerapi/addToCart">

    </action>
</config>

In the tutorial, the part

  name="rest/V1/badgemakerapi/addToCart"

is actually

  name="frontname/controller/action"

but because I don't have controller, I have to change it to API route

I noticed that in Checkout module, magento 2 core team does the same thing:

    <action name="rest/*/V1/carts/*/payment-information">

    </action>
    <action name="rest/*/V1/guest-carts/*/payment-information">

    </action>
    <action name="rest/*/V1/guest-carts/*/selected-payment-method">

    </action>
    <action name="rest/*/V1/carts/*/selected-payment-method">

    </action>

The problem is I can not update mini cart using this method.

Anyone has any idea?

Thank you very much.


texts: Magento parser error "Start tag expected, '<' not found"

texts:
I am getting these errors in system.log.

2017-06-20T11:59:55+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '&lt;' not found  in home/www/lib/Varien/Simplexml/Config.php on line 512
2017-06-20T11:59:55+00:00 ERR (3): Warning: simplexml_load_string():   in /home/www/lib/Varien/Simplexml/Config.php on line 512
2017-06-20T11:59:55+00:00 ERR (3): Warning: simplexml_load_string(): ^  in /home/www/lib/Varien/Simplexml/Config.php on line 512

I tried debugging them by adjusting the loadstring function in the config.php file:

public function loadString($string)
{
if (is_string($string)) {
    $xml = simplexml_load_string($string, $this->_elementClass);
    if(!$xml){
        Mage::log('XML_ERROR: ' . $string);
    }
    if ($xml instanceof Varien_Simplexml_Element) {
        $this->_xml = $xml;
        return true;
    }
} else {
    Mage::logException(new Exception('"$string" parameter for simplexml_load_string is not a string'));
}
return false;
}

The response in the system.log is not pointing to any logic location or file. How to debug this:

2017-06-20T11:59:56+00:00 DEBUG (7): XML_ERROR: ’°#  .   ½; ô..
2017-06-20T11:59:57+00:00 DEBUG (7): XML_ERROR: <config/>

Changed the error login as sugested in the comments. This is what the response is now:

2017-06-20T12:43:51+00:00 ERR (3): Notice: Undefined variable: classblock  in /home/www/app/code/local/Cmsmart/Megamenu/Block/Navigation.php on line 186
2017-06-20T12:43:51+00:00 ERR (3): Notice: Undefined variable: nothumbnail  in /home/www/app/code/local/Cmsmart/Megamenu/Block/Navigation.php on line 84
2017-06-20T12:43:51+00:00 ERR (3): Notice: Undefined variable: classblock  in /home/www/app/code/local/Cmsmart/Megamenu/Block/Navigation.php on line 186
2017-06-20T12:43:51+00:00 DEBUG (7): LibXMLError Object
(
[level] => 3
[code] => 4
[column] => 1
[message] => Start tag expected, '<' not found

[file] =>
[line] => 1
)

2017-06-20T12:43:53+00:00 DEBUG (7): LibXMLError Object
(
[level] => 3
[code] => 4
[column] => 1
[message] => Start tag expected, '<' not found

[file] =>
[line] => 1
)

Got this error:

2017-06-20T14:19:51+00:00 DEBUG (7): LibXMLError Object
(
[level] => 3
[code] => 4
[column] => 1
[message] => Start tag expected, '<' not found

[file] => ./app/design/frontend/default/theme313k/layout/cmsmart
[line] => 1
)

This is the corresponding file contents. I don't see anything wrong with that file. Also tried to remove whitespaces etc.

<?xml version="1.0"?>
<layout version="0.1.0">
<default>
    <reference name="top.menu" >
          <action  method="unsetChild" ><name>catalog.topnav</name>     </action>
          <block type="page/html_topmenu" name="catalog.topnav2" template="page/html/topmenu_2.phtml"/>
           <block type="megamenu/navigation"  name="catalog.topnav.megamenu">
              <action method="unsetData"><key>cache_lifetime</key></action>
              <action method="unsetData"><key>cache_tags</key></action>
           </block>
    </reference>

</default>
</layout>


texts: How to specify absolute external paths (e.g. CDN) using "addJS" in .xml in /layout (sub)directory?

texts:
It appears ABSOLUTE filespecs to external files work for CSS (addLinkRel) but not JS (addJs). The sytem always prepends the site domain+path when using addJs.

<layout version="1.0.0">
    <adminhtml_mypage_index>
        <reference name="head">
            <action method="addJs">
              <!-- This does not work ... -->
              <name>//cdn.... .js</name>
            </action>
            <action method="addLinkRel">
                <!-- ... but this does! -->
                <rel>stylesheet</rel>
                <href>//cdn.... .css</href>
            </action>

This forces me to a confusing inconsistency whereby the CSS files on, say a CDN, can be specified declaratively in the layout .xml, but the associated external JS files on the same CDN need to go in the .phtml. Is there a better way?

One would hope one could could keep these file references together in a logical place.

Should I move both the JS and CSS declarations from the layout .xml to the associated .phtml so that they're kept together? One could argue this then defeats the purpose of using .xml to declaratively specify JS and CSS.

Suggestions?


texts: Magento 2 : How do we add zipcode validation on COD payment method?

texts:
I need to show COD payment method for some zip-code only. How do I add filter in COD payment method for zip-code in Magento 2 ?

How to add my custom condition in cashondelivery.html


texts: JS doesn't work after using magento setup:upgrade

texts:
I'm completely new to a Magento 2 and I'm facing a problem.

Somewhy, after using php bin/magento setup:upgrade command, my admin panel doesn't work properly. Styles are not loaded correctly and I cannot browse through the panel (none of the selections appears).

php bin/magento setup:static-content:deploy -f command solves that at that moment, but after using setup:upgrade, it happens again and I don't want to use deploy command every time after I'm using upgrade. It takes a lot of time to complete deploy and it's a waste of it.

Tried to change Symlink to Copy in di.xml file, but it didn't helped.

Any suggestions? Thanks for any help.


texts:
I tried to login to my admin backend, but this problem always occurs:

Element 'resource', attribute 'module': The attribute 'module' is not allowed.


texts: Magento2 display price range on PDP configrable product

texts:
I would like to display the price range for configurable products on the product details page.
I have followed some references but no luck

app/code/Vendor/ModuleName/view/base/layout/catalog_product_prices.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <referenceBlock name="render.product.prices">
        <arguments>
            <argument name="configurable" xsi:type="array">
                <item name="prices" xsi:type="array">
                    <item name="final_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Vendor_ModuleName::product/price/final_price.phtml</item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</layout>


texts:
I am trying to display a message in template when there are no viewed_products. So I have tried to overwrite class Mage_Reports_Block_Product_Viewed and its method like this.

Module etc/config.xml file

<config>
    <global>
        <blocks>
            <reports>
                <rewrite>
                    <product_viewed>Myclass_Overwrites_Block_Reports_Product_Viewed</product_viewed>
                </rewrite>
            </reports>
        </blocks>
    </global>
</config>

Block in app/code/local/Myclass/Overwrites/Block/Product/Viewed.php

class Myclass_Overwrites_Block_Reports_Product_Viewed extends Mage_Reports_Block_Product_Viewed
  {
    ...

      protected function _toHtml(){

             if ($this->getCount()) {
               $this->setRecentlyViewedProducts($this->getItemsCollection());
             }
         return parent::_toHtml();
       }
...
  }

Now it overwrites it, if i click on a product and refresh the page i can clearly see with debuging ON that its getting overwritten and that product is shown. But if i don't click on a product (if visited product/s arent stored) it doesnt show anything (i guess it runs the class from Core, i also tried to change it just to see if it would work in core files and it does). I am doing this because i want to show else statement from template

Template design/frontend/Project/default/template/reports/product_viewed.phtml

 <?php if ($_products = $this->getRecentlyViewedProducts()): ?>

 //Code if there are Viewed Products

 <?php else: ?> // This doesn't show

<?php echo $this->__('Recently Viewed Products') ?>

You haven't viewed any Products

Am i doing something wrong or could i do this some other way?


texts: Product view page scrolls up randomly on mobile device

texts:
In the product view page when I scroll down a little bit, sometimes (very often) the page scrolls to the top.

This is the effect of the scroll up:

https://www.youtube.com/watch?v=aKwLVwIMrpM


texts:
When adding a coupon its far to easy for an admin to add a coupon and have it selected as "No Coupon" instead of "Specific Coupon". This means that if the admin accidentally sets it to be "No Coupon" everyone eligible would get the discount without entering a code.

What is the best way to protect against this? Is there an extension that will state how many customers the promotion might apply to? Is there an extension to add a JS warning before the admin hits save?


texts:
I am creating a module, that should send invoices and the order(confirmation) pdfs to some declared E-Mail addresses. I am able to do so for the invoices. But I dont know how to generate the order-confirmation pdf files.
For the invoice pdfs I am using:
Magento\Sales\Model\Order\Pdf\Invoice;

and I can call it in my class with
$pdfContent = $this->pdfInvoiceModel->getPdf([$invoice])->render();


texts: Join two tables cms/page and cms/page_store

texts:
I will try get all pages assign to the website with name

$collection = Mage::getModel('cms/page')->getCollection();
$collection->getSelect()
   ->join(
       array('cps' => $collection->getTable('cms/page_store')),
       'cps.page_id = main_table.page_id',
       array('store_id')
   );

but after the query I receive on my page such message

  Item (Mage_Cms_Model_Page) with the same id "9" already exist

as a result I want receive something like that

About Us    about-magento-demo-store    2 columns with right bar    All Store Views Enabled Mar 13, 2015 1:30:07 AM Mar 13, 2015 1:30:07 AM
...


texts:
I recently find the custom message based on the total for free delivery Link. I create the module as said @Marius but, I am the new one to Magento so I am unable to create Hepler Data.

I don't Have 50reputations for comment on the page so I am raising my question Here:

How to Create Helper_Data for the module?


texts: Magento2 get ID of product in price template default.phtml

texts:
How can I get the ID of product in Magento 2, in tempalte

vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml

I copied it to my theme:

/app/design/frontend/xxx/ddd/Magento_Catalog/templates/product/price/amount/default.phtml


texts: Magente error 503 without maintenance.flag file

texts:
I am facing the error 503 as well on live.

It has happened when I manually made the maintenance.flag file - which is correct.

Then I deleted that file but the error 503 is still present. I deleted www/var/cache and session but still the error 503 present.

Then I made the trial to clear the following lines in index.php

if (file_exists($maintenanceFile)) {
    include_once dirname(FILE) . '/errors/503.php';
    exit;
}

Error still present.

I went on my developement environment and put a maintenance.flag file. Got the error 503.

I cleared the lines above in index.php and it cleared the error 503 which makes sense.

I put back the lines within index and cleared maintenance.flag. Error disappeared correctly.

I swapped my live and dev database to see if it was not stored there but still error present.

I am getting crazy with a live environment not working for my e-commerce site...


texts: M2: no_NO not recognised despite installed via community engineering lang pack

texts:
bin/magento info:language:list

This return nb_NO and nn_NO for Norwegian, however no_NO does not exist.
I can see some packages having the no_NO language file though (Stripe, Mageplaza).

I tried to installed the Crowdin language pack for Norwegian via composer as suggested by Crowdin (they don't have a nb_NO or nn_NO branch):

composer require community-engineering/language-no_no

Then I get the following error when running setup:upgrade

  no_NO argument has invalid value, please run info:language:list for
  list of available locales

So of course my website does not translate to Norwegian.

How can I fix that ?


texts:
I've got this style in style.css:

.nav-container {
    margin-left: 80px;
}

I'd like to overwrite this, so I created a custom.css in my themes folder:

.nav-container {
    margin-left: 40px;
}

and added it in my themes page.xml:

<action method="addCss"><stylesheet>css/custom.css</stylesheet></action>

Unfortunately I see my class being overwritten by custom-menu in firebug:

.nav-container {
    float: left;
    margin-left: 80px;
} #(custommenu.css)

.nav-container {
    margin-left: 40px;
} #(custom.css)

How can I get this working?
Where do I have to add my custom.css to be able to overwrite the custom-menu?

Thanks


texts: What is the PHP extension_loaded for Zend OP Cache?

texts: What is the PHP extension_loaded in case of Zend OP Cache? APC has been replaced with Zend OP Cache in PHP 5.5


texts:
In my requirement, I have a review id with me by using that, I am getting complete information of that specific review by using the following code:

$review = Mage::getModel('review/review')->load($reviewId);

The above code is giving complete information but not just ratings. When I did Mage::log($review->getData()), I can see the following information which is clearly showing absence of ratings.

(
    [review_id] => 676
    [created_at] => 2014-01-31 15:19:24
    [entity_id] => 1
    [entity_pk_value] => 669
    [status_id] => 1
    [detail_id] => 675
    [store_id] => 1
    [title] => Hulk@hell.com
    [location] => Hulk mania
    [view_type] => 1
    [detail] => Hulk smash
    [nickname] => Hulk
    [customer_id] =>
    [course] =>
    [ystart] => 0
    [yend] => 0
    [stores] => Array
        (
            [0] => 0
            [1] => 1
        )

)

Please help

EDIT: I tried this which is giving all the three rating values but I was looking for percentage. and even the code is bigger and seems to be degrading performance.

$review = Mage::getModel('review/review')
                ->load($reviewId);

$data = $review->getData();
$votes = Mage::getModel('rating/rating_option_vote')
        ->getResourceCollection()
        ->setEntityPkFilter($data['entity_pk_value'])
        ->addFilter('review_id', $reviewId)
        // ->setStoreFilter(Mage::app()->getStore()->getId())
        ->load();


texts: What is the best AUTO store switcher for Magento 2? I have come across a few options just by searching on Google and they all seem to offer similar features. Is Amasty a better provider that Mage Plaza for example? I would love to hear your experience/recommendations.


texts: Is it safe to delete my index lock files?

texts:
I am trying to reindex but I get an error "Stock Status Index process is working now. Please try run this process later.". When I look at MAGENTO_ROOT/var/locks I see a ton of lock files.  Some are like "index_process_7.lock" but others are like "index_process_7e7e2219-ceb3-11e5-b966-d4ae52e7d176.lock".

None of them have been modified since 2016. Is it safe to just delete them?


texts: Can you give me a brief introduction/example for  in magento?

texts:
Am new to magento I have created custom module(front & back office). So here I want to know  structure/flow of depends? And how it works depending on other modules?

Can you give me brief introduction/examples for this?

Thanks in advance.


texts:
I am using Magento version 2.3.3

Resource Tree not showing while assigning custom resource to user.

Its giving some JSON syntax error in console as well

anyone here here, thanks in advance


texts: Magento 2 Duplicating products changes the original product Qty to 0

texts:
I am using Magento 2.3.4 which was recently upgraded from Magento 2.1.15. Currently i am facing an issue with product qty after duplicating products.

Explanation:

After duplicating the original product P1, I get P2  with the same quantity P1 originally had.
But after P2 got duplicated from P1 the original qty of P1 is getting changed to Null.The Quantity field is empty when i view the product from admin panel.

I did re-indexing but still the stock did not update. The indexer are set to "Update on Save" .

I tried the below step from the link https://github.com/magento/magento2/commit/20d7afbe75fed9b8f45e3231848aae40b1c06a3a

But this also did not help.

I also noticed that the original product is removed from the cataloginventory_stock_status table after i perform a full re-index.


texts: Magento1 - Getting Notice and error relating to GeoIP in system.log

texts:
I'm getting below Notice and error in system.log file continuously :

Notice: Uninitialized string offset: 0  in /lib/GeoIP/geoip.inc on line 413
2019-06-26T05:26:23+00:00 ERR (3): Notice: Uninitialized string offset: 1  in /lib/GeoIP/geoip.inc on line 413
2019-06-26T05:26:23+00:00 ERR (3): Notice: Uninitialized string offset: 2  in /lib/GeoIP/geoip.inc on line 413
2019-06-26T05:26:23+00:00 ERR (3): Notice: Uninitialized string offset: 3  in /lib/GeoIP/geoip.inc on line 413
2019-06-26T05:26:23+00:00 ERR (3): Notice: Uninitialized string offset: 4  in /lib/GeoIP/geoip.inc on line 413
2019-06-26T05:26:23+00:00 ERR (3): Notice: Uninitialized string offset: 5  in /lib/GeoIP/geoip.inc on line 413
2019-06-26T05:26:23+00:00 ERR (3): User Error: error traversing database - perhaps it is corrupt?  in /lib/GeoIP/geoip.inc on line 428

Where should I check for this?


texts:
I am a little confused with the Magento RWD Knowledge base documentation. I am reviewing the http://www.magentocommerce.com/knowledge-base/entry/ee114-ce19-rwd-dev-guide

Under SASS Fallback Structure it appears to have conflicting information.

  Item 2. states that it assumes that you copied all of the SCSS files in your custom theme location and it tells you to remove all of the SCSS Files located in directories copied.

then in

  Item 4. it tells you to copy all the files you want to modify in the directory.

So is step 2 necessary?

Also the documentation showcases local.xml file but reading additional documentation it states that local.xml has been replaced with theme.xml in 1.9 RWD but looking through the structure a lot of the overrides are happening in Page.xml

So I am really confused to does 1.9 RWD have a "Local.xml" file? if not which file need to reflect the updates Page.xml or theme.xml?


texts: Magento 2 : Add custom Gift message programmatically during checkout

texts:
I want to SET gift message programmatically in current order(one message for whole order) during Checkout.
Currently, I trying using sales_order_save_after  event to edit order but didn't get succeed.

any another approach to do the same?


texts: Magento2 - How to use _getAdditionalConfig() from \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable

texts:
In class \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable there is the function bellow.

/**
 * Returns additional values for js config, con be overridden by descendants
 *
 * @return array
 */
protected function _getAdditionalConfig()
{
    return [];
}

How one could "rewrite" (use plugin) it since it is protected.
I wanted to add additional data in this function because it is used in "getJsonConfig" function.

I guess if I'd want to make a plugin I would need to use getJsonConfig function because it is public. Which comes back to my question.
Should _getAdditionalConfig() be used by end users or it's just for Magento core use ?

Edit
I could use a preference for this block class.

Edit 2
Adding a preference for this block class doesn't seem to work

Edit 3
Made a plugin on \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable. Function used is getJsonConfig.


texts: Magento2.1.12: Removing   tags from subtotal block

texts:
Today, I'm facing very weird issue. We've a magento store developed on version 2.1.12. When I add product in the cart, the subtotal summary block at right side on cart page is not showing properly. It's disturbed due to removal of <tr> <td> tags from the block. It's only showing <span> tag. Please see this screenshot . It should be wrapped with <tr> <td> tag like this

I've checked in the template file located at Magento_Tax/template/checkout/summary/subtotal.phtml

and it's showing <tr> <td>. The same file in pub/static folder is also proper. I'm really stuck into this and need immediate help.

Thanks in advance!


texts: Magento 2 Elastic search 6 Fulltext search with like

texts:
I am trying to customize the default Magento 2 Elasticsearch 6. Right now the default Fulltext search is not giving that good result.

For Example I have product name like ADB12355 BBB, ADB3456 AAA, etc.

I am getting proper results either when adding ADB12355 BBB or ADB3456. The problem is I also want both the products if someone just search for ADB some kind of LIKE in mysql.

Also My configuration is correct and indexes are created but So far I am not able to find the correct place to customize.


texts: error when creating a new container inside page.wrapper in magento2

texts:
I'm trying to create a container inside page.wrapper to contain some custom blocks for my checkout page.

When I try the following in

  app/design/frontend/MyTheme/myname/Magento_Theme/layout/checkout_index_index.xml

<body>
    <referenceContainer name="logo-container">
        <referenceBlock name="onestepcheckout-logo" remove="true" />
    </referenceContainer>
    <referenceContainer name="page.wrapper">
        <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
        </container>
    </referenceContainer>
</body>

I get an error that

  Exception #0 (Magento\Framework\Exception\LocalizedException): The 'footer-custom3' is not a child of 'page.wrapper'.

How do I make it a child of page.wrapper?

Also if I use it as a child of main.content as in the following it shows up

<referenceContainer name="main.content">
    <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
        <block class="CleverSoft\Base\Block\Template" name="footer_block" template="html/footer.phtml">
            <block class="Magento\Store\Block\Switcher" name="footer.store_switcher" template="switch/stores.phtml" />
            <block class="Magento\Newsletter\Block\Subscribe" name="footer.newsletter" template="subscribe_footer.phtml" />
        </block>
    </container>
</referenceContainer>

Could someone explain to me why this is not working for page.wrapper?


texts: Progress of 'catalogsearch_fulltext' reindex with SOLR?

texts:
I'm using EE 1.14.01 and have integrated Magento with a SOLR instance.

Is there any way to see the progress when I re-index 'catalogsearch_fulltext'? It typically takes several hours (we have a lot of products and stores) but I currently have no way of knowing how many products have been re-indexed, whether the process has stalled, etc.

If I tail the Tomcat log on the SOLR server, I can see 'update' requests being passed through but I can't see how many products have actually been indexed vs. how many remain.

Many thanks in advance,
Rick.


texts: experience total not working by group function in collection

texts:
doctor_id | start_year | end_year
 2        | 2008       | 2012
 2        | 2012       | 2015
 5        | 2010       | 2013
 5        | 2013       | 2016

above is mysql  table doctor_experience

I have use this query but not working and throw unknown column 'count_year'  column error

    $exp_collection = Mage::getModel('doctor/experience')->getCollection()->addFieldToSelect('*');
            $exp_collection ->getSelect()
            ->columns('(end_year-start_year) as count_year')
            ->columns('SUM(count_year) as total_experience')
            ->group('doctor_id');
print_r($exp_collection->getData());

I want a output  like below means I want to get total experience of doctor id

doctor_id | start_year | end_year | total_experience
 2        | 2008       | 2012     | 7
 5        | 2010       | 2013     | 6


texts: Report product sold. I need the 'ordered_qty' as a negative value

texts:
I need for an CSV Export the value/number (column "Anz." in the screenshot) of 'ordered_qty' as a negative value/number. Everything I tried doesn't work.

What can I insert in these lines to get an - before the number?
Hope somebody can help me fast and easy.
Thanks for your time.

$this->addColumn('ordered_qty', array(
            'header'    =>Mage::helper('reports')->__('Anz.'),
            'width'     =>'120px',
            'align'     =>'right',
            'index'     =>'ordered_qty',
             ));

<?php

class Mage_Adminhtml_Block_Report_Product_Sold_Grid extends Mage_Adminhtml_Block_Report_Grid

{
    /**
     * Sub report size
     *
     * @var int
     */
    protected $_subReportSize = 0;

    /**
     * Initialize Grid settings
     *
     */
public function __construct()
{
    parent::__construct();
    $this->setId('gridProductsSold');
}

/**
 * Prepare collection object for grid
 *
 * @return Mage_Adminhtml_Block_Report_Product_Sold_Grid
 */
protected function _prepareCollection()
{
    parent::_prepareCollection();
    $this->getCollection()
        ->initReport('reports/product_sold_collection');
    return $this;
}

/**
 * Prepare Grid columns
 *
 * @return Mage_Adminhtml_Block_Report_Product_Sold_Grid
 */
protected function _prepareColumns()
{

$this->addColumn('EAN', array(
        'header'    =>Mage::helper('reports')->__('EAN'),
        'index'     =>'wv_ean'
    ));

    $this->addColumn('name', array(
        'header'    =>Mage::helper('reports')->__('Bezeichnung'),
        'index'     =>'""'
    ));

$this->addColumn('ordered_qty', array(
        'header'    =>Mage::helper('reports')->__('Anz.'),
        'width'     =>'120px',
        'align'     =>'right',
        'index'     =>'ordered_qty',

    ));

$this->addColumn('unit', array(
        'header'    =>Mage::helper('reports')->__('Einheit'),
        'index'     =>'unit'
    ));

$this->addColumn('qty', array(
        'header'    =>Mage::helper('reports')->__('Best.'),
        'index'     =>'""',

    ));

$this->addColumn('date', array(
        'header'    =>Mage::helper('reports')->__('Eingang'),
        'index'     =>'""'
    ));

    $this->addExportType('*/*/exportSoldCsv', Mage::helper('reports')->__('CSV'));
    $this->addExportType('*/*/exportSoldExcel', Mage::helper('reports')->__('Excel XML'));

    return parent::_prepareColumns();
}
}


texts: Difference between updating Magento 2.1.x to latest 2.1.15 & 2.2.6

texts:
I see that Magento 2 updates are simultaneously released in both a 2.1.x format and a 2.2.x format.
I currently have a Magento 2.1.x running, but I wonder wether I should aim to update to the newest Magento 2.1.x or 2.2.x?

Can anyone explain the key differences between updating to one instead of the other?

Thanks in advance!


texts: Magento 2 optionally ask for gender in checkout (billing and shipping)

texts:
I go to

  Stores > MyStore > Configuration > Customers > Customer Configuration > Name and Address Options

There I set Show Gender to optional.

I expect that a gender field would appear on the checkout shipping and billing address that the customer can optionally check.
But nothing appears.

On the database I can see that the sales_order has a field customer_gender. So I suspect there should be a way to activate the field.

How do I insert a gender field on the checkout shipping and billing addresses?


texts: Product with different VAT class depending on customer circumstances

texts:
There are some products in our clients site which are sometimes at standard UK vat rate of 20%, but depending on the client, and their situation they may be able to buy it at 0% VAT.

Products can only have 1 tax class assigned, so we tried making a configurable product, and 1 variation being 0% and the other at 20%, but that doesn't work due to the way Magento uses the pricing from the configurable item, not the individual products.

Instead we've opted to use a product bundle, with 2 associated products and this appears to work fine.

Is this the best option to use for this situation?


texts: Magento 2 : In Wishlist Special Price Not Showing for Simple Products

texts: In wishlist, Special price is showing for configurable products but not for simple products..


texts: Image / product slider not working only on Magento Frontend Homepage

texts:
I have developed new home page. As one of the internal pages.But when I tried to move it into the initial location (home url).I found that top banner is not working and product slider as well. All internal pages of my website show the image slider, and the product slider without any problems, but the homepage is not displaying it. Can somebody help me to find what is wrong.

Console shows js error: Uncaught TypeError: $(...).hammer is not a function.

Home page: http://www.byrneandohanlon.com/emerald/

Internal page (home page preview) fully working: http://www.byrneandohanlon.com/emerald/new_home


texts: Magento2: How to use checkbox in model popup in js?

texts:
I have created a model popup, that will appear when user click on add to cart. Now I want to add check box to accept user acceptance by click on checkbox.

Can someone please help to to do this .


texts:
I want to create a custom frontend route. It should have this link:

  www.mysite.com/myroute

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="myroute" frontName="myroute">
            <module  />
        </route>
    </router>
</config>

I've already created the route but I don't know where to place the controller.
Can you help me please?

Thanks!


texts: Notice: Undefined offset: 1, Undefined offset: 2

texts:
I have some notice in a line 27 of the method bellow, and can't find the issue !

public function blockOrder()
{
    $items = Mage::getSingleton('checkout/cart')->getQuote()->getItemsCollection();
    $tab = array();
    foreach ($items as $itemCart) {
    /*line 27*/ $tab[$itemCart->getUdropshipVendor()] += $itemCart->getPrice() * $itemCart->getQty();
    }
    foreach ($tab as $vendorId => $amountInCart) {
        $vendorMinAmount = Mage::getModel('udropship/vendor')->load($vendorId)->getMinimumOrderAmount();
        if ($amountInCart < $vendorMinAmount) {
            return true;
        }
        return false;
    }
}


texts: Configurable swatches are not displaying on new products page ( new.phtml )

texts:
I am using my custom theme. By following some articles, I have displayed configurable swatches on the product list page.

When I set the configurable product as New then it appears on my New Products Page. i.e. I have used following code for my New Products Page:

  {{block type="catalog/product_new" name="home.catalog.product.new"
  column_count="4" products_count="0" alias="product_new"
  template="catalog/product/new.phtml"}}

But on this page configurable swatches are not displaying

I activated RWD theme but there also configurable swatches are not displaying on New Products Page.

Can anyone point out where I am going wrong?


texts:
I am really new to Magento, I need advise on how to recreate product view page (see picture) and include it in my CMS page.
I have created a CMS page that will list multiple products.
I want to reuse the product view page in this cms page (picture).

Basically, in my CMS, I would like to add multiple products with (products images, details, price, and add to cart button). How can I reuse the phtml files that is in the product view page and include them in my CMS page?


texts: Show base currency price & display currency price at the same time in magento2?

texts:
I would like to show product price in both base currency & display currency. I have already enable display currency in frontend - that is i can see "USD / EUR" in header dropdown.

If i want to show 2 price, one in base currency, one in display currency at the same time, what should be the correct way?

Basic currency in the store, USD. Frontend currency displayed in EUR, I just need to add to the current price, the original price (USD).

I tried to change final_price.html

/vendor/magento/module-catalog/view/base/templates/product/price/final_price.html

This part of the code

<?php /* @escapeNotVerified */ echo $block->renderAmount($finalPriceModel->getAmount() , [
        'price_id' => $block->getPriceId('product-price-' . $idSuffix),
        'price_type' => 'finalPrice',
        'include_container' => true,
        'schema' => $schema
    ]);
    ?>

But I get only the displayed price (EUR) or empty space without any errors.

I can get the main price (USD) using this code,

<?php if ($priceAmount = $block->getProduct()->getFinalPrice()):?>
    <span> / $ <?= /* @escapeNotVerified */ $priceAmount ?> </span>
<?php endif;?>

But only in atribute.phtml

/vendor/magento/module-catalog/view/frontend/templates/product/view/atribute.html

Now: https://i.imgur.com/Fv3FIJA.png

I would like to display: https://i.imgur.com/2UgIdXI.png

Magento 2.2.4


texts: How to add Custom Field at Product Edit/Save Page?

texts:
I want to add Custom Field at Product Edit Page(Admin Side) like related/upsell/crosssell product i want to add Custom Products for it, found much similar solution but it's not working at all,If you know how to, Please help me out..

<?php

namespace CustomField\Ui\DataProvider;

use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Magento\Ui\Component\Form\Fieldset;
use Magento\Ui\Component\Form\Field;

class Fields extends AbstractModifier
{

/**
 * @param array $data
 * @return array
 * @since 100.1.0
 */
public function modifyData(array $data)
{
    return $data;
}

/**
 * @param array $meta
 * @return array
 * @since 100.1.0
 */
public function modifyMeta(array $meta)
{
    $meta = array_replace_recursive(
        $meta,
        [
            'yash' => [
                'arguments' => [
                    'data' => [
                        'config' => [
                            'label' => __('Add to Custom Products'),
                            'collapsible' => true,
                            'componentType' => Fieldset::NAME,
                            'dataScope' => 'data.ktpl',
                            'sortOrder' => 10
                        ],
                    ],
                ],

            ],
        ]
    );

    return $meta;
}
protected function getButtonSet()
{
    return [
        'arguments' => [
            'data' => [
                'config' => [
                    'formElement' => 'container',
                    'componentType' => 'container',
                    'label' => false,
                    'content' => 'This ',
                    'template' => 'ui/form/components/complex',
                ],
            ],
        ]
    ];
}

}

Thanks


texts: Magento 2 How to redirect to a custom block from a Controller

texts:
I have added a front phtml file followed by a Block, I need to redirect to that block from a controller.
this is the Block path, it's working fine.
http://mywebsite.co/schools/schoolzone_search/index/display

Here is my controller
<?php
namespace Vendor\Module\Controller\Index;
class Search extends \Magento\Framework\App\Action\Action
{
protected $resultRedirectFactory;
public function __construct(\Magento\Framework\Controller\Result\Redirect $resultRedirectFactory)
{
$this->resultRedirectFactory = $resultRedirectFactory;
}
public function execute()
{
$resultRedirect = $this->resultRedirectFactory->create();
$url ="schoolzone_search/index/display";
$url_2 = "http://mywebsite.co/schools/schoolzone_search/index/display";
return $resultRedirect->setPath($url);
}
}

in Network it's showing as 200 OK, But it is not redirecting to the Phtml Page.
Where am doing wrong? Can I get help?. Thank you in advance


texts: How Can I Find Out How To Leverage Existing Magento Code

texts:
I'm a PHP developer who is new to Magento, who is coming from a background of mainly working with Laravel. When writing modules for Magento what is the best way to find out what the Magento Framework currently can do for you. I know there are the developer docs but the content (IMO) mostly focuses on design patterns with very few examples of how you would do common tasks like:

Write to the filesystem
Query the database
Validate or retrieve request data

When using Laravel you have the main docs which goes over all the main features of the framework with examples. Then if you want to deep dive, there are the searchable API docs. Between these two resources I rarely find my self Googling "How do you do X in Laravel".
I've also tried reading the source code, but (and this could be down to my own abilities) I find the code quite hard to read.
How do other Magento developers work out how to leverage the code and complete tasks "in the Magento way"?


texts: Do Cron_schedule table collects log cleaning status too?

texts:
Hi If magento fails to run the log cleaning process as per the configuration then where it does saves the error_log (or) failure status? Magento doesn't clean the log tables periodically.

Note: I can't set Cron from cpanel(WHM) to do this automatically, as I don't have option.

Any help will be appreciated


texts:
I need to overwrite action called _initAction from Controller:

/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php

into my own module and controller:

/app/code/local/Qbikz/ToolTip/controllers/Adminhtml/Catalog/Product/AttributeController.php

I already tried different ways to solved it:
First method where <from> and <to> I tried different combinations (Showing 404 page not found):

 <rewrite>
     <qbikz_tooltip_adminhtml_catalog_product_attribute>
         <from><![CDATA[#^/adminpanel/catalog_product_attribute/edit/#]]></from>
         <to>/tooltip/adminhtml_catalog_product_attribute/init/</to>
     </qbikz_tooltip_adminhtml_catalog_product_attribute>
</rewrite>

+

 <frontend>
        <routers>
            <qbikz_tooltip>
                <use>admin</use>
                <args>
                    <module>Qbikz_ToolTip</module>
                    <frontName>catalog_product_attribute</frontName>
                </args>
            </qbikz_tooltip>
        </routers>
    </frontend>

Second method(Page showing with ignore my rules):

<admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <Qbikz before="Mage_Adminhtml_Catalog_Product">Qbikz_ToolTip_Adminhtml_Catalog_Product</Qbikz>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>

In my controller I put die("ok"); But it's not showing up. Maybe somebody could help? Thanks.


texts: Magento 2: Different static-content Files Per Locale?

texts:
In Magento 2, a static content URL looks like this

http://magento-2-with-keys.dev/static/adminhtml/Magento/science/en_US/Pulsestorm_FrontendTutorial1/hello.js

This includes a en_US locale portion.  This strongly implies that either

Magento 2 allows you to create different static content files per locale
Magento 2 processes static content files for locale/gettext strings

Which of the above is true?  Or are both true?  Or neither?

How do I, as a Magento module developer, provide a static content files on a per locale basis?  Would this be different if I was a theme developer?


texts: I found tier_prices.phtml for the tier price display on the product detail page, but I can't find the right block file for tier_prices.phtml. which block file is responsible for tier_prices.phtml?


texts: Magento 2 origData null in customer_save_before

texts:
I have created an observer on the customer_save_before event. Surprisingly
$observer->getEvent()->getCustomer()->getOrigData() is null. Is my expectation wrong?

This is also happening for customer_save_commit_after.

I am looking for an event for which the customer data (new and original) is available, that ideally takes place after the new data was persisted in the db, independent of the area from which it is called frontend or adminhtml.

I have logged all the events that are being dispatched throughout my save customer process and the two events mentioned above made the most sense.

Is there such an event?

Thanks!


texts: How to override .phtml files in Magento 2

texts:
I want to customize product details page, So it required to override some .phtml files in following locations.

So I want to know, how to override .phtml files in vendor\magento\module-catalog\view\frontend\templates\product or vendor\magento\module-theme\view


texts: Remove My Account top bar when user is not logged in

texts:
i want to remove magento top link My Account if user is not logged in ,i do not want to modify core files, i tried to get solution but could not find any working one .

i tried below method in : "Magento_Customer/layout/default.xml"

<customer_logout>
    <referenceBlock name="top.links">
        <referenceBlock name="my-account-link" remove="true" />
    </referenceBlock>
</customer_logout>

but it gives Error :

  Element 'customer_logout': This element is not expected. Expected is
  one of ( attribute, block, referenceBlock, referenceContainer,
  container, move, uiComponent ).


texts: Magento 1.9 cron scheduler change timezone

texts:
i'm a magento newbie. I wrote a cron job code in my custom module's observer file and ran cron job from terminal. Scheduled jobs are entered into cron_schedule table. But the scheduled time is in UTC. Where should I change it to set scheduled time in Asia/Kolkata timezone.

Please help me to solve this. Thanks in advance.


texts: $collection->getSize() will not apply to my filtered collection on category page; results in error

texts:
Experimenting with Magento EE 2.1.7. I've created a module which has the means to filter a collection but apparently I'm doing something wrong because I get an "Illegal State" error on the frontend category pages when I include this line prior to return $collection;

$collection->getSize();

While the below code will yield the desired result(s) in the category listing/grid, it fails to reflect the total number of results in pagination or the category product count in toolbar (i.e. There might be a single product on page but 600 products listed in the count and multiple pages of pagination).

<?php

// File: app/code/MyCompany/MyModule/Block/Category/Form.php

namespace MyCompany\MyModule\Block\Category;

class Form extends \Magento\Framework\View\Element\Template
{
    protected $_catalogLayer;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Catalog\Model\Layer\Resolver $layerResolver,
        array $data = []
    ) {
        $this->_catalogLayer = $layerResolver->get();
        parent::__construct($context, $data);
    }

    protected function _prepareLayout()
    {
        parent::_prepareLayout();

        $collection = $this->_catalogLayer->getProductCollection();

        $collection->addAttributeToFilter('sku', '123456');

        // This line results in "Illegal state" error on category page.
        $collection->getSize();

        return $collection;
    }
}


texts: Magento 2 How to disable maintenance mode when deployment mode is production

texts:
I am using production mode in magento, but in frontend it is showing Maintenance mode is enabled.

I am new in magento. Please guide me.
Thanks in advance.


texts: How to best add an UPSELL (add-on) checkout step to Magento ver 1.9.2.1?

texts:
What is the best way to add a new check-out step which would just have my up-sell products? I would like it to work like proflowers.com has it (please see the screenshot)

Thanks for any suggestions! :-*


texts: PayPal only Checkout, Remove "Proceed To Checkout" option?

texts:
Magento ver. 1.9.2.4 (CE)

I have a requirement to make PayPal Express Checkout the only method for purchasing products. I've looked at various configuration settings, but they seem only to disable the whole checkout process, including the Basket functionality.

Can this be achieved programmatically or with some other method?

Thank you.


texts: How to prevent Magento from removing disabled items from cart?

texts:
I'm developing a store that the cart is shared with all stores.

I achieved the quote id sharing, but when an product that is disabled in a store is added to cart, next time that I enter in the checkout/cart page, the item is gone.

I want that the product stays on cart and add an message saying that the item is not available in the store that the user will checkout.

Someone have done that before?

Thanks.


texts:
How we can create a menu item using Observer in Magento version 2.2.0.
Please help me on this.


texts: Is it possible Custom theme for desktop and Luma theme for mobile and ipad

texts: Is it possible to use blank or luma theme for mobile and custom theme for desktop in magento2.


texts: Product position in top level category not working

texts:
Hi guys so basically I have the following structure

Cat A
  - Cat B
    - Products
  - Cat C
    - Products
  - Cat D
    - Products

When editing Cat A I have set a position for all the products inside under the "Category Products" tab.

When visiting Cat A frontend it shows all products, not sub-categories which is fine but the order is not by position when the dropdown is selected they are just random.

I echo'd out $_product->getCatIndexPosition(); which shows most of them are set to 1 and not what I have set backend.

Can anyone spot what I am doing wrong?


texts: Magento 2: How to add Custom CSS/JS that will load last among other CSS/JS files

texts:
I need to override CSS/JS that will override the styling and I need it to load the last part among other CSS files link like:

<head>
<title>Home page</title>

<link  rel="stylesheet" type="text/css"  media="all" href="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/mage/calendar.css" />
<link  rel="stylesheet" type="text/css"  media="all" href="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/css/styles-m.css" />
<link  rel="stylesheet" type="text/css"  media="screen and (min-width: 768px)" href="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/css/styles-l.css" />
<link  rel="stylesheet" type="text/css"  media="print" href="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/css/print.css" />
<link  rel="icon" type="image/x-icon" href="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/Magento_Theme/favicon.ico" />
<link  rel="shortcut icon" type="image/x-icon" href="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/Magento_Theme/favicon.ico" />
<script  type="text/javascript"  src="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/requirejs/require.js"></script>
<script  type="text/javascript"  src="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/mage/requirejs/mixins.js"></script>
<script  type="text/javascript"  src="http://mage2.dev/pub/static/_requirejs/frontend/Magento/luma/en_US/requirejs-config.js"></script>

<!-- ADD MY CUSTOM CSS/JSS LOAD AT THE LAST -->
<link rel="stylesheet" type="text/css" media="all" href="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/css/OVERRIDE.CSS">
<script  type="text/javascript"  src="http://mage2.dev/pub/static/frontend/Magento/luma/en_US/js/OVERRIDE.JS"></script>

</head>

I found this post (How to add a custom CSS file in Magento 2) but it's not working for me.

(Posted it in magento forum but got no reply: link here)

Any help would be much appreciated.


texts:
I'm using the HelloResponsive EE theme on a Magento 1.13 EE deployment.

In setting up an extention for the eWAY gateway, I was told there was an error in the Prototype.js file that was interfering with the JSON post.

  Uncaught TypeError: Object.keys called on non-object prototype.js:126
  addMethods prototype.js:126 create prototype.js:115 (anonymous
  function) wishlist.js:38

for (var i = 0, length = properties.length; i < length; i++)
  klass.addMethods(properties[i]);

The custom theme does use JQuery as well, so this may be a conflict issue. But when I try moving the JQuery call before the Prototype call, the JQuery functions stop working.

Can anyone help explain

whether or not the error is related to the Prototype / JQuery
conflict (I am using a noConflict script) and
how best to fix this?

Here's the code in Wishlist.js, starting at line 38:

Enterprise.Wishlist.Widget.Form = Class.create(Enterprise.Widget, {
action: null,
isValid: false,

initialize: function($super, action) {
    var _templateString = '
' +
            '
' + Translator.translate('Wishlist Name') + '
<input type="text" id="wishlist-name" maxlength="255" class="input-text required-entry validate-length maximum-length-255" name="name"/>
' +
            '

<input type="checkbox" id="wishlist-public" name="visibility">
' + Translator.translate('Make This Wishlist Public') + '
' +
        '
' +
        '
<button type="submit" class="button btn-save">' + Translator.translate('Save') + '</button><button type="button" class="button btn-cancel">' + Translator.translate('Cancel') + '</button>
';

You're help is greatly appreciated!


texts: Configurable Products - showing customer total prices in dropdown options instead of +/- pricing

texts:
Can anyone please help. I have Magento Community 1.7 installed and can't find any way to change how the pricing is displayed for Configurable products.

I want to show the total price and not have +£10 etc on the different configuration options.

Is there any simple and effective way to do this please? I've tried the Magento Exchange Configurable Products addon which broke my store...

Thanks for any help.


texts: Move Product Attribiutes from More information Tab to details tab

texts:
I would like to move all product attributes from selected product to details tab.
I try to do something like this:
<move element="product.attribute" destination="content" after="-">
But this solution is not good form me because i would like to display product attribute only in Details tab not in all around product page.
Please help


texts: Associate a downloadable product to configurable product

texts:
How to associate a downloadable product to configurable product?

I can see only simple product list filtered with the similar attribute set right now. but not downloadable product with the same attribute set of configurable product.

Why can't I able to associate a downloadable product to configurable product?

I tried by altering the following setting after reading this blog.

Downloadable product -> Downloadable information -> Links -> Links can be purchased separately -> No

I think the above trick will work only for Grouped products but not for configurable products.

What should I do?

Please help.


texts: How to save XML code snippet in customer session?

texts:
I want to save a piece of XML code in the customer session. So far I tried with the following code.

// Get customer session.
$customerSession = Mage::getSingleton('customer/session');

// $xml contains a piece of XML code.
$xml= new SimpleXMLElement($xml);
$customerSession->setSegmentList($xml);

But I'm getting the following error.

String could not be parsed as XML

Can anyone suggest how to resolve this?
How can I save XML piece of code in customer session?


texts: Automatic generation of the client's login

texts:
After registering a new account, I would like each customer to receive their individual login name, eg login: Customer:8374233
Does anyone know any extension or how to solve it?


texts:
I did not make any changes recently related to this, but I can't edit or open any products from the Magento admin.

Here is the screenshot for what I see when I try to open a product.

Why am I not able to edit products?


texts: Magento2: Remove shipping method based on Custom option?

texts:
I want to remove the flat rate shipping method based on custom option selected in magento2

Any help would be appreciated.


texts: What are the Dispatch/Execute() functions and how do they work?

texts:
I would like an explanation of the dispatch and execute functions, the differences between them, when they are/should be used and how.

Please limit your answer to Magento 2


texts: Select all countries code gives 'We're sorry, an error has occurred while generating this email.' error in Magento 2

texts:
I have created a file for displaying all countries, but it shows We're sorry, an error has occurred while generating this email.

Please help me to fix the issue. Any help will be appreciated.

app\design\frontend\Vendor\Module\Magento_Cms\templates\countryselect.ptml

<?php
$_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$countryHelper = $this->_objectManager->get('Magento\Directory\Model\Config\Source\Country');
$countryFactory = $this->_objectManager->get('Magento\Directory\Model\CountryFactory');

$countries = $countryHelper->toOptionArray(); //Load an array of countries

    foreach ( $countries as $countryKey => $country ) {

        if ( $country['value'] != '' ) { //Ignore the first (empty) value

            $stateArray = $countryFactory->create()->setId(
                $country['value']
            )->getLoadedRegionCollection()->toOptionArray(); //Get all regions for the given ISO country code

            if ( count($stateArray) > 0 ) { //Again ignore empty values
                $countries[$countryKey]['states'] = $stateArray;
            }

        }
    }

var_dump($countries);
?>


texts:
I need to set bundle products that it will have variable qty. For making the final product customer needs 6 parts of Item A, 2 parts of Item B and 1 part of Item C. For example

Bundle product #a should contains at qty:
1 = 1 Item A + 1 Item B + 1 Item C
2 = 2 Item A + 1 Item B + 1 Item C
3 = 3 Item A + 1 Item B + 1 Item C
4 = 4 Item A + 2 Item B + 1 Item C
5 = 5 Item A + 2 Item B + 1 Item C
6 = 6 Item A + 2 Item B + 1 Item C

I wouldnt mind to put the qty of associated items for each qty of bundle.

EDIT: Customer should not have the option to choose how many of Item A, B and C. He should be able to choose how many products #a he wants only.

To better explain my need. This is calculator in Excel. What I need is to let customer choose only qty of column A which contains numbers of Items A, B, C.. in columns B, C, D.. I hope this is understandable.
https://www.dropbox.com/s/y5z2j7bj5br5k4p/calculator.xlsx?dl=0


texts: 404 Not Found - category-selector.css file

texts:
I have been trying to locate a copy of category-selectory.css that has gone missing from my store and causing problems with Google Shopping extension.

Does anyone have any idea if this file was removed in Magento 2.1.9 or still have a copy that they could post?

The file should be located here:

<css src="Magento_Catalog::catalog/category-selector.css"/>

But it giving a 404 error!


texts: Add custom view on magento admin order view page

texts: Want to add my custom info block on magento admin order view page using my custom plugin. can anyone help me with this?


texts: How can I merge columns in UI grid in Magento 2

texts:
I have two columns in Admin grid. For ex. 1. First Name, 2. Last Name

<column name="firstname">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">text</item>
            <item name="label" translate="true" xsi:type="string">First Name</item>
            <item name="editor" xsi:type="array">
                <item name="editorType" xsi:type="string">text</item>
            </item>
        </item>
    </argument>
</column>
<column name="lastname">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">text</item>
            <item name="label" translate="true" xsi:type="string">Last Name</item>
            <item name="editor" xsi:type="array">
                <item name="editorType" xsi:type="string">text</item>
            </item>
        </item>
    </argument>
</column>

So How can I merge these two columns into one like 1. First Name Last Name


texts: Disable Cash on delivery in citrus payment gatway for specific product in magento

texts: I am using citrus payment in magento website its working good but there is an option in admin in citrus payment method i.e. Show COD option and i disable it but COD option is still enable after placing order using citrus payment in frontend.


texts:
I have to work with attributes and I'd like to understand how it really works.

So first of all, in the BackOffice can someone explain me :

On this picture above what is the difference between :

on the scope column : Store View , Global and Website. What does that change ?
on the system and comparablecolumn : What does that mean ? What is the impact if I put system to yes / no ? Same question for comparable column.
on the column Use in Layered Navigation : What is the difference between Filterable (with results), Filterable (no results) and No

Thx a lot in advance for your answers.
If you got any website that explains what are the difference between all of this I'll be really grateful.


texts:
In Magento 1.9.2.4, We can access the SOAP through url  index.php/api/v2_soap/index/.

But, in Magento 2.1.9 what we should use?


texts: I want to get data by the current URL, so I have set a post value, but it is set for all pages

texts:
I want to get data by the current URL, so I have set a post value. But it is set for all pages, and I want to unset it if another URL opens. How can I do it?

Please see my code:

if ($currenturl = 'https://example.com/delhi.html') {
    $this->request->setPostValue('location', '289');
}


texts: Magento 1 How Customer allowed to do a partial payment?

texts:
This is the first time when customer completed an order with partial payment using Authorize.net payment method. I can see the 'Total Due' row in the order totals box.

Allow Partial Authorization is set to no.

What could have allowed customer to pay partial amount?


texts: What is different between subtotal and subtotal_invoiced

texts:
Sometimes I have seen in order in the sales_flat_orders table that have a subtotal but have no subtotal_invoiced. What is different between them?

Here is a sample row extracted from sales_flat_orders table:

subtotal     subtotal_invoiced    grand_total  total_invoiced    total_paid

37.5000           <null>            37.5000        <null>          31.2500


texts:
On Magento 1.8

I need the variables for the following list, so that I can modify the invoice:

| 1)No.  | Product     | 2)Total excl VAT | 3) VAT 6%
|:-------|------------:|:----------------:| :-------:
| 1      | Product A   |      $200        |    $12
| 2      | Product B   |      $300        |    $18
| 3      | Product C   |      $100        |     $6

Items numbering
Total exclude Tax on ROW item
Total Tax on ROW item
Is it possible to retrieve the type of tax code applied on product?

eg, Tax VAT 6% on Product A. So the name of product A will be "T6 - Product A"

I have tried looking in table sales_flat_invoice_item but did not find anything related.

Updated Findings:

There aren't any default variable in Magento for the items 1-4 above therefore new variable needs to be added. To add a new variable, go to the following file:

app/code/community/MDN/GlobalPDF/Model/Pdf/Order/invoice.php

and add the new variable in this function:

protected function setTemplateData($invoice) {

for example:

$data['store_id'] = $rma->getSalesOrder()->getstore_id();

and add a value with the variable $data.

Lastly open the XML file with the same name of the php file previously and add  the new variable into your text, multitext, etc.

For this case, ROW total without tax should be row_total_incl_tax - row_total.
I have used this as example $data['store_id'] = $rma->getSalesOrder()->getstore_id(); but it produces error as below.

Fatal error: Call to a member function getstore_id() on a non-object in /var/www/app/code/community/MDN/GlobalPDF/Model/Pdf/Order/Invoice.php on line 43


texts:
I am a "Newbie". I have a site written with the free version. The manual import works fine (after reindexing). I want to automate that process to run every night. How? Thanks, Randy

More info: the manual import/reindex in the Magento control panel works fine for my purpose. However, I need some way of automating that process for a unattended nightly import of some 6000 products. Our website was written by a developing firm that recently left us with an uncompleted web. We are trying to finish up on our own.

Thanks, Randy


texts:
I'm posting this question again since all the existing related posts are pretty old! I am completely new to Magento and I had just started to change a few config settings when I started to get a 404 on the admin. Site loads fine it's the admin I have issues with. I was setting up stores fine but I changed a Base URL (secure) saved and got a 404 afterwards. I have no idea whatsoever how to fix this and I need my admin back!
I appreciate all the help I can get!
Thanks,


texts: Magento 2 Get product Review star in phtml

texts:
I need to show the rating for the products in my custom slider in my home page.

Here im getting just the rating number say: 60 .

How to get the rating stars here in template.

Featuredproduct\view\frontend\templates\featured_grid.phtml

<?php
                    $_ratingSummary = $block->getRatingSummary($_product->getId());
                    $_reviewCount = $_ratingSummary->getRatingCount();
                    $_ratingSummary =$_ratingSummary->getRatingSummary();

                    if($_ratingSummary){ ?>

                            <div title="<?php echo (int)$_ratingSummary; ?>%" class="rating-result">
                                <span style="width:<?php echo (int)$_ratingSummary; ?>%"><?php echo (int)$_ratingSummary; ?>%

                            <?php echo __('('.$_reviewCount.')'); ?>

                    <?php } ?>

Featuredproduct\Block\Featuredproduct.php

protected $_reviewFactory;
public function __construct(
    \Magento\Catalog\Block\Product\Context $context,
    \Magento\Framework\App\ResourceConnection $resource,
    \Magento\Framework\Url\Helper\Data $urlHelper,
    \*Vendor*\Featuredproduct\Model\Resource\Customcollection\Collection $fpmanualCollection,
    \Magento\Framework\Stdlib\DateTime\DateTime $datetime,
    \Magento\Sales\Model\Order\Status\History $orderstatus,
    \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection,
    \Magento\CatalogInventory\Helper\Stock $stockHelper,
    \Magento\Review\Model\ReviewFactory $reviewFactory,
    //\Magento\Review\Model\ResourceModel\Rating\Collection $ratingCollection,
    \Magento\Review\Model\ResourceModel\Review\Summary\Collection $ratingCollection,
    \Magento\Catalog\Model\ProductFactory $_productloader,
        array $data = []
)
{
     $this->_coreResource = $resource;
     $this->urlHelper = $urlHelper;
     $this->_fpmanualCollection = $fpmanualCollection;
     $this->_datetime=$datetime;
     $this->_orderstatus=$orderstatus;
     $this->productCollection=$productCollection;
     $this->ratingCollection=$ratingCollection;
     $this->stockHelper=$stockHelper;

     $this->_reviewFactory = $reviewFactory;
     $this->_productloader = $_productloader;

    parent::__construct($context,$data);

}

public function getRatingSummary($id)
{
    $product = $this->_productloader->create()->load($id); // follow the link for this
    $this->_reviewFactory->create()->getEntitySummary($product, $this->_storeManager->getStore()->getId());
    $ratingSummary = $product->getRatingSummary();

    return $ratingSummary;
}


texts: How to add messages in "global_messages" block?

texts:
I simply wonder how to interact with the global_messages block.

I'm aware of http://inchoo.net/magento/magento-frontend/utilizing-magento-notification-system/ and https://makandracards.com/magento/10723-messages-and-global-messages-blocks

When I add a message, for example :

Mage::getSingleton('customer/session')->addError('Please enter all required information');

It is rendered with <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> in the template.

But as getMessagesBlock() always retrieves or creates the block aliased messages I can't understand how to populate global_messages block.

I understand "Global Messages" should be displayed with

 <?php echo $this->getChildHtml('global_messages') ?>

but how to set a message in this global_messages block ?


texts: Magento 2.3.6 - The attribute 'name' is required but missing in checkout/cart page

texts:
I'm working on a store in Magento 2.3.6 with Porto theme, all work correctly but I have an error page when go to "show edit cart" (checkout/cart/) "The attribute 'name' is required but missing", please help me!
Test shop address is https://www.00up.app/magento2/
THANK YOU!!!!
page cart street with this error message:
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'argument': The attribute 'name' is required but missing.
Line: 1219
Element 'argument': Not all fields of key identity-constraint 'blockReferenceActionArgumentName' evaluate to a node.
Line: 1219
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'argument': The attribute 'name' is required but missing.
Line: 1219
Element 'argument': Not all fields of key identity-constraint 'blockReferenceActionArgumentName' evaluate to a node.
Line: 1219


texts: Magento 2 - Custom theme - Change the background to an image

texts:
I know how to change the colour of my background in my custom theme however I was wondering if it were possible to change the background on all pages to an image?

I imagine it is similar to changing the colour but I don't know enough about magento 2 to be able to do it.

Any help would be much appreciated. I understand that my question is vague and basic ;)


texts: order sale vs purchase order in Magento (not getting the difference)

texts:
I dont fully understand what is the difference between Sale Order and Purchase Order in MAGENTO.

In my system i have 4 tables that are related to the Sale Order and 4 tables that are related to the Purchase Order; i mean, everytime that an order or a purchase order is set in MAGENTO a row is created in one of these tables

Sale Order tables:

-Header_order (contains the header information of the order)

-order_information (contains the information of the different lines of the order)

-approvals (this table was created because a guy can approve or reject the different lines of the order)

Purchase Order tables:

-Purchase_order_header (contains the header information of the purchase order)

-Purchase_order_items (contains the information of the different items of the purchase table)

-Purchase_order_approvals (this table was created because a guy can approve or reject the different lines of the purchase order).

Could you please explain to me WHAT is the different between them? I dont get it

Thanks!


texts: Magento 2: How to add an "items per page switcher" to a pager in the current variations grid for a configurable product

texts:
Then you open configurable product in admin panel there is Current Variations grid.

The grid is configured via \Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\ConfigurablePanel class. How can I add an "items per page" switcher to the grid?


texts: add content other than attribute information under "Additional information" in magento

texts:
we can see "Additional information " tab in magento product view page.

there we can list all attributes.

I want to display some contents under "Additional information " tab....

means

Main information

attribute label 1 : attribute value

Sub - information

attribute label 2 : atribute value.

please let me know if you need any clarifications.

thanks in advance.


texts: Return "not found" after installing magento CE 2.1.6 in subdirectory

texts:
I installed CE 2.1.6 in subdirectory via command line as linode(linux host) guided:
/var/www/html/mydomain.com/public_html

Installing is finished, then i went to the admin url like mydomain.com/admin_f3fds3, it returns me "not found". admin_f3fds3 is the uri it gave after installing.

And when i went to frontend, it redirected me to the following url:
http://tgqpauxpaf.info/index.php/?SID=v31er0705khgm3evn2vf3nraq5

What should i do next, has anyone installed magento like this?

LAMP: ubuntu0.16.04.1
Appach 2.4
Mysql 5.7.18
PHP 7.0.15
Thank you.


texts: Importing product weights when multiple rows in CSV per product

texts:
Currently, practically every Magento import is yielding a frustrating experience in this particular project.

Most product data is already in the system, configurables setup, each with all their associated simple products.

What we'd like to do is update all the product weights for all the products - quickest way is to bulk update in CSV.

First things first, we export our product data from the system.

Now, we'd like to think that the CSV format it spews out at of the system would be the correct format to reimport back in again but no - even Magento doesn't seem to be able to give us something to work with. If we reimport all the same CSV back into the system that it exports, none of the products show up on the front end (this is if we do it via dataflow).

As this store is a multistore, the CSV format we have is like the following:-

sku     _store     _attribute_set     _type     _category     _root_category    _product_websites     name     weight
sku-01             Default            simple                  Default Category  retail                name-01  weight-01
                                                Category 1    Default Category  wholesale
sku-02             Default            simple                  Default Category  retail                name-02  weight-02
                                                Category 1    Default Category  wholesale
sku-03             Default            simple                  Default Category  retail                name-03  weight-03
                                                Category 1    Default Category  wholesale

So as can be seen from the above dummy sample, each product has a minimum of two rows, the majority of the rows for the wholesale store is always blank though - presumably because this store just uses the default config and has no wholesale store overrides.

In the event that a product has more than two rows, this is when it has multiple simple products associated to it or custom options set. One row per associated product (granted, the CSV sample above does not show configurables) and one additional row per product for each custom option that it has as well - which is somewhere like column QAZT of CSV!

All pretty normal stuff so far I gather, at least, I've always seen complex product data in a Magento export formatted this way.

The problem comes when we try to reimport back into the system and I'm guessing the issue lies somewhere between the multiple rows per product with options/associated products and additional store(s).

If I were to import the above back into the system, Magento returns:-

Skipping import row, required field “sku” is not defined.

For what seems like every product but I'm guessing, it is probably for every row that does not contain a SKU value - which in the event of complex CSV data, is more that doesn't contain a SKU value than does. Is this to be expected behaviour - the system often screws everything up come the end of this dataflow import when this error is being returned.

I'm after the most stable and recommended way of just simply importing product weights for all products and as per the sample above, I have a CSV in the format exported with all the product weights entered for all the relevant products. Importing as is just causes every product to disappear from the catalog (wtf).

What is the next step?
Normal import?
Dataflow import?
What is the bare minimum of column headers required for just importing weight? (Just importing the SKU column and the weights was a total disaster).

Your thoughts, opinions, feedback and recommendations greatly welcome. Thanks.


texts: Additional images not showing in product details page- magento 2

texts: Facing problem while displaying additional images in magento 2 product details page, only showing base images but in backend images are there, do I need to write any separate api for showing additional images in pdp page


texts: Display Customer Attribute (Drop-down) in Admin Email

texts:
My site has a customer registration page and Magento sends an email to the admin of the submitted registration form. However, there are 3 customer attributes that use a dropdown to enter information, for example Country, Business size, and Industry. Currently the email displays numbers and not the drop-down selection. Please view screenshot below.

How can we have Magento send the selected choice from the dropdown. My current code is below for the 3 drop-down questions on the registration form.

Country:        {{htmlescape var=$customer.country}}
Business Size:  {{htmlescape var=$customer.customer_type}}
Industry:       {{htmlescape var=$customer.industry}}

Thank you