texts: How to override the product stock status behaviour based on custom product attribute

texts:
Am using Magento2 CE 2.1.10

A custom boolean attribute (global scope) has been added, attribute code "custom_force_on_web" with default value of false.

Desired outcome is that an out of stock product (either inventory quantity is zero and/or its' status is set to "Out of Stock") be visible in its parent category page (frontend) and any category search filters results if
"custom_force_on_web" is true for a given product.

By "category search filters" I'm referring to what you see under
"Shopping Options" when on the frontend category page.

Native Magento2 behaviour is to exclude "Out of Stock" products in category page and in any category search.
Native Magento2 does allow to show "Out of Stock" products but only as a global yes/no option for all products.
What I need is the ability to apply this at/on the product level, via the custom attribute.

This is required by my employers' customer, there's no wiggle room.

I have already googled this subject, traced the Catalog, CatalogInventory and CatalogSearch modules, and official Magento2 documentation.

I have discussed this in the official Magento2 irc channel.

Basically no one knows how to do this.

Any help would be greatly appreciated.


texts:
i have a problem whem i click in an item of my catalogue. My provider send me the following log error and tell me it isn't a server error:

  PHP Fatal error:  Uncaught TypeError: Argument 1 passed to
  Magento\Catalog\Model\ResourceModel\Product\Collection::addIsSaleableAttributeToFilter()
  must be of the type array or null, integer given, called in
  /home/fzquisho/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php
  on line 1582 and defined in
  /home/fzquisho/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php:2475

Can anyone help me?
Thanks


texts: Custom Product Attribute Not Always Available

texts:
In some situations, custom catalog_product attributes that I've created aren't loaded with the rest of the product data. So take the custom attribute, multiplier.

I want to display the multiplier attribute right next to the price attribute in the Mage_Catalog_Block_Product_Price block. However, the instance of the model that I get from $_product = $this->getProduct(); doesn't include this custom attribute.

Now I know there are some tricks to get it to load, for instance:

$_product = $this->getProduct();
$_product = $_product->load($_product->getId());

Or I can add the attribute when selecting the product

Mage::getModel('catalog/product')
     ->getCollection()
     ->addAttributeToSelect('multiplier')

But I'd rather avoid this. Instead, I think I've done something wrong to cause my custom attributes to not be loaded by default along with system attributes. I'd like to correct the problem at the root, but I don't know how to do that.

Edit:

I have found that setting Use in Product Listings to Yes for this attribute fixes the problem. However, I'm not sure if that's a good idea. Won't some themes end up listing this with other attributes like Color and Size?


texts: Paypal is not coming in the list of "shoppingCartPaymentList" method of soap api

texts:
I am using quote id of 324.
 $proxy = new SoapClient('http://127.0.0.1/stylefiesta/api/v2_soap/?wsdl=1'); // TODO : change url
$sessionId = $proxy->login('karishma.sharma', 'admin123');
 $result = $proxy->shoppingCartPaymentList($sessionId, 324);

I am not getting following array in response
Array
(
    [0] => stdClass Object
        (
            [code] => cashondelivery
            [title] => Cash On Delivery
            [cc_types] =>
        )

[1] => stdClass Object
    (
        [code] => banktransfer
        [title] => Bank Transfer Payment
        [cc_types] =>
    )

[2] => stdClass Object
    (
        [code] => checkmo
        [title] => Cash Payment
        [cc_types] =>
    )

)

But I am not getting paypal in the list although it is enabled in website.


texts: How Can I Create Custom Order Using CSV with multiple Products along with Custom Price?

texts: Many times I did the manual order for the customer, some order consists 100's of products, how can I create custom order by using CSV? Is possible import order by CSV? or is possible to import order by programmatically?


texts:
I have to upgrade a Magento 1.9.1 Store to 1.9.4 in order to get it running with PHP 7.2.
What I did is clone the store on a staging server and upgrade everything there. The store now runs fine but the upgrade took a few days and now there are some new customers and orders.

While upgrading I also updates some extensions to a new Version.
My question is if I now just export the database of 1.9.1 and import to the database of 1.9.4 will this work without problem and update itself or might there be some problems as the database did not get upgraded when upgrading to 1.9.4 and new extensions got installed.
Would it make more sense to find out how to just upgrade the customers and orders?

Thanks.


texts: How to skip customer attribute (created by third party extension) during Data MIgartion from Magento1 to Magento2?

texts:
I am currently working on data migration from Magento1 to Magento2.

I found some customer attributes are created in Magento1 by third party extension.

I am no longer using the above attributes in Magento2.

How to skip the customer attribute and its data during data migration ?


texts: How to send image in contact us email in Magento2?

texts: How to send image in contact us email in Magento 2 ?


texts: How to allow only use the english language to fill the form fields in magento 2

texts:
In Magento 2,

We have a registration form with some customization, But some attackers tried to enter the anonymous values inside the text fields that anonymous values are in the different languages.

For example, the first name field accepts the following value

уверенная в себе

How do I prevent my site from this type of spammers? Please provide the assistance


texts: How to Package extension for Magento Enterprise?

texts:
I need to package an extension for Magento Connect and I'm in doubt about following points:

Do I need EE to package it ?
Should I use a different 'Channel' ( instead of community ) ?
Any other difference instead of packaging an ext. for CE ?

UPDATE:

Note:
It is advisable to upload the package for Connect 1.0

Explanation
Once you upload the package on Magento Connect, It will try to convert the package from 2.0 -> 1.0
This process return an error while conversion from 1.0 -> 2.0 works

UPDATE 2

The reason behind this question is the following:

Suppose I want to sell the extension and so my customer will download the package file from my store.

If they don't have the community channel installed:

the installation will fail with the following message:

  CONNECT ERROR: The 'community' channel is not installed. Please use
  the MAGE shell script to install the 'community' channel.
  the store will go in maintenance mode
  the client will go in panic.

  Even if the above issue can be easily solved running this command: ./mage mage-setup . ... this doesn't look like a plug and play solution and potentially can create damage to a store.

So the point is:

there is any more proper way to deliver a non-free extension for EE ?


texts: Magento UI element based on configuration values

texts:
I am creating a custom module that adds MassAction in sales_order_grid:

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <listingToolbar name="listing_top">
        <massaction name="listing_massaction">
             <action name="order_complete">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">order_complete</item>
                        <item name="label" xsi:type="string" translate="true">Complete Order(s-ASOFT)</item>
                        <item name="url" xsi:type="url" path="completeorder/completeorder/massComplete"/>
                        <item name="confirm" xsi:type="array">
                            <item name="title" xsi:type="string" translate="true">Complete Order(s)</item>
                            <item name="message" xsi:type="string" translate="true">Are you sure you wan't to complete selected items?</item>
                        </item>
                    </item>
                </argument>
            </action>
        </massaction>
    </listingToolbar>
</listing>

I have system.xml and config.xml and have a field enable which enables/disables the module functionality:

<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
    <label>Module Enable</label>
    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>

Now what I need is that above ui_element (MassAction) should be visible only when "enable" config is set to YES, otherwise the MassAction should disappear.


texts: How to check if concrete type of cache is enabled in M1?

texts:
For example how to check if "Blocks HTML output" is enabled, strangely I have trouble to find out that information.

I'd like to know that in order to add conditions before saving and loading custom cached content which is parts of the HTML block output and is programmed in the template file because in the inner HTML I had to output dynamic data a couple times, so I am doing custom "hole punching" and the block class is not caching the whole template.


texts: Profiler not working after upgrade from 1.8.0 to 1.8.1

texts:
I needed to find a chokepoint in my code, and while it worked in 1.8.0, after the upgrade to 1.8.1 the profiler only shows the table headers like this:

Memory usage: real: 35913728, emalloc: 34225312
Code Profiler   Time    Cnt Emalloc RealMem

I can't really find out why it is broken. I'm wondering if more poeple have this problem, since I haven't come across any solutions yet.


texts: display text in product view page if "Tier prices" are availble

texts:
we have to display some text in product view page under  tag

if "tier prices" are available , than we want to dispaly that text

"tier prices are available"

or we have to dispalay the text

"tier prices are not available "

we are using this code : http://pastebin.com/Ye5i2TgQ = > app/design/frontend/default/theme_name/template/catalog/product/view/tierprices.phtml for displaying tier prices

please guide me about this


texts: How i Can Schedule A cron Job on the Basis of Admin Configurations Values

texts:
I created a cron job as per standard method

  Vendor\Module\etc\crontab.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">

     <group id="default">
        <job name="my_cronjob" instance="Vendor\Module\Cron\Clean" method="execute">
            <schedule>00 00 * * *</schedule>
        </job>
    </group>
</config>

In My

Vendor\Module\Cron\Clean.php

class Clean extends \Magento\Backend\App\Action
{
    /**
     * @var connection
     */
    private $connection;

    protected $_logger;
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Psr\Log\LoggerInterface $logger
    ) {
        $this->_logger = $logger;ory;
        parent::__construct($context);
    }
    public function execute()
    {
        $this->_logger->debug('Sync Starts!!');
    }
}

To schedule a cron i created an admin Config as

My Question is how i can Schedule a cron on basis of these fields


texts:
I want to display the size of the file in MB's using the php filesize option.

But for some reason my code does not seem to work, it does not display the file size. The uploaded file is inside the Magento media catalog folder.

What am I missing?

CODE:

<?php $file = '/h/p/file.pdf';?>
<?php echo filesize("../media/catalog".$file);?>


texts:
Deleted row from Content>Blocks then I try to add it again from previous backup but it doesn't render on the frontend.
How can I solve it?
Thanks


texts: magento2 webapi authorization for admin users

texts:
In Magento 2.1.5 I cannot use webapi when I am logged in as admin user. I found this problem on my regular install and verified with a freh one:

install magento 2.1.5 from composer repository
log-in  as the newly created admin user
open domain.com/rest/V1/customers/1

-->

<response>
  <message>Consumer is not authorized to access %resources</message>
    <parameters>
      <resources>Magento_Customer::customer</resources>
    </parameters>
</response>

I cannot access any resource although I'm logged in. Is this a bug in magento2 or am I doing something wrong here? Hard to believe for me that something so severe should be a bug.


texts: Incorrect CAPTCHA for customer login when Capcha is disabled

texts:
I am getting incorrect CAPTCHA on Magento 2.3.5 p1, on the customer login page, even though the captcha is disabled for the frontend.
In the table capcha_log i see that the entries are being registered.
The only workaround I have is to disable the captcha module, but that is not a good solution if I want captcha for the backend.
Any help would be welcomed.


texts: Getting PHP Fatal error: Call to a member function getMethodInstance() on boolean in app/code/core/Mage/Payment/Model/Observer.php on line 46

texts:
I'm trying to do the following:

$order->setTotalPaid($amount);
$order->save();

But I keep getting the following error:

  Call to a member function getMethodInstance() on boolean in /mnt/webdrive/foo.foo-web.net/app/code/core/Mage/Payment/Model/Observer.php on line 46

The payment is returning as a boolean! Not a null, and when I go into the orders page in the CMS, I see that a payment method had been set in the payment information! Payment Information:  My Wallet Payments

What's weird is, even when I try setting the payment again with

$order->setPaymentMethod('foopayment');
$order->save();

It's giving the exact same error!

What is causing this issue?


texts: Is it possible to create a non-ecommerce site using Magento

texts:
I have a site to develop. This site is a kind of voucher code site. Means this site will provide voucher codes for other sites. User will come to my site and pick voucher codes for an  another site and will then redirect to that site. In short, it does not need any add-to-cart functionality of magento.

An example site is shown below in link:  http://www.myvouchercodes.co.uk

However, this site require a strong admin side for support and I believe magento has a strong admin. This is the reason why I am planning to choose magento for my site. So my questions are

1)Is it good to use magento for developing such non e-commerce sites

2)What are the best practices that should take care of when developing such sites using magento

Please share your thoughts... Thanks in advance


texts: Force HTTPS on all pages in the frontend, not just Checkout/Account

texts:
In the backend, I've enabled Use Secure URLs in the Frontend. But users can still visit my site through non-secure URLs, except for checkout/account pages.

I want to force secure URLs on all pages. What I do right now is change the unsecure base URL to "https://...."

It seems working. If users use HTTP, they'll be redirected to https. But I wonder if this is the correct way to do it. Any side effects?


texts:
I'm importing my products in an empty magento store from an .csv and it worked fine while testing with 1 product, but now that I want to import all of them I get the problem the previous product gets overwritten by the next one so after the import I only have one product in my store.

include_once "../app/Mage.php";
include_once "../downloader/Maged/Controller.php";

Mage::init();

// Set the store id
$app = Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$Simpleproduct = Mage::getModel('catalog/product');

if(($handle = fopen("simple.csv", "r")) !== FALSE){
fgetcsv($handle);
while(($data = fgetcsv($handle, 1000, ';')) !== FALSE){
  try{
    $Simpleproduct
      ->setWebsiteIds(array(1))
      ->setAttributeSetId(4)
      ->setTypeId('simple')
      ->setCreatedAt(strtotime('now'))
      ->setName($data[4])
      ->setWeight(4.0000)
      ->setStatus(1) //(1 - enabled, 2 - disabled)
      ->setTaxClassId(2) //(0 - none, 1 - default, 2 - taxable, 4 - shipping)
      ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE)
      ->setPrice($data[3]);

     if($Simpleproduct->save()){
        echo "product ".$sku." Was created
";
        $row++;
     }
  }catch(Exception $e){
    die();
    echo "
";
    echo $e;
    echo "

";
    echo $data[4];
  }
  }
}else{
    echo "Handle == false";
 }


texts: How to update attribute frontend labels programmatically?

texts:
I have the code:

 $attributeModel = \Magento\Framework\App\ObjectManager::getInstance()
        ->get(\Magento\Eav\Model\Attribute::class)->load($id);

And I have to create/update frontend labels of $attributeModel for another stores (French & German)

Or maybe I should use another methods?


texts: Extend admin login session lifetime Magento1.9

texts:
As my admin account will be logged out for every 1 hour, I am wondering if there is any way that I can do to change my the session lifetime for all my admin accounts.

Here are what I have done:

  Magento backend > Configuration > Advanced > Admin > Security >
  Session lifetime(seconds): 86400

  Magento backend > General > Web > Session Cookie Management > Cookie
  Lifetime; 86400

Change in phpMyadmin:

However, it is still not working. Is there any more things I have to change in order to extend my admin session lifetime?


texts: Price removal from Product Page with .xml or .php OR stop GOOGLE indexing it

texts:
Hey everyone!

I am wondering if anyone could help me with this as I have been struggling for quite a bit now.

I have a magento 1.9 web store where all the prices are hidden with CSS (brochure website).

Problem?

Google still indexes rich snippets of the products and spits the "dummy prices" to Search Engine Results Page.

I am a fresher to .php and .xml.

Dont get overwhelmed with info here, just want to make it informative.

What have I figured out ?

That the layout of the product page is in: theme_name/default/template/page/1column.phtml

1) That is where the product page container is defined as:

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

2) Then in page.xml I find “content”:

<block type="core/text_list" name="content" as="content" translate="label">
                Main Content Area
 </block>

3) And in catalog.xml line 189 I find

   <reference name="content">
                <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">

Where under it I find:

Product.info.media
Product.info.upsell
Product.info.additional
Product.attributes
Product.info.addto
Product.info.addtocart

…and couple of more blocks…

4) Inspect element looks like:

I know the div product-type-data is being pulled through from:
App/design/frontend/theme_name/default/template/catalog/product/view.phtml

   <div <?php if ($useRichSnippets) echo $helperSnippets->getOfferItemscope(); ?>>

                <div class="product-type-data<?php echo $productTypeClasses; ?>"><?php echo $this->getChildHtml('product_type_data'); ?>

                <?php echo $this->getTierPriceHtml(); ?>

                <?php echo $priceProperties; ?>

 <?php //end: offers ?>

5) The price-box div is being pulled through from:
Base/default/template/catalog/product/price.phtml (if you need full code let me know)

<?php if ($price): ?>

Can anyone help me understand:

a)  What would be the solution to remove the price block or what needs to be done that google would stop indexing the price?

b)  Could I comment out the product-type-data in view.phtml and would it work?

Any comments and remarks would be highly appreciated

Many thanks ++

(additional image just in case it helps)

UPDATE - GOT IT SORTED

i went to the view.phtml file and edited this

from line 347 removed " <div <?php if ($useRichSnippets) echo $helperSnippets->getOfferItemscope(); ?>>   " - this line removes
 on front end

from line 353 removed   <?php echo $priceProperties; ?>     THIS LINE ACTUALLY GIVES LINES ON THE FRONT END: "META ITEMPROP="PRICEcURRENCY" CONTENT="GBP"> and <META ITEMPROP="PRICE" CONTENT="992">

from line 355 removed "
 <?php //end: offers ?>  "  THIS IS JUST A CLOSING DIV FOR THE 347 LINE.

thanks everyone who looked


texts: Fatal error when adding configurable product in cart and using "products subselection" in shopping cart price rules

texts:
I have this products subselection condition in a shoppng cart price rule:

If ALL of these conditions are TRUE :
If total amount less than 16 for a subselection of items in cart matching ALL of these conditions:
Attribute Set is Heft

This works well except for configurable products. Once we add a configurable product into the cart we get this error:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 523800 bytes) in [...]/lib/Varien/Object.php on line 629

And the configurable products don't even meet the conditions! (They are another attribute set.)

Why is this happening? Can any reproduce this problem? Any help is very much appreciated.

We use Magento CE 1.9.1 and memory limit is set to 512MB. I also tried 1024MB with the same outcome.

It worked in the previous version 1.6.

I also tried to debug Magento and ended up in Mage_Sales_Model_Quote_Address at the function collectTotal. Because once I comment $model->collect($this); adding to cart works. (Of course not as expected, but the cart gets the product. Which wasn't the case before.)


texts: Multiple Websites/Stores, same Skus, different attributes

texts:
I have 3 different websites, each with it's own store. WebA.com/WebA_en, WebB.com/WebB_en, and WebC.com/WebC_en.

I have somewhere close to 10,000 skus. Some of these skus belong to two, or all three of my stores. All of my skus share the same stock quantity. The skus that belong to two or all three of my websites may or may not have different attributes depending on the website. Image, Tiered Pricing, Minimum Sale and Interval Quantities, Description, Price, etc. must all be dependant on the store they belong to.

Example

0001 Is on WebA.com/WebA_en as well as WebB.com/WebB_en but not WebC.com/WebC_en.

0001 on WebA.com/WebA_en costs $2.50, has tier pricing available, a minimum sale quantity, and a quantity increment set. The base image on this store is an in-package image.

0001 on WebB.com/WebB_en costs $5.00, does not have tier pricing available, has no minimum sale quantity (1), and has no quantity increment set (1). The base image on this store is an out-of-package closeup.

I am using Magento 1.9 CE.

My questions are:

Does Magento come with any of these features out of the box?

What features will I need in addition to innate functionality?

Are there readily available extensions that can help me?

What kind of problems can I expect when it comes to import/export?

I am an experienced developer, but as this is the first time I am working with this level of multisite/multistore functionality, any input would be appreciated.


texts: Magento Shopping Cart Price Rule - Discounting the wrong amount

texts:
We have a Magento store running 1.9 Community version.

We have a number of discount codes we publish in magazines, this morning we noticed however instead of giving a 10% discount it's giving a little bit more than it should...

Check this screenshot:

http://i.imgur.com/dLbklgd.png

10% of £97.87 = £9.79 - no problem

£97.87 minus the discount rate £9.79 does not equal £86.12

This is the settings for the code:
http://i.imgur.com/d65emwC.png
What are we doing wrong here? I am at a total loss.


texts: Wrong sort order on category page Magento 2.3.0

texts:
I have created an attribute that is used for sorting on the category pages.  The sorting order is numeric.
Expectation is that sorting order is:
 1. 1
 2. 2
 3. 11

But the actual sort order is:
 1. 1
 2. 11
 3. 2

Apparantly, Magento sorts on the first digit. Not on the complete integer.
How to effectuate the correct sort order?


texts: How to Track or Observe that an order is being edited in Magento at backend

texts:
I want to track that I am editing an order at backend in magento, so I want to track that Edit button has been clicked at backend in order section. See below image for more help-

How can I track an order is being edited at backend.  I also Googled for an observer for this event but could not found. Please anybody can help me here.
Anyone can ask question if he has.

EDITED:-
Now I have added following code in config.xml file-

<controller_action_predispatch_adminhtml_sales_order_edit_index>
                <observers>
                    <kartparadigm_storecredit>
                        <class>kartparadigm_storecredit/observer</class>
                        <method>editOrder</method>
                    </kartparadigm_storecredit>
                </observers>
</controller_action_predispatch_adminhtml_sales_order_edit_index>

and in my observer.php file-

public function editOrder(Varien_Event_Observer $observer)
{
    Mage::log("I am bad boy");
    $order = $observer->getEvent()->getOrder();
    Mage::log('order-id- '.$order->getIncrementId());
    Mage::log('order-status- '.$order->getStatus());

}

Only "I am a bad boy" is printed in log file and it shows 500 Server Error on edit page. I think its because of second line in observer method but not sure why?


texts: Magento export/import category product sort order

texts:
I am looking for an easy way to be able to quickly update the product sort order on any category page via export or import. I have looked into several extensions but have been limited due to the issue of having 1000's products per category which by default would result in a CSV with over 150,000 characters in a particular cell. Even if I do find an extension it will take about the same amount of time to organize the data for import as if I was to organize data for a direct import into a database via a correctly formatted CSV (I dare say!).
I am familiar with MySQL and phpMyAdmin and I am very comfortable with exporting and importing directly into it, and even more comfortable with triple checking data before importing for precise characters, etc, but I am not so familiar with Magento's database handling and the indexing.
Is it viable to export the "catalog_category_product" table and amend it for re-import and does anyone know if there would be any other tables involved in this? Or which tables? And any further steps apart from a backup(!).


texts:
I need is_in_stock to be exposed as an attribute for which I can set "Use in layered navigation" to "Filterable (with results".

I can't seem to find a way to do this? I can't find an extension which does this? Does anyone have any ideas?

To clarify: I'm using ElasticSearch as my search backend, and ElasticSearch takes over layered navigation by using it's own facets which mirror the attribute settings for Layered Navigation - so that's why I need a stock attribute.


texts:
masgento 2.1 -  How to get the full path of the cached image thumbnails in REST

i know that the images are in /pub/media/catalog/product/

i need to know how can i get the cached version:
/pub/media/catalog/product/cache/thumbnail/140x140/beff4985b56e3afdbeabfc89641a4582/

any idea using object manager?


texts: Magento 2: Widget/Block not working with caching enabled

texts:
I have a widget which displays on the main page and the product category pages. Based on the user's selection in the widget the product results should filter. After that if we navigate to the category pages, the category filter should apply in addition to the widget selection.

Widget uses php COOKIE in the controller to retain the selection information.

Problem: When caching is disabled the widget works fine. But when caching is enabled it is not getting the selection information from main page to category pages or vice versa. I tried setting the block caching to false then it works partially. Do php cookies not work with caching in Magento? How to get it to work?


texts:
I have a news page in my magento store which is displaying news posts with a publish date, my store is built in 2 languages, the code which is creating the format:

public function getPublishDate($format = 'd F Y')
    {
        return $this->getDateCreatedFormated($format);
    }

This is the code in my Code\Model folder.

The problem is in, both languages the month is shown in English, how can i make sure the English pays shows the English date, and my other language, shows, ofcourse, the other languaeg.


texts: Google auth Redirect Url mismatched ! Magento 2

texts: I have integrated social Login Plugin "Mageplaza" in my Project,for getting  google client Id I have to give Redirect Url, Can anyone help me out regarding this problem.


texts: Magento 2 : Add visual swatch uploader in custom UI form

texts:
There are visual swatch uploader available in store -> product -> Edit "color" attribute and Manage Swatch (Values of Your Attribute) like display in below image.

I want to apply same that uploader in my custom module's UI form. I found that code in this file. But, not getting output.

  vendor/magento/module-swatches/view/adminhtml/templates/catalog/product/attribute/visual.phtml

How can I add in my UI form?

Any help would be appreciated !!


texts: Magento 2 Use Symlink In Default or Production Mode for Pub Static Files

texts:
Situation: I am running some free trials of Magento 2 and have limited HD space on the VPS. For this reason to cut down on HD space I want to have Magento symlink the files in default or production mode. I have noticed that a default Magento 2 install is about 420mb once the site first runs it goes to around 770mb so 350mb of this is copied files.

I have modified: app/etc/di.xml line:

 <item name="default" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item>

to

 <item name="default" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item>

This works ok and the site will properly create the symlinks even when in default mode. However the issue is that the css is not created or the js-translation.json the files it should create but does not are:

/pub/static/version1488209436/frontend/Magento/luma/en_US/css/styles-m.css

/pub/static/version1488209436/frontend/Magento/luma/en_US/css/styles-l.css

/pub/static/version1488209436/frontend/Magento/luma/en_US/css/print.css

/pub/static/version1488209436/frontend/Magento/luma/en_US/js-translation.json

So the question is: how do I make Magento also generate these files when in default or production mode and using symlinks?


texts: Use addFieldToFilter on order object to get orders of specific user

texts:
I'm trying to access the order object and return some information.

My block is called Review.php.

<?php

namespace MS\RealReviews\Block;

/**
 * Entity rating block
 *
 */

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

    protected $customer_id;
    protected $_orderCollectionFactory;

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

    public function getOrders() {

        if (!$this->orders && !$this->customer_id):
            $this->orders = $this->_orderCollectionFactory->create()->addAttributeToSelect(
                '*'
            )->addFieldToFilter(
                'customer_id',
                $this->_getCustomerID()
            );
        endif;

        return $this->orders;

    }

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

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

    public function isRealReview($customer_id = false){

        $html = '';
        $product = $this->getProductId();

        if($customer_id):
            $this->_setCustomerID($customer_id);
        endif;

        $orders = $this->getOrders();
        if($orders && count($orders)):
            foreach($orders as $_order):
                foreach($_order->getAllItems() as $item):
                    $html .= "1"; // get item arrays further...
                endforeach;
            endforeach;
        endif;

        $html .= $this->_getCustomerID();

        return $html;
    }

}

I want to get the items of all orders for a specific user. Right now, my block is failing, there is no output on the frontend.

What is wrong with the code?


texts: Show last 5 purchase order products details in shopping cart page (like last minuts shopping)

texts:
I am using SQL commend but its not working. Then how to show last 5 purchase order products detail in over shopping cart page.

  $store_id = 1;

    $collection = Mage::getModel('sales/order_item')
                ->getCollection()
                ->addAttributeToSelect('product_id')
                ->addAttributeToSelect('created_at')
                ->addAttributeToSort('main_table.created_at', 'DESC');
    $collection->getSelect()->join( array('so' => 'sales_flat_order'), 'main_table.order_id = so.entity_id AND so.store_id=' . $store_id, array(''));
    $collection->getSelect()->limit(5);

Please help me.


texts: Query to change the status of bulk magento orders

texts:
I have a lot of Magento Orders with the wrong status
Is there a way to change that bulk using a sql query?

Thanks in advanced


texts: Magento2 : how to create admin page with configuration fields

texts:
I have a module which adds a menu in backend linked to a custom page using a controller. All this works fine.

I would like now to use this new admin page for configuration.

I thought using my /view/adminhtml/templates/newpage.phtml to add all the mandatory fields, but all the entered parameters may be memorized somewhere surely in database.

Is there a dedicated table for that or may I create a new
one ?

Thank you for your help

  EDIT : I found I need to use system.xml. But each time in the examples I found, the new configuration fields are in admin/store/configuration menu. Is there a way to define my custom page instead?


texts: How to redirect frontend if admin username password is wrong

texts:
I am new to magento, I am learning step by step with all your help. Thanks..

I have done admin login from the frontend. I have separate login for admin at front end footer, I did it successfully but when user-name and password is wrong then it redirect magento admin login form and display the error.

I don't need like that, I have to redirect it to front with error message.

Thanks in advance...


texts: I just installed a Magento 2.3.6 version. and I tried to run the Command Reindexing but it's not working. I tried with diff commands like cache clear and flush none of the commands are not working through SSH. How can i achieve this thing. Can anyone help me with it please.


texts: Orders collection - how to get all in the time range (current day)

texts:
Trying to gather all the orders (current day) and sum totals

Updated:

    $format = Mage::getModel('core/date')->date('Y/m/d');
    $from = $format.' 00:00:00';
    $now  = Mage::getModel('core/date')->date('Y/m/d H:m:i');

    $torders = Mage::getModel('sales/order')
        ->getCollection()
        ->addAttributeToSort('increment_id', 'DESC')
        ->addFieldToFilter('state',Array('neq'=>Mage_Sales_Model_Order::STATE_NEW))
        ->addAttributeToFilter('created_at', array('from' => $from,'to' => $now))
        ;

everything is fine except one little thing, one of the orders seems to be not in collection.

Checked all customer_emails and the order created just before midnight (00:14:46) is not included in collection for some reason.
suppose to be 127 order while getSize() is saying 126 regardless what filters used etc.

Any ideas ?


texts: Installation of Magento2 stuck at 0% in windows

texts: I am trying to install Magento 2.2.8 in my windows 10 using xampp, but the installation is stuck at 0% and no errors are shown in console. Can anyone guide me how can i install it


texts: Custom widget not displaying on stage server

texts: I have created a custom widget, which is shown on local but when I pushed to staging, its not showing. Why?


texts: When I tried to save a Email Template in Admin, it thows me a 404 error: Page not found (only with some values and only in production)

texts:
Recently we upload our site to Production Server. In Developer Server all is apparently Ok. But, in production server, in Admin, when I go to Marketing >  Email Templates, and I try to modify some Template or Add a New one, some times the page throw me to a white page with only the black words: "404 error: Page not found."

After some tests, I saw that it only occurs when the Template Content field has in his text instructions like {{var ...}} or {{trans ...}} When the text is Plain HTML, it is saved without problem. At same time, instructions like {{depend ...}} or {{if ...}} Neither do they cause problems. For now, it is only when the text have {{var ...}} or {{trans ...}}. For example:

{{trans "%customer_name," customer_name=$order.getCustomerName()}}

{{var formattedShippingAddress|raw}}

As I said, it only occurs in my production server, in developer server works fine. I tried to upload again all my vendor directory, but the result was the same.

I do some more tests, and the strange thing is, when the error occurs, it doesn´t enter to the method execute() in vendor\magento\module-email\Controller\Adminhtml\Email\Template\Save.php, it goes directly to the 404 page. But, why only occurs when the text have that instructions? I don´t understand.

Someone have any idea?

My Magento version is 2.1.1


texts:
I want to override Mage_Sales_Recurring_ProfileController in my custom module.

My /etc/config.xml

<config>
    <frontend>
        <routers>
            <sales>
                <args>
                    <modules>
                        <Namespace_Module before="Mage_Sales">Namespace_Module</Namespace_Module>
                    </modules>
                </args>
            </sales>
        </routers>
    </frontend>
</config>

and my controller file

Namespace/Module/controllers/Sales/Recurring/ProfileController.php

require_once("Mage/Sales/controllers/Recurring/ProfileController.php");
class Namespace_Module_Sales_Recurring_ProfileController extends Mage_Sales_Recurring_ProfileController
{
   public function indexAction()
    {
       // custom code
    }
}

But the control doesnt go in the overriden controller, but the core controller only.

Can anyone tell the reason why.


texts: How can I save credit card information along with the order details in magento 2?

texts:
One of my client want to save credit card information when any customer place the order. He does not want any payment gateway like paypal/stripe etc.

So that i have built custom plugin and built an user interface where user can fill their ccno/cvc/expiry date etc and place the order. when user place the order then getting payment-information 404 bad request. How can i solve this? Please suggest very urgent.


texts: How to Show only Category pics in navigation bar

texts: I am running Magento 1.9. I want to display Only category Image in Navigation bar (dropdown menu). Anybody know how to do it? Or How to Add pictures in Navbar Dropdown menu


texts: Magento 2.3.4?How to change the cronjob frequency?

texts: I need to change the cronjob frequency for amazon_payments_process_queued_refunds and bulk_cleanup from 5 to 15 mins. Please let me know how to do it.


texts: CSS not properly load after going http to https in Magento

texts:
After using SSL certificate, there is problem in frontend.

Problem in font family css, it is load but not work same as work before on http.

How to resolve that problem, i have done all setting in backend like this

Use Secure URLs in Frontend : Yes

Use Secure URLs in Admin : Yes


texts: Get active cms pages assign and not assign to the Store

texts:
How to get all active cms pages and then if they doesn't exist in the Store show near N/A

$pages = Mage::getModel('cms/page')->getCollection()
            ->addFieldToFilter('is_active', 1)
            ->addStoreFilter(Mage::app()->getWebsite()->getId());


texts: How to Filter a Custom Column in Product Listing?

texts:
I have created a custom column in Product gird by a module, which shows Parent product's SKU there. It's working fine but when I try to filter it Magento gives "Something went wrong with processing the default view and we have restored the filter to its original state." error. and in exception.log the error is:

  [2019-01-03 11:33:08] main.CRITICAL: Invalid attribute name:
  parent_sku {"exception":"[object]
  (Magento\Framework\Exception\LocalizedException(code: 0): Invalid
  attribute name: parent_sku at
  /html/vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php:1383)"}
  []

Here's my code

  /html/app/code/CustomColumn/Addproductcolumn/view/adminhtml/ui_component

<?xml version="1.0" encoding="utf-8"?>

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
  <columns name="product_columns">
    <column name="parent_sku" class="CustomColumn\Addproductcolumn\Ui\Component\Listing\Column\ParentProductId">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
              <item name="label" xsi:type="string" translate="true">Parent Sku</item>
              <item name="filter" xsi:type="string">text</item>
              <item name="visible" xsi:type="boolean">true</item>
              <item name="sortOrder" xsi:type="number">50</item>
              <item name="align" xsi:type="string">left</item>
              <item name="dataType" xsi:type="string">text</item>
              <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
        </item>
    </argument>
    </column>
  </columns>
</listing>

  app/code/CustomColumn/Addproductcolumn/Ui/Component/Listing/Column/ParentProductId.php

<?php

namespace CustomColumn\Addproductcolumn\Ui\Component\Listing\Column;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Ui\Component\Listing\Columns\Column;

class ParentProductId extends Column
{
protected $configurable;
protected $bundle;
protected $_productFactory;

public function __construct(
    ContextInterface $context,
    UiComponentFactory $uiComponentFactory,
    \Magento\Catalog\Model\ProductFactory $productFactory,
    \Magento\ConfigurableProduct\Model\Product\Type\Configurable $configurable,
    \Magento\Bundle\Model\Product\Type $bundle,

    array $components = [],
    array $data = []
) {
    parent::__construct($context, $uiComponentFactory, $components, $data);
    $this->_configurable = $configurable;
    $this->_bundle = $bundle;
    $this->_productFactory = $productFactory;

}

public function prepareDataSource(array $dataSource)
{
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of object manager

    if (isset($dataSource['data']['items'])) {
        foreach ($dataSource['data']['items'] as &$items) {
        if($items['type_id'] == 'simple'){

            $productId = $items['entity_id'];
            $parentProducts = '';

            $getParent = $this->_configurable->getParentIdsByChild($productId);
            $parentData = $this->_productFactory->create()->load($getParent);
            $getParentSku = $parentData->getSku();

            if(isset($getParentSku)){
                $parentProducts .= $getParentSku;
            }

            $getParent = $this->_bundle->getParentIdsByChild($productId);
            if($getParent != ''){

                foreach ($getParent as $p) {
                    $parentData = $this->_productFactory->create()->load($p);
                    $getParentSku = $parentData->getSku();
                    $parentProducts .= $getParentSku.',';
                  }
            }

                $items['parent_sku'] = $parentProducts;
        }
    }
}

    return $dataSource;
}

}


texts: ?__store=store_view_code and category widget link

texts:
I'm using a category widget to generate a link to a category. However, the store code is appended to the URL. How do I prevent this.

{{widget type="catalog/category_widget_link" anchor_text="Mobile" title="Mobile" template="catalog/category/widget/link/link_inline.phtml" id_path="category/368"}}

And the URL which Magento generates:

http://www.domain.com/path/to/category.html?__store=store_view_code

Any help will be appreciated.

UPDATE

I didn't set Add store codes to Url in backend.


texts:
I am working on project , i want to change products per page based on some selection .

Like if user click price filter 0-100 i want product per page to be 10, when he selects 0,200 i want product per page to be 20 .

How this be done i some way .
Need help with logic how to do it .


texts: Magento 2 : How to set font icon using cdn url

texts:
In magento 2, How to set font icon using cdn url.

By default font icon comes from theme folder app/design/frontend/{Package}/{theme}/web/css/source/_theme.less file.

//  Fonts
@mobile-cart-padding : 10px;
@icons__font-path: '@{baseDir}fonts/Luma-Icons';
@icons__font-name: 'luma-icons';

How can we change baseDir with our cdn url to load icon in magento 2.

Thanks.


texts: Paypal checkout with coupon applied returns wrong grand total

texts: Have to fix this bug: magento works properly with prices and vat and coupon also, but when you place and order, using a coupon, and choose to pay with paypal it collects a wrong amount. usually less. Looks like if paypal re-calculate the goods price, the vat, and applies the coupon by itself not just taking from magento the grand total --it is not strange, what I cannot fix is that the two grand total are DIFFERENT. the mangetos is correct the paypal's is wrong (lower). As a result I have a suspected fraud, cause the amount collected is less than the magento's grand total. WHERE should I look to fix it ? THANK YOU


texts: Child theme is loaded before parent theme

texts:
I have created child theme but on page css from child theme is loaded before css from parent theme, and I don't get correct style.
Is there a way to specific order of loading scripts from theme (to set child theme to load last)
Example: In parent css -> .home{ color: red;}
         In child css -> .home{color: blue;}
In page color is red, because parent is loaded last.

And I another question, can I turn off styles from parent theme on specific page? Problem is next:
 1. Lets say i have class about-us in both css in parent and in child theme.
 2. In parent theme it has one group of attributes, for example color and size
 3. In child theme in has another group of attributes, for example background and line-heigh.
 4. I want to my class in specific page load only attributes from child theme.

Is there a way not to load parent's styles at all on specific page?


texts: Magento2, custom widget save data wrong encoding

texts:
I create a custom widget for magento2. I have one text parameter:

<parameter name="title" xsi:type="text"  visible="true" sort_order="1" >
            <label translate="true">Title</label>
        </parameter>

When I save data, if I use characters like à, or ã, or ü por example, the are saved with wrong encoding. For example ü became Ã¼.
This only happens on my widget. All the rest is saving with right encoding.

How can I set right encoding for a widget or a parameter?

thank you


texts: Change the number of products per page in category view

texts: This seems like a totally simple thing, but I just can't figure out how to do it.  I am running on Magento 1.7 and I can not figure out how to set the number of products per page in a category view.


texts: How to auto update to the current year in footer Magento 2?

texts: How to auto update the copyright year in the  footer section of the site in Magento 2.


texts: require_once fails, but using a non-requested path, when including file from Helper class file

texts:
I have this helper class file (currently reachable):

<?php

require_once dirname(__FILE__).'/securimage/securimage.php';

class Milyuncarros_Mobile_Helper_Captcha extends Mage_Core_Helper_Abstract
{
    public function check($value)
    {
        $securimage = new Securimage();
        return $securimage->check($value);
    }

    public function show($ns)
    {
        $img = new Securimage();
        if ($ns) $img->setNamespace($ns);
        $img->show();  // outputs the image and content headers to the browser
    }
}

I get this error:

Fatal error: require_once(): Failed opening required '/home/carros/public_html/includes/src/securimage/securimage.php' (include_path='/home/carros/public_html/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/carros/public_html/includes/src/Milyuncarros_Mobile_Helper_Captcha.php on line 3

As you can notice, there's no /app directory in the failing path. But my helper class (and the needed securimage folder) is located at /app/code/local/Milyuncarros/Mobile/Helper.

Why is it failing at such wrong path?


texts: ERROR: “/app/etc/” must exist for proper tool work in magento 1.8.1

texts:
I am trying to install the newly release security patch for magento 1.8 in my distant server when I get this error

I tried to edit CURRENT_DIR in the sh file with pwd value and I always get the same error.

Is there a way to be fixed

Thank you in advance


texts: Magento 2 tries to load old theme on category pages

texts:
I'm using Magento 2.2.3 and after switching from the custom theme (Infortis - Ultimo) to Luma, all category pages are still displaying the Ultimo theme. The rest of the website displays using Luma so the problem is just with category pages. I've uninstalled the custom theme but the category pages still try to load it and give the error...

Exception #0 (LogicException): Unable to load theme by specified key: '6'

'6' is the ID of the old theme. The new theme's ID is '2'. I don't know where in the database there's a reference causing categories to try using the old theme on just category pages.

The order I've tried to do this is...

Changed theme to Luma in Content > Configuration
Removed the rows containing umm_ from eav_attribute table (as recommended)
Removed the custom theme entries from the theme table
Removed the theme files from app/code & app/design
Flushed the cache
Removed var/view_preprocessed (and all the other var/cache files)
Removed pub/static/frontend/*

I've tried other combinations too but nothing has worked.


texts: Adding Product Image in My Product Reviews page

texts: friends. How to add product images on the My Product Reviews page like this mockup design


texts: how to add recently compared products in a div

texts:
I want to add recently compared products in a div. so I added this code in CMS

<div id="contents_right" style="background-color: green; float: right; width: 250px; height: 100%;">
    &nbsp;
{{widget type="reports/product_widget_compared" page_size="5" template="reports/widget/compared/content/compared_list.phtml"}}
</div>

But I cannot see any widget added in my homepage. Where have I gone wrong?
Thanks..


texts:
I have this weird error that's saving the wrong date.

The saved date is date -1 day (exemple, the selected date is 10/06/2020, but the saved date is 09/06/2020). My Magento 2 site is in French, but maybe I have miss something in the global configuration.

EDIT : I've changed Date field to DateTime Field, the day is right but the hour is late of 2 hours (selected 11:00, saved 09:00), so maybe the 2 hours are being remove from the the selected day ? which cause the -1 day ?


texts:
Thanks guys for the help in getting the cat ids in magento.

Found this script to mass enable categories based on IDs

<?php setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$file = fopen(MAGENTO . "/var/import/categoriesToEnable.csv", 'r');
while (($line = fgetcsv($file)) !== FALSE) {
$cats = explode(",",$line[1]);
foreach ($cats as $cat) {
$newcats[$cat] = true;
}
}
// Activate the categories it is in foreach ($newcats as $cat=>$value) {
if ($value && !empty($cat)) {
try {
$_category = Mage::getModel('catalog/category')->load($cat);
if ($_category->getIsActive() === "0" || !$_category->getIsActive()) {
$_category->setIsActive(1);
$_category->save();
echo "
Enabled ".$_category->getName();
unset($_category);
}
} catch(Exception $e) {
echo " Caught Cat Insert exception: ", $e->getMessage();
}
}
 }
?>

Get an error when trying to run it

Fatal error: Call to undefined function setCurrentStore() in /var/www/vhosts/***********/httpdocs/quick_enableCats.php on line 2


texts: Adding a product to the compare list redirects to the home page

texts:
As stated, adding a product to the compare list redirects to the home page but I'd like it not to redirect at all. The product is successfully added to the list, the redirect is the only problem.

Edit: Same happens when "Clear"-ing the list. Interestingly enough, if you press "Clear" as a logged-in user at your dashboard, it correctly stays on the dashboard instead of redirecting to the homepage.

Edit #2: I figured it out, look below for the answer.


texts: Store views are not displaying in Admin portal product details page

texts:
Store views are there if I will go to Stores >> All Stores
But If I go to any product details page and the scope drop-down only shows the default store view.


texts: Configurable Product Swatches price Version 1.9.2.2

texts: I'm using Magento version 1.9.2.2, its working fine but custom option/configurable product price not updating.


texts: Magento 1.9 getCustomer Telephone in PDF Print-outs

texts:
Hi I have some custom code to display PDF Print-out, everything work fine except that customer telephone number, I have this code in php to define that variables:

      $processor->setVariables(
            array(
                'order'           => $order,
                'sales_object'    => $order,
                'billing_address' => $pdf->PrepareCustomerAddress($orderHelper, $order, 'billing'),
                'shipping_address'=> $pdf->PrepareCustomerAddress($orderHelper, $order, 'shipping'),
                'payment'         => $pdf->PreparePayment($orderHelper, $order, $order),
                'shipping'        => nl2br($pdf->PrepareShipping($orderHelper, $order, $order))
            )
        );

and I try to use in phtml file like this:

{{htmlescape var=$billing_address.getTelephone()}}

but the field Phone is blank, if I use only {{htmlescape var=$billing_address}} display the entire customer address including phone number too.

How I can get only the Customer Telephone number?

THIS IS THE PHTML CODE:

      &nbsp;&nbsp;&nbsp;&nbsp;{{var sales_object.increment_id}}

REGISTRATION NUMBER

      &nbsp;

CONTACT INFORMATION

    {{var sales_object.increment_id}}

      FIRST NAME:
      LAST NAME:
      &nbsp;
      &nbsp;

      {{htmlescape var=$order.getCustomerFirstname()}}
      {{htmlescape var=$order.getCustomerLastname()}}

      {{htmlescape var=$order.getCustomerFirstname()}}

EMAIL: {{htmlescape var=$order.getCustomerEmail()}}

PHONE: {{htmlescape var=$order.getCustomerTelephone()}}

      {{htmlescape var=$order.getCustomerLastname()}}

      {{htmlescape var=$order.getCustomerEmail()}}

Thanks


texts: I would like to extend the magento api so that a third party can, via web service or rest api, close the session of a client. Can you guide me on the steps that I should take? or some link with more information?


texts: Don't work bin/magento setup:static-content:deploy after upgrade Magento to 2.3.2

texts:
Hello!

When i run command bin/magento setup:static-content:deploy i give errors:

And my error:
useful.css):

  failed to open stream: No such file or directory

How to fix it? Thanks)


texts: I am new to magento .I want to reindex the products manually but I don't know where model and controller files path. please help me for reindexing the products.


texts:
I have some doubs for setting  the permissions of magento when the web site go to online

Always i setting file and directory 755.

It's correct?

thanks
Alessandro


texts:
I need to move recently viewed products. I moved it to the product page with this code in catalog.xml
<reference name="content">
     <block type="reports/product_viewed" name="right.reports.product.viewed" as="recently_viewed" template="reports/product_viewed.phtml" />
  </reference>
 but it's on the top of the page and i need it after the description. Which is in the bottom. I'm using magento 1.9. Please tell me what file to use if you have a solution.


texts: Add product tax as normal product price for shipping method

texts:
Here is example with problem explanation:

There is a product with base price $75 in Magento store
This product has tax (included in price by dynamic tax) $10
Where customer see product and adds it to the cart (and in checkout), product's price is $85 (base price + tax)
There is Webshopapps Matrix rates (free) installed in Magento store
Webshopapps Matrix rates configured to give free shipping for customer when product in cart costs $80 or more.
When customer goes to checkout, he can't use free shipping, because real product price (without tax) is $75.

What i need to get:

When customer goes to checkout, he must get free shipping for this product. This means, that Shipping method cost (Matrix rates carrier) must be calculate not product base price, but product base price + tax, eg: product base price is $75 and tax is $10, in this way, shipping carrier must use price $85, not $75.

How can i do this?


texts: How do I ignore these data migration errors (Class does not exist but mentioned)

texts:
Using the Magento Data Migration tool, I get the following errors:

[2018-09-07 20:57:11][ERROR]: Class ugiftcert/source_template does not exist but mentioned in: eav_attribute.source_model for attribute_id=556
[2018-09-07 20:57:11][ERROR]: Class ugiftcert/source_template does not exist but mentioned in: eav_attribute.source_model for attribute_id=557
[2018-09-07 20:57:11][ERROR]: Class ugiftcert/product_pdf does not exist but mentioned in: catalog_eav_attribute.frontend_input_renderer for attribute_id=584
[2018-09-07 20:57:11][ERROR]: Class ugiftcert/product_conditions does not exist but mentioned in: catalog_eav_attribute.frontend_input_renderer for attribute_id=585
[2018-09-07 20:57:11][INFO][mode: data][stage: volume check][step: EAV Step]: Error occurred. Rollback.
[2018-09-07 20:57:11][INFO][mode: data][stage: volume check][step: EAV Step]: EAV Step: rollback
[2018-09-07 20:57:11][INFO][mode: data][stage: volume check][step: EAV Step]: Please fix errors and run Migration Tool again

[Migration\Exception]
 Volume Check failed

I understand I can ignore the attributes with xml files. But I don't understand the syntax. I believe I need to add these in the ignore group in vendor/magento/data-migration-tool/etc/opensource-to-opensource/eav-attribute-groups.xml.dist

I'm looking for answer on how to add the above errors to these ignore files. Something like:

<group name="ignore">
    <attribute type="catalog_product">msrp_enabled</attribute>
    <attribute type="catalog_product">group_price</attribute>
</group>


texts: Magento 2: Want to change the location of Product Page "Your added .....shopping cart" message, under the addto cart button

texts:
I have tried to relocate in layouts XML file, but it's not working.
the file is in the/vendor/magento/module-checkout/view/frontend/templates/messages/addCartSuccessMessage.phtml
I just want to put this line under the add to cart button or after the short description pannal.
(Magento 2.3.4)


texts: Can someone explain how to use the filters on the Magento 2 Sales Orders Report?

texts:
I'm trying to understand the how the Date Used, From/To Dates and Order Status filters specifically work together for this report. For example, if I select "Order updated" from 6/1/20 to 6/30/20 and select a "Complete" status...will the results include any order that moved to a "complete" status during that time frame? Or would the results only include orders that were updated during that time frame but are in a "complete" status the date the report was ran?
Same with using "Order Created" as Date Used. For example, I select "order created" from 6/1/20 to 6/30/20 and select a "complete" status...will the results include orders that were created and moved to a complete status during the specified time frame or orders that were created within that time frame but have a "complete" status the day the report was ran?


texts: No system navigation on my magento admin panel

texts:
Like my title above is there anyone encounter that your Magento admin panel have no system navigation? I can't clear a cache, I can't install an extensions and etc..  Please check the attached file. Please help me about this problem I'm getting annoying why my Magento have no system nav .

Thank you,


texts:
I create csv file for user like that:

$this->_prepareDownloadResponse($name.'.csv', $csv, 'type/csv');

Can I check if user download whole csv correctly?


texts:
I don't know if I can post this here, to answer questions, I wanted to do this, but I don't know where to start, if anyone can help, I am very grateful

hello friends, is it possible to share a cart? I have a customer who needs to share a cart with other people, his idea would be to set up a cart and send the link to the person to finalize the purchase, he is doing this to help older people to buy online easily

Thanks


texts: What is the best way to re-write Catalog Search Results?

texts:
We currently have a site that serves search results like the following:
http://www.domain.com/catalogsearch/result/?q=firstparam+otherparam+stuff

Ideally, we'd like it to serve it via: /firstparam+otherparam+stuff
We full recongize that the + is a reserved character, what we our goal is to use it.

We have the following htaccess rule

RewriteEngine On
RewriteCond %{THE_REQUEST} \ /+catalogsearch/result/\?q=([^&\ ]+)
RewriteRule ^ /%1? [L,NE,R=301]

Now we have /firstparam+otherparam+stuff

How do we actually get the catalogsearch to run on this query?


texts: Grid Serialize not working for second grid checkbox

texts:
I have admin form with grid. in my grid i have set checkbox as another form field but it gives disabled when it rendered.My code is as below.

Layout file.

<shippinggroup_adminhtml_shippinggroup_customers>
    <block type="core/text_list" name="root" output="toHtml">
        <block type="shippinggroup/adminhtml_shippinggroup_edit_tab_formcustomer" name="shippinggroup.edit.tab.formcustomer" />
        <block type="adminhtml/widget_grid_serializer" name="customer_grid_serializer" >
                <action method="initSerializerBlock">
                    <grid_block_name>shippinggroup.edit.tab.formcustomer</grid_block_name>
                    <data_callback>getSelectedCustomers</data_callback>
                    <hidden_input_name>links[customer_ids]</hidden_input_name>
                    <reload_param_name>customer</reload_param_name>
                </action>
                <action method="addColumnInputName">
                    <input_name>warrantymail</input_name>
               </action>

        </block>
    </block>
</shippinggroup_adminhtml_shippinggroup_customers>

grid column.

$this->addColumn('customer_ids', array(
        'header_css_class'  => 'a-center',
        'type'              => 'checkbox',
        'name'              => 'customer_ids',
        'values'            => $this->_getSelectedCustomers(),
        'align'             => 'center',
        'index'             => 'entity_id'
    ));
   $this->addColumn('position', array(
        'header'            => Mage::helper('catalog')->__('Position'),
        'name'              => 'position',
        'type'              => 'checkbox',
        'validate_class'    => 'validate-number',
        'index'             => 'position',
        'values'            => '',
    ));

Here is screenshot of output https://www.screencast.com/t/xCqsQ6NCF

I would also like to display label for column.

Please guide me on this.


texts: M2 Importer: Value for 'visibility' attribute contains incorrect value

texts:
If the importer runs with cronjob I get always the same errors on all lines:

  Value for 'visibility' attribute contains incorrect value, see
  acceptable values on settings specified for Admin in line(s):...

If I run the importer manually it always runs without problems. But if it runs automatically with cronjob there are the errors.

I have tried everything. I have tried Integer values, I have tried English strings like "Catalog, Search" and also the same in German.

I have no idea what I can do. Magento version: 2.2.4


texts: How to override a static method in Magento2

texts:
Plugin Interceptors and overriding with preference does not work on static methods.

Need to override getOptionArray method in Magento\Catalog\Model\Product\Visibility  to return a custom visibility

/**
     * Retrieve option array
     *
     * @return array
     */
    public static function getOptionArray()
    {
        return [
            self::VISIBILITY_NOT_VISIBLE => __('Not Visible Individually'),
            self::VISIBILITY_IN_CATALOG => __('Catalog'),
            self::VISIBILITY_IN_SEARCH => __('Search'),
            self::VISIBILITY_BOTH => __('Catalog, Search')
        ];
    }

Any other way this can be achieved ?


texts: Magento 2: New customer attribute not saving on admin

texts:
I created new custom customer attribute, it is added to admin edit customer page but its value cannot be saved.

In /Vendor/Module/Setup/CustomerSetup.php

use Magento\Eav\Model\Config;
use Magento\Eav\Model\Entity\Setup\Context;
use Magento\Eav\Setup\EavSetup;
use Magento\Framework\App\CacheInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory;

class CustomerSetup extends EavSetup {

protected $eavConfig;

public function __construct(
    ModuleDataSetupInterface $setup,
    Context $context,
    CacheInterface $cache,
    CollectionFactory $attrGroupCollectionFactory,
    Config $eavConfig
    ) {
    $this -> eavConfig = $eavConfig;
    parent :: __construct($setup, $context, $cache, $attrGroupCollectionFactory);
}

public function installAttributes($customerSetup) {
    $this -> installCustomerAttributes($customerSetup);
    $this -> installCustomerAddressAttributes($customerSetup);
}

public function installCustomerAttributes($customerSetup) {

    $customerSetup -> addAttribute(\Magento\Customer\Model\Customer::ENTITY,
        'invoice_email',
        [
        'label' => 'invoice email',
        'system' => 0,
        'position' => 100,
        'sort_order' =>100,
        'visible' =>  true,
        'note' => '',
        'type' => 'varchar',
        'input' => 'text',

        ]
        );

    $customerSetup -> getEavConfig() -> getAttribute('customer', 'invoice_email')->setData('is_user_defined',1)->setData('is_required',0)->setData('default_value','')->setData('used_in_forms', ['customer_account_edit']) -> save();

}

public function installCustomerAddressAttributes($customerSetup) {

}

public function getEavConfig() {
    return $this -> eavConfig;
}
}

And in Vendor/Module/Setup/InstallData.php

namespace Wetag\InvoiceEmail\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;

/**
* @codeCoverageIgnore
 */
class InstallData implements InstallDataInterface
{
/**
 * EAV setup factory
 *
 * @var EavSetupFactory
 */
private $eavSetupFactory;

/**
 * Init
 *
 * @param EavSetupFactory $eavSetupFactory
 */
public function __construct(EavSetupFactory $eavSetupFactory)
{
    $this->eavSetupFactory = $eavSetupFactory;
}

/**
 * {@inheritdoc}
 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
 */
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    /** @var EavSetup $eavSetup */
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    if (version_compare($context->getVersion(), '1.0.0') < 0){

            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $customerSetup = $objectManager->create('Wetag\InvoiceEmail\Setup\CustomerSetup');
            $customerSetup->installAttributes($customerSetup);

    }

}
}

How can i edit the attribute so it can be saved in front end and baackend (i tried to create an observer but this return an infinite page loading when saving the customer: infinite loop)


texts:
Getting an error during credit card checkout as "CartId is a required field"
But i don't get this error in COD.


texts: Magento 2 Set Product as New when new product is created

texts:
Whenever I create a new product I want to set the attributes "Set Product as New From" and "To" automatically. For example now(), now()+1month.

Isn't this a core feature and setting in Magento 2?


texts: Can not create shipment for guest Magento 2.2.6

texts:
I have placed an order as Guest and the order has been received and the status is as pending, when I am trying to create a shipment for the order I get the error No such entity with customerId =.
But while creating a shipment for an order of registered customer the error is not shown.


texts: Quick Simple Product Creation doesn't appear

texts:
I would like to create simple products from a configurable product, but the "quick simple product creation" dialog does not appear when I create a new configurable product. The dialog is described here: http://www.magentocommerce.com/knowledge-base/entry/configurable-product-step-4-add-associated-products

How can I quickly create simple products with the correct options from a configurable product?


texts: Magento 2.3.3 Icons not showing correctly

texts: Fresh install of 2.3.3 with Luma theme sample data. The icon in the navigation bar and the search bar aren't showing correctly. Any ideas?


texts:
I am trying to overwrite a core template and add my custom logic using a viewModel as follows:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="name.of.the.core.block" template="Vendor_CustomModule::path/to/template.phtml">
        <arguments>
           <argument name="viewModel" xsi:type="object">Vendor\CustomModule\ViewModel\Class</argument>
        </arguments>
    </referenceBlock>
</body>

But it's not working.
I know it is possible to inject viewModels into blocks but not sure if it is possible by referencing an existing block?


texts: How to join a custom table and show its attribute on Magento 2 rest Api getList() function?

texts:
Im creating a custom product Api with searchCriteria from \Magento\Catalog\Model\ResourceModel\Product\Collection
And I joined other table to this collection;
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
{
    /** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */
    $collection = $this->collectionFactory->create();
    $collection->getSelect()->joinLeft(array("vendorProduct"=>'ced_csmarketplace_vendor_products'), 'e.entity_id = vendorProduct.product_id',array('vendor_id' => "vendor_id"));

    $this->extensionAttributesJoinProcessor->process($collection);

    $collection->addAttributeToSelect('*');
    $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');
    $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');

    $this->collectionProcessor->process($searchCriteria, $collection);

    $collection->load();

    $collection->addCategoryIds();
    $this->addExtensionAttributes($collection);
    $searchResult = $this->searchResultsFactory->create();

    $searchResult->setSearchCriteria($searchCriteria);
    $searchResult->setItems($collection->getItems());
    $searchResult->setTotalCount($collection->getSize());

    return $searchResult;
}

The joined data not show when I call this Api.
But if I "return $collection->getData();" it will show the joined data.


texts: Magento 2.3 Custom Order Status Reverts Back to Processing

texts:
I have created an custom order status by following below link.
https://docs.magento.com/user-guide/sales/order-status-custom.html
named "Online Payment Success" and I set this  status to my order when a Invoice is generated for that order using event named "sales_order_invoice_pay" everything seems to work fine in my local setup but when I pushed the code to server the status is set but reverts back to processing
Code in Observer
<?php
namespace Vendor\Module\Observer;
use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;
class SalesOrderStatus implements ObserverInterface
{
    /**
    * @param EventObserver $observer
    * @return $this
    */
    public function __construct(
        \Magento\Sales\Model\Order $order
    ){
        $this->order = $order;
    }
    public function execute(EventObserver $observer)
    {
            $currentOrder=$observer->getEvent()->getInvoice()->getOrder();
            $paymentMethod  = $currentOrder->getPayment()->getMethodInstance()->getCode();
            if($paymentMethod=="braintree" || $paymentMethod=="paypal_express")
            {
                $currentOrder->setState(\Magento\Sales\Model\Order::STATE_PROCESSING, true);
                $currentOrder->setStatus("payment_captured");
                $currentOrder->addStatusToHistory($currentOrder->getStatus(),"Invoice Generated");
                $currentOrder->save();
            }

    }
}


texts: WYSIWYG Editor media url not working in magento 2.4.0

texts:
Add this code WYSIWYG Editor

but it's not working in magento 2.4.0


texts: Magento 2 : Add header and Footer in Checkout custom theme

texts:
I need to add header and footer on checkout page. i have try below code for this but its not working its display only Logo on Header i want to add full header with menu and top links.

app/design/frontend/Package/theme/Magento_Checkout/layout/override/base/Magento/blank/checkout_index_index.xml

Code :

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="header.panel" remove="false" />
    <referenceBlock name="catalog.topnav" remove="false"/>
    <referenceContainer name="footer-container"  remove="false"/>
</body>


texts: Where does the page Identifier set in Magento 2

texts:
We are using Porto theme and I want to echo the store id inside of the body tag as a extra class.
So for instance on our category page we get this:
< body data-container="body" class="page-with-filter page-products categorypath-gear-fitness-equipment category-fitness-equipment layout-1140 wide catalog-category-view page-layout-2columns-left" >

And i want to add inside of the class="" the extra "store id". But i don't know how this is set.
I think it's been set inside of the xml, but can't figure out where.
Can someone please help me, and if it has to be created with a module.. can you please explain how.


texts: Why Sales rule (Coupon) not working for variant of virtual configurable product?

texts:
I created salesrule (coupon) for variant of virtual configurable product, but coupon is not working . Sku of the products variant (variant is as a simple product) - ps_262_549, configurable product skus - ps_262. for ps_262 it is working, but not working for ps_262_549.

But coupon code works for variant of configurable products, if order create via admin panel


texts: Magento 2 single store mode still exports products for both store views?

texts:
Why is a magento 2 site in single store mode still exporting products from global and store view stores?

These products were initially migrated using the data-migration-tool from magento 1


texts: magento 2 REST API for cutom collection based on store code

texts:
magento 2 REST API for custom collection based on store code how to pass store id

rest/store_code/V1/banners

rest/ar/V1/banners

different store having different banners so how to get the banners collection  based on store code


texts: Magento upgrade version 1.9.4.1 to 1.9.4.3

texts:
How do I upgrade my site Magento version 1.9.4.1 to 1.9.4.3

Please give me suggestion how can I do this
I take all backup file in an old version in site
so how can I upgrade through a command line
or manually give me suggestions fast.

Thanks in Advance


texts: Magento 2: How to exclude/hide products from Search?

texts:
I still want to be able to access to some products through the URL but exclude them from the Search bar
I am using elasticsearch7
Thank you in advance
EDIT:
Ideally, to do it programmatically


texts: My Mage_Shell script doesn't work: Mage::getModel() can't find class

texts:
So, I just ran into this and scratched my head quite a few times and since the Magento bug tracker is dead, let's do it here.

Symptom:

Class 'MyNameSpace_MyModule_Helper_Data' not found in /var/www/example.com/app/Mage.php on line 547

This happens when a script is run, based on shell/abstract.php. The site works fine, so I know that the helper/model/block is working. What's going on?


texts:
I have a marketplace assign product also i used ajax cart in my site

in below form if more then one seller is there it will be display check the link http://kidsdial.com/peacock-bebe-blocks-set-no-7.html

My problem is if i add a second seller product into the cart it won't add first seller price only added

I think problem is id anyone help me out this

<form action="<?php echo Mage::helper('checkout/cart')->getAddUrl(Mage::registry('current_product')); ?>" method="post" id="product_addtocart_form1">

    <button id="<?php echo $seller->getMpassignproductId() ?>"  class="button btn-cart customaddtocart" title="<?php echo $this->__('Add to Cart')?>">

    <?php echo $this->__('Add to Bag')?></button>

    <button class="button buy-now" onclick="location.href ='{{config path="web/unsecure/base_url"}}/checkout/cart/add?product=1&qty=1'">
    Buy Now</button>

</form>

My .js File

if(el.up('form#product_addtocart_form1')){
                    var url =   $('product_addtocart_form1').readAttribute('action');
                    var link = url.replace('checkout','ajaxcart').replace('wishlist/index','ajaxcart/wishlist').replace('https','http');
                    el.onclick = function(){
                        if(productAddToCartForm.submit){
                            var emajcForm = productAddToCartForm;
                            if (('undefined' != typeof productAddToCartFormOld) && productAddToCartFormOld)
                                emajcForm   =   productAddToCartFormOld;
                            if(emajcForm.validator && emajcForm.validator.validate()){
                                jQuery('#product_addtocart_form1').ajaxForm(options);
                                $('product_addtocart_form1').setAttribute("action", link);
                                jQuery('#product_addtocart_form1').submit();
                            }
                        }
                        return false;
                    }
                }


texts: Shopping Cart total percentage discount when specific item is in cart

texts:
I have a specific type of shopping cart rule I'd like to create. You can think of it as a 'variety discount'; the more products from different categories the customer has in their basket, the greater a discount they get from their order:
Example
Categories:

Shoes (3% discount)

Coats (2% discount)

Jackets (2% discount)

Sale (Exempt from discount)

Accessories (5% discount)

Scenario:

A customer adds a product to the (empty) cart from category Shoes worth £40, this adds a 3% discount to the cart total, resulting in £38.80 (40 - 3%)

Then a product from the Coats category worth £200 is added to the cart. The total discount increases to 5% for the cart total, resulting in £228 (240 - 5%)

A second product from shoes is added worth £30. As the price rule has already been applied, the discount isn't affected, resulting in a total of £256.50 (270 - 5%)

A sale item is added to the cart worth £10, at a reduced price of £8. This is exempt from the deduction for the other products, giving a total of £264.5.

The Shopping Cart Price Rule interface allows you to discount a fixed amount from the cart, and the alternative is applying a percentage amount to items that match the conditions set.
Is the described scenario above possible without writing a custom extension? If not some advice on where to get started would be appreciated as Magento is still a little alien to me.


texts: How to get category URL in multiple stores

texts:
I'm trying to generate the href links for our multilingual Magento 2 site, and as the category slug changes, I cannot simply replace the store code in the URL.

I've code is given below :

        $category = $this->_registry->registry('current_category');

        if (!$category->getId()) {
            throw new LocalizedException(__('Failed to initialize category'));
        }

        $categoryId = $category->getId();

        foreach ($this->_storeManager->getStores() as $store) {
            $locale = $this->_scopeConfig->getValue('general/locale/code', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $store->getStoreId());
            $category->setStoreId($store->getStoreId());
            $category->load($categoryId);

            if($category->getIsActive())
            {
                $output[$locale] = $category->getUrl();
            }
        }

It seems to work except that the $category->getUrl() always return the current store URL, even if I loaded the category from another store. Is it a bug or should I do something else?

So how get multiple store category URL ?


texts: Magento 2 : How can i get all category with all eav attributes in collection?

texts:
How can I get all categories with all EAV attributes in the collection?

$categories = $objectManager->create('Magento\Catalog\Model\ResourceModel\Category\Collection');
$categories->addAttributeToSelect('*');

  $categories->getData(); give me the following data

I want all available EAV attributes in this collection


texts: How I can get string truncate method in Magento 2 like Magento 1?

texts:
In Magento 1 I use:

Mage::helper('core/string')->truncate($string, $length, '...', $remainder)

How I can use a native method to truncate strings in Magento 2?


texts: Magento 1 : How to fetch the Customer Group Prices of Catalogue Prices (Promotional Rules) Prices of Group Products?

texts:
Let's have I have 10 Grouped products and setup the multiple Promotional Rules for different Customer Groups.

Rule 1 :
Conditions met X

Actions - Retailer => get can the 5% discount

Rule 2 :
Conditions met Y

Actions - Retailer => get can the 7% discount

Rule 3:
Conditions met X

Actions - Wholesaler => get can the 10% discount

Rule 4 :
Conditions met Y

Actions - Wholesaler => get can the 14% discount

How to fetch the final price of all Grouped Products. No tax in the game.

Settings are as it is what Magento 1 provides.


texts: Is it necessary to keep the encryption key always same even if we change the server - Magento 2

texts:
Is it necessary to keep the encryption key always same even if we move the website to a new server. And if we change how the already registered customer's login/password will work as these customers passwords generated using the old key.
Please advise.
Encryption Key -> app/etc/env.php


texts: Magento2 : When edit data the data cannot be display?

texts:
When edit the data cannot be display in form while using ui-component under edit tabs. And also the data save as empty.

Anyone know how to solve it? ``

            sample_form.sample_form_data_source

        Sample Information
        true

            left
            tabs

            sample_form.sample_form_data_source

                Magento_Ui/js/form/provider

                id
                id

            Account Information

                    infromation

                text
                false

                    infromation

                text

                    infromation

``Thanks in advance.


texts: 301 Redirect Multiple Url using .htaccess Magento 2

texts:
I'm trying to 301 redirect multiple urls to new url.

Using .htaccess File.

What changes i have to make in .htaccess


texts:
I installed Magento 2.0, but when I go in app folder there is no code folder. So is Magento 2.0 installed properly or not?
Or when I go into app/design/frontend/Magento/, there is nothing in this folder.

Can anyone tell me that magento 2.0 install properly or not?


texts: Updating Copyright / making private on Admin login

texts:
I know how to change the copyright info on a customer view, but how do I get rid of the magento copyright on the admin login box?

I'm working on a multi-vendor store and want no reference to Magento (mainly for security purposes).


texts: changing default quantity of magento's grouped product from 0 to 1

texts:
For the simple product i can set the minimum quantity of a product from System > Configuration > Inventory > Product Stock Options > Minimum Qty Allowed in Shopping Cart , But in grouped product there still it shows the default quantity 0.

I grouped product's default quantity to be 1 instead 0.


texts: How to add text under the countries in checkout shipping address

texts: How to add text between countries and phone number magento2 checkout shipping address.


texts: How to find the Delivery Date Selected While Checkout?

texts: We are using Firecheckout. There's an option to choose Delivery Date while checkout but How can we find the Customer selected delivery date in "Order View" from website admin?


texts: How to downgrade magento ver 2 from 2.2.2 to 2.1.10?

texts:
Recently, i upgraded from 2.1.7 to 2.2.2 and right now i have a lot of issue so

Can i downgrade from 2.2.2 to 2.1.7?

Thanks


texts: Is there a way to remove deps config in requirejs-config.js in the other module?

texts:
I'm following the steps in this article on a default Magento sample data version and I want to remove 'mage/translate-inline' ADM from injected into the page. See here - https://prnt.sc/t7ao6j
Is there a way to remove deps config in requirejs-config.js in the other module from my module?


texts: How to upgrade resource to admin user role

texts:
I create an admin user role from setup using this code,

$role=$this->_roleFactory->create();
$role->setName('test')
     ->setPid(0)
     ->setRoleType(RoleGroup::ROLE_TYPE)
     ->setUserType(UserContextInterface::USER_TYPE_ADMIN);

$role->save();
$resource=[
  'Magento_Backend::admin'
];

$this->_rulesFactory->create()
     ->setRoleId($role->getId())->setResources($resource)->saveRel();

But I want to add a new resource to this role, using UpgradeData.

Is there any solution?


texts: Configurable Products Super product attribute prices don't add on

texts:
Magento CE 1.7.02. I have a problem with configurable product pricing. I think I understand how it's supposed to work (config product price + super attribute price). I have several configurable products that work fine (about 50). However, I noticed the other day that one was not working and have now found two more not working.
They display correctly, and the dropdowns are there to select the options, showing the correct price differences. However, when the required option is selected, the price does not add on, the quantity does not increment, and the checkout does not work. The page is not locked, but nothing happens. You can select another option for the same base configurable product, but they all do the same thing.
I have flushed all caches, re-indexed, deleted these products and recreated - same thing. I cannot re-create a configurable product that works, EXCEPT if I use the attributes of one of the other products that DOES work. SO I think it is related to the attributes, but I have been thru all the attribute settings comparing the ones that work to those that don't. No differences I can see. I stumped. What do I do now?
I'm a Magento beginner, and no programmer, so if anyone can help I'd really appreciate it.
Thanks


texts: Magento 2.2.5 checkout page custom field value not getting in Observer

texts:
Triggered "checkout_onepage_controller_success_action" event but custom checkout field value not getting in observer.

How can I save checkout page custom field data with other checkout details to a custom table using observer.

Created a "sms" custom field on checkout page

namespace EdmondsCommerce\Sms\Plugin;

use Magento\Checkout\Block\Checkout\LayoutProcessor;

class SmsPlugin
{
    public function afterProcess(LayoutProcessor $subject, $jsLayout) {
        $customAttributeCode = 'sms';
        $customField = [
            'component' => 'Magento_Ui/js/form/element/abstract',
            'config' => [
                // customScope is used to group elements within a single form (e.g. they can be validated separately)
                'customScope' => 'shippingAddress.custom_attributes',
                'customEntry' => null,
                'template' => 'ui/form/field',
                'elementTmpl' => 'ui/form/element/input'
            ],
            'dataScope' => 'shippingAddress.custom_attributes' . '.' . $customAttributeCode,
            'label' => 'Custom SMS Attribute',
            'provider' => 'checkoutProvider',
            'sortOrder' => 0,
            'validation' => [
                'required-entry' => true
            ],
            'options' => [],
            'filterBy' => null,
            'customEntry' => null,
            'visible' => true,
        ];

        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['shipping-address-fieldset']['children'][$customAttributeCode] = $customField;

        return $jsLayout;
    }
}

Extension attribute code

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Quote\Api\Data\AddressInterface">
        <attribute code="sms" type="string" />
    </extension_attributes>
</config>

event.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

   <event name="checkout_onepage_controller_success_action">
        <observer name="checkout_onepage_observer" instance="EdmondsCommerce\Sms\Observer\TestObserver" />
    </event>

Observer Code

namespace EdmondsCommerce\Sms\Observer;
use Magento\Framework\Event\ObserverInterface;
 use Magento\Framework\App\RequestInterface;

class TestObserver implements \Magento\Framework\Event\ObserverInterface
{
    protected $_checkoutSession;

    public function __construct(\Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation) {

        $this->_checkoutSession = $checkoutSession;
        $this->_addressInformation = $addressInformation;

    }

    public function execute(\Magento\Framework\Event\Observer $observer){

        $order = $this->_checkoutSession->getLastRealOrder();

        $shippingAddress = $this->_addressInformation->getShippingAddress();
        $shippingAddressExtensionAttributes = $shippingAddress->getExtensionAttributes();
        if ($shippingAddressExtensionAttributes) {
            $sms = $shippingAddressExtensionAttributes->getSms();
            echo $sms;
            exit();

        }
    }
}


texts: How to alphabetically in ascending order designers name(a-z)

texts:
I am new in Magento. I need to fix the women's apparel page. on my website multiple designers products. How the designer's product display alphabetically
Ex. Ahana, Boutique, Carlisle etc.
I am working as a front-end developer/Graphic Designer.

My Website Url : https://wardrobetreasures.com/women


texts:
After made that: How to change Magento timezone

My magento regional time was Europe/Paris but I tried to change to Europe/Budapest (both are the same..)

AOE Scheduler says

  Last heartbeat is older than one hour. Please check your settings and
  your configuration!

What I have made:

Mage.php (before)

            date_default_timezone_set('UTC');

Mage.php (after)

            date_default_timezone_set('Europe/Budapest');

config.xml (before)

        <locale>
            en_US
            <timezone>America/Los_Angeles</timezone>
        </locale>

config.xml (after)

        <locale>
            en_US
            <timezone>Europe/Budapest</timezone>
        </locale>

I tried to

Disable all schedules and remove programmed
Disable cron job system
Enable cron job system again
Enable all schedules and re build programs.

But the problem keeps :/

Is like the cron job hour is advanced (real hour 11:36 in Spain):

Sugestions? Thanks!!


texts: Magento hide / show coupon field in cart page

texts:
I'm using Magento 1.7 and I need a solution or at least some directions in order to solve the following issue:

I want to hide the coupon field in the cart page and replace it with a link that says "Have a coupon? Click here to use it". When the link is clicked, the coupon form should appear and the customer can enter his code. I've searched everywhere and I can't find a solution, which seems really weird since everybody is recommending that the coupon field should not be prominent in the cart page.
Any help will be greatly appreciated.

Thanks in advance.


texts:
I have an issue with my Magento's database (Magento 1): in few days, doing several times the reindexing process, the table 'core_url_rewrite' weighs about 10 GB and the server stops to work. Then, both the frontend and the backend become unable to be reached.

How can I solve it?


texts: we installed ParadoxLabs AuthorizeNetCim payment method but not working in Celigo

texts:
we installed ParadoxLabs AuthorizeNetCim payment method which having code "authnetcim".

One of our customer choose above payment method and place order after celigo sync that order to thier system "Celigo Software".

When we generated shipment using Celigo Software it gives error  "authnetcim" such "Payment method not available"

Can you help ASAP...


texts: Magento 2: Product URL Suffix problem with search (2.3.1)

texts:
We removed the values for url suffix from the configuration (removed .html). After rebuilding cache and reindexing from CLI the store works correct but the search function for some reason doesn't. The search results still go to .html urls and therefore get an 404 page. Also tried to remove all static content and rebuild but that doesn't work.

How to fix this?


texts: Magento 2.1 - Cancel an order [ configurable product ] issue

texts:
I'm so confused about cancelling orders in Magento.

I made an issue post in Magento2 github repository explaining my problems.

1st issue :

NB : All the products are configurable

The test products :

Product 1 :

Chaz Kangeroo Hoodie
SKU: MH01-XS-Black
Color: Black
Size: XS

Product 2 :

Chaz Kangeroo Hoodie
SKU: MH01-M-Orange
Color: Orange
Size: M

Add the 2 configurable products above to the cart [product 1 qty 2
product 2 qty 3]
Place the order Invoice & ship partially the order
Cancel the order

Magento still shows "Cancel button" after i canceled the order
When i click on Cancel again, it returns to the old state

See the video
https://youtu.be/hA7Ov6t3P-Q

For the other issues :

#5313


texts: Issue : when i click Payment Methods tab all the page is keep loading in admin panel

texts:
In My admin panel when i click the Payment Methods section the entire page is loading.The loading is not stopping.Payment Services tab is working fine.Any one faced this issue here before.Expecting your advice regarding this.

I Noticed this after i installed a Stripe payment module.So i remove this and check the same thing happening.So my issue is not because of stripe payment gateway module.

UPDATE

Browser console error.


texts: Adding attributes to “list.phtml” for compare page

texts:
I want to show all attributes of a product in compare page. I added this code in catalog/product/compare/list.phtml but I get this error:

<?php echo (
        (
            $_item->getProduct()->getResource()->getAttribute('admin_rating')->getFrontend()->getValue($_item->getProduct() )
            && $_item->getProduct() ->getResource()->getAttribute('admin_rating')->getFrontend()->getValue($_item->getProduct() ) != "Nein"
        )
        ? $_item->getProduct() ->getResource()->getAttribute('admin_rating')->getFrontend()->getValue($_item->getProduct() )
        : ''
    ); ?>

  ERROR: Fatal error: Call to a member function getResource() on a non-object in ...\app\design\frontend\base\default\template\catalog\product\compare\list.phtml on line 78

What's wrong?