texts: Magento2.4 refused to load all external resources

texts:
I have a Magento2.4 website and when I view the console I see the below errors. I read about creating a CSP module to whitelist the domain names however it does not seem to work? I do see Mycompany_Cspmodule listed as enabled when I view a list of modules on the command line
[Report Only] Refused to load the script 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js' because it violates the
following Content Security Policy directive: "script-src assets.adobedtm.com
secure.authorize.net test.authorize.net www.googleadservices.com www.google-analytics.com
www.paypalobjects.com js.braintreegateway.com www.paypal.com geostag.cardinalcommerce.com 1eafstag.cardinalcommerce.com geoapi.cardinalcommerce.com 1eafapi.cardinalcommerce.com songbird.cardinalcommerce.com includestest.ccdc02.com www.sandbox.paypal.com t.paypal.com s.ytimg.com video.google.com vimeo.com www.vimeo.com www.youtube.com *.payments-amazon.com *.payments-amazon.co.uk *.payments-amazon.co.jp *.payments-amazon.jp *.payments-amazon.it *.payments-amazon.fr *.payments-amazon.es *.avada.io yotpo.com www.yotpo.com p.yotpo.com staticw2.yotpo.com w2.yotpo.com 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

I have the website in production mode.
I also have a custom module I thought would fix this but guess am missing something.
I have the following custom module folder and files setup
app/code/Mycompany/Cspmodule/etc/config.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
    <csp>
        <mode>
            <storefront>
                <report_uri>https://www.example.com/</report_uri>
            </storefront>
            <admin>
                <report_uri>https://www.example.com/</report_uri>
            </admin>
        </mode>

    </csp>
</default>

app/code/Mycompany/Cspmodule/etc/csp_whitelist.xml

 <csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp/etc/csp_whitelist.xsd">
 <policies>
    <policy id="default-src">
        <values>
            <value id="cloudflare" type="host">*.cloudflare.com</value>
            <value id="twitter.com" type="host">*.twitter.com</value>
            <value id="fontawesome" type="host">*.fontawesome.com</value>
            <value id="googlemaps" type="host">*.googleapis.com</value>
            <value id="yotpo" type="host">*.yotpo.com</value>
            <value id="maxcdn" type="host">*.bootstrapcdn.com</value>
            <value id="maxcdn" type="host">*.google-analytics.com</value>
        </values>
    </policy>
 </policies>
</csp_whitelist>

app/code/Mycompany/Cspmodule/etc/module.xml
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
  <module name="Austinwilliams_Cspmodule" setup_version="1.0.0"/>
</config>

app/code/Mycompany/Cspmodule/registration.php
<?php
  use Magento\Framework\Component\ComponentRegistrar;

  ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Mycompany_Cspmodule', __DIR__);


texts: How to add float or decimal field using declarative schema in magento 2?

texts:
I have to create a table using declarative schema in Magento 2.3.5. Please advise me how to create decimal/float field using xml.
<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="tp_directory_city" resource="default" engine="innodb" comment="City Directory Table">
        <column xsi:type="int" name="id" padding="11" unsigned="true" nullable="false" identity="true" comment="ID"/>
        <column xsi:type="int" name="region_id" nullable="false" unsigned="true" padding="11" comment="Region ID"/>
        <column xsi:type="varchar" name="city_code" nullable="false" length="25" comment="City Code"/>
        <column xsi:type="varchar" name="name" nullable="false" length="255" comment="City Name"/>
        <column xsi:type="decimal" name="shipping_price" nullable="false" length="255" comment="City Name"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
    </table>
</schema>


texts: Get order object inside email_order_set_template_vars_before event observer

texts:
I have observer for email_order_set_template_vars_before where i am setting some email template variable to use in order confirmation email.

Now i want to find which products customer has ordered in that order and depending on that set value for email template variable.

So how can i access order object inside this observer method?


texts: Magento PayPal order - Money taken - Not showing as an order in the backend

texts:
Hi so as of a few days ago PayPal orders are being charged but no order appears in the backend and no customer emails are sent.

I went into PayPal IPN settings and the return URL was:
http://example.com/credit/ppcb.asp

I did some looking around and tried:
http://www.example.com/index.php/paypal/standard/success/

I did the checkout myself, it goes to a success page and gives me an order number but this never goes into the Sales grid and no confirmation email is sent.

I am just stumped if anyone can suggest anything that would be great!

EDIT:
A few errors that are appearing around the time of the order system.log

  2015-08-19T08:58:13+00:00 ERR (3): Warning: Missing argument 3 for Mage_Review_Block_Helper::getSummaryHtml(), called in /var/www/vhosts/example.com/site1/app/design/frontend/default/sns_nova/template/sns/ajaxcart/checkout/cart/mini-cart/default.phtml on line 176 and defined  in /var/www/vhosts/example.com/site1/app/code/core/Mage/Review/Block/Helper.php on line 41

  2015-08-19T08:58:13+00:00 ERR (3): Notice: Undefined variable: displayIfNoReviews  in /var/www/vhosts/example.com/site1/app/code/core/Mage/Review/Block/Helper.php on line 49

  2015-08-19T08:58:15+00:00 ERR (3): Warning: Invalid argument supplied for foreach()  in /var/www/vhosts/example.com/site1/app/code/local/Sns/Ajaxcart/Block/Cart/Ajaxcart.php on line 36


texts: how to find and use defined variables of less in magento 2?

texts:
basically i want to use the defined less variables in my custom theme.i have created a child theme of Luma .In child theme i have created a _theme.less file and by using the defined variables of less i changed the header panel background color by using

@header-panel__background-color: @color-black;

but i am confused where is the @header-panel__background-color is defined .i have searched also in lib folder but can't find any result.


texts: Magento 2 Payment methods reload on Checkout

texts:
The task is to make some restrictions on payment method, but only after they are loaded on checkout page.
User select one of payment methods and after that I need to do some logic and if it return false show message to user and hide this method.

I have overried Magento_Checkout/js/action/select-payment-method like here Magento 2 - discount depend on Payment Method does not work but don't know what to do next?


texts: In magento, in "Customer Grid", how can I fix to show data in "Name" column in all records?

texts: In magento "Customer Grid", data in "Name" column is missing in some rows and showing in some rows. How can I fix to show data in "Name" column in all records?


texts: How to show validation error from Observer on frontend?

texts:
I'm customizing one page checkout and want to add validation of new field during billing step. To make this validation I don't want to rewrite controller or model, but want to use observer controller_action_predispatch_checkout_onepage_saveBilling make all validation here and save field to Mage::getSingleton('customer/session') if it's ok or trigger an error. But I don't see any way how to add error and show it on front. I'm trying:

return array('error' => -1, 'message' => $helper->__('Your card number or zipcode are not correct.'));

Mage::app()->getResponse()->setBody(Mage::helper('core')->jsonEncode(array('error' => -1, 'message' => $helper->__('No card number was found in loyalty request'))));

I can throw exception:

 Mage::throwException('Error');

Than execution stops but I can't show error message.

Is there any way how to solve it?


texts:
I need to add Nigerian regions/states to the database. So I created and successfully imported the "directory_country_region.csv" and "directory_country_region_name.csv" files to the "directory_country_region" and "directory_country_region_name" tables via phpMyAdmin. Then, I tried importing "tablerates.csv" into Magento admin, but I got the following error message again:

We couldn't import this file because of these errors: Please correct Region/State "Abia" in the Row #2.
Please correct Region/State "Abuja" in the Row #3.
Please correct Region/State "Adamawa" in the Row #4.
Please correct Region/State "Akwa Ibom" in the Row #5.
Please correct Region/State "Anambra" in the Row #6.
Please correct Region/State "Bauchi" in the Row #7.
Please correct Region/State "Bayelsa" in the Row #8.
Please correct Region/State "Benue" in the Row #9.
Please correct Region/State "Borno" in the Row #10.
Please correct Region/State "Cross River" in the Row #11.
Please correct Region/State "Delta" in the Row #12.
Please correct Region/State "Ebonyi" in the Row #13.
Please correct Region/State "Edo" in the Row #14.
Please correct Region/State "Ekiti" in the Row #15.
Please correct Region/State "Enugu" in the Row #16.
Please correct Region/State "Gombe" in the Row #17.
Please correct Region/State "Imo" in the Row #18.
Please correct Region/State "Jigawa" in the Row #19.
Please correct Region/State "Kaduna" in the Row #20.
Please correct Region/State "Kano" in the Row #21.
Please correct Region/State "Katsina" in the Row #22.
Please correct Region/State "Kebbi" in the Row #23.
Please correct Region/State "Kogi" in the Row #24.
Please correct Region/State "Kwara" in the Row #25.
Please correct Region/State "Lagos" in the Row #26.
Please correct Region/State "Nasarawa" in the Row #27.
Please correct Region/State "Niger" in the Row #28.
Please correct Region/State "Ogun" in the Row #29.
Please correct Region/State "Ondo" in the Row #30.
Please correct Region/State "Osun" in the Row #31.
Please correct Region/State "Oyo" in the Row #32.
Please correct Region/State "Plateau" in the Row #33.
Please correct Region/State "Rivers" in the Row #34.
Please correct Region/State "Sokoto" in the Row #35.
Please correct Region/State "Taraba" in the Row #36.
Please correct Region/State "Yobe" in the Row #37.
Please correct Region/State "Zamfara" in the Row #38.

Those regions/states are already in the database. What else can I do to successfully import the tablerates.csv?

Update

The following is my tablerates.csv file:

Thanks in advance.


texts: Implementing older Magento version support in upgrade scripts

texts:
Background: I have some upgrade scripts, which implement methods only supported by new Magento versions. Magento 1.4 lacks these methods.

Task: My task is to implement support of Magento 1.4 in these scripts.

Solution: Currently I see this as checking if Magento version is higher then something, use the existing method, if lower then something, use plain MySQL / some methods that exist in Magento 1.4 / Zend, that result in same.

Problem: It is hard to understand what plain MySQL corresponds to methods, which I need to implement.

Questions:

Is there a way to monitor the database for all scripts that get executed ?
Is there a manual for Magento 1.4 methods that can be used in upgrade scripts ?
Am I on the right path to solve this case ?


texts: Magento 2: Use a model with a dynamic name

texts:
I have a M1 module that I'm looking at porting to M2, and part of one of helpers contains code that looks like this:

public function getModel($code)
{
     return Mage::getSingleton('vendor/package_model_' . $code);
}

Given that Magento 2 uses dependency injection, I know that I can specify that I'd like an instance of \Vendor\Package\Model\Interface, but how can I specify that I'd like a specific model?

I'd like to follow best practice, so if it's possible to avoid doing this directly through the ObjectMananger then that would be ideal, but if that's the only option then that's OK too.


texts: How should i implement modman in my project?

texts: I have a Magento project directory, And now we want to implement Modman with the project, so where should I start the Modman? and where to put the .modman folder?


texts: In Magento 2, what is the best practice for loading some CSS for a custom widget, so that the stylesheet only loads when the widget is present?

texts:
I have created a Magento 2 widget that displays a list of categories, similar to the one shown in this guide. The widget outputs the correct HTML, so now I need to add some styling to it to make it look nice.

In my reading on the internet, I have found that I can tell Magento to load a CSS file

under the default layout file, which I presume will make it appear on all pages, or
in a layout file that is specific to a single layout handle (for example, catalog_product_view).

What I am not understanding is how I can tell Magento to ONLY load that CSS file if the widget is present on a given page. Obviously, I can simply hard-code the path to a CSS file in the widget template itself, but this seems hacky. It would also mean that Magento has no way to know to compile/minify that CSS file.

I found a similar question about Magento 1, but the only answer is suggesting to do the exact thing I want to avoid: Having to hard-code the CSS include in the template file.

Disclaimer: Some of my assumptions may be incorrect, so feel free to correct me accordingly.


texts: Change PDF engine for Email Attachments by Fooman

texts: I'm using Firegento as PDF engine for invoice, etc (as part of Magento DE). Fooman's Email Attachments takes the standard Zend engine. Is it possible to change the setting to take the Firegento engine instead so the order PDF looks the same like invoice, shipping list, etc.


texts: How to commit & push Magento's vendor directory file in Magento Cloud?

texts:
I have made changes in,

  Magento/vendor/magento/module-checkout/Model/PaymentInformationManagement.php

I have made changes in above file, But how can I commit these changes and PUSH it to Magento cloud as it will not show in git diff.

Any idea how to push changes of vendor DIR files on Magento Cloud ?

  Note : I don't want to override in my app directory as it is bug and I
  want fix it in direct file.


texts: Magento1 compilation breaks shopping cart

texts:
Using Magento version 1.9.3.1 on a live store setup. When compilation is enabled, the shopping cart gives a blank screen. The actual checkout page loads fine, but the shopping cart is blank

More info on the problem below:

https://www.iweb.co.uk/2012/02/fix-magento-cartcheckout-blank-page-with-compilation-enabled/

But the solution proposed in above post, doesn't work for us. We already have persistent shopping cart disabled. We've tried disabling any plugin that is related to the cart or checkout process, but still blank page. Obviously not able to get any log errors.

Any suggestions on how to debug or find solution? Thanks.


texts: Products visible only on the search page

texts:
Products are visible only on the search page, but not available on the category page.

Admin products visibility on Catalog and Search:

Category page screen:

Category page filters show the count of products:

Search success:


texts:
I need to call a webservice to ckeck the stock of products in my cart. I added this observer:

MyModule/etc/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_postdispatch_checkout_index_index">
        <observer name="checkout_page" instance="Fcnet\Order\Observer\CheckStockBeforeValidateCart" />
     </event>
</config>

MyModule/Observer/CheckStockBeforeValidateCart

class CheckStockBeforeValidateCart implements ObserverInterface
{
....
 public function execute(EventObserver $observer)
    {

        $this->_logger->debug('------- OK -------');

    }

}

This observer is not called all the time, it is completely random. Is there another event or should I change something for this call to be made each time the cart is validated?


texts: Dynamic comments for product create/update form fields

texts:
I need to display message to admin in front of some custom product attribute, For example "Donation" fields which take decimals, I need to display message to admin that say's 20% is a minimum donation for this product.

This 20% will be different for other product, for some product it may be 15% or 10%. I have custom module that stores donation percentages to database.

My question is from database how Can I display message [like field comment] with dynamic message content.


texts: show custom data on magento product detail page via module or observer

texts:
i am new to magento i want to show some custom data via module / observer in product details description tab ,

can u please i got some links but i do not want to modify core files can u please guide of hint way of doing it

i created module and added below code:

<blocks>
    <rewrite>
        <reference name="content">
        <block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/descriptionfff.phtml">
                <action method="addToParentGroup"><group>detailed_info</group></action>
                <action method="setTitle" translate="value"><value>Description</value></action>
        </block>
        </reference>
    </rewrite>
</blocks>


texts: Can't even migrate Magento 1.9 with sample data to Magento 2.2

texts:
I am learning the process of migration from Magento 1 to Magento 2. I have installed Magento 1.9.3.10 (with sample data) and Magento 2.2.6 (no sample data) on one server. When I run Data Migration Tool, it fails with many "Source fields are not mapped" errors. I have attached a screenshot.

The reason it fails is that it doesn't know how to migrate several tables. For example, there is a "move" record in map.xml, saying that sales_flat_creditmemo corresponds to sales_creditmemo. But the first table has a field base_customer_balance_amount and the second table doesn't have it. And there is no record in default config that would handle this field.

It seems Data Migration Tool is even not capable of migrating a basic configuration. It means either sample data for Magento 1.9 messes up database schema, or I am doing something wrong.


texts: How to call customer account sidebar on custom magento extension

texts:
I am developing a magento extension in which i need to call the customer account side bar in the left section on my extension template i have tried adding it to my extension  layout xml but with no luck :'( any body had any previous experience with this please share.

Note : I am using Magento ver. 1.7.0.2


texts: I want to delete all product using Rest API in Magento 2.


texts: Magento 2 Show only a total number of active products in category in admin

texts:
I have a lot of products on my webshop, and so many of them are inactive, but will come back later.

I wonder if it's possible to show only numbers of active products besides each category? maybe a custom module is needed for this? If so, what do I need to do?

It's OK to still show all products inclusive the inactive ones on the right side after clicking on the categories. It's only the overview on the left site I need to change.


texts: magento2 Mass Action to Custom Page in Admin

texts:
I have added a custom option to the magento2 admin order action-dropdown in view/adminhtml/ui_component/sales_order_grid.xml. Then  I created a custom method Controller/Adminhtml/Order/MassDoSomething.php, where I can do something with the selected orders in the method protected function massAction(AbstractCollection $collection); Thats works.

But is to possible to show a custom page "intemediate page" where I can show the selected orders? Or do I have to create a new admin page (like https://www.mageplaza.com/magento-2-module-development/create-admin-grid-magento-2.html) and redirect the users from the Mass Action to this page?

How can I create a custom page with the selected orders?


texts: How to redirect a associated product to its configurable product

texts:
I am using Magento 1.9.2.1 and I am using the native swatches option. I am trying to only show the associated products on the catalog page and not the configurable product. But I am hoping that by clicking on any of the associated products, it would take the customer to the configurable product.

So lets say that I am selling a cap that has a red and brown option.
I want the catalog to show the red simple product and the brown simple product. But when the customer clicks on either of the simple products, it will take them to the configurable product and they can select a color there instead.

Is there a easy way to do this?


texts:
Every so often a customer will place an order where there is no customer data for customer_id or email in the sales_flat_order table.

Info is present for billing and shipping in sales_flat_quote_address.  When this happens, the user is marked as Guest and is listed as a retail customer.

Has anyone seen this before or know why it might be happening?

Please let me know if there's any more info I can provide.

Thanks.


texts:
I need to show Grid on admin tab of custom module , i have followed this tutorial http://magebase.com/magento-tutorials/understanding-the-grid-serializer-block/ , but unable to save old checked value in grid.

1) Layout

<company_adminhtml_module_newtabtab>
        <block type="core/text_list" name="root" output="toHtml">
            <block type="company/adminhtml_module_edit_tab_newtab" name="module.tab.newtab"/>
            <block type="adminhtml/widget_grid_serializer" name="module_grid_serializer">
               <reference name="module_grid_serializer">
                <action method="initSerializerBlock">
                    <grid_block_name>module.tab.newtab</grid_block_name>
                    <data_callback>getSelectednewtab</data_callback>
                    <hidden_input_name>links[newtab]</hidden_input_name>
                    <reload_param_name>newtab</reload_param_name>
                </action>

               </reference>
            </block>
        </block>
    </company_adminhtml_module_newtabtab>

2) Block Newtab.php

protected function _prepareColumns()
    {
        $this->addColumn('newtab', array(
            'header'    => $this->__('Id'),
            'type'      => 'checkbox',
            'index'     => 'table_id',
            'align'     => 'center',
            'field_name'=> 'newtab',
            'values'    => $this->_getSelectednewtab(), // values selected properly from database
        ));

        $this->addColumn('table_field_name', array(
            'header'    => $this->__('Name'),
            'index'     => 'table_field_name',
            'align'     => 'left',
        ));
    }

3) Controller

 public function newtabTabAction()
    {

        $test_ids = array(1,2); // your load logic here

       $this->loadLayout()
            ->getLayout()
            ->getBlock('module.tab.newtab')
            ->setNewtab($this->getRequest()->getPost($test_ids, null));

        $this->renderLayout();

    }
    public function newtabGridAction()
    {

        $this->loadLayout()
            ->getLayout()
            ->getBlock('module.tab.newtab')
            ->setNewtab($this->getRequest()->getPost('newtab', null));

        $this->renderLayout();

    }

4) Decoding of serialized id's (showing for newly checked id's)

$links=$this->getRequest()->getParam('links', null);

             if ($links['newtab']) {
                 $design_tags = Mage::helper('adminhtml/js')->decodeGridSerializedInput($links['newtab']);
             }


texts: How can I migrate sales data from m2 to m2 store

texts:
I have a active store in magento 2.3.5 version. And also have store exist in magento 2.4.2 instance. Now I want to migrate sales data from 2.3.5 to 2.4.2. How can I achieve this in magento 2?
Can someone help me with this.


texts: M2: all quotes remain active - where should they be set inactive?

texts:
M2.3.3: We have a situation where all quotes remain active (i.e. is_active=1). That means they're never cleared by cron as that only clears inactive quotes.
We now have ~186k quotes in the database, going back to when the site was first setup. 185k have no customer id; around 900 have a customer id. As the store is B2B and only open to logged in customers (no guests), how can we end up with the majority of quotes having no customer (customer_id=NULL)? Only thing that I can think is Magento is creating a quote for every single visitor, before they logon. Assume the customer gets another quote when they logon, leaving these "guest" quotes active so they're never cleared. None are persistent (that's off).
Seems to me the quote clean-up routine is not fit for purpose.
However, clearly there's something seriously awry with how quotes are converted to orders. Appears that in our checkout process, quotes generating orders are never being set inactive. I've tried to trace how the quote gets set inactive during the order flow, but nothing jumps out in the code to suggest where this should happen.
Does anyone know what part of the order process (i.e. code) is supposed to set the quote that generated it to inactive?
Thanks


texts: How to add "Please go to Cache Management and refresh cache types." Notification in Magento 2

texts:
Hello Everyone I have created a module the save changes only works when the cache is a refresh to I want to add a Notice on Save to Refresh Cache Something like that.

How I can do this Need help


texts: Syntax error, unexpected '.' in ObjectManager\Factory\AbstractFactory.php

texts:
I am trying to install Magento, but it showing me error:

  syntax error, unexpected '.' in
  E:\wamp\www\Magento\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php
  on line 93

as per the suggestion's I had upgrade my php version. The problem is solve for temporary. After completion of installation the message show as:

  System messages

  One or more indexers are invalid. Make sure your Magento cron job is
  running.

On searching on this topic I got suggestion to run following command:

php bin/magento indexer:reindex

but on running of this command it shows me error again:

  syntax error, unexpected '.' in
  E:\wamp\www\Magento\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php
  on line 93


texts: How to create custom the featured product,Best saler product and new arival product with tabs on home of magento

texts: I want to add the Featured product,Best Seller and New arrival in tab format. Means when I click on featured product the featured product slider get display, when click on best seller product then best seller product get display.Please can anyone suggest me suitable solution for it. Because I am new user of Magento. Should I need to create the custom extension. If yes then please give me steps to be followed.


texts:
In my magento store my products have several custom options which alter the price of the product. I also need to add in a custom function which shows or hides particular content when this event triggers.

I can see that the following is called when any option ever changes:

opConfig.reloadPrice();

but i am unsure what file this actually sits in so i can add an extra function onto the event.


texts: How to add product Y to cart with product X in Magento 2?

texts: I want to add product Y (free gift) to cart with product X. What is the best way to do so? Any help will be appreciated.


texts: Terms and conditions on registration form in magento2

texts:
I want to add Terms and Conditions checkobox on Account registration page in magento2.
User should accept the terms and condition before creating an account


texts: How to retrieve product custom attributes in a order

texts:
I add some custom attributes to our products, like "product_processing_status".
Now we have a order with some products.

I read the products from the order with the SOAP V2 API.
How i can retrieve the custom attribute "product_processing_status" with SOAP V2 and update them with a new value in the order?


texts: Magento 2: Get Product stock quantity details in Rest API

texts:
Need to get Product stock quantity in products details using Rest API.
Method: GET
Using API URL: http://127.0.0.1/jaipurart/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=name&searchCriteria[filter_groups][0][filters][0][value]=%25Wood%25&searchCriteria[filter_groups][0][filters][0][condition_type]=like
Above api returns products details but need also products stock quantity and status.
Any help would be appreciated. Thanks!


texts: How can I resent the order confirmation email?

texts: Due to other extension conflicts some of my order confirmation emails weren't send. How can I sent them manually via backend?


texts:
In my store,When a customer places an order, it appears in the “My Orders” section of their account. However, once the order status is changed to Transfer WMS, the order history no longer appears.

Any help on this?

Thank you


texts:
I have a simple model for example

ID     Name
1     nerogee
2     John

Another table save age information by reference Key ID

ID     age
1       20
2       31

I try to build a listing and form. But I failed to get the age field for the model. Can anyone give me some hint on how to do this? I checked the cms_page module and find it seem something to do with MetadataPool and ExtensionPool. But I still can't get it work.


texts: Magento 2 : Adding custom header label and link

texts:
I want to know how to add  custom link to the header panel that should be manageable from back-end. so that the person trying to change the value can easily change it without any coding knowledge
I have tried it with module and it successfully worked using following code:-
<referenceBlock name="header.links">

 <block class="Learning\Module\Block\Link" name="custom-header-link">

            <arguments>
            <argument name="label" xsi:type="string" translate="true">Customer Service: 888-371-4942</argument>
            <argument name="path" xsi:type="string" translate="true">support</argument>
            </arguments>

      </block>

 </referenceBlock>

but i dont know how to manage it from backend.
thank you


texts: Store product export csv file in var/importexport folder

texts:
I want to store the product export csv file on a folder while generating from the admin panel.

Right now its only directly downloadable from the admin panel, but I want to store that file in a particular folder like "var/importexport".

Please advise.


texts: Create a picking list or send with an e-mail

texts:
I need to add a feature to my website that creates picking list for warehouse.

When you go to sales>orders>view an order>shipments>click on a shipment> You will see a print button which prints picking slip. I want to add a button called e-mail. When you click on the button it should send the picking list to an e-mail I set. Also I need to change the picking slip template.

For also learning purpose could you help me please? So where should I start? Where can I change the template and how can I add the e-mail button?

Thanks.


texts: Optimization in fetching data form Magento Database

texts:
I have stuck at one thing. we need to fetch data data form Magento and generate the FEED.

The Problem is that we have around 40,000 products around 715 attributes and around 950 attribute set. one more the I need all filterable attributes in this collection.

When i try to call the Product collection as per default Magento Standard then It will take too much time on server as well as data.

How to optimize the query....


texts: Installing / Migrating OpenMage (Magento LTS) To Existing Site with Easy Upgrades GIT

texts:
I found this https://www.openmage.org/magento-lts/migration-guide.html but I had trouble making it work. I was able to clone the repos and make the patch, but the patch wouldn't apply, and I also wasn't clear on if I should git init a new repo on my Magento site I'm porting or not.
Basically I have an existing site with lots of extensions, and I want to port it to OpenMage LTS using git so that future updates will be easier with just a "git pull". What is the best way to handle this? Step by step please.
For now I cloned the OpenMageLTS to a blank directory, then copied over the .git and files to my existing site overwriting the core Magento 1.9.4.5 files. Should I then just exclude the existing files from git, and git pull in the future and call it a day? I feel like that's not the right way but I'm not sure.


texts: Modman: symlink module from home directory

texts:
If i have a module in my home directory:

/home/users/me/mymodule

and I have my web root in var/www

/var/www/mysite/public_html

How can i use modman to link the two?


texts:
How do I edit the text in the various blocks in the Luma Theme for Magento 2.
Eg the in the top picture there is a text "New Luma Yoga..."
Where is this text generated and where do I edit it ?


texts:
Magento 2 products page title showing wrong on product page.

http://prntscr.com/lpbrrv

Any idea why ?


texts:
I have a theme that I bought and downloaded and followed the instructions to create a sub-theme.

If I edit the core theme files I'm able to achieve what I want but if I replicate it in the child theme, nothing happens.

I'm not sure what I'm doing wrong, here is my structure.

C:\wamp\www\website\app\design\frontend\ultimo

and inside there reside "default" and "custom_theme"

The file I'm trying to change is header.phtml which resides in.

C:\wamp\www\website\app\design\frontend\ultimo\custom_theme\template\page\html


texts:
We have a heavily bespoked version of CE 1.4.1.1 and I've looked on the official site but can't seem to find details of any support lifecycle for this version.

Can anyone tell me please whether Magento will continue to offer security updates for this version and if not, when was this version retired, as we will need to scope a project to update to the latest version and migrate the custom extensions to the latest versions


texts:
I have created a warranty as a product in magento which has 2 custom check box options. This product (warranty) does not have any specific page so I would like to display both the custom options of a warranty products as checkbox when selected one of the custom option the product (warranty) also should get added to the cart.

I want to display this addon product (warranty) only when the cart amount is larger then $2000. Is there any way to achieve this functionality? I have attached a screenshot below to illustrate the custom option.


texts: How to fix 'APPSEC-1063' issue with collection join after the patch SUPEE-6788

texts:
One of the files in an extension after the patch SUPEE-6788 is showing an issue related to APPSEC-1063.

$collection->join('catalog/product', 'product_id=`catalog/product`.entity_id')
    ->addFieldToFilter('`catalog/product`.type_id', array('in' => array('simple', 'virtual', 'downloadable')));

How do I need to change this code to make it compatible?


texts: where function setCategoryId defined in statement $params->setCategoryId

texts:
In module_catalog , Controller/Prodcut/View.php file, Can you please explain what is the purpose of DataObject Class and where function setCategoryId defined ?

// Prepare helper and params
        $params = new \Magento\Framework\DataObject();
        $params->setCategoryId($categoryId);
        $params->setSpecifyOptions($specifyOptions);


texts: Save image cache on CDN or turn image cache off

texts:
I'm using Cloud Files CDN to host media and skin folders, and it's working properly for images and files located on that CDN. But the issue i'm having is with cached images. Every time new image cache is generated in media/catalog/products folder it is not displayed on front-end. Obviously it's because the cached image does not exist on CDN.

Is there any way to force magento to save cache on CDN? Or turn off image cache?


texts:
Magento 2.3.3, custom theme based on Blank.

It's a very small store with only two categories. I want to display them in the top navigation menu without a dropdown menu. In other words, just a horizontal (inline) list of the two categories, at the top (not the left).

Where and what do I change to make this happen?


texts: Magento 2: Get recently reviewed Products on Category Page

texts:
On the product view page the reviews get loaded via the following code:

$_items = $block->getReviewsCollection()->getItems();

This is what the getReviewsCollection function looks like:

public function getReviewsCollection()
{
    if (null === $this->_reviewsCollection) {
        $this->_reviewsCollection = $this->_reviewsColFactory->create()->addStoreFilter(
            $this->_storeManager->getStore()->getId()
        )->addStatusFilter(
            \Magento\Review\Model\Review::STATUS_APPROVED
        )->addEntityFilter(
            'product',
            $this->getProduct()->getId()
        )->setDateOrder();
    }
    return $this->_reviewsCollection;
}

This is later used in the following way:

foreach ($_items as $_review):
    ...
    ...
    foreach ($_review->getRatingVotes() as $_vote):
        ...
        ...

I'm trying to replicate this in order to display the recently reviewed products on the category pages.
My code so far looks like this:

public function __construct(
    \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
    \Magento\Framework\Registry $registry,
    \Magento\Review\Model\ResourceModel\Review\CollectionFactory $reviewCollection,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Framework\View\Element\Template\Context $context,
    array $data = []
) {
    $this->productRepository = $productRepository;
    $this->registry = $registry;
    $this->reviewCollection = $reviewCollection;
    $this->storeManager = $storeManager;
    parent::__construct($context, $data);
}

public function getCollection()
{
    $category = $this->registry->registry('current_category');
    $collection = $category->getProductCollection();

    foreach( $collection as $product ) {

        // this is the method from the magento
        // core function (getReviewsCollection()) mentioned above
        $reviewCollection = $this->reviewCollection->create()
            ->addStoreFilter(
                $this->storeManager->getStore()->getId()
            )->addStatusFilter(
                \Magento\Review\Model\Review::STATUS_APPROVED
            )->addEntityFilter(
                'product',
                $product->getId()
            )->setDateOrder();

        $reviews = $reviewCollection->getItems();

        if( !empty($reviews) ){
            foreach ($reviews as $review){
                // this is where the code breaks
                foreach( $review->getRatingVotes() as $vote ){
                    // do stuff here
                }
            }
        }
    }
}

Inside the getCollection function I use the same method to retrieve the review collection as in the getReviewsCollection method from the magento core. I can successfully retrieve an array of \Magento\Review\Model\Review objects.

But my code breaks as soon as I try to iterate over the reviews and use the $review->getRatingVotes() method inside the inner most foreach loop. getRatingVotes() returns null and I get an Invalid argument supplied for foreach() exception.

I decided to investigate the getRatingVotes() method but I cannot find where it is defined. I did a search of the whole codebase inside VSCode as well as via grep. The only place where it occurs is inside the .phtml template file  of the reviews list.


texts: Magento 2 Payment method Instruction in API

texts:
Fetch Instructions for Payment method in Magento 2's existing API /rest/V1/carts/mine/selected-payment-method

Magento APIs doesn't provide any Instructions for Payment method, Even after selection of payment method for CART API

Method

/rest/V1/carts/mine/selected-payment-method


texts: Authorize.net not accepting any testing Credit card on Magento 2.2.5 in sandbox mode

texts:
I have managed to successfully configure authorize.net with latest SHA on Magento 2.2.5 and its appearing as payment method but when i enter credit card no. it gives error saying
"Please enter a valid credit card type number"

Using:
Authorize.net : sandbox account
CC details: Tried all test CC's given

Seems like validator.js is throwing this error but not sure why it is not accepting.
Even tried applying luma theme in order to check theme conflicts.

Any help much appreciated,

Thanks,
Siddhesh


texts:
I'm getting this error when I try to add images to a product.

SQLSTATE[42000]: Syntax error or access violation: 1142 TRIGGER command denied to user 'OLDUSER'@'localhost' for table 'catalog_product_entity_media_gallery', query was: INSERT INTO `catalog_product_entity_media_gallery` (`attribute_id`, `value`, `media_type`) VALUES (?, ?, ?)

I've moved the site to a different account with a different DB user, I've updated the env.php with the new details and everything appears to work fine on the frontend and in the admin area except this.

I've cleared the whole var folder, re-compiled, re-deployed, etc.
So where is it getting the old DB details from?

I've tried grep oldDBuser and the only thing that shows is the exception log.


texts: Rest API - Post method to magento/api/rest/products returns 404

texts:
Posting product data via magento/api/rest/products returns a 404 but saves the data. Any ideas why this is occurring? If I do a get request I get a 200, this is only occuring on a post method.

So I looked in my logs, and I see an error after the post. File not found api/rest/products/27

Which is wrong is should be magento/api/rest/products/27

"POST /magento/api/rest/products/ HTTP/1.1" 404 1148 "

"GET /magento/api/rest/products/67 HTTP/1.1" 200 937 "


texts: Receive Post Parameters In Magento 2 Controller

texts:
I am calling HTTP request for controller, I am getting get parameters, but I am not able to receive post parameters in Controller.

Basically I want to call Magento 2 APIs and send customized response to application, for that I have created a simple module, which will call API and customized response and send response to application,

But I am not able to fetch post parameters from request.

Here are some of my files which can give an idea about problem,

etc/webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/api/token" method="POST">
        <service class="Spaarg\Api\Api\apiInterface" method="token"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

Index.php

<?php
/**
 *
 * Copyright Â© 2015 Spaargcommerce. All rights reserved.
 */
namespace Spaarg\Api\Controller\Token;

class Index extends \Magento\Framework\App\Action\Action
{

    /**
     * @var \Magento\Framework\App\Cache\TypeListInterface
     */
    protected $_cacheTypeList;

    /**
     * @var \Magento\Framework\App\Cache\StateInterface
     */
    protected $_cacheState;

    /**
     * @var \Magento\Framework\App\Cache\Frontend\Pool
     */
    protected $_cacheFrontendPool;

    /**
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $resultPageFactory;

    /**
     * @param Action\Context $context
     * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
     * @param \Magento\Framework\App\Cache\StateInterface $cacheState
     * @param \Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     */
    public function __construct(
       \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
        \Magento\Framework\App\Cache\StateInterface $cacheState,
        \Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->_cacheTypeList = $cacheTypeList;
        $this->_cacheState = $cacheState;
        $this->_cacheFrontendPool = $cacheFrontendPool;
        $this->resultPageFactory = $resultPageFactory;
    }

    /**
     * Flush cache storage
     *
     */
    public function execute()
    {
        //$this->resultPage = $this->resultPageFactory->create();
        //return $this->resultPage;

        $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); //instance of\Magento\Framework\App\ObjectManager
        $storeManager = $_objectManager->get('Magento\Store\Model\StoreManagerInterface');
        $currentStore = $storeManager->getStore();
        $baseUrl = $currentStore->getBaseUrl();

        $post = $this->getRequest()->getPost();

        echo "<pre>";
        print_r($post);
        exit;

    }
}

It will be great if someone can help.


texts: How to apply an existing coupon code programmatically in Magento 2

texts:
I try to apply an existing coupon code  programmatically  in a controller by coupon id.

The only thing I found these code lines for Magento 1.

Mage::getSingleton('checkout/cart')
        ->getQuote()
        ->setCouponCode($coupon)
        ->collectTotals()
        ->save();

Does anyone know how can I do this in magento 2?


texts: How to skip Shipping and Payment method in checkout (magento 1.9)

texts:
I need to skip the Shipping and Payment method steps in checkout.

This, because a lot of products need customising and checking before shipping them.
So what we do is check the list (with the client) and contact/inform them. The actual order will be processed through another system.


texts:
After spending weeks on trying to fix this in Magento 1.7.1.0, I decided to update to 1.8.1.0 to finally get rid of this problem and guess what - nothing has changed!
I am still getting the "The totals of the cart item amounts do not match order amounts." error and my customers can still not checkout using PayPal in some cases. Tax is set up exactly as recommended here: http://www.magentocommerce.com/knowledge-base/entry/magento-ce-18-ee-113-tax-calc
The issue again is the pesky 1 cent and the only information I could find that made some sense to me is this: https://gist.github.com/edannenberg/8041401

Since you can't even report bugs for Magento 1.8.1.0 (obviously considered to be bugfree...) and no moderator on the official forums ever gave a c*** about this nasty problem, I would like to ask you guys, if you are aswell still experiencing this issue in Magento 1.8.1.0

UPDATE:
After reapplying this fix https://stackoverflow.com/questions/11868985/magento-paypal-tax-rounding-issue#answer-14562319 on my 1.8.1.0 install and setting transfer cart line items to No, I have had no more paypal errors.


texts: Change store switcher select list into buttons

texts:
On this multisite I have a store switcher (select list). Now I am able to switch between the stores and share the shopping cart. I want to change the select list in buttons.

My storeswitcher.phtml looks like this:

<?php
/**
 * @see Lucus_Foodisgood_Block_Storeswitcher
 * @var $this Lucus_Foodisgood_Block_Storeswitcher
 */
?>

    <?php echo $this->__('Continue shopping at:') ?>
    <select title="><?php echo $this->__('Continue shopping at:') ?>" name="lucus_store_switcher" onchange="lucusStoreswitcher(this)">
        <?php foreach ($this->getStores() as $storeId => $store) : ?>
            <option <?php if ($this->isCurrentStore($storeId)) : ?>selected="selected"<?php endif ?> value="<?php echo $store['url'] ?>"><?php echo $store['name'] ?></option>
        <?php endforeach ?>
    </select>

How do I translate this into buttons/links:

Shop 2
Shop 3


texts:
Ive just started working on a Magento 2 site (2.1.9) and trying to add a 301 rewrite to pub/static/.htaccess so that when someone enters an old URL with index.php it removes the index.php with a 301 rewrite.

However when I enter any changes in the htaccess file located in pub/static/, they're being completely ignored...

RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ https://domain.com/$1 [R=301,L]

Am I missing something? surely I shouldn't have to re-deploy the static files?


texts:
I'm fairly sure I'm missing something obvious here, but I can't see it.

I've added an install script to a module I've built, I've double checked it against Alan Storm's excellent tutorial, and I'm sure everything is correct, but it won't play ball.

I'm clearing the entry from core_resource each time, and I'm clearing the cache (all of the cache is disabled anyway, but I'm clearing it for good measure!!)

config.xml looks like this:

<?xml version="1.0"?>
<config>
      <modules>
            <Lw_Restrict>
                  <version>1.0.0</version>
            </Lw_Restrict>
      </modules>
      <global>
            <resources>
                  <restrict_setup>
                        <setup>
                              <module>Lw_Restrict</module>
                              <class>Lw_Restrict_Model_Resource_Mysql4_Setup</class>
                        </setup>
                        <connection>
                              <use>core_setup</use>
                        </connection>
                  </restrict_setup>
            </resources>
      </global>
</config>

./app/code/local/Lw/Restrict/Model/Resource/Mysql4/Setup.php

<?php

class Lw_Restrict_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup {

}

./app/code/local/Lw/Restrict/sql/restrict_setup/mysql4-install-1.0.0.php

<?php

die("Noop");

The install script was previously more complicated, adding attributes etc, but I stripped it back to this test just to make sure it wasn't that.

What happens when I clear everything and run this is that the site loads as normal, a row is added to core_resource, but it doesn't die (and previously it didn't add the attributes)

If someone can point out what I'm missing that'd be great!!!


texts: How can I create a sub menu item without creating a category?

texts:
I would like to create a dummy submenu like the following without creating a category, since creating a category will result in a url. under the dummy submenu i will have real categories

 dummy submenu
      sports wear
      Golf equipments
      etc...


texts: How can I add a SKU column in the Best Seller Product Report.


texts: PayPal IPN's not working correctly. Error 500?

texts:
I have got an issue with my 2 Magento websites.
Both sites are running PayPal Website Payments Pro Hosted Solution.

The issue is with the PayPal IPNs. All orders which come in are being stuck on ‘Pending Payment’ and I have to manually check if we have the payment – cancel that original and then hand enter a duplicate (hand entered orders get the status of pending).

I have explained the setup we have to PayPal and they said it should work fine, it doesn’t break their rules.
They said the IPN’s are failing with a http error code of 500 which means something is going wrong our end, and there is nothing they can do.

I opened up a ticket with simpleservers (our hosting company) and tried a few things which them but no joy.

This is the latest thing from PayPal:

  Following a conversation with a Business Support agent, I have opened a new ticket to follow up on your issue.

  Looking at your IPN History (which you can see yourself here ->(LINK). I can see that some of the IPNs are in "Retrying" status when we tried to send them to your IPN URL:

  http://www.goodfoodandgifts.co.uk/paypal/ipn/

  From PayPal's point of view, we will consider an IPN successfully sent when your integration responds with HTTP 200 OK, but in this case it's responding with HTTP 500 (Internal Server Error).

  For example, you can see that a new IPN was triggered for Pro transaction 7VE97236S1009884X (latest in the account) and sent to your IPN URL but it failed with error 500.

  Can you check further your IPN script to see why it's responding with HTTP 500? It appears only Website Payments Standard transactions IPN are working fine, and the others are receiving Retrying (Pro, Express Checkout, temporary holds, etc) so maybe the script is only prepared to handle Standard transactions.

This is the latest from SimpleServers:

  I just tested this and it came back ok in the simulator

  http://goodfoodandgifts.co.uk/paypal/ipn/

  – Simple Servers Support

Our web developer is out of the office right now, and has been for a few weeks, very unwell.

Am I making a silly mistake somewhere, does anyone know how to fix this?


texts: Magento2 How to get custom attribute and its value of a customer?

texts:
I followed this tutorial to add a custom attribute to Customer.  Then in Controller LoginPost.php, I want to get the value of that attribute of a particular customer to do some checking. But I found it completely different from Magento 1.X to retrieve the value of a custom attribute.

Anyone can suggest some methods? Thanks.


texts: PDF Invoice Plus extension not showing in backend

texts:
I purchased this extension today, but I am not able to install it.
I've got two folders app and lib. I have uploaded it to the root of my magento site

run:

sudo php bin/magento setup:upgrade

sudo php bin/magento setup:di:compile

sudo php bin/magento setup:static-content:deploy

and nothing. The extension is not showing. I am desperate please help.


texts: Multiple Domains, multiple Store View and redirect

texts:
I have 2 different domains (www.mysite.com and www.mysite.it) associated at 2 different Store View (code=en and code=it). After set from backend my Magento 1.9.0.1 to works with different domains, I set my .htaccess to redirect to the right store view and the right associated domain:

SetEnvIf Host www\.mysite\.com MAGE_RUN_CODE=en
SetEnvIf Host ^mysite\.com MAGE_RUN_CODE=en

SetEnvIf Host www\.mysite\.it MAGE_RUN_CODE=it
SetEnvIf Host ^mysite\.it MAGE_RUN_CODE=it

This works well except for one thing:

if I type mysite.com/myproduct-name or mysite.it/myproduct-name without www it brings me to the respective homepage (www.mysite.com and www.mysite.it).

How can set it so that redirect me to the www version of the content (e.g. www.mysite.com/myproduct-name)?

Edit

Ok, I think this is the problem, this is hot .htaccess part:

RewriteCond %{HTTP_HOST} !^mysite.it$ [NC]
RewriteRule ^(.*)$ http://www.mysite.it/ [R=301,L]

# RewriteCond %{HTTP_HOST} !^mysite.com$ [NC]
# RewriteRule ^(.*)$ http://www.mysite.com/ [R=301,L]

SetEnvIf Host www\.mysite\.com MAGE_RUN_CODE=en
SetEnvIf Host ^mysite\.com MAGE_RUN_CODE=en
SetEnvIf Host www\.mysite\.it MAGE_RUN_CODE=it
SetEnvIf Host ^mysite\.it MAGE_RUN_CODE=it

In this situation redirect of product is resolved but I can access only to www.mysite.it
If I uncomment row 3 and 4 I'm not able to access both domains anymore.
If I remove ! from both conditions I can access to both domains but redirect to www product page doesn't work anymore

Where am I wrong?


texts:
How i can make custom module and then add products in custom module? i want add new section in backend and then work with this section (section catalog also should work)

Thanks


texts: Setup Multiple website Magento 2.1 on Shared hosting with no SSH access and NO Virtual Host setup

texts:
I want to setup two different websites on the same Magento 2.1 Installation.
The two websites will have different products and different domain (not on the same host). Right now I have only registered one domain and I'm trying to configure multiwebsite to work on mydomain.com and shop.mydomain.com (or mydomain.com/shop). I have tried different tutorial but nothing seems to work.

I'm on a Shared Hosting with no SSH and I'm unable to follow the Magento DevDocs all the way through because I can't create a Virtual host or run code with ssh.

I have also tried this two tutorial with no luck:
https://www.forgeonline.co.nz/magento-multistore-website-shopfront/
https://www.fmeextensions.com/blog/how-to-create-configure-multiple-store-views-in-magento-2/

what I'm doing wrong?


texts: Magento crons with hour in cron expression not scheduling

texts:
I have been trying to schedule a cron job at 1830 hours daily but it never is scheduled

<cron_expr>30 18 * * *</cron_expr>   //This never works
<cron_expr>0 18 * * *</cron_expr> //This also does not work

However when I schedule a cron using the minutes expression, it is always scheduled

<cron_expr>*/10 * * * *</cron_expr> //This surprisingly works!

I understand that Magento schedules crons using the UTC timezone, and the expressions that I have tried are to do with times in UTC.

Below are my cron settings from Admin

  Generate Schedules Every : 15
  Schedule Ahead for : 60
  Missed if Not Run Within : 60
  History Cleanup Every : 120
  Success History Lifetime : 120
  Failure History Lifetime : 3000

Can someone help me with what am I missing out?


texts: Order E-Mail: How to exchange SKU with other Attribute?

texts:
i will display another Attribute (manufacturer_sku) in the Order- E-Mail instead of the shop sku.

Found the Code here:

app/design/frontend/base/template/email/order/items/order/default.phtml

$this->escapeHtml($this->getSku($_item))

How can i change the SKU with my attribute?


texts: What is mean by 'single product' in Magento?

texts:
I saw in one blog they have mentioned about 'Single Products' in Magento ? In there they have defined them as the products which sold individually. Can anyone provide a brief explanation on this? Are they mean simple products ?

Any suggestions will be appreciated.


texts: Is anybody knows payment extension for Magento 1 which supports Venmo?


texts: Custom module column in sales order grid with select filter in magento 2

texts:
I have a custom module with the columns id, order_id & reason. Now I want to add the reason value in the order grid with the select filter.
Reasons are listed in the other table of the custom module.
If I am using the text field filter then it is working but in the case of the dropdown filter, it is not working properly.
I have used below code:

vendor/module/view/adminhtml/ui_component/sales_order_grid.xml

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="cancel_reason">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Vendor\Moduel\Model\Config\Source\Reason</item>
                <item name="config" xsi:type="array">
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="filter" xsi:type="string">select</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                    <item name="dataType" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Cancellation Reason</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

Vendor\Moduel\Model\Config\Source\Reason

<?php
namespace Vendor\Module\Model\Config\Source;

use Magento\Framework\Option\ArrayInterface;

class Reason implements ArrayInterface
{

    public function toOptionArray()
    {
        $result = [];
        foreach ($this->getOptions() as $value => $label) {
            $result[] = [
                 'value' => $value,
                 'label' => $label,
             ];
        }
        return $result;
    }

    public function getOptions() {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
        $connection = $resource->getConnection();
        $tableName = $resource->getTableName('cancelreason_item');
        $sql = "Select `reason` FROM " . $tableName;
        $rows = $connection->fetchAll($sql);

        $result = [];
        foreach($rows AS $row){
            $result[$row['reason']] = $row['reason'];
        }
        return $result;
    }
}


texts: Magento2: GA standard module does not see the ecommerce transaction

texts:
I configured the Google Analytics module in the Magento backend. Then I enabled e-commerce tracking in GA.

Now, I see the number of page visits, but I do not see e-commerce transactions.
Can anyone help how to solve this?

version: 2.2.5


texts: Why does Magento 2 composer.json require composer?

texts:
Perhaps a stupid question but: Why does Magento 2 composer.json require Composer?

If you look at the composer.json (either of the GitHub repo or the composer.json bundled with the downloaded archive from magento.com), you'll see something like:

"require": {
  ...
  "composer/composer": "@alpha"
  ...
}

or:

"require": {
  ...
  "composer/composer": "1.4.1"
  ...
}

So my question basically is: Why would Magento (or any given Composer project) require composer itself? I mean: You typically should already have installed composer on your system as a global library. So why include it then?


texts: Magento connect manager/downloader not working after migrating to new server

texts: i recently moved my ste from one hosting company to another, then i noticed that my magento connect downloader is not working. even the Enhanced Admin Grid extension too. i replaced the downloader folder with one from a fresh download. i checked the file persmission- 755 for folder and 644 for index.php still not working, what do i do?


texts: Magento 2 Add new column tracking/mobile number to sales grid

texts: Hello guys I need your help to know how to add new column "tracking/mobile number" to sales grid.


texts:
I am facing one problem regarding Paypal Pro transaction ...

I am using PayFlow Pro method for my website payment i have entered all the information from admin panel but when i checkout (onnepage checkout) and click on place order button after filling my credit card information it show me “User authentication failed” error message and transaction failed there i have check innoDB support in my database also and there is no special char in my password still its not happening ...

anybody please help me out with this i have been tring this from past 4 days ...  :(


texts: Why does getParentIdsByChild return an empty array for a Child (Simple) Product

texts:
I have injected.

  Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable

In my constructor as $configProductModel

$this->configProductModel->getParentsIdsByChild($product->getId());
// outputs [];

I know this product to be a simple Product and I'm trying to load the configurable Product so I can get the Parent SKU


texts: I have a limited edition product the price of each edition has to go up, as the previous edition is sold. I.e.  1st edition is 1000, 2nd edition is 1100, 3rd edition is 1200. Each edition can only be released when the previous edition is sold. How can this be managed?


texts: Mailchimp abandonded cart not working in Magento 2.2

texts: I have connected the mailchimp account with magneto 2.2 and synced. but abandoned cart emails are not working properly. other automatons are working properly without abandoned cart. please guide.


texts: how can i place order using disabled product from admin create order only in magento2?

texts:
I want to place order for disabled product too only from admin create order.
so i want to know where i can skip quote validation so that magento2 could allow me place order.
when i am placing order i am getting below notification.


texts:
I am planning to truncate catalog_product_flat_* tables to fix the Catalog Serach Index per this StackOverflow answer.

“There was a problem with reindexing process.” after product import

In the case that after the truncate, the reindex continues to fail, should I restore the catalog_product_flat_* tables or the entire database?


texts: Shipment method only available for specific days

texts:
we are using magento 1.8.1ce.

Is there a way to use a shipment method which only is available between specific times on specific days.

We are looking for a method which is only available between thursday 15:00 and friday 16:00.

How can i do this?

i did see an post which uses an attribute for filtering.
But we need it to be applied to all products ...


texts: what learning path experts suggests to magento2 begginer?

texts:
I am magento2 beginner and studied official documentation but find it difficult to understand it is request to experts to suggest me learning path with links of tutorials and pdf books for the strong base for magento2 coding career. That you think a beginner must know about.
Thanks ...


texts:
I have the FishPig wordpress/magento integration.

I'd like to be able to display a blog post in a category much like you can display a native static CMS block.

I had expected that the associated blog post feature achieved this, is that the case?

If not how can this be achieved?


texts: Is it necessary to disable the cache before creating a module?

texts:
I am newbie to Magento. I'm learning to create my first module but I'm confused whether it's necessary to disable the cache or not.

If yes, please tell me how? Thanks,


texts: Magento CE 1.7 "updated_at" for sales_flat_order not updating with new shipping address

texts:
Is a known issue? I use shipstation to manage our warehouse and it updates based on updated_at value in the database.

When a customer updates their shipping address, the updated_at date remains the same. As you can imagine, this is a big deal. So my 2nd question: is there anything else that we know about which does not update the update_at value?


texts: Magento2 : Move billing address after payment method

texts: How can I move Billing address after Payment method section?


texts: How to manually assign shipping rate in cart page magento

texts: My requirement is when the shopping cart page is loaded i need to set my custom shipping rate and show it on the cart page.I have country name and shipping price in my hand.The shipping method is matrix rate.I have tried the estimate shipping method box functionality on the page load but it didn't work.


texts: How to remove default validation from login and registration form in magento2.2.5?

texts: I want to remove default validation from login and registration form and add my custom validation in magento2.2.5?


texts: Warning: simplexml_load_file(): I/O Magento warning : failed to load external entity “/var/www/app/etc/local.xml”

texts:
I have this issue in my magento installation

Warning: simplexml_load_file(): I/O warning : failed to load external entity "/var/www/app/etc/local.xml" in /var/www/app/Mage.php on line 767

setting libxml_disable_entity_loader(false); solves this issue but I will have to do it for every simplexml_load_file()

Is there any better solution and also if anyone could shed some light on how this issue might have occurred?


texts:
can you please help me that how can i get file path from magento web app product page.
I want to customize the product page. I couldn't find a way to customize my product page template. so any body can please tell me that how can i do this and solve my problem.  i am working on magento version 9.x.


texts: Create invoice programmatically with custom date

texts:
I had some problems with a payment module and some invoices were not created. But I'm generating the invoices need to create programmatically and the same with the dates of the requests not to lose the billing metrics from my reports.

$orderItems = $order->getAllItems();
$invoiceItems = array();

foreach ($orderItems as $_eachItem) {
    $opid = $_eachItem->getId();
    $opdtId = $_eachItem->getProductId();

    $itemss = Mage::getModel('catalog/product')->load($opdtId);
    $psku = $itemss->getSku();

    $qty = $_eachItem->getQtyOrdered();
    $itemsarray[$opid] = $qty;
}

if($order->canInvoice()) {
    $invoiceId = Mage::getModel('sales/order_invoice_api')
    ->create($order->getIncrementId(), $itemsarray ,'Fatura Criada Manualmente via Script' ,0,0);
}

So, how create invoice with a custom date? Any Idea?


texts: What is the quickest way to render the attributes of a Mage_Eav_Model_Entity_Abstract in Mage_Adminhtml_Block_Widget_Form?


texts: Move upsell after product description using xml

texts:
I am trying to move the up-sell block below the the description tabs
I have this so far

app/design/frontend/THEME/main/Magento_Catalog/layout/catalog_product_view.xml

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <move element="product.info.upsell" destination="content" after="-"/>
  </body>
</page>

When i refresh the cache i get no up-sell block at all. Everything else keeps working as expected.  What am i doing wrong here?


texts: simple zend pdf file not generate in magento

texts:
I tried below simple code in my TestController.php code but not generate pdf file. When I call testAction method of TestController.php it displays blank on page and no error on page and as well as not generate pdf file

class Namespace1_Module1_TestController extends Mage_Core_Controller_Front_Action
{
  public function testAction()
  {
  pdf = new Zend_Pdf();
    $page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);
    //var_dump($page);
    $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);

    define('FONT_SIZE'      , 12);
    define('MARGIN_LEFT'    , 40);
    define('MARGIN_TOP'     , 40);
    define('COL_WIDTH'      , 100);
    define('COL_LEFT_MARGIN', 10);
    define('COL_SEPARATOR'  , '|');
    define('ROW_HEIGHT'     , 20);

    $row = 1;
    $x = MARGIN_LEFT;
    $y = MARGIN_TOP;

    $page->setFont($font, FONT_SIZE);

                $page->drawText('ABCD', $x, $page->getHeight() - $y);
                $x += COL_WIDTH;
                $x += COL_LEFT_MARGIN;
                $x = MARGIN_LEFT;
                $y += ROW_HEIGHT;

    $pdf->pages[] = $page;
    $pdf->save('data.pdf', true);
  }
}

Where I Wrong to generate pdf file ?


texts: Some item options or their combination are not currently available in Magento 2.3

texts:
In a store the products are importing via a connector with clients ERP.
Variations (size attribute only) and products that are out of stock are not visible in the store.
When we try to add a product in the cart Magento randomly gives the error "Some item options or their combination are not currently available." to some variations even they are in stock and with available quantity.

For example, we have a jacket with sizes 48, 50, 52, 54, 56
We can buy only two of them (48, 50 for example) and all the others are showing the error.
 This happens almost to all products
 The website is https://onnetgr.com

Thanks in advance for any help


texts:
I have created a new discount coupon code (2014SALE) of 10% discount for a particular category (say Car). It is working fine. But my requirement is to create an another discount of $75 for a particular product (say Maruti) on the same category (Car) with the same coupon code (2014SALE).

That means if user applies code 2014SALE having any products under category car will get 10% discount on total price. But if user applies code 2014SALE having Maruti in the cart, he will get discount of flat $75.

Is it possible to create two different kind of discounts with the same coupon code?


texts: How to override Magento\Eav\Model\ResourceModel\Entity\Attribute class methods in Magento 2.2?

texts:
I have tried to override _processAttributeOptions()  method from Magento\Eav\Model\ResourceModel\Entity\Attribute in my custom module. But the function does not override. Here is my code:

  Namespace\Module_Name\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Eav\Model\ResourceModel\Entity\Attribute" type="Namespace\Module_Name\Model\ResourceModel\Entity\Attribute" />
</config>

  Namespace\Module_Name\Model\ResourceModel\Entity\Attribute

<?php

namespace Namespace\Module_Name\Model\ResourceModel\Entity;

class Attribute extends \Magento\Eav\Model\ResourceModel\Entity\Attribute
{
 protected function _processAttributeOptions($object, $option)
    {
             //here is my custom code with core
    }
}

Please help me to override this method in Magento 2.2.


texts:
I am trying to delete one invalid folder from magento default export functionality. But its throwing on error page.

I have attached images, looks like magento default issue. If anyone faced this issue and have any solution then please help me with this.


texts:
I was trying to build a custom payment extension for magento. I noticed when I click "Place Order", I got this error from network tab. I tried testing with all cache disabled and enabled. Also I'm not using Mage_Core_Model_Config::getNode() anywhere. The exact error is -

Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'Mage_Core_Model_Config_Element' is not allowed' in [no active file] on line 0

any help please! I searched other questions related to this problem but nothing works for me.


texts:
Here is the shipping rules.

Country,Region/State,"Zip/Postal Code","Order Subtotal (and above)","Shipping Price"
DNK,*,*,0.0000,79.0000
NOR,*,*,0.0000,300.0000
SWE,*,*,0.0000,200.0000

I've disabled Flat-rate shipping and free shipping by navigating to: Configuration -> Shipping methods.

Also changed the default method in One page checkout settings.

But still the website it not taking the table-rate shipping and the shipping price is not calculating according to the rules.

Also it shows shipping amount as 79 all the time, I've edited DNK amount to 80 but it still shows 79 (only table-rate shipping is enabled).

Disabled all cart pricing rules, still it is now working.

I've spend around day to find this, is there someone can give some suggestions/idea about how this issue is happened?

Thanks.


texts: Troubleshooting failed webhook executions of the PayPal PLUS Extension from iways that cause automatic invoicing to stop

texts:
I use the following components:

magento (community) ver. 2.3.5-p1
iways/module-pay-pal-plus ver. 1.3.1 (github.com, marketplace.magento.com)

Since the last update to 2.3.5-p1, the behaviour for payments via the PayPal PLUS Extension has changed.
Until now, payments via the PayPal PLUS extension were booked with the PayPal transaction type "Capture". Since the update, the PayPal Transaction Type "Authorization" is used for booking.

To clarify my problem, here are two pictures from the Magento admin interface:

New behavior since the update to magento 2.3.5-p1

Usual behaviour from magento 2.3.4

The change ensures that incoming orders are not automatically processed by our system. The creation of an invoice and the update of the stock is no longer done automatically but has to be triggered manually for each incoming order.
We still use the "PayPal Express Checkout" in parallel to the PayPal PLUS extension, which continues to work perfectly.

I cannot find a setting to change the one I use.
How do I change the PayPal transaction type of the extension, so that the order process in our magento backend is automated again?

Or is there a more common way to capture authorized PayPal payments and automatically generate invoices for those orders than changing the PayPal transaction type?

  Desired behavior:
  after a customer has successfully paid his order via PayPal PLUS, the
  order should be marked as paid in the Magento admin interface and an
  invoice should be created automatically.


texts: default state of custom option for simple products

texts:
I have a series of products with custom options of type checkbox. However I cannot set from the setup of the product the default state of that particular option.

I need at least one of the checkboxes (options) to be checked by default as the user enters the product page / adds to cart from category page.

Is this doable from the Magento administration or will it require some extra development (if so how this can be done)?


texts:
Its a pretty straight forward question, Im looking for a cms page builder as the client requires the ability to edit pages - add widgets and alter the design.

I know bluefoot cms - link here - has been acquired by magento and they will be implementing it into magento 2 - but is there a time scale? Or does no one have any idea on it?

Alternatively does anyone know of any other good cms extensions which might be of use to myself? Bluefoot looks like it will be the best option, but its just not available... as of yet.


texts: Magento 2, I Want to add or hide custom steps on checkout page

texts:
I have created 1 custom tab on the checkout page and it's working fine I follow below link to add the tab on cart page.

Magento 2 - Add step on checkout

Then after I have added a Create an account link in the custom tab.I follow below link to add the Link

Create an account link

Now I want to Remove the step for logging user. If the customer is logging then I want to remove 1st steps(Login) and it directly redirects on 2nd steps.


texts:
someVar = <?php echo $this->__("Yes") ?>

seems to not work. Even when I try console.log(<?php echo $this->__("Yes") ?>). Isn't $this->__() supposed to return just string?

I have the translation in the *.csv file and I know it's the correct one, because I work with other translations from that file in the same template.


texts: Magento 2: Setting cron job for changing order status, can affect on performance?

texts:
I want to set cron job for order confirm. Below controller code Confirm.php used for confirm order from my fronted custom module.
This will Set order status confirm. This is working fine.

<?php
namespace \<vender>\<module>\Controller\Order;

class Confirm extends \<vender>\<module>\Controller\Order
{
    /**
     * Seller Order Confirm page.
     *
     * @return \Magento\Framework\View\Result\Page
     */
    public function execute()
    {
        $order_id = $this->getRequest()->getParam('order_ids');

        $sellerId = $this->_customerSession->getCustomerId();
        try {
            $trackingcoll = $this->_objectManager->create(
                                '<vender>\<module>\Model\Orders'
                            )
                            ->getCollection()
                            ->addFieldToFilter(
                                'order_id',
                                $order_id
                            )
                            ->addFieldToFilter(
                                'seller_id',
                                $sellerId
                            );

                         foreach ($trackingcoll as $tracking) {
                            $tracking->setSellerOrderConfirm('Confirmed');
                            $tracking->save();
                        }
                    $this->messageManager->addSuccess(
                        __('The order has been Confirmed by Seller.')
                    );

        }catch (\Magento\Framework\Exception\LocalizedException $e) {
                    $this->messageManager->addError($e->getMessage());
                } catch (\Exception $e) {
                    $this->messageManager->addError(
                        __('We can\'t send the email order right now.')
                    );
        }
         return $this->resultRedirectFactory->create()->setPath(
                    '*/*/history',
                    ['_secure' => $this->getRequest()->isSecure()]
                );

    }
}

Same code used in corn page to check pending order & set order confirm.
My question is as follow.

Can changing status sufficient to make order status confirm or want to do something more?
Is there any performance issues if I run cron for every two hours?
Is there any harm to set auto email sending for order confirm?

Thanks in Advance.


texts:
I am trying to change "Shopping Cart" to "Basket" on both the h1.page-title and in the <title> tag itself.

Where can I change this?


texts:
So my server error log is constantly full of this error:

Timeout waiting for output from CGI script /home/.../public_html/mydomain/index.php

Whatever this error is, I think it might be contributing to my website consistently getting overloaded and crashing/restarting.

Anyone have any insight as to what this is and a possible solution for it?


texts: Apply Tax to Shipping Amount in Magento2

texts:
We have a magento2 setup for indian website. We allow customers to purchase including tax. Also we are charging some shipping amount from customers but this shipping amount is under GST of 18%. We need to caluculate GST for shipping amount only.How can i do that.

Product Cost : 500 ( Including GST 5% )
But when i added product to cart it needs to show as
Product Cost : 475
GST (5%) : 25

Also For shipping Amount , We are charging Flat 50

We need to apply 18% GST for shipping amount

Final Cart will be displayed like this

Product Cost : 475

GST (5%) : 25

Shipping Cost : 50

Shipping Tax (18%) : 9


texts: Magento 2: Collection Query addFieldToFilter Loop Issue

texts:
I have below code

$_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$orderRepository = $objectManager->get('\Magento\Sales\Api\OrderRepositoryInterface');
$customModel = $objectManager->get('\Custom\Module\Model\ResourceModel\Index\Collection');

$orderIdsArray = array(3123,3124);

if(count($orderIdsArray) > 0 ){
    foreach($orderIdsArray as $orderId){
        $oId = $orderRepository->get($orderId);
        if($oId->getId()){
            $items = $oId->getAllItems();
            if (count($items) > 0 && count($items) == 1) {
                foreach ($items as $item) {
                    $products = $customModel->addFieldToFilter('product_id', $item->getProductId());
                    echo $products->getSelect()->__toString().'='.count($products);
                }
            }
        }
    }
}

First query it print

SELECT `main_table`.* FROM `custom_table` AS `main_table` WHERE (`product_id` = '2482')
SELECT `main_table`.* FROM `custom_table` AS `main_table` WHERE (`product_id` = '2482') AND (`product_id` = '1') <-- WRONG

How can i get below ones?

SELECT `main_table`.* FROM `custom_table` AS `main_table` WHERE (`product_id` = '1') <-- CORRECT


texts:
I'm working on optimizing our website & am getting this notice when using GTMetrix.

  The following resources have identical contents, but are served from
  different URLs. Serve these resources from a consistent URL to save 2
  request(s) and 10.9KiB.

Now, I can see from the URL that the issue is that 3 of our products have the exact same image, yet Magento has to reference these URLs differently. Is there any way that I can resolve this? I've done some digging using Google but nothing promising has come up.

Fewer requests means faster rendering time & improved efficiency.


texts: How to sell codes, like games codes on magento?

texts: How can I sell virtual codes, like for steam and origin games on magento?


texts: Add translation programmatically in module installer

texts:
I've created module and I want to add translations to core_translate database table. I created array with original string and translation in form:

$words = array(
  'MyCustomModule::StringToTranslate' => 'String translation'
   ...
);

and in install PHP file I tried with:

foreach ($words as $source => $translate) {
    $model = Mage::getModel('core/translate');
    $model->setString($source);
    $model->setTranslate($translate);
    $model->setLocale('pl_PL');
    $model->save();
}

and with:

foreach ($words as $source => $translate) {
    $model = Mage::getModel('core/translate');
    $model->setData('string', $source);
    $model->setData('translate', $translate);
    $model->setData('locale', 'pl_PL');
    $model->save();
}

but I still get an error. As I see in Mage/Core/Model/Translate it just a simple class.

How can I add my translations into that table?


texts:
Is their any way to destroy the Session on browser back.
I'm using the Paypal payment method,during the payment process user redirected to the Paypal site for payment & if user click on the Paypal cancel button it redirects back to cart page, again if user click the browser back button it send back to the Paypal site for payment.
I tried the script and it successfully blocked the Back button in cart page,but without script is their any other way ?

<script type = "text/javascript" >
history.pushState({ page: 1 }, "Title 1", "#no-back");
window.onhashchange = function (event) {
  window.location.hash = "no-back";
};
</script>

Thanks


texts: Using layered navigation without is_anchor category attribute

texts:
Is it possible to use and display the layered navigation filtering when setting the anchor attribute to false?
I don't want to set anchor to true, because I don't want products of child categories to display.

Any tips?


texts:
im trying to create new button in shipping multiple addresses page. When i open addresses.phtml, there's so much button like in code below.

            <button type="submit" title="<?php /* @escapeNotVerified */ echo __('Go to Shipping Information') ?>" class="action primary continue<?php if ($block->isContinueDisabled()):?> disabled<?php endif; ?>" data-role="can-continue" data-flag="1"<?php if ($block->isContinueDisabled()):?> disabled="disabled"<?php endif; ?>><?php /* @escapeNotVerified */ echo __('Go to Shipping Information') ?></button>

            <button type="submit" data-multiship-item-update="" class="action update" data-role="can-continue" data-flag="0"><?php /* @escapeNotVerified */ echo __('Update Qty &amp; Addresses') ?></button>
            <button type="button" title="<?php /* @escapeNotVerified */ echo __('Enter a New Address') ?>" class="action add" data-role="add-new-address"><?php /* @escapeNotVerified */ echo __('Enter a New Address') ?></button>
            <a href="<?php /* @escapeNotVerified */ echo $block->getBackUrl() ?>" class="action back"><?php /* @escapeNotVerified */ echo __('Back to Shopping Cart') ?>

And that submit will send form to AddressesPost.php which got code like below.

public function execute()
    {
        if (!$this->_getCheckout()->getCustomerDefaultShippingAddress()) {
            $this->_redirect('*/checkout_address/newShipping');
            return;
        }
        try {
            if ($this->getRequest()->getParam('continue', false)) {
                $this->_getCheckout()->setCollectRatesFlag(true);
                $this->_getState()->setActiveStep(State::STEP_SHIPPING);
                $this->_getState()->setCompleteStep(State::STEP_SELECT_ADDRESSES);
                $this->_redirect('*/*/shipping');
            } elseif ($this->getRequest()->getParam('new_address')) {
                $this->_redirect('*/checkout_address/newShipping');
            } else {
                $this->_redirect('*/*/addresses');
            }
            if ($shipToInfo = $this->getRequest()->getPost('ship')) {
                $this->_getCheckout()->setShippingItemsInformation($shipToInfo);
            }
        } catch (\Magento\Framework\Exception\LocalizedException $e) {
            $this->messageManager->addError($e->getMessage());
            $this->_redirect('*/*/addresses');
        } catch (\Exception $e) {
            $this->messageManager->addException($e, __('Data saving problem'));
            $this->_redirect('*/*/addresses');
        }
    }

Like in the code above, there's getParam() which i though that the button send data and the code getParam will know what button did we clicked. But i can't find where or when did the button send data. So my question, how could the code know which button we clicked?


texts: Consumer is not authorized to access %resources magento 2

texts:
I try to get one particular customer orders that time i am facing below error.

{
"message": "Consumer is not authorized to access %resources",
"parameters": {
    "resources": "Magento_Catalog::products"
}}

Any one please help me. how i fix this error.


texts: Magento 2 Can We override **Add New Product** Page ? in custom_module on frontend area?

texts:
I want to make a custom page where vendor can add New Product with all text fields which Magento provide from the backend.

I want to override this same page on my custom module on the frontend side.

Is this possible?


texts: Moving the category toolbar out of product/list

texts:
I'm trying to move the toolbar that shows the sorting options and the pager out of the product list so I can bundle it with the breadcrumbs and the category name.

I found this site that worked for older versions of Magento but it's not working for CE 1.7 or EE 1.12.

In the comments someone had some code to move it to the root but that also doesn't work. This was the code to move it to category/view which would help:

$toolbar = $this->getChild('product_list')->getToolbarBlock();
$toolbar->setCollection($this->getChild('product_list')->getLoadedProductCollection());
echo $toolbar->toHtml();

If there is another way to group the breadcrumbs, category name and toolbar together let me know.


texts: Magento Community 1.9.1 how do I add Static Blocks to a sidebar in RWD?

texts:
The last theme I used had identifiers in the theme for placing CMS blocks into theme pages. Does RWD have existing layout identifiers I can use? or do I have to add code to my layout.xml? RWD's right sidebar is a bit empty looking. Also, I see the paypal sticker on the rightside bar, is this hardwired? I can't find it in the backend.

tia
August


texts: magento: command not found on Magento2 Already Installed through wizard

texts:
Was getting lots of issues installing, so installed Magento2 via Softaculous Installer in CPanel. Installed successfully and site & admin is accessible.

NOW, however, wanting to do things via CLI access, but always get "magento: command not found" when trying to run any of the commands.

Few questions having trouble finding answers for:

In order to have access to CLI 'magento' commands, did I have to do the initial installation via composer or CLI to start?
Is there any way to take the fresh working installation instance I have and enable the CLI magento commands without uninstalling and starting over? (Because was having a difficult time getting a stable, successful installation completed through doing CLI or Composer installation) - Although when I did have success a couple of times in the past (before I did something dumb to wack it up beyond my patience for troubleshooting, then deciding to start fresh again...) I DID get access to the Magento commands in CLI, and think they will ultimately prove to be an imperative asset in the future development of this project. :-/

Thanks in advance for any feedback here. Have worked on a couple of projects in Magento 1.*+ in the past, but really want to start this new project off in the new platform.


texts:
How can I render the bundle options in product list

I tried to add the block

<?php echo $this->getLayout()->createBlock('bundle/catalog_product_view_type_bundle', '', array('template'=> 'bundle/catalog/product/view/type/bundle/options.phtml'))->toHtml(); ?>

inside the list.phtml for each bundled product in $_productCollection but its not working.
Do I need to create a module with blocks having methods of catalog and bundle modules?
I am new to Magento. Please help. I tried everything I can.


texts:
Can i override app/etc/config.xml and put the core_cache_option table in a different schema from the other tables?

If so how?

EDITED:

I want the core_cache_option table to be in a different schema to the rest of the magento tables.


texts:
I have multi store as well as multi domain in my magento site.

www.domain.nl
www.domain.be

the issue occurs in back-end (admin grid) when I want to filter products, orders,  or customers.

the error says

Access to XMLHttpRequest at 'https://www.domain.be/admin_12w5st/mui/index/render/key/' (redirected from 'https://www.domain.nl/admin_12w5st/mui/index/render/key/a65af72908ae41562210df6cbc370a9bf0d4ce996237d2a40aec7804fa8d3673/?namespace=customer_listing&search=&filters%5Bplaceholder%5D=true&filters%5Bentity_id%5D%5Bfrom%5D=1&filters%5Bentity_id%5D%5Bto%5D=2&paging%5BpageSize%5D=20&paging%5Bcurrent%5D=1&sorting%5Bfield%5D=entity_id&sorting%5Bdirection%5D=asc&isAjax=true') from origin 'https://www.domain.nl' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

here are my environment :

nginx
magento 2.2.9
php 7.0.33

I tried to put

add_header 'Access-Control-Allow-Origin' '*' 'always';
or without quote mark
add_header Access-Control-Allow-Origin *; in my server.headers file but still no luck, the issue still persist.

Does anyone have any idea? Thanks in Advance.


texts: Magento No free Shipping for wholesale customer

texts:
In Magento 1.9.1  I have enabled the free shipping for minimum order amount(i.e. $75) from System >> Configuration >> Shipping Methods >> FedEx.

It’s working fine for all customers as expected, but I want, wholesale customer can pay the full shipping amount. No shipping discount/ free for wholesale customer.

Can  anyone tell/suggest me how to do that or how to set a shopping rule for that?


texts: Magento : 2 How to solve a error of messageManager like “Recoverable Error: Object of class”?

texts:
When I have created a block to the show a custom success message on the checkout page. I have used

$this->messageManager->addSuccess(__('your' .$currencySymbol.$amount. ' amount' ));

But when I am running the code I  got this type of error:
Recoverable Error: Object of class Magento\Framework\Message\Manager could not be converted to string in "my file path".

Please help me. How to solve my error?

Thank you very much.


texts:
I'm using the Magento 2 rest API to read out the orders in to our system.
If an order line product have a custom file option we want to download this file.

From the order items we get the following custom option result:

  "option_value": "image/png,abu.png,custom_options/quote/a/b/2f25a9e4bb5afd53ad4e097c024289b6.png,custom_options/order/a/b/2f25a9e4bb5afd53ad4e097c024289b6.png,/var/www/html/magento2/pub/media/custom_options/quote/a/b/2f25a9e4bb5afd53ad4e097c024289b6.png,269733,651,718,2f25a9e4bb5afd53ad4e"

How can we download this file. The Magento backend uses the UUID and also a column id?

Question:
How can you download a file uploaded by the user from the rest API?


texts: Magento 2.3 Change Order Status Programmatically

texts: How to Order status change Processing to complete in magento 2.3


texts:
I have many download-links which contain spaces in the folders and file-names.
Because of that they do not work in magento.

Does anybody know a workaround to maken them work somehow?

Thanks,
Marcel


texts: How to add my block and phtml file in magento 2 with reference block

texts:
I want to add a text box on the total credit memo. I can input amount to refund.

I am trying to add my block in creditmemo_totals

What i tried is
add code in

Company/Custom/view/adminhtml/layout/sales_order_creditmemo_new.xml

    <body>
        <referenceBlock name="creditmemo_totals">
            <block class="Company\Custom\Block\Adminhtml\Sales\Order\Creditmemo\Totals" name="Company_fee" template="Company_Custom::creditmemo/companyfee.phtml"/>
        </referenceBlock>
    </body>

What i want to do is add custom fee total box in refund total box like this


texts: Custom search box with filters : name + locality

texts:
I am new to magento-2.X, I want to create a custom search box on my sellers listing page, here I want to search by seller's name, and by seller's locality.

Please help me, In advance thank you.


texts: How can i remove duplicate orders in backend magento 1.9

texts:
I am Stuck in a big problem.
when i order a product magento backend shows me duplicate order details each time.

what could be the reason behind it?


texts: magento 2 Save custom attribute customer not working

texts:
I am using magento 2.1.4
I have created some attribute for customer
When i save, this attribute not woking
Pls help me
http://prntscr.com/esncjv

Thanks


texts: Magento: free shipping for customers from adwords

texts:
I have a magento 1.9 and i want to offer free shipping to all clients that are coming from adwords campaign.

Do you have any ideas ?

Thanks !


texts: Changing page layout through a database table

texts:
Is it possible to change all page layouts through a sql query? I noticed that in the admin section under Catalog > Manage Categories, under the Custom Design tab, there is a dropdown menu for Page Layout. Considering nearly every drop down and select box in the admin section affects a table in the magento database, which table would I have to target in order to change all of my sub categories to "2 columns with left bar".

There are over 100 subcats that need to be changed, and I'd like to do this in one shot rather than manually going through and changing them one at a time.

Thanks!


texts: Is there any extension to generate one RMA ID for multiple orders in Magento 2?

texts: Is there any paid extension to generate one rma for multiple orders ? If you anybody have an idea about it please suggest me or is this possible way to generate one RMA for multiple orders even there might be different shipping address.


texts: Magento 2: Add active class on selected shipping method

texts:
I want to add active class When I select a shipping method on the checkout page.

For example: If I select free shipping then active class should be added on radio button which is free shipping.

Thanks in advance.


texts: How to do an action if an order is placed by a customer

texts:
My module is when the order is placed by the customer, then automatically store some data(which are related to the product) into the custom table in database. what I want is how to detect the order placing moment.
Help me...
I hope you guys will understand my question..

Thanks!..