texts: Magento 2 How To Add Custom Text After All Prices

texts:
I tried to add custom text after all prices that appears in magento 2.

For this I tried to do in 2 ways:

1) I tried to modify function getPrice from module-catalog\Model\Product.php like this:

public function getPrice()
    {
        if ($this->_calculatePrice || !$this->getData(self::PRICE)) {
           return $this->getPriceModel()->getPrice($this)."some text";
        } else {
            return $this->getData(self::PRICE);
        }
    }

but this is not working. If I add some int value this will work on every page, othewise is show 0.

if I will do this: return $this->getPriceModel()->getPrice($this)* 100; this will work.

I tried to add this custom text on "currency_display_options_forming" event like this:

   public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $baseCode = $observer->getEvent()->getBaseCode();
        $currencyOptions = $observer->getEvent()->getCurrencyOptions();

        if ($baseCode === 'EUR') { // change currency symbol position to Right with EUR
            $currencyOptions->setData('position', \Magento\Framework\Currency::RIGHT)."some text";

        }

        return $this;
    }
}

This is also not working.

Does anyone have a good idea how to do that?

Maybe I should find function that format this value from getPrice function? if yes, is somebody that know where I can find this function?


texts: $block Class Some Method is won't appear in get_class_methods() call

texts:
I am working in \success.phtml file, with the final objective of placing a tracking iframe on the confirmation page.

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

// @codingStandardsIgnoreFile
?>
<?php /** @var $block \Magento\Checkout\Block\Onepage\Success  **/?>

<?php if ($block->getOrderId()):?>
    <?php if ($block->getCanViewOrder()) :?>

<?= __('Your order number is: %1.', sprintf('%s', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))) ?>

    <?php  else :?>

<?= __('Your order # is: %1.', $block->escapeHtml($block->getOrderId())) ?>

    <?php endif;?>

<?= /* @escapeNotVerified */ __('We\'ll email you an order confirmation with details and tracking info.') ?>

<?php endif;?>

<?= $block->getAdditionalInfoHtml() ?>

        <a class="action primary continue" href="<?= /* @escapeNotVerified
         */ $block->getContinueUrl() ?>"><?= /* @escapeNotVerified */
         __('Continue Shopping') ?>

<?php
    $block_methods = get_class_methods($block);
?>

I am trying to access the product/shopping cart info of the order, so I made a get_class_methods($block) call as seen above. The output said that $block has 80 different methods, but none of the methods listed were getOrderId(), which confuses me since that method is used in the file. Can anyone explain this? Also would it be possibly to access the methods of a $block class from a different file? I am pretty new to coding so I am pretty confused by this.


texts: I need a point in the right direction. Right now we have a SOAP V1 API grabbing customers when they create an order. I have been asked to also be able to update a customer when the save new profile information. So basically when they click the save button on the update profile page. I have not deat with a lot of SOAP V1 actions and am looking for some resources into how I would write this out to be performed when this button is clicked.I know this isn't a normal SE question, but any help is greatly appreciated.


texts: Magento 2 - How to replace a char on item title

texts:
I have succesfully used this trick to replace dash char "-" with "br" on CATEGORY VIEW:

<?php echo str_replace(' - ', '<br />', $_helper->productAttribute($_product, $_product->getName() , 'name')); ?>

result --> https://dev.push96.com/uomo.html

But now how can I use the same trick on the PRODUCT PAGE title?
--> https://dev.push96.com/uomo/tommy-jeans-uomo-t-shirt-in-puro-cotone-giallo-con-logo-dm0dm05125094.html

I need the same replace "-" with line break but I can't find where to put the code.


texts: Does anyone have a fix for PayPal Express NVP Gateway errors due to rounding issues

texts:
The title says it all, ever since its inception to the latest stable 1.7.x.x, Magento has certain issues taking Paypal Express orders, taxation round errors cause the Magento total to not match the Paypal total with customer frustrating results.

Various settings for taxation have been recommended, it fails with all, though Row Total and Unit Price seem to cause less problems.

It also fails quite a bit if "Transfer Cart Line Items" is yes, so that's shut off.

Here's the constant issue...

2013-06-21T16:27:07+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'PayPal NVP gateway errors:
The totals of the cart item amounts do not match order amounts
(#10413: Transaction refused because of an invalid argument. See additional error messages for details).
Correlation ID: 1b6bbf0dcad1b. Version: 60.0.' in /folder/somesite/htdoc/app/Mage.php:536

Stack trace:
#0 /folder/somesite/htdoc/app/code/core/Mage/Paypal/Model/Api/Nvp.php(952): Mage::exception('Mage_Core', 'PayPal NVP gate...')
#1 /folder/somesite/htdoc/app/code/core/Mage/Paypal/Model/Api/Nvp.php(914): Mage_Paypal_Model_Api_Nvp->_handleCallErrors(Array)


texts: Magento order notification through sms for admin

texts: Is there any way to alert admin when order is placed from customer other than email like SMS etc. If it is there, anyone can share the solution?


texts: Magento2 does varnish cache help to improve performance on development mode?

texts:
I am working on a Magento EE project and version is 2.1.15, and since we have lots of product on the products page, and takes 22s to reload the page, so i am wondering will varnish help to improve the performance to reduce the loading time on the products page? and i tried on my Ubuntu machine and seems like not a lot of difference even i use varnish cache

thank you


texts: how to achieve Buy 2 products in some category and get any 1 product in same category for free

texts:
say for eg in same category

Buy A and B then C product should be free
or 2A then B should be free


texts:
What does a product that is not found return in terms of Object?

I'm loading a product like the following:

$man_collection = Mage::getModel('catalog/category')
    ->load($mProduct)
    ->getProductCollection()
    ->addAttributeToSelect('*')
    ->addAttributeToFilter('status', 1)
    ->addAttributeToFilter('visibility', 4)
    // ->getSelect()->limit(1);
    ->addFieldToFilter(array(
        array('attribute' => 'color', 'eq' => '1049')
    ));

Assuming that this specific product with this color code 1049 does not exist in the database, how can I validate it? If I try

gettype($man_collection)

it still returns Object.  So is there a way to validate this? Like "if product with color code 1049 found proceed, else echo not found"


texts: After Migration From M1 to M2, Default Migrated Attribute Set Product Tier Pricing Not Updating

texts:
I've migrated M1 to M2.1.8 by using "UB Data Migration tool", but when I tried to update tier price for a product having "Default Migrated" attribute set it doesn't
updated(not getting any error just getting product saved message), others things are updating properly e.g-product name, special price, cost etc.

While for the attribute set "Default" everything working fine.


texts: How can i add header links next to language switcher or Left side

texts:
I need to add some custom links on header just like below screenshot:-

But as i trying to add the same on "header.links" it's adding right side(near CONTACT US link).

how can i achieve my expected one?


texts: Can we use “paypal payment method” in magento for Indian shopping website?

texts:
I am having a Indian shopping website which is set up in magento.
I just need to know weather we can use paypal as a payment method for purchases.
If yes, then how?
If no, then why not?


texts:
I have a multi-website (2 websites).

Now I want one of the 2 in maintenance and the other one not.

Is this possible? Or can I secure them with an htacces password for one of the 2?


texts: Creating a coupon Product A + Product B and get 10% OFF

texts:
I want to create a coupon.

The idea is Product A + Product B and get 10% OFF.

How to create this I tried some Ideas but, that didn't worked.

Here

Product Variant A.1, A.2, A.3
Product Variant B.1, B.2, B.3
Product Variant C.1, C.2, C.3

+
Product Variant D.1, D.2

What I want is that If someone chose B.2 + D.1 he gets 10% OFF
and so on. So, the important part is that 1 product from A,B,C and 1 from D.


texts: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in Magento customer Create

texts:
I got this issue when creating the customer in magneto 2.
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /vendor/magento/framework/Model/ResourceModel/Db/VersionControl/Snapshot.php on line 47

due to this reason, I increased the memory limit up to 8 GB. but the issue remains.
/**
 * Register snapshot of entity data, for tracking changes
 *
 * @param \Magento\Framework\DataObject $entity
 * @return void
 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
 */
public function registerSnapshot(\Magento\Framework\DataObject $entity)
{
    $metaData = $this->metadata->getFields($entity);
    $filteredData = array_intersect_key($entity->getData(), $metaData);
    $data = array_merge($metaData, $filteredData);
    $this->snapshotData[get_class($entity)][$entity->getId()] = $data;
}

issue raised in this line
$data = array_merge($metaData, $filteredData);
vendor/magento/framework/Model/ResourceModel/Db/VersionControl/Snapshot.php
What solution we need to provide this.


texts: You did not sign in correctly or Your account is temporarily disabled Magento 2

texts:
I have try this Solution but its not working....
   Please give me suggestion to how to resolve this
   When trying to login to the admin account in my local test setup it says: Account is temporarily disabled even I used correct user and password.

Solution 1: Unlock admin account
try command in case the account is locked

php bin/magento admin:user:unlock

Or go to Magento 2 root folder and type

php bin/magento admin:user:unlock

Solution 2:
Remove Cache var/cache

Solution 3:
Remove everything, except .htaccess file from pub/static folder
Open up app/etc/di.xml find the path

  Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

and replace to

  Magento\Framework\App\View\Asset\MaterializationStrategy\Copy


texts: Magento 2 - sell product grouped by quantity

texts:
My client want sell their product by quantity for exemple :

Flowers sell by

10qty = 10$,20qty = 15$,30qty = 22$

without the customer can edited the quantity salled.

And he want to manage the stock quantity by unit.

So if he had 100 flowers and he sale one group of 20 flowers, he remaind 80 flowers at the end.


texts:
We are developing a website with the following requirements:

You can choose "United Kingdom" or "USA" when browsing the shop. This shows different currencies (GBP or USD).
Products only entered once in admin panel, shared across both "UK" and "US" (ie. they have the same products).
Different stock availability because of different fulfillment centres - US orders are fulfilled by a different warehouse to UK (warehouses are in different parts of the world). UK warehouse may have Product A in stock, whereas US warehouse may not, in which case UK customers should be able to buy the product but US customers should not.

Currently our set up is one website with multiple store views, one store view for UK and one for US. Using this module http://www.magentocommerce.com/magento-connect/store-view-pricing.html to set different fixed prices for each currency (ie. not based on conversion rates)... £0.99, $0.99 etc.

However we have hit a roadblock at the stock issue as Stock Availability/Qty is a Global attribute in Magento and cannot be based on different store views.

We would appreciate any help on how to go forward with this. Is there any way we can stop Stock Availability from being Global? Should we create our own attribute for Stock and use that (messy)? We really don't want to end up having to create separate Websites for each US and UK as this means products would have to be entered multiple times.

Thanks so much for any help anyone can give.


texts: Magento 2 How to hide price from front end with custom module?

texts:
I have created one module and it has system configuration on the admin side, where the admin has the functionality to enable/disable the module. As per system configuration, I need to hide the price from every place on the front end.

  i.e. "catalog, category, wishlist, a related product, upsell products,
  cart, checkout, orders, email, account dashboard, etc.."

from everywhere I need to hide the price if the module is enabled.

Is there any global file for the price which can be overridden and add the code for hiding price?

I found one file, But if we override \Magento\Catalog\Pricing\Render\FinalPriceBox and change in wrapResult() function, it works but it will affect only product page and home page not for wishlist and other places.

how can I achieve this functionality? Is anyone have any idea about it?

Please share an idea to hide price from cart/checkout/order/etc...


texts: where to place the templates of an adminhtml block?

texts:
I have a custom design called mydesign and a custom extension  (My_Testmodule).

if i create the following block in my own module:

class My_Testmodule_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Type_Test extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Type_Abstract {

    public function __construct() {
        parent::__construct();
        $this->setTemplate('mydesign/catalog/product/edit/options/type/test.phtml');
    }

}

where should the template be located?

should it be in

app/design/adminhtml/mydesign/default/template/testmodule/catalog/product/...
app/design/frontend/mydesign/default/template/testmodule/catalog/product/...
or somewhere else?

i thought it should be in adminhtml/... but it doesn't seems to be called. The Block is definitly beeing called, if i echo something in constructor it will be printed on screen. But the template seems to be ignored.

Please help me, im struggeling arround with it since hours.


texts: I need to add value in customer table after successful order placed

texts:
This is my Installdata.php Which saves the cashback value in attribute Id.
Now I need to save this value into customer table of magento 2 if transaction is successful.

<?php

namespace Rk\Wallet\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    private $eavSetupFactory;
    public function __construct(
        EavSetupFactory $eavSetupFactory
    )
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {
        /** @var EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        $eavSetup->addAttribute(
                \Magento\Catalog\Model\Product::ENTITY, 'cashback', [
            'group' => 'Product Details',
            'type' => 'varchar',
            'sort_order' => 102,
            'backend' => '',
            'frontend' => '',
            'label' => 'CashBack Percentage',
            'input' => 'text',
            'class' => 'cash',
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
            'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
            'visible' => true,
            'required' => false,
            'user_defined' => true,
            'default' => '',
            'searchable' => true,
            'filterable' => true,
            'comparable' => false,
            'visible_on_front' => true,
            'used_in_product_listing' => true,
            'unique' => false,
            'apply_to' => 'simple,configurable,virtual,bundle,downloadable'
        ]);
        $eavSetup->addAttribute(
                \Magento\Catalog\Model\Product::ENTITY, 'cashback_validity', [
            'group' => 'Cashback/Delivery Date',
            'type' => 'varchar',
            'sort_order' => 102,
            'backend' => '',
            'frontend' => '',
            'label' => 'Cashback validity Days',
            'input' => 'text',
            'class' => '',
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
            'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
            'visible' => true,
            'required' => false,
            'user_defined' => true,
            'default' => '',
            'searchable' => true,
            'filterable' => true,
            'comparable' => false,
            'visible_on_front' => true,
            'used_in_product_listing' => true,
            'unique' => false,
            'apply_to' => 'simple,configurable,virtual,bundle,downloadable'
        ]);
    }

}


texts: How do I delete a customer account programmatically in Magento2 CE?

texts:
Version: Magento 2.1.0

I run the following codes in my controller and got error:

$customer = $this->customerFactory->create()->load($id);
$customer->delete();

Error:

Exception #0 (Magento\Framework\Exception\LocalizedException): Delete operation is forbidden for current area

My code was stopped by the beforeDelete() method in Magento\Framework\Model\AbstractModel.php. It calls another method called isAllowed(AbstractModel $model)

How do I bypass these methods and delete a customer?


texts: If Free Shipping Replace Text with Free instead of $0.00 in Magento 2

texts:
I am trying to customize the shopping cart page, If customer select Free Shipping Shipping Method needs to replace Free instead of $0.00. For this stuff, I followed steps.

Customized the root/vendor/magento/module-checkout/view/frontend/web/template/cart/totals/shipping.html, but it's not affecting.

Can you please suggest me how to do this.


texts:
I have Block
question

  class Question extends \Magento\Framework\View\Element\Template
  implements \Magento\Widget\Block\BlockInterface

in function

public function __construct(

        \Magento\Framework\View\Element\Template\Context $context,
        \Mageaddons\Productquestion\Model\ProductquestionFactory  $productQuestion,
        \Mageaddons\Productquestion\Model\AnswerquestionFactory  $answersQuestion,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Catalog\Block\Product\View $product,
        array $data = []
    ){
        $this->_productQuestion = $productQuestion;
        $this->_answersQuestion = $answersQuestion;
        $this->_customerSession = $customerSession;
        $this->_product = $product;
        parent::__construct($context,$data);
    }

when run get error

[2015-12-04 08:20:22] main.CRITICAL: Circular dependency: Mageaddons\Productquestion\Block\Product\Question depends on Mageaddons\Productquestion\Block\Product\Question and vice versa. [] []

any help. tks!

Edited
when i comment

\Magento\Customer\Model\Session $customerSession,
\Magento\Catalog\Block\Product\View $product,

it work.
This block be use to add in Product View.
.So how do get custommer isLoggedIn and product in product view.


texts: Sticky sidebar does not supports to chrome in magento 1.9.2

texts:
Want to display sticky sidebar in magento website. As the sticky sidebar is working in Mozilla firefox but unable to work in google chorme.

CSS code used for sidebar

#sidebar {
border-radius: 0 !important;
bottom: 0;
color:#fff;
border:2px solid #000;
margin-bottom: 10px;
margin-left: auto;
opacity: 1 !important;
top: 0 !important;
position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky;
position: -o-sticky;
position: sticky;
scroll-behavior: smooth;
overflow-y: scroll;
 height: 45em;
}
.sidebarfixed{background: #f4f4f4;
        border-left: 1px solid #ccc;
        position:absolute;
      }


texts: Something went wrong: There are no products to generate feed. Please check Amasty Feed indexers status or feed conditions

texts:
How can I do this problem as the title?

When I finish all of the settings of google feed setup by Amasty Feed and try to generate it but it turns as above picture.
I went to Index Management and check all of the statuses are ready. Someone also told me to let the Amasty Feed update on save but it still didn't work. Is there anyone who has the same problem and solved it?

Hope to get the answer.
Regards,
Tess


texts: gettig error while add new tab in sale order view Wrong tab configuration

texts:
i am trying to add new tab in sale_order_view. with follow xml but getting error after searching for hour for solution i could not succeeded to solve my problem.

<adminhtml_sales_order_view>
        <reference name="sales_order_tabs">
            <action method="addTab"><name>test</name><block>test/adminhtml_test_edit_tab_itemform</block></action>
        </reference>
    </adminhtml_sales_order_view>

any help will be appreciated.


texts: magento 1.9 "new" label not showing in catalog view

texts:
I am not seeing the new label being applied on the catalog page. There are 2 labels  that I have applied but only one is working.

Here is code;
Sale Label

<?php if($this->helper('framework')->isSpecialProduct($_product)):?>
    <?php echo $this->__('sale_label') ?>
<?php endif;?>
New Label
<?php if($this->helper('framework')->isNewProduct($_product)):?>
    <?php echo $this->__('new_label') ?>
<?php endif; ?>

Sale label works no problem.. But I can't get the new label to apply. Even when I filter the new products on the page so it is only showing them (so I know I 100% have new items in catalog) it still will not show the label..

Any thoughts?


texts: Fatal error: Call to a member function getSource() on a non-object in public_html/app/code/core/Mage/Catalog/Model/Product.php on line 1390

texts:
I am trying to use a custom Yes/No attribute to show/hide an element within the Price.phtml file but whenever I add the condition I keep getting this error and I can't understand why since I had it working previously.

Here is what I have added from line 359 of Price.phtml

    <?php if ($_taxHelper->displayBothPrices()): ?>

            <?php echo $_specialPriceStoreLabel ?>

                <?php echo $this->helper('tax')->__('Excl. Tax:') ?>
                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                    <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>

                <?php echo $this->helper('tax')->__('Incl. Tax:') ?>
                <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                    <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>

    <?php else: ?>
        <?php if ($_product->getAttributeText($_specialPriceStoreLabel['hide_special_price']) == "Yes"): ?>
        <?php echo $this->__('RRP') ?> <?php echo $_coreHelper->currency($_regularPrice, true, false) ?><?php $regularprice =  $_regularPrice; ?>
        <?php         $price_diff = $regularprice-$finalPrice;
        $discountPercent = ($price_diff/$regularprice)*100;
        $discountPercent = ceil($discountPercent); ?>
        (-<?php echo $discountPercent; ?>%)
            <?php else: ?>
            <?php echo $this->__('RRP') ?> <?php echo $_coreHelper->currency($_regularPrice, true, false) ?><?php $regularprice =  $_regularPrice; ?>
            <?php         $price_diff = $regularprice-$finalPrice;
            $discountPercent = ($price_diff/$regularprice)*100;
            $discountPercent = ceil($discountPercent); ?>
            (-<?php echo $discountPercent; ?>%)
        <?php endif; ?>
    <?php endif; ?>
<?php endif; ?>

Basically what I would like to achieve is by adding a new attribute and adding it to the price group I can set whether to display special price on the frontend or not for certain products.

I keep getting this error:

function getSource() on a non-object in /*****/*****/public_html/app/code/core/Mage/Catalog/Model/Product.php on line 1390

Can anyone see what I have done wrong?


texts: people. I'm trying to migrate to declarative schema on my module with magento v2.3.1. But when i'm running php bin/magento setup:install --convert-old-scripts=1 it doesn't generates any db_schema.xml. What i'm doing wrong?


texts: Onclick button redirect to sitename.com/undefined instead of Product url

texts:
Once we click on button in product view page, we are creating New Product Programatically & now I am trying to redirect to newly created Product's URL after click on same button.

result :

onclick button is redirecting to sitename/undefined

public function createSimpleProductAndRedirectAction()
{

$originalProductId = $this->getRequest()->getParam("id");
$originalProduct = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($originalProductId);

if ($product = $this->_createProduct(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, true, $originalProduct))
   {

          if(Mage::getSingleton('customer/session')->isLoggedIn())
          {

             $result['message'] = "Your Image Saved";
             return $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
          }
   }
}

protected function _createProduct($type, $doSave = true, $originalProduct, $newImagePath = "")
    {

        try {
            if (isset($login) && (is_array($login) && !empty($login)) || ($login != "")) {

                $result['redirect'] = $this->_getRefererUrl() ? $this->_getRefererUrl() : Mage::getUrl('customer/account', array(
                    '_secure' => true
                ));
                $result['success'] = true;

                $customerId = Mage::getSingleton('customer/session')->getCustomerId();

                $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
                return $this;
            } else {
                $customerId = "";

            }

            if(Mage::getSingleton('customer/session')->isLoggedIn()) {
                $res = $this->saveProduct($type, $doSave, $originalProduct, $newImagePath);
                $result['redirect'] = $product->getProductUrl();
                return $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
                 exit;
            } else {

            }

        } catch (Mage_Core_Exception $e) {}

        } catch (Exception $e) { }
    }

public function saveProduct($type, $doSave = true, $originalProduct)
{

            Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

            $product = Mage::getModel('catalog/product');
            $rand = rand(11, 999999999);
            $product->setUrlKey($rand);

            $product->setName($originalProduct->getName());
            $product->save();

            return $product;
}

js

_ajaxCreateImg: function(dataUrl, startNumber)
{
    new Ajax.Request(this.createImgUrl, {
        onComplete: function(response) {
            var responseData = response.responseText.evalJSON();
            if(lastRequest == 1){
                this._processAjaxResponse(response);
                window.location.replace(responseData.redirect);
            }
         }.bind(this)
     });


texts: Magento 2 : on page load product sorting not working

texts:
When I go on the category page, sorting does not work unless I select any value from dropdowns like position or price then it sorts the product.
http://prntscr.com/q97trw

Can anyone help me how can I do this?

Thanks in advance.


texts: Magento 2.3 - Sometimes 404 error when creating a shipment

texts: sometimes when creating a shipment through the Magento 2 admin we get a 404 error. I have tried almost everything but the reason why is very vague and not consistent. I now found out that it's most likely due to caching, when I clear cache (Redis and normal) it works for a while, I hope somebody can help me with a solution.


texts: Magento2 Blank category list page after migration

texts:
We successfully migrated a huge multi-store site from magento-1.9.3 to magento-2.1.6 last week using Magento migration tool. After migration, we notice that categories are not listing any products although products are there all set in admin. Also we reindexed everything but the issue still remain there until we put the media folder from magento1.9.3 to migrated magento2.1.3/pub/ directory.

We've checked this issue and it seems that Magento\Catalog\Block\Category\View::getProductListHtml() function returns empty product listing html when there is not media with product images.

The case is not same with other magento stores as having a blank media only replaces the placeholders images. My question is, why it is necessary for me to place the old media folder will all images in order to render the products list successfully under categories?

PS: permissions are set properly for pub, no custom module is overriding any class, all the commands (static content, reindex, cacha clean, di compilation) ran completely.


texts: Magento 2 add custom data to shipping method

texts:
Hello I'm trying to add custom data to shipping method (image url, to be exact). Following this example I managed to add extension attribute to interface and show field named 'image' in extension attributes (in JSON view). So now I'm stuck on how to populate that extension attribute when creating method.

For example I would need to do something like this:

    $method = $this->_rateMethodFactory->create();
    $method->setCarrier($carrier);
    $method->setCarrierTitle($carrier_title);
    $method->setMethod($carrier_method);
    $method->setMethodTitle($carrier_method_title);
    $method->setPrice($price);
    $method->setCost($price);
    $method->setData('image','https://someurl.com.image.jpg');
    $result->append($method);

The problem is in this line:

$method->setData('image','https://someurl.com.image.jpg');
// I also tried using this
$method->setImage('https://someurl.com.image.jpg');

But either way I can't get that because it doesn't exist when I list all data from shipping method in front controller. I tried using:

$result->getData('image');
// I also tried
$result->getImage('image');

And when I try:

$result->getExtensionAttributes();

it returns null.

Could you please help me how set some data when creating method and pass it to extension attribute.


texts: Magento 2.3.4: Exception #0 Recoverable Error: Object of class Magento\Framework\App\State\Interceptor could not be converted to string

texts:
I am employing the code below to check what deployment mode server is on. This is throwing the error. Please point out the issue with the usage of the object $this->_appState to get the the mode. Thanks.

public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\App\State $appState,
        \Magento\Framework\Filesystem $fileSystem) {
    $this->_appState  = $appState->getMode();
    // Code to get the absolute path to the pub folder.
    $this->_pubPath = $fileSystem->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::PUB)->getAbsolutePath();
    parent::__construct($context);
}

/**
 * getAllPagesJSContent() returns the custom JS contents to calling custom allpages.js.
 * This function checks if the deployment mode is production or not, and returns
 * pmm/custom/js/allpages.min.js or pmm/custom/js/allpages.js
 *
 * @param void
 * @return string file contents or empty
 */
public function getAllPagesJSContent() {
    echo $this->_appState;
    // Check current environment. If it is the production retrieve the allpages.min.js file.
    if ($this->_appState == "production") {
        echo "Hello from production 1";
        if (($custom_js_file_contents = $this->get_custom_js_file_contents('allpages.min.js')) !== FALSE) {
            return $custom_js_file_contents;
        }
    }


texts: Creating a page that displays a product matching a criteria

texts:
What I'm trying to achieve is creating pages which displays a range of products when a user clicks on a HTML Anchor, and looks the same as my search results page (when using the top bar), only allowing me to display results which match my criteria exactly (The theme I'm using doesn't have an advanced search feature, which I could manipulate the URL).

For example, one criteria of mine is "Pack Size", which is how many T-Shirts are in a given pack. If a user clicks on "10 T-Shirts", it will navigate to a page showing all products with a pack size of 10.

Would creating a seperate blocks for each desired result achieve this?

Thanks for your time


texts: Custom block showing at top of page instead content

texts:
I have created a custom module. In that I have a custom controller and an action

public function reviewAction()
{

}

Now when I hit the url www.somesite.com/modulename/controllername/review then it is running properly. Now I had to create a custom page for this url.
What I did is added this code in my module config.xml file

  <layout>
        <updates>
            <mcreview>
                <file>mcreview.xml</file>
            </mcreview>
        </updates>
    </layout>

and then created mcreview.xml file at

/app/design/frontend/base/default/layout/mcreview.xml

Added following code in above file

<mcreview_index_review>
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="mcreview/data" name="magecomp.mcreview.data" template="mcreview/review.phtml" />
    </reference>
</mcreview_index_review>

and also created review.phtml file.
Then in my function added the following code

 public function reviewAction()
  {
     $block = $this->getLayout()->createBlock('core/template')
      ->setTemplate('mcreview/review.phtml');
    $this->getResponse()->setBody($block->toHtml());
    $this->loadLayout();
    $this->renderLayout();
  }

Now when I load the url the content of my review.phtml file comes at top, even above the header. It should come in the body of the page. Please any one can tell me what I am missing or what should I add in my code so that my review.phtml file contents are shown in the body of the page after head section.


texts:
I'm running Magento 1.7 on php6.5, which was previously on php5.3.

First problem, Deprecated functionality: iconv_set_encoding(),  was solved with this: Magento 1.9, php 5.6 - Use of iconv.internal_encoding is deprecated

Now I've got a new error message:

ini_set(): Cannot find save handler 'memcache'  in /var/www/rkbridal/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

How to work through this?


texts: I'm looking to change the quantity of selections of a particular bundle in the cart from a dropdown on the Cart page. The issue I'm having is getting the labels of the selections to update. You can see in the screenshot I've included the quantity selection is 200 (and the selection quantities have changed correctly, along with pricing), however the option text on the product has not. Is there an easy way to do this inside of an Observer method?


texts: Translate Shipping and handling, grandtotal, subtotal for PDF invoice, from backend in Magento 2

texts: How can I translate the "Shipping & Handling", "Subtotal", "Grand Total" from the PDF invoice that is generated after you press the button PRINT in the backend. The invoice needs to be translated. And those in particular are not translated. Where are the files that contains this information?


texts: Magento2 : get all user define attributes using attribute set id on detail page

texts:
I got attribute_set_id on product detail page. like this

  [attribute_set_id] => 14

Using this i want to get all custom attribute which are set in this attribute set id.

so if you have any clue help me.


texts: Magento Subtracting Tax from subtotal instead of adding it

texts:
For some reason magento is subtracting the tax amount from the subtotal instead of adding it. 5.50 + 6.07 +0.66= 12.23 not 11.57.Grand total is wrong! I looked at my tax settings and they all seem correct so I have no idea why this is happening. Any help would be appreciated.

Thanks

edit more pictures of config and settings

The subtotal excluding tax is actually cheaper than the product thats 12.95!


texts:
I'm trying to overwrite below html template file but not working. I have already run commands.

  vendor\magento\module-sales-rule\view\frontend\web\template\payment\discount.html

to

  app\design\frontend\Pt\name\Magento_SalesRules\web\template\payment\discount.html


texts: Magento 2: Error while adding new category or new product

texts:
I am facing a error while adding a new product or category from back-end. The error is as follows:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: INSERT INTO `catalog_product_entity` (`row_id`, `entity_id`, `created_in`, `updated_in`, `attribute_set_id`, `type_id`, `sku`, `has_options`, `required_options`, `created_at`, `updated_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)


texts: Issue image mapping with magento1.9 bulk product upload in csv format

texts:
I had prepared the magento bulk product upload format in csv file and tested it. It's working fine, no issue in that. But, when i am uploading more than one product in the file 1st product image get mapped, after that other product images not mapped.

It's working for only one product, please review with my import file.
Magento import file
I am using default product import under "import/export".

Thanks


texts: how to override PWA magento 2.4 component main.js file?

texts:
I am new for PWA magento but can't understand full structure yet I have installed PWA Venia and want to create override file of venia like in magento we know we create a child theme and can override LUMA theme there, How can we achieve same thing in PWA?
UPDATE
as mention in first comment followed them and get this error
After running this command "yarn workspace pwa-sample build"
yarn workspace v1.22.10
yarn run v1.22.10
$ yarn run build:prod
$ yarn run clean && webpack --no-progress --env.mode production
$ rimraf dist
Error: Cannot find module './src/plugins/normalModuleOverrideWebpackPlugin'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (/var/www/html/magento2/project-community-edition/pwa-studio/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at module.exports (/var/www/html/magento2/project-community-edition/pwa-studio/packages/pwa-sample/webpack.config.js:80:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/bin/node
Arguments: /usr/lib/node_modules/yarn/lib/cli.js build
Directory: /var/www/html/magento2/project-community-edition/pwa-studio/packages/pwa-sample
Output:
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
yes is know it says cant find location but file is there is cross checked alot of time but dont know why showing this


texts:
I'm having trouble trying to proceed to the checkout of a Magento 1.9 store. If I am at the checkout and go back to the store, when I go to the checkout again, I can't go any further, because the "Payment" class is instantiated as "undefined". Thus, the following errors appear:

Cannot read property 'init' of undefined
Cannot set property 'currentMethod' of undefined

I arrived where the class is instantiated, but I couldn't find an error. When updating the page using CTRL + F5 the error disappears.


texts: Show Configurable Product in Best sellers

texts:
Magento does not show up configurable base product in the best sellers. Code is:

// Filter only products with visibility catalog,search & catalog
$_visibility = array(
    Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG,
    Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH
);
$_storeId = Mage::app()->getStore()->getId();
$_collection = Mage::getResourceModel('reports/product_collection')
    ->addOrderedQty('', '', true, false, false)
    ->addAttributeToSelect('*')
    ->addAttributeToFilter('visibility', $_visibility)
    ->addStoreFilter($_storeId)
    ->setOrder('ordered_qty', 'desc');
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($_collection);
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($_collection);

How to show configurable products? Also which tables this collection would query?


texts:
I get this error when I tried to use soap with the following piece of code.

Error

Uncaught SoapFault exception: [env:Sender] Consumer is not authorized to access %resources in ...

PHP

$wsdlUrl = 'http://local.magento.com/soap/default?wsdl&services=customerAccountManagementV1';
$opts = array('http' => array('header' => 'Authorization: Bearer n95e7at5r0wf6mj1xv6ynni62d4xbkfi'));
$context = stream_context_create($opts);
$soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'context' => $context]);
$serviceArgs = array("customerId" => 1);
$soapResponse = $soapClient->customerAccountManagementV1IsReadonly($serviceArgs);
var_dump($soapResponse);

The token is correct and there is no problem when I test it using soapUI.

Can anyone help?


texts: category_ids attribute missing while searching for products via REST API (rest/V1/products)

texts:
The response does not have the "category_ids" key. I need this key. Is there any other API which can provide this key?

  "id": 10,
  "sku": "Nike 3 color half sleeve tshirt",
  "name": "Nike 3 color half sleeve tshirt",
  "attribute_set_id": 4,
  "price": 0,
  "status": 1,
  "visibility": 4,
  "type_id": "configurable",
  "created_at": "2015-12-01 23:05:47",
  "updated_at": "2015-12-25 00:22:27",
  "weight": 2,
  "product_links": [],
  "options": [],
  "tier_prices": [],
  "custom_attributes": [
    {
      "attribute_code": "description",
      "value": "
Nike summer wear hal sleeve tshirt in 3 colors
"
    },
    {
      "attribute_code": "meta_title",
      "value": "Nike 3 color half sleeve tshirt"
    },
    {
      "attribute_code": "meta_keyword",
      "value": "Nike 3 color half sleeve tshirt"
    },
    {
      "attribute_code": "meta_description",
      "value": "Nike 3 color half sleeve tshirt
Nike summer wear hal sleeve tshirt in 3 colors
"
    },
    {
      "attribute_code": "image",
      "value": "/p/w/pwp_sheet2.jpeg"
    },
    {
      "attribute_code": "small_image",
      "value": "/p/w/pwp_sheet2.jpeg"
    },
    {
      "attribute_code": "thumbnail",
      "value": "/p/w/pwp_sheet2.jpeg"
    },
    {
      "attribute_code": "options_container",
      "value": "container2"
    },
    {
      "attribute_code": "required_options",
      "value": "1"
    },
    {
      "attribute_code": "has_options",
      "value": "1"
    },
    {
      "attribute_code": "url_key",
      "value": "nike-3-color-half-sleeve-tshirt"
    },
    {
      "attribute_code": "tax_class_id",
      "value": "2"
    },
    {
      "attribute_code": "vendor",
      "value": "Paxcel Cloth House"
    }
  ]


texts: How to use multiple databases in EcomDev PHPUnit fixtures

texts:
I set up unit tests for Magento 1.9.1.0 using EcomDev PHPUnit. I was able to make almost everything working properly. The only thing which I haven't figured out is how to use fixtures in multiple database setup.

There are two database resources set in local.xml:

default_setup used by the whole codebase as default connection
my_extension used by one custom extension, declared in module config.xml

Then I have following fixtures in default.yaml file:

aliases:
    user: &user
        id: 1
        login: john
        password: foo
        email: john@example.com
        customer_id: 1
        firstname: John
        lastname: Doe
        customer_id: 1

tables:
    my_extension/user:
      -
        <<: *user
        id: 1

eav:
    customer:
      -
        <<: *eav_customer
        entity_id: 1
        firstname: John
        lastname: Smith
        email: example1@example.com

I would like to have eav/customer fixture added using default_setup resource and my_extension/user fixture added using my_extension resource.

As far as I see in EcomDev_PHPUnit_Model_Fixture_Processor_Tables, it always uses default resource.

For now I just configured test Magento environment to have both resources using the same database.

Do you know any elegant way to make fixtures working with different resources?


texts: Magento2 : How to add Custom button in product edit form

texts:
I have created one custom module and through that module, I want to add a custom button in Admin product edit form.

I have created a plugin using the below reference
How to Add a Custom Button to Admin Sales Order View in Magento2

di.xml

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="\Magento\Catalog\Block\Adminhtml\Product\Edit">
            <plugin name="Company_Module::pluginBeforeView" type="Company\Module\Plugin\PluginBeforeView" />
        </type>
    </config>

PluginBeforeView.php

namespace Company\Module\Plugin;

class PluginBeforeView
    {

        public function beforeGetOrderId(\Magento\Catalog\Block\Adminhtml\Product\Edit $subject){
            $subject->addButton(
                    'mybutton',
                    ['label' => __('My Buttion'), 'onclick' => 'setLocation(window.location.href)', 'class' => 'reset'],
                    -1
                );

            return null;
        }

    }

But it did not work. Any idea how to solve this.


texts: Upgrade from 1.8.0 to 1.8.1 breaks PO Number on certain payment methods

texts:
I have a field in the checkout where the user can put a PO Number. This field worked fine in 1.8.0, but it doesn't save anymore in 1.8.1, the database field stays empty.

template/payment/form/checkmo.phtml has the following code added to it:

<ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">

        <?php echo $this->__('Purchase Order Number') ?>

            <input type="text" id="po_number" name="payment[po_number]" title="<?php echo $this->__('Purchase Order Number') ?>" class="input-text" value="<?php echo $this->htmlEscape($this->getInfoData('po_number')) ?>" />

Since there was a lot of problems with the formkey stuff around the login system, I went ahead and added the following code the template/checkout/onepage/payment.phtml inside the form tag:

<?php echo $this->getBlockHtml('formkey'); ?>

This to add the form key in case that was the problem, which is not.

The PO Number is a very important item in our store, so it is vital that this works, but I currently can not find a reason why it doesn't save it. Any help and/or hints are greatly appreciated!

UPDATE
After bit of debugging, I found out that is does save on one payment (iDeal), but it doesn't on another (checkmo), even though it does get sent anyway. I still do not know where or how exactly it gets lost though..


texts:
In Magento 1 admin sales grid, there's a function to export to CSV.
How can I only export selected orders instead of exporting ALL the orders?


texts: magento2 Directly to product if only one

texts:
Moving from magento 1.9 to 2 -

looking for a way to do some of the things I had done in 1.9, one of those being, that if there's only one product in a category, just go to the product detail page when clicking that category....

just like this, but is there a way to do it in magento 2?
:) thanks in advance!

https://stackoverflow.com/questions/14022430/directly-go-to-product-detail-page-on-click-the-category

EDIT-----

after the response below, I have module in place, but cannot enable said module, how else can it be enabled besides shell access?
I Have tried for hours now, and no success:


texts:
What is the purpose of these ajax calls and how to prevent these Ajax calls on magento 2 homepage, or atleast minimize their execution time because they are taking load time of around 3-4 secs on my site.

  1) banner/ajax/load/?sections=&_=1553687029673

  2)
  customer/section/load/?sections=cart&update_section_id=false&_=1553687029674


texts:
I have made a query that gets customer's orders. Can I get customer gender based on this query? If not, how can I get customer gender? This is the code I have so far:

<?php

require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();

$productId = 297;

$orders = Mage::getModel('sales/order')->getCollection();
$orders
     ->getSelect()
     ->joinLeft(
     array(
          'order_item' =>Mage::getSingleton('core/resource')->getTableName('sales/order_item')),
          'order_item.order_id = main_table.entity_id',
          array('product_id'=>'product_id'))
     ->where('product_id=?', $productId)
     ->group('main_table.entity_id')
     ->order('main_table.entity_id DESC');

$fields = "date,company,name,country,city,address,postcode,itemname,quantity,price,sku \n";
foreach($orders as $order):

     $order->getData();
     $order->getIncrementId();
     $billingAddress = $order->getBillingAddress();
     $shippingAddress = $order->getShippingAddress();
     $billingStreet = $billingAddress->getStreet();

     $countryCode = $billingAddress->getCountry();
     $country = Mage::getModel('directory/country')->loadByCode($countryCode);

     $fields .=
          date('Y-m-d',strtotime($order->getCreatedAt())).','.
          $billingAddress->getCompany().','.
          $billingAddress->getName().','.
          $country->getName().','.
          $billingAddress->getCity().','.
          $billingStreet[0].','.
          $billingAddress->getPostcode().','.
          $order->getShippingDescription() .',';

          foreach ($order->getAllItems() as $itemId => $item):
               $itemname =  $item->getName();
               $itemname =  str_replace('&', " ", $itemname);
               $fields .=
                    $itemname. ','.
                    $item->getQtyOrdered().','.
                    $item->getPrice().','.
                    $item->getSku().',';

          endforeach;
     $fields = rtrim($fields, ',');
     $fields .= "\n";

endforeach;

$name = date('d-m-Y-H-i-s');
$output = fopen('backend/assets/csv/' . $name . '.csv', 'w');
fwrite ($output,$fields);
fclose ($output);


texts: Magento2: Dependency in admin form field

texts:
I am trying to add field dependency on magento2. i follow this thread but its not working for me. I am not sure if i miss something.

Here is code which i have implement.

use Magento\Backend\Block\Widget\Form\Generic;
use Magento\Backend\Block\Widget\Tab\TabInterface;

class Main extends Generic implements TabInterface
{

    /**
     * {@inheritdoc}
     */
    public function getTabLabel()
    {
        return __('Banner Information');
    }

    /**
     * {@inheritdoc}
     */
    public function getTabTitle()
    {
        return __('Banner Information');
    }

    /**
     * {@inheritdoc}
     */
    public function canShowTab()
    {
        return true;
    }

    /**
     * {@inheritdoc}
     */
    public function isHidden()
    {
        return false;
    }

    /**
     * Prepare form before rendering HTML
     *
     * @return $this
     * @SuppressWarnings(PHPMD.NPathComplexity)
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    protected function _prepareForm()
    {
        $model = $this->_coreRegistry->registry('current_kensium_categorybanner_items');
        /** @var \Magento\Framework\Data\Form $form */
        $form = $this->_formFactory->create();
        $form->setHtmlIdPrefix('item_');
        $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Item Information')]);

        $htmlIdPrefix = $form->getHtmlIdPrefix();
        $fieldset->addField(
            'answers',
            'select',
            [
                'name' => 'answers',
                'label' => __('Banner Type 22'),
                'title' => __('Banner Type 22'),
                'required' => false,
                'options' => ['1' => __('Customer'), '0' => __('PDP')]
            ]

        );

        $fieldset->addField(
            'is_status',
            'text',
            [
                'name' => 'is_status',
                'label' => __('Category 22'),
                'title' => __('Category 22')

            ],
            'answers'
        );

        if ($model->getId()) {
            $fieldset->addField('id', 'hidden', ['name' => 'id']);
        }

        $form->setValues($model->getData());

        $this->setChild(
            'form_after',
            $this->getLayout()->createBlock(
                'Magento\Backend\Block\Widget\Form\Element\Dependence'
            )->addFieldMap(
                "item_answers",
                'answers'
            )
                ->addFieldMap(
                    "item_is_status",
                    'is_status'
                )
                ->addFieldDependence(
                    'is_status',
                    'answers',
                    'Customer'
                )
        );

        $this->setForm($form);
        return parent::_prepareForm();
    }
}

Does anyone have implemented it?


texts: What are the best practices for installing third party extensions in Magento 2?

texts:
While working on a client project for Magento 2 - I've discovered numerous methods of loading in and keeping track of third party extensions.

Going into this assuming that we're using the integrator installation method (composer!), what are the best practices for managing third party extensions?

So far, every extension I've purchased or downloaded has had it's own composer.json file - and I know of at least three different ways extension authors would recommend to install their extension:

Copy these files into app/code
Copy this zip into folder, add it is a artifact repository, and require it
Add this online repository (with/without auth) and require it

So far, I've come across 1 & 2 and am just sort of suspecting #3 exists.  But then, noticing that the ones that suggested #1 I found that you can have a "path" repository - moved my extensions from app/code to the same folder I decided to put these artifacts, and required it that way.

In this process, my repositories configuration looks something like:

"repositories": {
    "0": {
        "type": "composer",
        "url": "https://repo.magento.com/"
    },
    "artifacts": {
        "type": "artifact",
        "url": "artifacts"
    },
    "third-party": {
        "type": "path",
        "url": "artifacts/*/*"
    },
},

So my question to you is - what is the best practice here?  How do you manage third party extensions?

So far I believe the way I am doing it is the best way - if only because their composer.json gets read and any dependency conflicts (or PHP version constraints) will become apparent - but I don't think that's definitive enough.


texts: Store switcher not showing in frontend magento 2

texts:
I have created a new website store and store view in magento 2.1.3 backend and configure the new site language but i can't see the store switcher in frontend

Here is my back end setup

heare i selected English as default for Indian store and Arabic for Arabic store

And i need to display like below image in frontend


texts: How to add header to checkout page on magento 2 LUMA theme

texts:
I have headers on all the pages in LUMA theme except the checkout one. Screen shots are attached for the reference.

As you can see in the attached images, we have header on product view page and its missing on checkout page? Is there any default way of adding it without overriding the module?


texts: Adding a setting to category configuration

texts: I want to add a few admin settings to the Catalog/Manage Categories screen, I've grepped various directories but most of the site is accessed by FTP, where is the XML file that controls the options on this screen?


texts: Can Magento 2 handle complex price calculations?

texts:
I have products with around 10-20 attributes(in the form of dropdown-fields) and 2-20 options per attribute. The price has to change depending on what options are selected.

So it is not possible for me to use "configurable products" and create every single combination of options.

Is their a way to add a complex price calculation to my products?


texts: Unable to display "Hello World" from custom module

texts:
I am following the book: Getting Started with Magento Extension Development. And I'm unable to make my extension echoing "Hello World".

I believed there are 3 area I need to take care:

active the module from app/etc/modules/Froggyline_HappyHour.xml.

  File: app/code/community/Froggyline/HappyHour/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Froggyline_HappyHour>
            <version>0.0.0</version>
        </Froggyline_HappyHour>
    </modules>
    <frontend>
        <routers>
            <froggyline_happyhour>
                <use>standard</use>
                <args>
                    <module>Froggyline_Happyhour</module>
                    <frontName>happyhour</frontName>
                </args>
            </froggyline_happyhour>
        </routers>
    </frontend>
</config>

  FILE: app/code/community/Froggyline/HappyHour/controller/GreetingController.php

<?php
class Froggyline_HappyHour_GreetingController extends Mage_Core_Controller_Front_Action
{
    public function helloWorldAction()
    {
        echo 'Hello World';
    }
}
?>

I am visiting the following URL: http://localhost/happyhour/greeting/helloWorld and receive Http 404.

Which step did I miss, so that the page will display "Hello World"?


texts: Avoid reducing of stock when item is added to cart

texts:
For example, there is one pair of shoes in stock. User "X" adds them to cart. Later, when user "Y" tries to add same shoes to cart - he gets a message "product is out of stock".

Is there any way to reduce the stock only after order is placed?


texts: Magento orders stuck in payment_review: how does one release? and is stock reserved?

texts:
we are seeing several orders with status/state both payment_review. And we are running a script that cleans up and releases the stock of order like 'payment_approval', payment_review and 'pending_payment'. There is a check on canCancel() in the routing and this is where the process of payment_review differs: it returns false and as such we cannot cancel these orders ... what to do?

So my questions is:

Order with state/status payment_review have already blocked/reserved stock (read: deducted the qty for the order from total stock). Am I right?
And these orders should also be released after X days for the stock to become available again.

Help appreciated


texts:
Using \Magento\Customer\Api\Data\CustomerRepository Save method we can create single customer with the attributes in \Magento\Customer\Api\Data\CustomerInterfacewith single API request.

But how can we create multiple customers at a time with single API request.

If i send multiple customers objects in a single request its giving error expecting the \Magento\Customer\Api\Data\CustomerInterface attributes.

So how can i create API with \Magento\Customer\Api\Data\CustomerRepository Save method with array of \Magento\Customer\Api\Data\CustomerInterface attributes


texts: Magento2 : Product Details Page (PDP) Animation images are not showing animation on frontend

texts: I have uploaded a gif image for a product, after uploading it is working in the backend, but When I go to frontend on product details page it is not working I mean it is not showing its animated view.


texts: How to check if a product has a group price?

texts:
Some of our products have special prices for different groups, i have set up these prices in magento front end. I just need to know how to get a group price or check if a product has one.

I have this line which checks if a customer is logged in:

<?php
//Check if User is Logged In
$login = Mage::getSingleton('customer/session')->isLoggedIn();
if ($login) {

}

So i assume it will be similar but i just do not what to change or what to change it to. if i havnt explained this very well please let me know.

Added code

<?php
//Check if User is Logged In
$login = Mage::getSingleton('customer/session')->isLoggedIn();
if ($login) {
    //Get Customers Group ID
    $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
    if ($groupId == 5) {
        $group_price = Mage::getModel('catalog/product')->getGroupPrice();
        if ($group_price) {
            ?>
            <?php echo "Special Group Price " ?><?php
        }
    }
} else { ?>
    <?php echo "Now" ?>
<?php } ?>


texts:
Just wanted to make sure!

I am running CE 1.9.1.1 and my latest update was PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43. Was this the latest security patch for 1.9.1.1?

Is the new security patch SUPEE-6482, only for Magento Community Edition 1.9.2.1?


texts: add to cart not working in tablet in magento-1.7

texts:
I am using magento 1.7.0.2
Its working fine on my PC, but when i am using it from my tablet, Add to cart not working in tablet.
What’s can be issue?
Can anyone suggest?

Thanx in advance..


texts: Magento2 : Committing vendor folder in Git Repository

texts:
Is it good practice to push vendor folder into git repository?
Is there any pros and cons of it?


texts:
I have installed EV SSL on my site. But in chrome it isnt showing any padlock sign.

i checked the site for ssl scan here and it is giving error

  Insecure < form > call.  Found on line # 2243 in file:
  www.smartteck.co.uk/index.html

but i can not figure out what is on line 2243 the only form i have is newsletter signup in my footer and i can not see any problem with that.

can any one tell me what is wrong there?


texts: How to create shipment using rest api in magento 2?

texts: How we can create shipment of a order using rest api.


texts: Magento 2 do not update Inventory correctly

texts:
Example: Inventory level is at QTY 100. All of these things happen simultaneously:
1- An admin processes a refund/return and restocks 2 items.
2- Two customers make a purchase buying quantities of 1 and 3 items respectively.
3- An admin receives a shipment of 20 items and adjusts the inventory.
In this example, the inventory, considering all transactions should be at 118.
The conflict arises with the third activity. The first two actions regardless of the order of events will consecutively update the quantity +2, -1 and -3 and the stock will end up at 98 by virtue of row-level record locking.
However, the third action could interfere because the operator would input 120 into the quantity field (100 in stock + 20 received ). If this transaction will occur after any of the others, the inventory will be wrong at 120.
Any suggestions on how should this can be resolved.


texts: Get image url of product attributes in magento 2

texts:
I am using Amasty improved layered navigation extension in magento 2.
There is one option of assigning images like "category image" to a multiselect product attribute.

https://prnt.sc/t0k21y
https://prnt.sc/t0k2nb

I have assigned these attributes value to a product https://prnt.sc/t0k39m
I was able to fetch the selected option names of the attribute for a particular product using below code in my phtml file.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Framework\Registry')-
 >registry('current_product');//get current product
 $categoryCollection = $objectManager-
 >get('\Magento\Catalog\Model\ResourceModel\Category\CollectionFactory');
 $productRepository = $objectManager->get('\Magento\Catalog\Model\ProductRepository');

 $productId =  $product->getId();
$product = $productRepository->getById($productId);
 $attribute_string = $product->getResource()->getAttribute('product_view_special')-
   >getFrontend()->getValue($product);

This code returns the value of the selected options "Face mask filteration layer" and "PFOA free". I want to know, how can i get the imageurl assigned with this option value . If somebody has used amasty layered navigation then please help me.
I am unable to get the image url .


texts:
I am facing an issue and not able to figure it out if its a magento bug.

I have added an additional fee created a module for it and its working fine every where. The only issue occurs If I come in payment step (checkout).

When I am in payment step and change the price from additional fee from backend and refresh the the payment page. My additional fee gets updated but grand total does not.

But if I go back to shipping step again proceed to payment step from there it gets proper total again. That means $quote->collectTotals() are not called in payment step? Or Am I missing something?

public function collect(
    \Magento\Quote\Model\Quote $quote,
    \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment,
    \Magento\Quote\Model\Quote\Address\Total $total
)
{
    parent::collect($quote, $shippingAssignment, $total);
    if (!count($shippingAssignment->getItems()) || !$this->feeHelper->isModuleEnable()) {
        return $this;
    }

    $fee = $this->calculator->calculate($quote);
    $total->setTotalAmount($this->getCode(), $fee);
    $total->setBaseTotalAmount($this->getCode(), $fee);
    $total->setFee($fee);
    $total->setBaseFee($fee);
    $quote->setFee($fee);
    $quote->setBaseFee($fee);
    return $this;
}

/**
 * @param \Magento\Quote\Model\Quote $quote
 * @param \Magento\Quote\Model\Quote\Address\Total $total
 * @return array
 */
public function fetch(\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Quote\Address\Total $total)
{
    $result = [];
    if(!$this->feeHelper->isModuleEnable()){
        return $result;
    }

    $fee = $this->calculator->calculate($quote);
    if($fee > 0){
        $result = [
            'code' => $this->getCode(),
            'title' => $this->getLabel(),
            'value' => $fee
        ];
    }

    return $result;
}


texts: Why registration.php added in magento-2.0.0-RC?

texts:
Recently magento-2.0.0-RC was launched and they added registration.php in every module root folder? So I just want to know is there any reason for that?

Can someone put light on this?


texts: Change ups account details and get ups shipping rates based on product's custom attribute 'Zip code' programmatically

texts:
Here is my requirement:

We need to get ups account details from customer custom attribute and use it for ups shipping rate calculation in checkout page.
We have different shipping origin zipcodes in product custom attribute. We need to get UPS shipping rates based on product zipcodes in checkout page.

Questions:

How to override the ups account programmatically while fetching ups shipping rates?

How to get shipping rates for different zipcodes in checkout page dynamically based on product data?

Note: Shipping Origin Zipcode will be maintained in product level and UPS account details will be maintained in customer level


texts: How to submit contact us data to Magento 2 contact us form action using graphqL?

texts:
How to submit contact us form data to Magento default functionalities using graphQl.
I know to want to pass the form data using Mutation and doesn't have a clear idea to achieve the target.

Please kindly help me in this.


texts:
i'm trying to get main image (original image) at magento 1.4 (the flat product is on) using this script

<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
ini_set('memory_limit', '8192M');

require_once('app/Mage.php');

$app = Mage::app();

$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('*');

$i = 0;
foreach ($collection as $product) {

    echo $i.'-----Main image'.$product->getImage().'<br>';
    $i++;

    if ($i == 50) {
        break;
    }

}

?>

but it return nothing/empty, the output is here,

0-----Main image
1-----Main image
2-----Main image
3-----Main image
4-----Main image
5-----Main image
6-----Main image
7-----Main image
8-----Main image
9-----Main image
10-----Main image
11-----Main image
12-----Main image
13-----Main image
14-----Main image
15-----Main image
16-----Main image
17-----Main image
18-----Main image
19-----Main image
20-----Main image
21-----Main image
22-----Main image
23-----Main image
24-----Main image
25-----Main image
26-----Main image
27-----Main image
28-----Main image
29-----Main image
30-----Main image
31-----Main image
32-----Main image
33-----Main image
34-----Main image
35-----Main image
36-----Main image
37-----Main image
38-----Main image
39-----Main image
40-----Main image
41-----Main image
42-----Main image
43-----Main image
44-----Main image
45-----Main image
46-----Main image
47-----Main image
48-----Main image
49-----Main image

anyone know what are the problems?


texts: Problem when programatically changing configuration on Magento EE 1.13.1

texts:
I need to automatically change the value of 2 keys stored on Magento configuration.
After some research I've reached the following snippet:

$config = Mage::getConfig();
$config->saveConfig('path1', $var1);
$config->saveConfig('path2', $var2);
$config->cleanCache();
Mage::app()->getConfig()->reinit();
Mage::app()->reinitStores();
Mage::app()->getStore()->resetConfig();

This script should work and indeed it does seem to work on the test machine. However on the production server I've noticed some problems. Sometimes only  one of the configs changes leaving the system with an invalid state.

Should I only be changing one value, re-initiating and then changing the other value?
Can you see any other problem with the script?


texts: Magento 2.3 How get selected options from custom product attribute to list format?

texts:
How i can get only selected options from custom multi-select attribute in block?

I used

$attribute = $_product->getResource()->getAttribute('attribute_name')->getFrontend()->getValue($_product);

And it is doesn't work


texts: Magento 2.3.x Text Replacement through i18n/en_US.csv

texts: Is it possible to replace the text in Product/catalog Information through i18n/en_US.csv file?


texts: how to add afterRende to a form (page checkout shipping).I am using setInterval to check form is loaded, but it's a very bad idea.


texts: check file uploaded or not without $_FILES in Magento 2

texts:
I'm checking condition like file uploaded or not, for that I used $_FILES but as magento 2 coding standards we cannot use $_FILES.

if ($id) {
    $model->load($id);
}

//if (isset($_FILES['file']) && $_FILES['file']['name'] != '') {
    $imageFile = $this->helper->uploadFile('file');
    $model->setFile($imageFile);
//}

So I created helper class to upload file

public function uploadFile($scope)
{
   try {
        $uploader = $this->_fileUploaderFactory->create(['fileId' => $scope]);
        $uploader->setAllowRenameFiles(true);
        $uploader->setFilesDispersion(true);
        $uploader->setAllowCreateFolders(true);

        if ($uploader->save($this->getBaseDir())) {
            return $uploader->getUploadedFileName();
        }

    } catch (\Exception $e) {
        throw new $e('File was not uploaded');
    }
}

But when I have no upload any file it's show fatal error "File was not uploaded".
How we check that file was selected in field or not?


texts:
I have trouble to setup a free shipping coupon in Magento 1.7.0.2. The coupon itself will be applied successfully but the Free Shipping Method doesn't appear.

Actually I want to setup a coupon which enables (UPS) free shipping for all items.

I was wondering if I have to enable (any) Free Shipping Method first? But then Free Shipping will also show up if no Coupon got applied.

Do I miss something? Here are my configuration settings:

Shopping Cart Price Rules

Status: Active
Website: Main Website
Customer Groups: ALL
Coupon: Specific Coupon
Coupon Code: FREE1
Uses per Coupon:
Uses per Customer: 0
From Date:
To Date:
Priority:

Condition: If ALL of these conditions are TRUE: Shipping Country is United States
Apply: Percent of product price discount
Discount Amount: 0
Maximum Qty Discount is Applied To: 0
Discount Qty Step (Buy X): 0
Apply to Shipping Amount: Yes
Free Shipping: For shipment with matching items
Stop Further Rules Processing: No

Shipping Methods:

Free Shipping
Enabled: No

UPS
Enabled for Checkout: Yes
Free Method: UPS Ground
Free Shipping with Minimum Order Amount: Enable
Minimum Order Amount for Free Shipping: 100000000

Thank you very much!


texts: Magento 1: Create multiple credit memos from admin

texts:
Is it possible to create more than one credit memo per order via Magento 1 admin?

Example:
I created an order with 2 products, then an invoice and then I also created one credit memo with an adjustment refund (no products refunded). After I saved the adjustment refund credit memo I'm unable to add any other additional credit memo to refund the products. Is there a hidden option to accomplish this or is it impossible by design?


texts: Magento 2.3.5-p1 Expand Discount Code field on checkout payment step by default (luma)

texts:
I try to have the discount field on the checkout payment step expanded by default but it seems my changes do not have any effect. My theme inherits from luma.
I have the following code in my Namespace/Theme/Magento_SalesRule/web/template/payment/discount.html

        <form class="form form-discount" id="discount-form">

                        <input class="input-text"
                               type="text"
                               id="discount-code"
                               name="discount_code"
                               data-validate="{'required-entry':true}"
                               data-bind="value: couponCode, attr:{disabled:isApplied() , placeholder: $t('Enter discount code')} " />

                        <button class="action action-apply" type="submit" data-bind="'value': $t('Apply Discount'), click: apply">

                        </button>

                        <button class="action action-cancel" type="submit" data-bind="'value': $t('Cancel'), click: cancel">

                        </button>

        </form>

Can anybody tell me what I am doing wrong here? Thanks!


texts:
Hi is it also possible to get email notification for cancelled orders?

Thanks


texts: Configurable product attribute sort order in Dropdown 2.12

texts:
The order of the dropdown is not consistent with the order of the attribute itself.
Within the attribute size I have it ordered
Newborn
0-3 mo

and in the dropdown it shows up as
0-3
Newborn

the size Newborn was added a few days after the other sizes and the newborn simple products were imported after the 0-3 mo.
Any suggestions of how to get the order of the drop down to follow the order of the list within the attribute?
I have cleared cache and reindexed.
I read that @Khoa TruongDinh had the same issue but did not see a solution to the issue so am reposting.


texts: What kind of weight does default UPS and USPS take in consideration?

texts:
I'm using Magento Community 1.9.2, I'm new at this and I want to set shipping properly with UPS and USPS.
I've set weight along with length, width and height (these 3 are custom attributes) for each of my products and I can see that at shipping options only weight is taken in consideration for UPS and USPS.

I have products that fit in an envelope and products that fit in a box, so I can't charge standard flat rate.

My question is: what the measurement unit of UPS and USPS and what's the best way to setup this properly?

Thanks


texts: Value coupon discount not applicable Magento

texts: Discount value is applied but is not calculated with the total amount.


texts: Updating "Include In Menu" on categories programmatically in Magento 2 and not updating in the admin

texts:
I have the following code to get all categories which are active but not included in the menu. It then loops around these and updates them to be included in the menu. The script works on the frontend however the issue is when I check a few categories in the admin it still shows as "Include In Menu" as being no.

Is there anything I need to add to my script so that the admin reflects the change? Not sure if its affects anything but I have flat categories enabled

class Index extends \Magento\Backend\App\Action
{
    protected $categoryFactory;
    protected $categoryRepository;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryFactory,
        \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository
    ) {
        $this->categoryFactory = $categoryFactory;
        $this->categoryRepository = $categoryRepository;
        parent::__construct($context);
    }

    public function execute()
    {
        $categories = $this->categoryFactory->create()
            ->addAttributeToFilter('is_active', 1)
            ->addAttributeToFilter('include_in_menu', 0)
            ->addAttributeToSort('id')
            ->addAttributeToSelect('*');

        foreach ($categories as $category) {
            $category->setIncludeInMenu(1);
            $category->setStoreId(1);
            $this->categoryRepository->save($category);
        }

    }
}


texts:
When I click this setting icon I get this following error.

1 exception(s):
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): Requested product doesn't exist

Exception #0 (Magento\Framework\Exception\NoSuchEntityException): Requested product doesn't exist
#0 /var/www/html/isac-test/vendor/magento/module-review/Block/Form.php(150): Magento\Catalog\Model\ProductRepository->getById('50', false, '1')
#1 /var/www/html/isac-test/app/design/frontend/Altius/isec/Magento_Catalog/templates/custom/review-form.phtml(156): Magento\Review\Block\Form->getProductInfo()
#2 /var/www/html/isac-test/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/html/i...')
#3 /var/www/html/isac-test/vendor/magento/framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Review\Block\Form), '/var/www/html/i...', Array)

I deployed, compiled but couldn't identify why this error occurs.


texts:
I seem to be having loads of problems with this table in my Magento EE 1.14 build.

I'm curious to know about what the stack community things about turning it off and the repercussions associated with disabling.

I found a brief article that suggested something like so:

<frontend>
    <events>
        <controller_action_predispatch>
            <observers><log><type>disabled</type></log></observers>
        </controller_action_predispatch>
        <controller_action_postdispatch>
            <observers><log><type>disabled</type></log></observers>
        </controller_action_postdispatch>
        <customer_login>
            <observers><log><type>disabled</type></log></observers>
        </customer_login>
        <customer_logout>
            <observers><log><type>disabled</type></log></observers>
        </customer_logout>
        <sales_quote_save_after>
            <observers><log><type>disabled</type></log></observers>
        </sales_quote_save_after>
        <checkout_quote_destroy>
            <observers><log><type>disabled</type></log></observers>
        </checkout_quote_destroy>
    </events>
</frontend>

I found this information here: http://www.axertion.com/tutorials/2012/12/how-to-disable-magento-logging-to-the-database/

Will this break "The product comparing" if I disable the visitor log?

What else should I know about?

New Relic keeps telling me this is a problem every night at the same time.

What should/can i do to improve this process. I've set the log to clean every day. I can't understand why it's taking so long for the insert.

   Slow query trace
437,000ms
MAX TIME
/cms/page/view
ACTION
Query
 INSERT INTO `log_visitor` (`session_id`, `first_visit_at`, `last_visit_at`, `last_url_id`, `store_id`) VALUES (?, ?, ?, ?, ?)

437,000ms.... that's like 7+ minutes of downtime. Need help, please.


texts: Magento 2 How can we provide an option to upload multiple images while creating coupons at admin end?

texts: I want to upload images on coupons during coupon creation at admin. How can we achieve this programmatically in Magento 2?


texts:
A few pertinent questions here:

What's the best way to identify core changes and work them into modules? Is there a free alternative to http://www.fontis.com.au/mageaudit/ ?
How about subversion/git pre-commit hooks to prevent commits to core files? Do you keep Magento core under source control at all?
How does one prevent changes to core files by mistake -- perhaps a Sublime Text plugin that tells you if you're modifying a core file?
Is it okay to copy core files to /local to inject a dispatch event for Observers?

...asking for a ...friend. Yeah.


texts: Custom layout changes are not visible on frontend in mangeto 2

texts:
I have added custom layout with 4 columns in custom theme.
This is my layouts.xml in E:\xampp\htdocs\magento\app\design\frontend\vendor\custom-theme\Magento_Theme\layouts.xml

<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">

    <layout id="4columns">
      <label translate="true">Home columns</label>
    </layout>
</page_layouts>

This is my 4columns.xml located in \app\design\frontend\vendor\custom-theme\Magento_Theme\page_layout\4columns.xml

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

  <referenceContainer name="columns">
      <container name="fouth.column" htmlTag="div" htmlClass="fourth-column" after="-">
      </container>
   </referenceContainer>
</layout>

This is my default.xml located in \app\design\frontend\vendor\custom-theme\Magento_Theme\layout\default.xml

<page  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="logo">
        <arguments>
            <argument name="logo_file" xsi:type="string">images/custom-logo.jpg</argument>
            <argument name="logo_img_width" xsi:type="number">100</argument>
            <argument name="logo_img_height" xsi:type="number">100</argument>
        </arguments>
    </referenceBlock>
    <referenceContainer name="fouth.column">
          <block class="Magento\Cms\Block\Block" name="home-page-block">
             <arguments>
              <argument name="block_id" xsi:type="string">home-page-block</argument>
             <arguments>
          </block>
    </referenceContainer>

</body>
</page>

From admin panel, for Home page , I have selected Home columns Layout in design tab of PAges.But still I can't see these changes on front though I have cleared cache so many times.

I am not getting any error also.Can anyone suggest what's wrong here?
I am newbie to magento.So I am not understanding .


texts: Magento 2: how to stop process of php bin/magento setup:backup --db

texts:
I already execute below command :

php bin/magento setup:backup --db

my db is too large so it will in progress mode. but now i don't need to backup file so how can i stop without interrupt my site ?

any idea please share


texts: Attempting to pass access keys into composer create-project for automated install

texts:
I am writing a shell script in bash (rewriting) that migrates / deploys our magento2 marketplace.

I started off by getting the latest release from github, but that makes it so i cannot use the admin-based web updater (which is the only place I can install our payment processor module because they don't upload to packagist)  I don't want to attempt a sed edit on the package.json to add the repo and access keys, so I'm left trying to use the following command:

composer create-project --repository=https://repo.magento.com/ magento/project-community-edition

Of course, this requires I manually enter the access keys.  i attempted to script it like this:

echo "a2dthisisnotreale1621a522a 21e9thisisnotreald4a183373" | composer create-project --repository=https://repo.magento.com/ magento/project-community-edition /var/www

I get an error stating You must be using the interactive console to authenticate.   How am I supposed to do an unattended deploy?  Our shop focuses primarily on continuous integration, and i cannot have our site be down for more than 20 minutes or so.  It seems like every example of installing magento2 is from a non-automated method.

Has anyone tackled this problem?  If so, how did you do it?


texts:
I have the following problem: Inside of four different store views, we have the opportunity for the customer, to change between different assortments. This is basically just a filter in the Layered Navigation. It works pretty decent. Depending on which assortment the customer has chosen, the logo of the Order Email should change to the specific assortment.
But whatever I try to write a module OR plugin to override the Magento\Email\Model\AbstractTemplate -> getLogoUrl(), it just doesn't work. I know already, that it's a protected method and that a plugin won't work to override it. So I've tried to create a module which is overriding the whole method. Unfortunately the method is inside of an abstract class and it just doesn't work. Right now I am just trying to log into the debug log file. If I put the logging lines directly into the:

/var/www/vhosts/gildegruppe.com/dev/vendor/magento/module-email/Model/AbstractTemplate.php

it works and prints my test into the debug.log file. But if I create a:

<preference for="Magento\Email\Model\AbstractTemplate" type="VENDOR\MODULE\Model\Emaillogo" />

and the Emaillogo.php contains this:

<?php

namespace VENDOR\MODULE\Model;

class Emaillogo
{
  public function getLogoUrl($store)
  {
      $logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
      $logger->info("TEST: Fake");

  // ...

it will compile, but there is no output in the debug.log. What am I missing here?


texts:
All of a sudden, "as low as" prices started to appear on my Magento 2.0.2 site.

Where did they come from? How to I remove them?


texts: Add a custom attribute to company in magento 2.2.2 for B2B

texts:
I am using B2B extensions and I want to add custom attributes to company entity, As a text field and create 6-digit number randomly for that i'm using

$customcompanyattribute     = mt_rand(100000, 999999);

Attribute should be read-only and should generate value when a new company form is submitted.

I found that we don't have a mechanism like Magento has for adding attributes to customer CustomerSetupFactory, and using

Here is the work i did.

app/code/Custom/OverrideCompany/view/base/ui_component/company_form.xml

 <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="general">
        <field name="account_number" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                <item name="disabled" xsi:type="boolean">true</item>

                    <item name="source" xsi:type="string">Account Number</item>
                </item>
            </argument>
            <settings>
                <validation>
                    <rule name="required-entry" xsi:type="boolean">true</rule>
                </validation>
                <dataType>text</dataType>
                <label translate="true">Account Number</label>
                <dataScope>account_number</dataScope>
            </settings>
        </field>

    </fieldset>
</form>

app/code/Custom/OverrideCompany/Setup/InstallSchema.php

   <?php
namespace Custom\OverrideCompany\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class InstallSchema implements InstallSchemaInterface {
    const COMPANY_TABLE_NAME = 'company';

    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context){
        $setup->startSetup();
        $table = $setup->getTable(self::COMPANY_TABLE_NAME);

        $columns = [
            'account_number',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    'length' => 11,
                    'nullable' => true,
                    'comment' => 'Account Number'
            ],
        ];
        $connection = $setup->getConnection();
        foreach ($columns as $col_name => $col_array){
            $connection->addColumn($table, $col_name, $col_array);
        }
        $setup->endSetup();
    }
}

app/code/Custom/OverrideCompany/Setup/UpgradeSchema.php

<?php

namespace Custom\OverrideCompany\Setup;

use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;

class UpgradeSchema implements UpgradeSchemaInterface
{

    /**
     * {@inheritdoc}
     */
    public function upgrade(
        SchemaSetupInterface $setup,
        ModuleContextInterface $context
    ) {
        $installer = $setup;

        $installer->startSetup();
        if (version_compare($context->getVersion(), '1.0.0', '<')) {
                $installer->getConnection()->addColumn(
                $installer->getTable('company'),
                'account_number',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    'length' => 11,
                    'nullable' => true,
                    'comment' => 'Account Number'
                ]
            );
        }
        $installer->endSetup();
    }
}

How to achieve it.


texts: PWA Magento2.3.5 Overwrite Logo Component in Custom Project

texts:
Magento PWA Docs for overwrite a component such as Footer is found here:https://magento.github.io/pwa-studio/tutorials/pwa-studio-fundamentals/modify-site-footer/
So I'm assuming the same steps should be taken to overwrite any other component such as Logo:
What've done ins my pwa-custom project!
in my project folder pwa-custom
mkdir -p src/components/Logo
cp node_modules/@magento/venia-ui/lib/components/Logo/logo.js src/components/Logo
For testing I've edited logo.js and added console.log('here');
Create a src/components/Logo/index.js file with the following content to set the default component export for the Logo directory.
export {default} from './logo'
on yarn run watch  no changes or compilation activates.
Does anyone have any idea what I'm doing wrong or missing?


texts: How to migrate theme from magento1.9 to magento2?

texts: I have migrated data from magento1.9 to magento2 but want to transfer magento1.9 theme to magento2


texts: End User Password Change (Frontend) not changing the password 1.9.01

texts:
first post so go easy on me, please.

I've done as much searching on this and checking as my limited skills allow.
What I can say is /app/design/frontend/rwd/default/layout
customer.xml appears fine.

I had the problem previously where it was just a blank screen on the reset PW link. This time (and annoyingly I cannot pinpoint when the problem occured) the password reset form appears, but it doesn't show a message to say it's been completed. Sure enough the password doesn't change.

I tried adding the following code to
the resetforgottenpassword.phtml

"
but not sure i put it in the right place. It didn't have any effect.

any help very gratefully received

thanks


texts: error during deploying custom theme in magento 2

texts:
i am working on theme in magento 2,but i am getting error in terminal(CMD),the error message is  "unable to load theme by specified key:My/Helloworld" when i run php bin\magento setup:static-content:deploy, my required file are
app\design\frontend\My\Helloworld\composer.json

{
    "name": "magento/theme-frontend-My",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/theme-frontend-blank": "100.0.*",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

app\design\frontend\My\Helloworld\registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/My/Helloworld',
    __DIR__
);


texts: Not able to upload or remove image on migrated products in Magento 2

texts:
I have migrated products from Magento 1.9 to Magento 2. Now if am uploading a new image then it's not saving. I am also not able to remove the image and gives an error

  The image cannot be removed as it has been assigned to the other image
  role

As I have also removed rules from all store for the image still it gives the same error while removing the image.

When adding a new image, that particular image is uploading to pub/media/tmp folder but not assigned to the product and pub/media/catalog/product folder as well.

Any fix for this?


texts: When Reordering Magento gives me a blank screen

texts: Recently I've tarred and dumped my Magento store on production (PHP 5.3, Mysql 5.1, Apache 2.2) and imported it on my local environment (PHP 5.3, Mysql 5.5, Apache 2.2). I've turned on all the logging possible in magento and in the php.ini and I've upped my php memory_limit to 256M, my php max_execution_time is at 18000 and compilation is disabled in Magento. When I try to reorder something I get a blank screen and nothing appears in my logs (Magento or apache2), so far this only happens when I try to reorder something. When I disable all my shopping cart rules it works fine. Any advice would be of great help !


texts:
Each time I'm getting this error after completing order in my website. Order notification, payment all are working fine. But this message confused customers.

  The items you have selected cannot be shipped at the moment. Please
  contact the store owner to arrange for shipping.

Anybody have any idea why this problem appearing and how to solve it? Here is the image


texts: change the pop up message text after we click on "shipping method"

texts:
we are not able to deliver the products to the some locations/pin/zip code.

so we want to restrict customers to order the product to those locations/pin/zip code
We are using Table rates shipping method. We entered all the zip/postal codes we deliver the products in an excel sheet (see image)

= > tablerate.csv and uploaded in magento table rates shipping method.

so when customer click on "shipping method" we are getting pop up message as in the image.

But we want to change the POP UP message text. How do we change the message in the popup?Please help me to find location.


texts: Have Categories navigation always active in mobile

texts:
www.undergrounddynamics.com

Hello, let see if I can explain this correctly.

I am trying to have my categories drop down always show or remain open instead of having someone click the button on the side to force it open.(In mobile resolutions). This issue is only on the mobile resolutions of 900 and under. In firefox I am able to to press crtl+shift+m to view the different resolutions.

which file should I look into or go about doing this to have this possible?

Hopefully I was able to explain this correctly.

Thank you


texts: Remove all password salts from customer table Magento 2

texts:
I recently did a Cart2Cart migration for customers and customer passwords, but since we have launched, our customers have been having huge trouble logging in!

I've done some research but couldn't find anything and it's come to my attention that the new users created do not have password salts, so I'm just wondering how I can directly remove password_salts from the database, and what table these are stored in?

Does anyone have an SQL query that will remove them from the database for Magento 2?

Thanks in advance.


texts: Cronjob executing but not doing anything

texts:
Junior dev here. I installed a module which uses cron jobs. The cron job gets executed but there are no changes done to the system. If everything worked correctly, I would be able to import products from lightspeed, a point of sales provider.
My cron.log gives me this:

[2020-08-18 17:15:07] main.INFO: Cron Job
maurisource_lightspeed_synccatalog is run [] []
[2020-08-18 17:15:11] main.INFO: Cron Job
maurisource_lightspeed_synccatalog is successfully finished.
Statistics:
{"sum":3.3492119312286,"count":1,"realmem":4194304,"emalloc":2570192,"realmem_start":155451392,"emalloc_start":153277360}
[] []

My theory is that the module is being executed but doesnt have the permission to make changes in the database. However its just a theory, and I dont know how to test it, or even fix this problem. Any ideas?
PS: I installed everything using root, not sure if that can have an impact on this.


texts: Magento 1.9.3.7 Warning tax discount configuration might result in different discounts than a customer might expect

texts: The following configuration has been applied. What am I missing?


texts: import custom csv to custom table- magento 2

texts:
My requirement is import custom csv file to custom table.

please share hints and key points to achieve this?

Thanks.


texts: Magento 2.3.3: Caches after changes in CSS

texts:
What is the best and fastest way make changes visible that has been done in _theme.less file ? I always do a lot of things but it is not effective:

php bin/magento setup:upgrade;
php bin/magento setup:di:compile;
rm -rf var/cache;
rm -rf var/composer_home;
rm -rf var/generation;
rm -rf var/page_cache;
rm -rf var/view_preprocessed;
php bin/magento setup:static-content:deploy -f de_DE en_GB en_US;

Thanks...!