texts: List all Products and change price, quantity and one custom attribute

texts:
We're a very small store and have to sell some of our products online. Magento is our system of choice. Right now we're still using Magento 1. For our shop we have the possibility to list all products (about 650) and change the price, the stock qty and one custom attribute (the year of manufacturing) from an external list. The list looks like this

[Manufacturer] [Product Name] [Year of manufacturing] [Price] [Stock QTY] [-> Save]

and is looped through the whole list of products. I think the (or one of the) performance problem(s) is that there is a loop inside the loop - [Year of manufacturing] is a dropdown-attribute and every available option is looped through for every single product.

Is somebody using the same or a similar approach and has some advice regarding the performance?

EDIT: Added... "Code" by request

<?php
use Magento\Framework\App\Bootstrap;

require __DIR__ . '/../app/bootstrap.php';

$params = $_SERVER;

$bootstrap = Bootstrap::create(BP, $params);

$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$productCollection = $obj->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');

$collection = $productCollection->create()
            ->addAttributeToSelect(['name','jahrgang','jahrgangswein','price','aktualisiert'])
            ->joinField('qty', 'cataloginventory_stock_item', 'qty', 'product_id=entity_id', '{{table}}.stock_id=1', 'left')
            ->setOrder('manufacturer', 'asc')
            ->load();

foreach($collection as $product) {
                                    echo $product->getAttributeText('manufacturer') . ' ' . $product->getName() . ' ' . $product->getAttributeText('jahrgang');
                                    $productRepository = $obj->get('\Magento\Catalog\Model\Product\Attribute\Repository');
                                    $jahrgaenge = $productRepository->get('jahrgang')->getOptions();
                                    $jahrgang_optionen = '';
  foreach ($jahrgaenge as $jahrgaengeOption) {
                                      $jahrgang_id = $jahrgaengeOption->getValue(); //id of the option
                                      $jahrgang_value = $jahrgaengeOption->getLabel(); //Label of the option
                                      $jahrgang_optionen .= '<option value="' . $jahrgang_id . '">' . $jahrgang_value . '</option>';
                                    }
                                    echo '<select>' . $jahrgang_optionen . '</select><br>';
                                    }

?>


texts: Magento 2 Best way to merge specific DB tables and data from one database to another

texts:
We have two enviroments Staging and Production, for Magento 2.3.5. At the moment these two enviroments have different database structure, meaning that we can't just dump the entire DB and restore it to the other enviroment. We need to merge Orders, products,customers from one DB to another. I have thought of the following 3 options.

Use Magento 2 default import / export function to export orders, products and customers then import to another enviroment
dump all relavant mysql tables for orders, products and customers and restore them to another enviroment
write an custom module, something like using Magento's resrouce model, to transfer orders, products and customers to another enviroment

which one of the above option would you suggest? are there any other better way to do it?


texts:
Change to Production mode the Theme something error
but developer mode is working , how can i do?
please help! thank you!

my command:

php bin/magento deploy:mode:set production -s --skip-compilation
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento setup:static-content:deploy


texts: Prevent Rewards Points from being used to pay for Gift Cards (virtual and/or physical)

texts: In Magento 2, is it possible to prevent rewards points from being used to pay for, either in full or partially, a gift card?


texts:
I've got a custom backend module. This module has a form created with xml and .phtml file. In form there's some inputs, selects and textarea (the problem). In .phtml file there's only buttons which work as "input buttons". When user clicks on the button a custom text is inserted into a textarea (via JS). Problem is whenever I click one of the buttons and DO NOT do anything in the textarea (add letter, remove space etc.) then the inserted text via JS is NOT in POST data.

Example:

Textarea: "some text and now {{TEXT_INSERTED_VIA_JS}}"
POST: "some text and now "

Textarea: "some text and now {{TEXT_INSERTED_VIA_JS}} {{TEXT_INSERTED_VIA_JS}} {{TEXT_INSERTED_VIA_JS}}"
POST: "some text and now "

Textarea: "some text and now {{TEXT_INSERTED_VIA_JS}} {{TEXT_INSERTED_VIA_JS}} some text {{TEXT_INSERTED_VIA_JS}}"
POST: "some text and now {{TEXT_INSERTED_VIA_JS}} {{TEXT_INSERTED_VIA_JS}} some text "

Textarea: "some text and now {{TEXT_INSERTED_VIA_JS}} some more text"
POST: "some text and now {{TEXT_INSERTED_VIA_JS}} some more text"

Textarea: "some text and now {{TEXT_INSERTED_VIA_JS}} *I remove space here via keyboard*"
POST: "some text and now {{TEXT_INSERTED_VIA_JS}}"

Point is when I click a button (enter text via JS into textarea) and there's no activity in textarea via keyboard, then the text inserted via JS is gone in POST.

Any ideas why?


texts:
I need to apply a custom tax over order based on informations provided on 'Payment Info' section, when using my custom payment method.
The problem seems the call stack, the informations are collected in Mage_Payment_Model_Method_Abstract::assignData, but the tax/discount can be applied in Mage_Sales_Model_Quote_Address_Total_Abstract::collect.

There's a way to do this?


texts: Update product name programatically in Magento 2

texts:
I'm trying to programatically update configurable product name and keep other product data unchanged.
The store has 6 store views.
Each store view has unique name - all of them need changing.

I'm using this code:

...
$product = $this->productRepository->get('111111111');
$product->setName('New Name');
$this->productRepository->save($product);

It updates the name but also removes the product from other storeviews (keeps for the default store view only) and removes all product variations.

Questions:

How do I update product name for each store view separately?
Why Product Repository's save method removes stuff + how to prevent it?

THanks!


texts: Magento2 duplicates entries in admin configuration after field id changes

texts:
I changed some Id's in the adminhtml/system.xml configuration file & now I got some duplicated entries.

I tried deleting the old values in the core_config_data table but the old fields continue showing in the admin.

any ideas ?


texts: What is data-post, data-action in magento 2? Can anyone explain wishlist functionality?

texts:
Can anyone explain below code? How did it work?

Is there any alternate way to do?

 <a href="#" data-post='<?php  echo $this->helper('Magento\Wishlist\Helper\Data')->getAddParams($_product) ?>' class="action towishlist" data-action="add-to-wishlist">Add to Wishlist


texts:
Is there a way to bulk update products position at Category Page importing a CSV file via System -> Data Transfer -> Import ?
Cordially,
Daniel Mas


texts: How to add a Dropdown on My Account in the header? What steps should follow

texts: Here is the screenshot what i am exact want.


texts: Adding custom JS to existing module causing errors

texts:
So I've been trying to add some custom javascript to a module, however when the JS has added it works fine in itself, but it causes a lot of errors for a lot of different scripts, and I can't figure out how to stop it from causing that.

What I have done now is load the custom JS using the require-config.js in Module/Namespace/view/frontend, using the following code:

var config = {
map: {
    '*': {
        module: "Module_Namespace/js/view/customFolder/customScript",
    }
},

shim: {
    'module': {
        deps: ['jquery']
    }
},

deps: [
    "js/view/customFolder/customScript"
]
};

My custom script is located in Module/Namespace/view/frontend/web/js/view/customFolder/customScript.js.

If I use the regular js templates that Magento use the entire scripts won't work however:

define([
'jquery',
'jquery/ui'
], function ($) {
"use strict";

$.widget('namespace.customScript', {
    __create: function() {
        this.testAlert();
    },

    testAlert: function() {
        alert('testAlert');
    }
});

return $.namespace.customScript;
});

This will give the following error:

  Uncaught Error: Script error for: js/view/customFolder/customScript
  http://requirejs.org/docs/errors.html#scripterror at makeError
  (require.js:166) at HTMLScriptElement.onScriptError (require.js:1681)

Followed by alot of the following error:

  mixins.js:117 Uncaught TypeError: module.config is not a function at
  Object.getMixins (mixins.js:117) at Object.hasMixins (mixins.js:138)
  at processName (mixins.js:161) at Array.map () at
  Object.processNames (mixins.js:169) at window.define (mixins.js:258)
  at scripts.js:6

However, if I put an alert at the very top of the custom JS (above the define) it will replace all of the module.config errors with these:

  Uncaught TypeError: Cannot read property 'config' of undefined
       at Object.getMixins (mixins.js:117)
       at Object.hasMixins (mixins.js:138)
       at processName (mixins.js:161)
       at Array.map ()
       at Object.processNames (mixins.js:169)
       at window.define (mixins.js:258)
       at translate.js:9
       at translate.js:16

I have no clue how to solve these errors, but I just need to load a simple javascript into an existing module. Is there a better way to do it than this, or can I try anything to debug/fix these errors?

Thanks in advance!


texts: Amazon S3(AWS) in magento programmatically

texts:
i'm adding product programmatically in magento store(Magento ver. 1.9.0.1).

I want to display and save images On my store from Amazon S3(AWS) in magento (Frontend & BackEnd),

i'm using this extension: https://github.com/arkadedigital/magento-s3.

my issue is i have no idea how to add Amazon S3 image to magento db programmatically.

it is possible then how?

Any help or suggestion will be appreciated.


texts: What is the Best Magento Full Page Cache?

texts:
We run an online store and are looking for a FPC solution. There are a lot of players in the field and it is hard to choose one. We were using the Tinybrick Opencommerce Lightspeed Warp FPC but we are running into a lot of issues with it. I would prefer a company that has live support but I know this is likely not possible. Our hosting company stated that Varnish would require four times more hosting power than what we currently have. We tried Lesti FPC but the speed improvement was very small.

Store owners only, can you please recommend a FPC solution that you work with that has significant speed improvement and offers good support and does not cause problems with the site? If you would include a link to your site for testing that would be amazing!

We have already done a lot of speed optimization for the site on the hosting end and on the site itself. We were loading the page at 2.5 seconds but after we decided to make the whole site EV SSL based on the new Google recommendation, our load time is not sitting at around 4.20 seconds load. We are hoping that the FPC solution will be able to help out with the load times. Thanks!


texts: TinyMCE - Update Validation Config Settings to allow  inside

texts:
I have an issue where TinyMCE is removing my links in my static CMS blocks. I believe this is because the anchor includes div's which doesn't meet the validation for TinyMCE.

How is it possible to update the TinyMCE validation to allow me to link my div's.

I've taken a look at the following file

  lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js

I believe this file is what handles the validation as I can see within the settings variable there is:

valid_elements': this.schema.validElements.join(','),

Although I am unsure how I can edit the Tiny MCE to allow me to link divs?

Any advise would be greatly appreciated.


texts:
I'm working on a reorder-module that will allow my customers to:
a) Click a link i email
b) Click a link in order history

What will happend next is that:
1) Delete all items currently in cart
2) Add the items based on the order ID provided

As I plan to add email reminders etc I need this option to work if the user is not logged in as well. Hence I need to add like increment ID to the actual link. However, I dont want customers to randomaly just change the increment ID I need to come up with something.

So my thoughts so far of possible approaches:

a) Hash the increment_id together with some salt (public, not user specific) in the link like www.mydomain,com/index.php/myReOrderModule/.../HASH_VALUE*
On the downside, I need to first, in the module, loop through all increment_ids and check against the hash-value to find a match.

b) Add both the increment_id and the hash-value to the link. Like:
 www.mydomain,com/index.php/myReOrderModule/.../INCREMENT_ID/HASH_VALUE*
In this case all I need to to check is INCREMENT_ID add salt and check it against hash-value

So my questions:

1) Which option is to prefer (their might be others as well?)

2) Is this method "safe" enough to also prefill the cart with shipping details from previous order?


texts: Readiness check fails for Found non-writable paths but they are

texts:
I'm having issues trying to run the Readiness check on Magento 2.1
It's saying "Found non-writable path(s)" with a massive list of paths what aren't writable.

The thing is, they are writable, I've changed the Owner/Group to so many things and nothing has worked, tried reindexing, clearing cache and generation in /var/


texts: When it is good to use viewModel ? What is difference between viewModel and Block?

texts:
I am bit confuse about using  viewModel in Magento. I am not getting exact difference between viewModel and Block.
In which case using viewModel is best case?

Any help will be appreciated.


texts: used in layered naviation (Filterable with results) stopped showing comparable attributes on frontend

texts: For the product with a attribute which is used in layer navigation = 'Filterable with results' Suddenly stopped showing attributes to filter on frontend. How to check this ? where should i lookup ?


texts: Magento2 - is it possible to specify multiple urls in api?

texts:
I would like to know is it possible to (call) specify multiple URLs in a single route webapi.xml ?

Ex:-

<?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/hello/test/" method="POST">
            <service class="Inchoo\Hello\Api\TestInterface" method="test"/>
            <resources>
                <resource ref="anonymous"/>
            </resources>
        </route>
    </routes>


texts:
I've created a mass action for my custom grid. i've encountered a weird problem which is when i check all the checkboxes, it won't send any post id data when i try to retrieve it with:

$this->getRequest->getParams();

but when i don't check all of them, it will send all the data that has been checked, here's my mass action code in xml:

<massaction name="listing_massaction">
  <action name="test">
    <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
          <item name="type" xsi:type="string">test</item>
          <item name="label" xsi:type="string" translate="true">Test</item>
          <item name="url" xsi:type="url" path="namespace_module/test/massTest"/>
      </item>
    </argument>
  </action>
</massaction>

MassTest.php:

use Magento\Backend\App\Action\Context;
use Magento\Ui\Component\MassAction\Filter;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class MassTest extends \Magento\Backend\App\Action
{

   public function __construct(
       Context $context,
       Filter $filter,
       \Namespace\Module\Model\ResourceModel\Test\CollectionFactory $collectionFactory
   ) {
       $this->filter = $filter;
       $this->_listingProduct = $listingProduct;
       $this->_collectionFactory = $collectionFactory;
       parent::__construct($context, $filter);
   }

   public function execute(){
     //$collection = $this->filter->getCollection($this->_collectionFactory->create()); // get your selected collection
     //$collectionSize = $collection->getSize();
     //echo $collectionSize;
     $data = $this->getRequest()->getParams();
     print_r($data['selected']);
     exit;
   }

   /**
    * @param AbstractCollection $collection
    * @return \Magento\Backend\Model\View\Result\Redirect
    */
   protected function massAction(AbstractCollection $collection)
   {

   }

}


texts: Relationship between model and template - magento

texts:
Somebody told template read content from model via block.

My question:

1.Have any possibility to read content directly from model?

2.If Is this possible,How can I achieve?

3.In which situation, block interact with template and model?

4.If I using only template and model, have any drawback in this?


texts: Magento 2 Show timepicker using UiComponent

texts:
I want to show Timepicker in Ui Component Form. I could able to add the time field by using below code but not able to save value. Can anybody help on it.

   <field name="start_time">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Start Time</item>
                <item name="formElement" xsi:type="string">date</item>
                <item name="source" xsi:type="string">prmrule</item>
                <item name="dataScope" xsi:type="string">start_time</item>
                <item name="options" xsi:type="array">
                    <item name="controlType" xsi:type="string">select</item>
                    <item name="timeOnlyTitle" xsi:type="string">Select Start Time</item>
                    <item name="showsTime" xsi:type="boolean">true</item>
                    <item name="timeOnly" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
    </field>

I am not getting that time which I have selected in ui_form. I am getting date in UTC format by default in Magento. I want to get only time which I have selected in ui_form.


texts: Forgot Password redirect to different store page after submitting email on front end

texts: I have multiple store and when customer submit his email address. It redirect to another store login page. How could I redirect to the current store that the customer send his email.


texts: One Step Checkout plugin - Remove subtotal from summary section

texts:
What is the best way to remove the subtotal section from the one step checkout plugin as shown in the screen shot? I also want to remove the VAT from the quantity price. I have attempted to edit in summary.phtml file but even when the total section is removed it still displays, I assume this is being over written by another file.

Thanks in advanced for your help.


texts:
I want create a widget.xml like that:

<parameter name="attribute_options" xsi:type="MT\Widget\Block\Adminhtml\Widget\Attribute\Option"  visible="true">
            <label translate="true">Attribute Options</label>
            <description translate="true">Select attribute options to show</description>
        </parameter>

So, could I create a new parameter type like xsi:type="MT\Widget\Block\Adminhtml\Widget\Attribute\Option" ? If no, how can expand new atomic type?


texts: Magento2 dump the raw sql of a query before it is executed

texts:
I have this resource

\Magento\Framework\App\ResourceConnection $resource

and this connection object

$this->_connection = $resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);

How do I dump the raw sql query that will be executed for example on the fallowing code:

$this->_connection->update('my_table',['my_field'=>$value],['field_equals'=>$field_value]);


texts: condition based add tab on Product page - magento2

texts:
I want to add a tab on product view page in magento2.

That tab will only be visible if the customer belongs to a certain customer group.

Tabs are added via XML file, how can I create a custom handler in magento2 or use some condition on that.


texts:
I have a CMS page and would like to add current pricing and display available quantity available called from the product SKU. There is a product ID for each product. The code below is from the category page.   What is the code to display the following:

Product price

<?php
if($prd_price == 1){
echo $this->getPriceHtml($_product, true);
}
?>

Qty available inventory

<?php echo($_product->getSku()); ?></td> Available Units: <?php echo $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct ($_product); echo round($stock->getQty()); ?>

Thank you.


texts:
I was disabled Magento Review with command

"bin/magento module:enable Magento_Review"

Now, I reenabled it with the same command, but the module appears anywhere.

No admin links under Reports, Marketing->User Content and Stores->Attributes.

It's enabled by settings too under Stores->Settings->Configuration->Catalog->Catalog->Product Reviews

Also there no issues with source files under

/vendor/magento/module-review

/vendor/magento/module-review-analytics

/generated/code/Magento/Review


texts:
I want these attribute data in my magento website.

when i delete these sourcce model it work fine but who can i change the source model value.

I dont want to ignore these attributes. If you have any other solution please comment below

[2020-02-25 06:33:46][ERROR]: Foreign key (FK_CATALOG_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID) constraint fails on source database. Orphan records id: 477 from `catalog_eav_attribute`.`attribute_id` has no referenced records in `eav_attribute`
[2020-02-25 06:33:46][ERROR]: Foreign key (FK_CAT_PRD_ENTT_INT_ATTR_ID_EAV_ATTR_ATTR_ID) constraint fails on source database. Orphan records id: 477 from `catalog_product_entity_int`.`attribute_id` has no referenced records in `eav_attribute`
[2020-02-25 06:33:46][ERROR]: Foreign key (FK_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID) constraint fails on source database. Orphan records id: 467,477 from `eav_entity_attribute`.`attribute_id` has no referenced records in `eav_attribute`
[2020-02-25 06:33:46][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2020-02-25 06:33:46][ERROR]: Incompatibility in data. Source document: eav_attribute. Field: source_model. Error: Class profile/entity_school is not mapped in record attribute_id=551
[2020-02-25 06:33:46][ERROR]: Incompatibility in data. Source document: eav_attribute. Field: source_model. Error: Class eav/entity_attribute_source_custom is not mapped in record attribute_id=563
[2020-02-25 06:33:46][ERROR]: Incompatibility in data. Source document: eav_attribute. Field: source_model. Error: Class shipperhq_shipper/source_freight_freightclass is not mapped in record attribute_id=614
[2020-02-25 06:33:46][ERROR]: Incompatibility in data. Source document: eav_attribute. Field: source_model. Error: Class wsafedexfreight/shipping_carrier_wsafedexfreight_source_freightclass is not mapped in record attribute_id=620
[2020-02-25 06:33:46][ERROR]: Incompatibility in data. Source document: eav_attribute. Field: source_model. Error: Class wsafedexfreight/shipping_carrier_wsafedexfreight_source_itempackaging is not mapped in record attribute_id=621
[2020-02-25 06:33:46][ERROR]: Incompatibility in data. Source document: eav_attribute. Field: source_model. Error: Class boxmenu/boxmenu is not mapped in record attribute_id=627
[2020-02-25 06:33:46][ERROR]: Incompatibility in data. Source document: eav_attribute. Field: source_model. Error: Class shipperhq_shipper/source_validation_result is not mapped in record attribute_id=666


texts: Making minor changes to the RWD default theme?

texts:
I have to admit that I'm a total Magento newbie, just started reading the manual, finished a plain and a demo installation, and preparing the migration from PrestaShop to Magento CE.

I really like the default RWD theme as is, and pretty much would only exchange some colors and make the slider on the homepage 2/3 in a 3 column layout.

I have discovered the RWD dev guide and now I'm wondering if I need to follow that guide with installing compass and making a full copy of the default theme if I only want to implement the mentioned minor changes.

Any advice?


texts: customer-data.js error: .../section/load/?sections=instant-purchase&... JS error

texts:
I keep getting a JS error in my site, it's an ajax get request to http://domain.com/customer/section/load/?sections=instant-purchase&update_section_id=false&_=1517327157790 which results in a "code 400 Bad request".

It gets called by the Instant Purchase module - which is disabled in my Magento 2.2.2 site.

What could cause this?

My understanding is that the sections.xml file does this, but if the module is disabled, it should stop, right?

What am I missing?


texts: I want to sell at the international level, I am looking for the VAT rate or extensions for magento. I sell material goods


texts: Magento 2 url rewrite cann't work with querystring

texts:
I want to rewrite url from "men.html?brand=147" to "men/nike.html"

I tried to add new custom rewrite url in Admin but it wasn't take querystring "?brand=147"

How can i fix that! Thank you!!!


texts: HOW TO DELETE OR OVERRIDE _NAV CSS FILE FORM BOOTSTRAP CDN

texts:
_nav file in bootstrap CDN damaging my navbar style So
HOW TO DELETE OR OVERRIDE _NAV.sccs FILE FORM BOOTSTRAP CDN?

I have added bootstrap CDN to Magento 2 it changed my main menu alignment how to fix it??

display: block fixing it instead of display: flex CSS style but I don't know how to add it

how to add display:block css style to override display: flex bootstrap CDN css style in _nav.scss file
I have already added
.nav {
display: block;
}
but it doesnt work


texts: Show only lowest (tier)price and add "price from"

texts:
In the catagory page ,the prices are shown directly under the product name.
In my theme (SM-Market): left is the normal price, on the right the Lowest tier price.

How can I show only the lowest price??

Or:  lowest price left, normal right.

Or:  hold positions and add "price from" before lowest tierprice.


texts: How to get catalog name at all levels in magento

texts:
I want to display all catalog names from all the levels and I am using the following code and it shows the category at level 1 and I want a nested menu to be displayed

the following is the code snippet

<select id="<?php echo $categorySearchHelper->getCategoryParamName() ?>" name="<?php echo $categorySearchHelper->getCategoryParamName() ?>">
    <option value=""><?php echo $this->__('All') ?></option>
    <?php foreach ($this->getSearchableCategories() as $mainCategory): ?>
        <option value="<?php echo $mainCategory->getEntityId()?>"><?php echo $mainCategory->getName() ?></option>
        <?php if ($categorySearchHelper->showSubCategories()) : ?>
            <?php foreach ($this->getSearchableSubCategories($mainCategory) as $category) : ?>
                <option value="<?php echo $category->getEntityId()?>"><?php echo $categorySearchHelper->getIndentationText() . $category->getName()?></option>
            <?php endforeach;?>
        <?php endif ?>
    <?php endforeach;?>
</select>

Please help


texts: Magento 2.3 - Adding Product Name and Price into a New Order email template

texts:
I want to be able to pull the Product Name and Price from a new order to include it in the New Order email template.
I need to add both variables into a url to redirect users somewhere else once they've completed their purchase.
Ideally, the url that I'd be creating would look like this:
http://mywebsite.com/registerdb?package=%package&itemtotal=%cost
Where %package would be the Product Name and %cost the cost of the item in the cart.
Any help would be appreciated!


texts: Checkout page redirects to cart page after filling billing address

texts:
I have a issue in checkout page. After filling up shipping address and hitting continue button, the site redirect to cart page without emptying the cart. When I inspecting the checkout page with Firebug, the below link is thrown 500 Internal Server Error,

www.website.com/index.php/checkout/onepage/saveBilling/

I have followed some magentocommerce links to find out the issue, but no use.

What will be the issue? Any assistance will be helpful.

This is the error I am getting in error log:

2014-01-30T09:08:44+00:00 ERR (3): Warning: include(SoapClient.php): failed to open stream: No such file or directory  in /var/www/vhosts/website.com/public_html/lib/Varien/Autoload.php on line 93
2014-01-30T09:08:44+00:00 ERR (3): Warning: include(SoapClient.php): failed to open stream: No such file or directory  in /var/www/vhosts/website.com/public_html/lib/Varien/Autoload.php on line 93
2014-01-30T09:08:44+00:00 ERR (3): Warning: include(): Failed opening 'SoapClient.php' for inclusion (include_path='/var/www/vhosts/website.com/public_html/app/code/local:/var/www/vhosts/website.com/public_html/app/code/community:/var/www/vhosts/website.com/public_html/app/code/core:/var/www/vhosts/website.com/public_html/lib:.:/usr/share/pear:/usr/share/php')  in /var/www/vhosts/website.com/public_html/lib/Varien/Autoload.php on line 93


texts:
You are setting up a brand new Magento installation for a merchant who is migrating from Magento 1 to Magento 2.
Keeping in mind upgradability and the need to customize, which one do you choose?

A. Create a new Magento instance using composer create-project
B. Clone the magento/magento2 GitHub repository
C. Run php bin/magento setup:migrate   command
D. Create a new Magento instance by using the bin/magento install command

Can someone let me know what will be the correct answer with valid reason. I was thinking to go with C but then couldn't find this command in CLI commands list.


texts:
I have tried a lot of different methods of restricting the access via .htaccess and I can not get it to work. I have tried both methods on production and on fresh magento installation on new cPanel. Any idea why this doesn't work?

Method 1:

 Order deny,allow
 Deny from all
 Allow from 1.1.1.1

Method 2:

 RewriteCond %{REQUEST_URI} ^/admin/ [NC]
 RewriteCond %{REMOTE_ADDR} !^1.1.1.1
 RewriteRule ^(.*)$ http://%{HTTP_HOST}/ [R=302,L]


texts: Magento 2 saving update product in "All Store Views"

texts:
I want to update product information for "All Store Views" but it seems that when I try to update a product, Magento ignores setStoreId(0). Instead the product information will be saved to store view 1.

For reference I have 4 store views: 1, 2, 3, 4 + store view 0 (admin).

My code:

$collection = $this->filter->getCollection($this->collectionFactory->create());

foreach ($collection->getAllIds() AS $productId)
{
    $product = $this->productRepository->getById($productId);

    $product->setStoreId(0);
    $product->setSpecialPrice(111);

    $this->productRepository->save($product);
}


texts: Reporting on Blocks in Content Elements of 2.3.2

texts: How would I set up reporting on Blocks that are set up in Content Elements of our Magento 2.3.2 website? These blocks contain advertising and I would like to see if customers click on them.


texts: Magento 2.3.4 - How to create filter by product rating in layered navigation

texts: I want to have a filter by product rating in layered navigation. Regarding this, I found a solution Magento 2 : Rating Filter in Layered Navigation. This is working fine if you modify vendor\magento\module-catalog\Model\Layer\FilterList.php in core folder(vendor folder). But I'm not able to override vendor\magento\module-catalog\Model\Layer\FilterList.php from app/code. Please share if anybody has any suggestion. Thanks in advance.


texts:
I'm looking for an event that is always fired just before Magento captures the payment. The reason is that the Magento is integrated into an external system (events registration) and therefore needs to check the availability just before charging the credit card - if no spots are available I'd need to throw an error and redirect the user.

Is there a reliable event that I can get my observer to listen on? Or should I hard code a custom event into the payment system? (There's only 1 payment method).


texts: How to change the address format shown on the user account dashboard?

texts:
I'm trying to make changes on the user addresses format but I didn't get it yet. I've tried to change the format directly on /app/code/core/Mage/Customer/etc/config.xml but without success. Basically what I need is two changes: first, show the second address line besides first line, because I'm using the first only for the street name and the second only for number. However, for a layout questions, I don't want an entire line just to show a number, so, I wanna put the number besides the street name (in Brazil we use the format Street Name, comma, number, comma, ap/suite etc.). How to?

The second detail is: how to show in admin area, on the customer management page, a custom field I've used in registration page, like "How did you find us?", for example.

Thanks!!


texts:
I want to implement flat rate shipping for magento 2 in New Zealand

I am unable to find region code list Like Auckland, Wellington, Christchurch and Dunedin etc

Please, anyone, guide me so that I find Region/State code.


texts:
I'm trying to determine how to remove index.php from the Admin page URLs.

I already know how to do it for SEO on public facing pages as is documented here.   And "Use Web Server Rewrites" is already on, it just isn't working for admin URLs.

Perhaps it doesn't matter that much that it includes index.php, but cleaner URLs would be much easier to manage patterns for .htaccess rules and my WAF (Web Application Firewall).

Update: I uncommented the following two lines from the .htaccess, this is not a solution.  I expect there must be a setting somewhere in Magento that tells it to generate links that exclude the index.php.

## externally rewrite index.php/admin to admin
    RewriteCond %{REQUEST_URI} ^/index.php/admin.*$
    RewriteRule ^index.php/admin(.*) /admin$1 [R]


texts: magento 2.2.2 array_replace_recursive(): recursion detected

texts:
I have installed new magento 2.2.2 version but when i run command php bin/magento setup:upgrade getting error Warning: array_replace_recursive(): recursion detected in vendor\magento\module-config\App\Config\Type\System.php on line 158

how can i solve that ?


texts: Magento 2.0 Rest APi orders - multiple ID filters

texts:
I'm having a really hard time to retrieve orders by entity_id. I'm calling '/rest/V1/orders' and passing this parameters:

{
  'searchCriteria[filter_groups][0][filters][0][field]': 'entity_id',
  'searchCriteria[filter_groups][0][filters][0][value]': '1',
  'searchCriteria[filter_groups][0][filters][0][condition_type]': 'eq',
  'searchCriteria[filter_groups][0][filters][1][field]': 'entity_id',
  'searchCriteria[filter_groups][0][filters][1][value]': '2',
  'searchCriteria[filter_groups][0][filters][1][condition_type]': 'eq',
  'searchCriteria[current_page]': 1,
  'searchCriteria[page_size]': 100
}

When trying to do that it results with an empty array. Using only one filters returns a proper order. I also tried using "in" filter

{
  'searchCriteria[filter_groups][0][filters][0][field]': 'entity_id',
  'searchCriteria[filter_groups][0][filters][0][value]': '1,2',
  'searchCriteria[filter_groups][0][filters][0][condition_type]': 'in'
  'searchCriteria[current_page]': 1,
  'searchCriteria[page_size]': 100
}

Passing params like this result in returning order with ID 1, but no order with ID 2. If I change the order of filter value to '2,1' it returns only order with ID 2.

What am I doing wrong here ? What is the proper way of getting orders from REST API by their IDs ?


texts: Invalid website id requested - Customers can't log into other sites

texts:
I deleted an old website id that we have not used for the past year.
However in doing so the customers that registered with this site can no longer login to the other websites associated with the account.

When we try to access the customer via the admin panel we get the following error:

a:5:{i:0;s:29:"Invalid website id requested.";i:1;s:2920:"#0 /home/socia641/public_html/app/code/core/Mage/Core/Model/App.php(969): Mage::exception('Mage_Core', 'Invalid website...')
#1 /home/socia641/public_html/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php(128): Mage_Core_Model_App->getWebsite('2')
#2 /home/socia641/public_html/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php(58): Mage_Adminhtml_Block_Customer_Edit_Tab_Account->initForm()
#3 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Customer_Edit_Tabs->_beforeToHtml()
#4 /home/socia641/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#5 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#6 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#7 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#8 /home/socia641/public_html/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left')
#9 /home/socia641/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/socia641/...')
#10 /home/socia641/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#11 /home/socia641/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#12 /home/socia641/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#13 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#14 /home/socia641/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#15 /home/socia641/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#16 /home/socia641/public_html/app/code/core/Mage/Adminhtml/controllers/CustomerController.php(151): Mage_Core_Controller_Varien_Action->renderLayout()
#17 /home/socia641/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_CustomerController->editAction()
#18 /home/socia641/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit')
#19 /home/socia641/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 /home/socia641/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#21 /home/socia641/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#22 /home/socia641/public_html/index.php(83): Mage::run('', 'store')
#23 {main}";s:3:"url";s:40:"/index.php/admin/customer/edit/id/14397/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

We are still able to search the customer email in manage customers we just cant access the account and they cant log into the site. In the website column it is blank compared to other customers. All other details seem normal. How do we fix this issue?


texts: How to restore deleted Order in Magento 1.9.2?

texts: I have deleted an order accidentally. It's very important to recover this order However I do not know how to recover deleted order. I am using magento 1.9.2 version. Kindly help me.


texts: Which referenceBlock name i should set in own xml file to override template Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml?


texts: Magento 2 - Compare Products Not Showing In Sidebar

texts:
On a new site build, I'm trying to figure out why the compare products information is not showing up in the sidebar for the category page or the customer account page. It a new M2 install with a custom theme that is inheriting from Luma. When I click any product's "add to compare" button, the page will re-load, but there is no success message and nothing shows up in the sidebar, even after I wait for the page to fully (and I mean fully) load.

So far, this is the path I have gone down to test why the items are not showing up.

I have checked to make sure that the data is getting set in the DB on the catalog_compare_item table when I hit the "add to compare" button, and it is. It's being stored with the user ID when I'm logged in and not when I'm not. This table is matching a test dev site I set up to play with debugging this.

This lead me to check the compare page itself at {{site-root}}/catalog/product_compare/index/ and the products that I have added are showing up just fine. All the data is being pulled in and I can use all the functionality on this page.

This points to the Knockout JS templates that are being used to display the content. I tracked the template down using this file {{site-root}}/vendor/magento/module-catalog/view/frontend/layout/default.xml which points to this file for display logic {{site-root}}/vendor/magento/module-catalog/view/frontend/web/js/view/compare-products.js. When I put in a console.log for the Customer object that is driving the data for the file:

define([
    'uiComponent',
    'Magento_Customer/js/customer-data'
], function (Component, customerData) {
    'use strict';
    console.log(customerData);

I get back an empty object. So this points to a null value coming back from the file {{site-root}}/vendor/magento/module-customer/view/frontend/web/js/customer-data.js.

So why would this file be returning with nothing?


texts: How can i debug in getAllowedMethods for custom shipping method?

texts:
How can i debug in custom shipping method?

<?php
namespace Inchoo\Shipping\Model\Carrier;

use Magento\Quote\Model\Quote\Address\RateRequest;
use Magento\Shipping\Model\Rate\Result;

class Example extends \Magento\Shipping\Model\Carrier\AbstractCarrier implements
    \Magento\Shipping\Model\Carrier\CarrierInterface
{
    /**
     * @var string
     */
    protected $_code = 'example';

    /**
     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
     * @param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
     * @param \Psr\Log\LoggerInterface $logger
     * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory
     * @param \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
        \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
        array $data = []
    ) {
        $this->_rateResultFactory = $rateResultFactory;
        $this->_rateMethodFactory = $rateMethodFactory;
        parent::__construct($scopeConfig, $rateErrorFactory, $logger, $data);
    }

    /**
     * @return array
     */
    public function getAllowedMethods()
    {
        $allowed = explode(',', $this->getConfigData('shipcode'));
        $arr = array();
        foreach ($allowed as $k) {
            $arr[$k] = $k;
        }

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

        return ['example' => $this->getConfigData('name')];
    }

    /**
     * @param RateRequest $request
     * @return bool|Result
     */
    public function collectRates(RateRequest $request)
    {
        if (!$this->getConfigFlag('active')) {
            return false;
        }

        /** @var \Magento\Shipping\Model\Rate\Result $result */
        $result = $this->_rateResultFactory->create();

        /** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */
        $method = $this->_rateMethodFactory->create();

        $method->setCarrier('example');
        $method->setCarrierTitle($this->getConfigData('title'));

        $method->setMethod('example');
        $method->setMethodTitle($this->getConfigData('name'));

        /*you can fetch shipping price from different sources over some APIs, we used price from config.xml - xml node price*/
        $amount = $this->getConfigData('price');

        $method->setPrice($amount);
        $method->setCost($amount);

        $result->append($method);

        return $result;
    }
}

i placed the code inside the getAllowedMethods() but nothing was happened, the payment method still display

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

Anyone know how to debug in getAllowedMethods?


texts: Apply custom validation at checkout page in magento2?

texts:
I am new in this and trying to change on checkout page.
I am trying to override the js file to override the postcode validation after the ajax hit.
But it's not working.
What are the steps should I follow to override the js and added the custom alidation at checkout onepage.


texts: Magento 2: Migrate changes made since last migration using non-live DB?

texts:
When we started development of our M2 project, we migrated all data to the new M2 project from M1. We did this using the Data Migration Tool. Because we did not want to mess with the live database, we first made a copy of this database and used this copy to migrate our data to M2.
This has worked perfectly.
Now we want to migrate all changes made to the live M1 database since we started development on M2. But now I saw that in order to migrate the delta from the old M1 database Magento added some tables to that database when we migrated it (according to https://devdocs.magento.com/guides/v2.4/migration/migration-migrate-delta.html). However, since we migrated from a copy and not the live M1 database, no changes were tracked.
Is there a way to migrate changed data from M1 to M2 without Magento having kept track of changes in the M1 database?


texts: Could you advise How to show thumbnail selected file of custom option?


texts: Moving section navigation block without breaking mobile navigation

texts:
So I have this XML file to move the navigation:

<move element="navigation.sections" destination="header-wrapper" />

On Desktop, I need some styling to try and keep it between the logo and the search bar so I have added this CSS inside of a _navigation_extend.less file:

.nav-sections {
    background-color: transparent;
    position: relative;
    top: -12px;
    left: 10px;
    margin-bottom: 0px;
    width: 52%;
    float: left;
}
.navigation {
    background-color: transparent;
    font-weight: 400;
    z-index: 5;
}

This fixes my issue on desktop mode but completely breaks mobile navigation. How can I fix this on desktop mode and keep the current style for mobile?


texts: Magento CSV Stock import not making M2EPro update my listings

texts:
I am importing a CSV of stock levels into Magento2 (2.1.6) but that is not triggering any updates to happen to my M2E Pro ebay listings.

It seems that the CSV import doesn't use Magento core, so it doesn't mark a product as updated, so M2E Pro doesn't pick up the fact that the product has had an update, and does nothing.

M2E Pro offers some code snippets that could help with this, but I am at a loss as to how that could be implemented so that it will work when I import a CSV into Magento?

M2E Pro article

Has anyone done this already, or could help with a solution?


texts:
I have created custom module i.e /stores/index/display.

But I want to modify the /stores, How can I do that?


texts: Magento 2 Static Content deploy requried?

texts:
I am a newbie in Magento2 I read some articles in which they mention like in Developer mode there is no need for Content deploy, it is only required in production mode.

but when I worked practically I faced an issue for this, without static content deploy my code was not updating, so I want to know what is Magento doing while Static content deploy.

any reference links would also be appreciated.


texts:
How can i filter the sale order grid by any preference , observer or plugin . How override sales order grid.

Can any one help me . I just want to apply condition just like addFeildToFilter and i pass custom_attribute with value and then just selected order record shown in grid.

Thanks in advance


texts: Missing SKU field in the "New Product" form

texts:
I've recently started working with Magento and I'm facing a pretty basic problem that I can't manage to figure out.
When creating a new product, from the admin page, Catalog -> Products -> New Product, I'm being redirected to a form. After completing the required fields, I receive an error message:

The value of attribute "sku" must be set

Which is a problem, as I don't have any SKU field in my form. I've looked for this problem, without any result, and I found out that SKU should be somewhere between Product Name and Price. Unfortunately, that's not my case.

Any ideas what should I do in this case?
Thank you!

P.S. My version of Magento is the latest one, 2.2.3.

Edit 1:
This is a screenshot of my form and error:

Edit 2:
This is a screenshot of my default Attribute Set:


texts: Magento hreflang tags: How to get URL Key per Store View?

texts:
I have been trying to add hreflang tags to a multi-language project following the answers to this question. In my setup there is one website, one store and there are three store views (English, German and Dutch).

The code that I'm currently using in

[my Magento install dir]/app/design/frontend/MYPACKAGE/MYTHEME/template/page/html/head.phtml

is the following

<?php foreach (Mage::app()->getWebsites() as $website) {
    foreach ($website->getGroups() as $group) {
        $stores = $group->getStores();
        foreach ($stores as $store) {
            $storeCode = $store->getCode();
            echo '<link rel="alternate" hreflang="' . $storeCode . '" href="' . $store->getCurrentUrl(false) . '"/>' . "\n";
        }
    }
}
?>

This outputs the hreflang tags like this

<link rel="alternate" hreflang="en" href="domain.com/en/bags.html">
<link rel="alternate" hreflang="de" href="domain.com/de/bags.html">
<link rel="alternate" hreflang="nl" href="domain.com/nl/bags.html">

At first glance this looks perfect, however there is this one problem. The store is using different URL Keys per language (store view). To improve SEO, the URL Keys are translated to match the language of the store view. For store views other than the one that is selected, the current hreflang tags point to URLs that do not exist (resulting in 404 Page not Found errors).

So the hreflang tags that I am looking for should look like this

<link rel="alternate" hreflang="en" href="domain.com/en/bags.html">
<link rel="alternate" hreflang="de" href="domain.com/de/taschen.html">
<link rel="alternate" hreflang="nl" href="domain.com/nl/tassen.html">

How can I get the hreflang tags to match the proper URL Key for each store view?

UPDATE July 16, 2015

Even though I have not accepted Marius his answer (because I did not manage to get his second solution to work for me) I used his first approach and created 301 redirects for all pages in different languages.

This seemed to work out just fine but last week Google started sending out error messages to users for incorrect implementation on Hreflang through Google Search Console.

In the Search Console it says that Google has found URLs for my 'en' site and alternate URLs in 'nl' that do not have return tags. A screen shot of the console is below.

The Alternate 'en' URLs that Google is listing do appear in the <head> section of my site, but I have set 301 redirects to the 'nl' URLs in the Magento Admin Panel.

For some reason Google handles this as incorrect implementation of hreflang tags.


texts: Change product position by drag and drop?

texts: I'm using magento 2.1 and I would like to know if there is an possibility that I can change the product order position by dragging in de back-end?


texts:
I have created a UI form in admin but I am not able to receive form data in save controller.
Following is my code in ui_component

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">my_edit_form.edit_form_data_source</item>
        </item>
        <item name="label" xsi:type="string" translate="true">My Information</item>
        <item name="template" xsi:type="string">templates/form/collapsible</item>
    </argument>
    <settings>
        <buttons>
            <button name="save" class="Anshu\MyManagement\Block\Adminhtml\My\Edit\SaveButton"/>
            <button name="back" class="Anshu\MyManagement\Block\Adminhtml\My\Edit\BackButton"/>
        </buttons>
        <namespace>my_edit_form</namespace>
        <dataScope>myManagement</dataScope>
        <deps>
            <dep>my_edit_form.edit_form_data_source</dep>
        </deps>
    </settings>
    <dataSource name="edit_form_data_source">
        <argument name="data" xsi:type="array">
            <item name="js_config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
            </item>
        </argument>
        <settings>
            <submitUrl path="my/my/save"/>
        </settings>
        <dataProvider class="Anshu\MyManagement\Model\DataProvider" name="edit_form_data_source">
            <settings>
                <requestFieldName>id</requestFieldName>
                <primaryFieldName>id</primaryFieldName>
            </settings>
        </dataProvider>
    </dataSource>
    <fieldset name="details">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="collapsible" xsi:type="boolean">false</item>
                <item name="label" xsi:type="string" translate="true">My Information</item>
                <item name="sortOrder" xsi:type="number">10</item>
            </item>
        </argument>
        <field name="name" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">myManagement</item>
                </item>
            </argument>
            <settings>
                <dataType>text</dataType>
                Name
                <dataScope>name</dataScope>
            </settings>
        </field>
        <field name="description" formElement="textarea">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">myManagement</item>
                </item>
            </argument>
            <settings>
                <dataType>text</dataType>
                Description
                <dataScope>description</dataScope>
            </settings>
        </field>
    </fieldset>
</form>


texts: Who called the event / observer in magento?

texts:
Eg I have a block that is on the page to edit the purchase order, both the editing page of the order as the block passes through the event sales_order_load_after when obeserver the event can not know what they spent for the event, if it was page or block.

How to know who called or went by event?

I have a fraud clearsales module, this module is on the order page to check I just click on the button analyze, when I click on it, it passes the event "sales_order_load_after" need to know who is passing by the magnitude of the event is ClearSale or page, I know that the two are going through the event as a test print.

config.xml:

<adminhtml>
        <events>
            <sales_order_load_after>
                <observers>
                    <ceicom_managesale>
                        <class>ceicom_managesale/observer</class>
                        <method>someMethod</method>
                    </ceicom_managesale>
                </observers>
            </sales_order_load_after>
        </events>
    </adminhtml>

Observer:

<?php

class Ceicom_ManageSale_Model_Observer
{
    public function someMethod($observer)
    {
        echo("teste");
    }
}


texts:
Hello Magento Community!
I currently check customers for their Browser / Operating System to see if it is compatible with our website. (Ex Windows XP is no longer supported by Microsoft or many main web browsers)

How can I make it so that when people first come to my website I perform the check then redirect them to an error page, or possibly a customizable view with error messages? Is it possible to do without creating custom blocks or controllers?


texts: Does interception in magento2 replace observers in magento1?

texts:
Is interception intended to be the preferred method when dealing with changing the behavior of an original method in Magento2 as observers was in magento1?

https://wiki.magento.com/display/MAGE2DOC/Using+Interception


texts: Override SenderBuilder class to add Bcc when sending invoice

texts:
I didn't found an event when invoice email is sent, so i tried to override Magento\Sales\Model\Order\Email\SenderBuilder class, the override is working but getting the customer attribute invoice_email is not working, it works on my localhost by in the development website (which is multistore), it didn't work.
I don't know if there's a better solution to use an observer if there's a sending invoice email event

so in my module

Vendor/ModuleName/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\Sales\Model\Order\Email\SenderBuilder" type="Vendor\ModuleName\Model\Sales\Order\Email\SenderBuilder" />
</config>

In app/code/Vendor/ModuleName/Model/Sales/Order/Email/SenderBuilder.php

namespace Wetag\InvoiceEmail\Model\Sales\Order\Email;

class SenderBuilder extends \Magento\Sales\Model\Order\Email\SenderBuilder
{

public function send()
{

    $this->configureEmailTemplate();

    $this->transportBuilder->addTo(
        $this->identityContainer->getCustomerEmail(),
        $this->identityContainer->getCustomerName()
    );

    $copyTo = $this->identityContainer->getEmailCopyTo();

    if (!empty($copyTo) && $this->identityContainer->getCopyMethod() == 'bcc') {
        foreach ($copyTo as $email) {
            $this->transportBuilder->addBcc($email);
        }
    }

    if($this->identityContainer  instanceof \Magento\Sales\Model\Order\Email\Container\InvoiceIdentity) {
    //do stuff

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $CustomerModel = $objectManager->create('Magento\Customer\Model\Customer');

        $CustomerModel->setWebsiteId($this->identityContainer->getStore()->getStoreId());
        $CustomerModel->loadByEmail($this->identityContainer->getCustomerEmail());
        $email = $CustomerModel->getData()['invoice_email'];

        if(!empty($email)){

            $this->transportBuilder->addBcc($email);
        }

    }
    $transport = $this->transportBuilder->getTransport();
    $transport->sendMessage();
}
}


texts: Requested Store not found while applying new theme after updating magento 1.9 to 2.1.7

texts:
I've successfully upgraded magento 1 to 2. Everything is working fine, all data has been imported.
But when i go to apply my theme, i get the error

Requested Store is not found

Any help will be appreciated.


texts: How to use expression values in where condition?

texts:
How to do that in magento model way

Select sum(qty + product_id - any_other_columns) as total from table2  where total>10;


texts: How to create a grid within magento admin to display DB table information

texts: Basically I have custom table for customer details. And I wanted to make a grid of all values from that table in admin panel.


texts: After running yarn run watch:venia the command run successfully and got the build url but getting error response as mentioned below:

texts:
i have set the urls as:

MAGENTO_BACKEND_URL="http://magentovenia.com/"
MAGENTO_BUILDPACK_SECURE_HOST_EXACT_DOMAIN='pwa.magentovenia.com'

But Getting Error Response In Browser

  message   "Error: ServiceResolver: Request to
  http://magentovenia.com/graphql failed: ServerParseError: Unexpected
  token < in JSON at position 8\n    at makePromise.then.catch.e
  (/var/www/html/magento/pwa-studio/packages/upward-js/lib/resolvers/ServiceResolver.js:105:23)\n
  at process._tickCallback (internal/process/next_tick.js:68:7)"


texts: Magento 2: How to get search products Collection

texts:
I need to get search products collection in .phtml. Currently i'm getting but Bundle products are missing. I want custom search collection.

Thanks in advance.


texts:
I have a problem in my site. I get too many unrelated results, and if I refresh cache it is fixed for a while. It seems like its search results of other people (or my previous searches). Is there a way to fix this?

Magento version 1.9.2.4


texts: I'm getting an error on my checkout page when I try to click continue

texts: I added an extension to have the discount code part of my onepage checkout process but when I activate the extension the "Continue" button on the Discount code step doesn't work. And it's giving me an error like it's trying to go to an insecure page. The config.xml file for the discount code does have the secure_url tag so why isn't this working. Can someone tell me exactly what files and where in them I should be looking for why this error is happening


texts: Magento2.3.0 Specific Category associated products not appearing in frontend

texts:
I am using Magento2.3.0 and my issue is on production mode in front-end side one category inside product not showing on but in admin side all settings are proper and assign product it in this category.

I apply all command including re-indexing  but not showing  in this category inside product.

If any one idea please share it


texts: Magento 2 How to place an order after getting response from redirected url?

texts:
Folowing is my ajax call in file:
Path: /app/code/Nitesh/Module/view/frontend/web/js/view/payment/method-renderer/payment-method.js

$.ajax({
dataType: 'json',
url: url_submit,
data: data,
async : false,
type: 'post',
success: function(result)
{
    if(result != null) {
        flag_success = 1;
    } else {
        flag_success = 0;
        window.location.assign(url_redirect);
    }
},
});

My placeOrder()  fuction is called when flag_success == 1;

if(flag_success == 1){
      this.placeOrder();
}

Now when I'm redirecting to url_redirect then I want to place an order after getting response from that redirected url.

Means I want to make value of flag_success = 1; after gettting back from that redirected url.

Also If there is any way to call placeOrder() from controller that also helps me. Because I'm getting response of that redirected url there.

If anyone want more information then I will provide.


texts: Magento 2.1 : Add to cart adds 2 products from PDP

texts:
In magento2.1 add to cart button adds two quantity in cart when you press it for second time.
I mean, on product page when add a product to cart it's ok and adds 1 qty. But on second time when I press ADD TO CART, it adds 2 qty and cart qty goes to 3 instead of 2.
Also I didn't use amazon payment.
what should I do?


texts:
Is there was a way to programmatically clone an attribute set? I would like to create a new attribute set based on the DEFAULT set. I would like my cloned new attribute set to contain all the same groups and attributes that the Default set does.

I thought there was a way to quickly write a program to do this, but now I'm getting confused.

Please advise.


texts: cannot read property 'section loadurl' of undefined in customer-data.js:89 Magento2

texts:
**i have already try all the given solutions but its not woking for me.
**


texts: how to get product attribute set in phtml file

texts:
I want attribute set name in phtml file in magento2 and display it in product page

i want to display it in below page


texts: Adding a button to top of page in category edit

texts:
I have found where the buttons (reset, delete and save) get added in app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml:

Line 28:

<?php echo $this->htmlEscape($this->getHeader()) . ($this->getCategoryId() ? ' (' . Mage::helper('catalog')->__('ID: %s', $this->getCategoryId()) . ')' : '') ?>

            <?php echo $this->getResetButtonHtml() ?>
            <?php if($this->getCategoryId()): ?>
                    <?php echo $this->getDeleteButtonHtml() ?>
            <?php endif; ?>
            <?php echo $this->getAdditionalButtonsHtml(); ?>
            <?php echo $this->getSaveButtonHtml() ?>

And in app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php are the methods and logic to add them.

I would like to add my own but I really don't want to be copying form.phtml into my local directory nor would I really want to overwrite Form.php. Is there a better way? Possibly with my layout xml for my module?

Thanks in advance.


texts:
I am new to magento2 and need to create an event with the shopping cart.

when you add an item the shopping cart will change color and when the cart is empty, return to the initial color.


texts:
I need to execute some actions when the Order Invoice is created, so I've made an Observer and I've attached it to 'sales_order_invoice_save_after' event.

The problem is that my Observer function is called when the Invoice is made but also when Comments are added to the Invoice.

How could I check for that, so I could execute my actions only when the Invoice is made?


texts:
When logging into Magento's new Marketplace extension/theme store, you're presented with two options

You can log-in/signup using your standard magento.com account, or you can "Use a Connected Account".  Click on this Connect with Magento button does nothing.

What is this supposed to do?  What is a Magento Connected Account?


texts: Not able to get OAuth token for Magento Rest API Client

texts:
I am using Magento version 1.9.1.0 and server running on my mac and trying to use Magento Rest APIs using OAuth Integration.
I have a consumer key and consumer secret.

Now, I want to get OAuth token for Rest APIs usage. I have followed this link

In this, we needed oauth_signature and timestamp which we don't get when we create a consumer on admin panel .

  Now how can we get OAuth token with only consumer key and consumer
  secret ?


texts: Magento 2.1.5 : Add decimal number to price

texts:
How to add third decimal point to products, orders, tax, shipping price in both frontend and backend ?

Ex:

Product: 12.55$   ==>   12.550$


texts: Magento 2.3.3 Customer order view page break after product delete from system

texts:
I placed order and after that same product i had delete after that.
When click on view order link from customer order page , below error displayed.
Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Block\Product\ImageFactory::create() must be an instance of Magento\Catalog\Model\Product, null given, called in /vendor/magento/module-catalog/Block/Product/ImageBuilder.php on line 135 and defined in /vendor/magento/module-catalog/Block/Product/ImageFactory.php:137 Stack trace: #0 /vendor/magento/module-catalog/Block/Product/ImageBuilder.php(135): Magento\Catalog\Block\Product\ImageFactory->create(NULL, 'cart_page_produ...', Array) #1 /app/code/Module/Sales/Block/Order/Item/Renderer/DefaultRenderer.php(78): Magento\Catalog\Block\Product\ImageBuilder->create(NULL, 'cart_page_produ...', Array) #2 /vendor/magento/module-catalog/Block/Product/ImageFactory.php on line 137


texts: I'm trying Magmi for Magento2.2 but i get this error, the database user and pw is correct, anyone knows what is wrong?


texts: Elastic search illegal_argument_exception error "Text fields are not optimised" but it's NOT A TEXT FIELD

texts:
I upgraded to 2.4.1 and elasticsearch, which I did not use before.
In my log I find the following error
"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true, "failed_shards":[{"shard":0,"index":"magento2_product_1_v4","node":"HVBmFhwfQK-VkdOPpT60-g","reason":{"type":"illegal_argument_exception", "reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [features] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}],

(this repeats 5+ times deep)
at vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632
This seems to indicate it is not happy with the [features] attribute being a text field
Problem is, it is not a text field, it is a multiselect attribute with backend type varchar - I have just checked the attributes table to be sure! - so what is this error about? Also, I am not aware of aggregrating or sorting by that field anywhere, though as a multiselect field it is used in layered navigation. That's what they are designed for, no?
How should multiselect attributes be to work with layered navigation and elasticsearch?


texts:
I am wondering how I would go about giving all errors in Magento other than 404 errors a custom errror page that says something along the lines of "Something went wrong". I want all of them to pull up the same error page. How would I go about this?

Thanks.


texts: Magento 2 - Upload image file using inline edit

texts:
I am using inline edit for product grid. Now i can edit product name and other field but i cant upload any image.

 <editor>
     <editorType>text</editorType>
 </editor>

That is creating input text field. What should i use for input file type?


texts: Can't change Custom Attribute when Importing Products

texts:
I have a custom attribute for my products called Designer_name. I'm trying to import products and change a Designer_name's value in the additional_attributes column, but it doesn't work. The attribute is of type "dropdown", I have all values I want to use as options in the attribute, and it is in the attribute set that my products are in. It simply does not register when I import it.
When I make the attribute required, it gives me the error "1. Please make sure attribute "Designer_name" is not empty. in row(s): 2, 3". I have exported a product, changed the Designer_name's value and tried to import it again, and this still happens. Has anyone else experienced this?
Note: I'm working with configurable products, not sure if it makes a difference, but I'm filling the value in all variations of the product. I've noticed that only the rows with the product variations throw the error, but those are filled with the custom attribute as well.
Note 2: I've tried adding Designer_name as a column of its own, and magento says it doesn't exist. I've tried both with the configurable variations empty and filled.


texts: Magento 2 Custom module admin controller error

texts:
I have created the custom module as per the below tutorial:

http://www.mage-world.com/blog/grid-and-form-in-magento-2-admin-panel-part-1.html

And after I am getting the below error:

  Fatal error: Class Tutorial\SimpleNews\Controller\Adminhtml\News contains
  1 abstract method and must therefore be declared abstract or implement
  the remaining methods (Magento\Framework\App\ActionInterface::execute)
  in
  C:\xampp\htdocs\magento3\app\code\Tutorial\SimpleNews\Controller\Adminhtml\News.php
  on line 12

After that I have done some google and found the solution for the execute() function in below answer:

Error in custom Admin menu controller - Magento 2

According to the answer I have changed the class name from class to abstract class.

After that I am getting the below error:

Boolean value is expected, supported values: array (
  0 => true,
  1 => 1,
  2 => 'true',
  3 => '1',
  4 => false,
  5 => 0,
  6 => 'false',
  7 => '0',
)

Please see below is the Tutorial\SimpleNews\Controller\Adminhtml\News.php file code:

<?php

namespace Tutorial\SimpleNews\Controller\Adminhtml;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Registry;
use Magento\Framework\View\Result\PageFactory;
use Tutorial\SimpleNews\Model\NewsFactory;

abstract class News extends Action
{
    /**
     * Authorization level
     *
     * @see _isAllowed()
     */
     const ADMIN_RESOURCE = 'News_LatestNews::manage_news';

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

    /**
     * Result page factory
     *
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $_resultPageFactory;

    /**
     * News model factory
     *
     * @var \Tutorial\SimpleNews\Model\NewsFactory
     */
    protected $_newsFactory;

    /**
     * @param Context $context
     * @param Registry $coreRegistry
     * @param PageFactory $resultPageFactory
     * @param NewsFactory $newsFactory
     */
    public function __construct(
        Context $context,
        Registry $coreRegistry,
        PageFactory $resultPageFactory,
        NewsFactory $newsFactory
    ) {
       parent::__construct($context);
        $this->_coreRegistry = $coreRegistry;
        $this->_resultPageFactory = $resultPageFactory;
        $this->_newsFactory = $newsFactory;
    }

}

Tutorial\SimpleNews\Controller\Adminhtml\News\Index.php file code:

<?php

namespace Tutorial\SimpleNews\Controller\Adminhtml\News;

use Tutorial\SimpleNews\Controller\Adminhtml\News;

class Index extends News
{

    /**
    * @return void
    */
    public function execute()
    {
      if ($this->getRequest()->getQuery('ajax')) {
            $this->_forward('grid');
            return;
        }

        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
        $resultPage = $this->_resultPageFactory->create();
        $resultPage->setActiveMenu('Tutorial_SimpleNews::main_menu');
        $resultPage->getConfig()->getTitle()->prepend(__('Simple News'));

        return $resultPage;
    }
}

I have done the var_dump($this->_authorization->isAllowed('News_LatestNews::manage_news')); also it's output it bool(true).

Anybody, can help me how I can trace this issue?


texts: How can i delete a custom defined tax class in magento 2

texts: There is a tax class showing in tax class tab. I want to remove that class but don't know from where i can delete it.


texts: magento1.13.1.0 install SUPEE-10415,why magento Security scan not detecte it?

texts: check every file,already according to SUPEE-10415.sh inside the diff comparison


texts: Products not showing in catalog after media migration from magento 1.9 to 2.1

texts: I just migrated my site from magento 1.9.2 to magento 2.1.5. The problem started after I copied the media folder. All the images showed, but all of the products in catalog and search disappeared - So I reindexed and flushed the cache but the products are still not showing (they were before the media folder copy) and if I go directly to a product url everything shows normally. Anyone knows what it could be?


texts: Magento 1.7 OnepageCheckout SaveBilling returns 200 -> nothing happens

texts:
When I click on the continue button inside the billing section, the tiny loading icon appears and a request is triggered. It returns 200 with an empty response. But then... nothing happens and there are no errors in the developer console and in the var folder.

Before there where some issues with the login and forgotten formKeys by the main-developer.

Enable Form Key Validation On Checkout is enabled.
PHP Version 5.4.45

I'm not experienced with magento. I hope someone could help me out.

Is it just a js issue?


texts:
I need to check if a product has a catalog price rule and if it has, it needs to display a specific div.

So I need something like:

<?php if catalog price rule : ?>
<div>
Text
</div>
<?php endif; ?>

How can I achieve that?


texts: Magento2 : How to change sort by option position in sorting options

texts:
Native Magento give 3 options position, name, price for sort by option. I added one custom product attribute for sorting option. I want to display it on first position but it is displaying on last position.

How can I change position of custom added attribute and it will display on first sort by option.

Thanks


texts: how to get mixed or multi array response in rest API magento2

texts: i have my custom api which will return multi dimension array , which will have key pair value,  where key and value are dynamic from database in that case how to achieve in rest api of magento2


texts:
I'm going through a newly created site and am trying to deactivate all the modules that I won't need. I'm familiar enough with some of them to know what effect turning them off will have, but with others I end up having to poke around the module's code for a while to get a feel for what it does.

Is there any existing documentation for the core modules that gives a general overview of what each module does? (Eg. Mage_Wishlist: Allows logged in users to save a list of items with their account that can be added to the cart at a later time.)


texts: How do you apply a catalog price rule to a limited quantity?

texts: I have setup a catalog price rule applied to all my products but wanted to limit to a maximum quantity that can be applied then it will revert back to the 'full' price.


texts: Modifying XML Value in Custom Layout Update XML

texts:
The word "In Stock" was added inside catalog.xml:

<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml">
    <action method="setData">
        <name>instock_text</name>
        <value>In Stock</value>
    </action>
</block>

I want to rename it via Custom Layout Update XML so it would appear a different text for some products.

<reference name="product.info">
    <block type="catalog/product_view">
        <action method="setData">
            <name>in_stock_text</name>
            <value>This product is in stock.</value>
        </action>
    </block>
</reference>

The custom layout xml seems not working. Did I miss something on update xml?


texts:
How can we filter orders who have discounts?

$order_collection = Mage::getModel('sales/order')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('discount_or_something_else', array('gt' => 0));

Its not working.


texts:
So, I create module, which implement import/export some data. Everything work fine. The logic of import in next : I take a file in var/[module_name]/import/. (This file will be put by some another service)

My question is: What is the best way to create this folders [module_name]/import when some one will take my module in other project?

I think about to write instruction ('create folder in var...'), and also I think about installer, but I guess it is not good idea

Any advice?


texts: magento existing method rewrite with module

texts:
I have few core files modifications in my app/code/local/Mage folder, but I wan't to make them work as magento module.

My example: I did few small modifications in method getValueHtml in file Mage/Bundle/Block/Sales/Order/Items/Renderer.php and now I wan't this rewritten method to be used.

I have followed online tutorials for blocks rewrite but it is not working for me. I'm missing something, but I can't figure it out. These are my module files:

app/code/local/MyCompany/Bundleproducts/etc/config.xml:

<?xml version="1.0"?>
<config>
 <modules>
    <MyCompany_Bundleproducts>
        <version>1.0.0</version>
    </MyCompany_Bundleproducts>
 </modules>
 <global>
  <blocks>
      <bundle>
         <rewrite>
              <sales_order>MyCompany_Bundleproducts_Block_Sales_Order_Items_Renderer</sales_order>
          </rewrite>
      </bundle>
  </blocks>
 </global>
</config>

app/code/local/MyCompany/Bundleproducts/Block/Sales/Order/Items/Renderer.php:

<?php
class MyCompany_Bundleproducts_Block_Sales_Order_Items_Renderer extends Mage_Bundle_Block_Sales_Order_Items_Renderer
{
    public function getValueHtml($item)
    {
        if ($attributes = $this->getSelectionAttributes($item)) {
            return sprintf('%d', $attributes['qty']) . ' TEST ' .
                $this->escapeHtml($item->getName());
        } else {
            return $this->escapeHtml($item->getName());
        }
    }
}

and app/etc/modules/MyCompany_Bundleproducts.xml

<?xml version="1.0"?>
<config>
    <modules>
        <MyCompany_Bundleproducts>
            <active>true</active>
            <codePool>local</codePool>
        </MyCompany_Bundleproducts>
    </modules>
</config>

Can someone point me to the right direction? Thanks!


texts: Magento 2 Theme - grunt watch with overridden {module}.scss

texts:
we are working on a magento 2 theme and followed the official guidelines regarding structure, naming and grunt. there is a correct grunt config and everything works fine with local styles (eg. local-l.less) - which are referenced in themes.js as "files: [...".

but, what about other stuff like a _navigation.scss, that lives in our themes web/css/source? when i run "grunt refresh", changes to that file are successfully deployed and delivered. its not very handy, to use "grunt refresh" everytime, when a line is changed in such a file. is there any possbility to integrate that with grunt watch?

regards,
dominik


texts: Is it possible for customers to login with a mobile number instead of an email address?

texts:
I want to create new customer on this registration page and that customer assigned mobile number instead of customer email. Also remove required in the email field. I create an account for them and then assign a mobile number, which they then use to login, with a password.

Please share your good suggestions.


texts:
after reading the official guide here Magento Guide I have setup my magento this way:

I have created one website in english and one in spanish
I have configured Apache this way

<VirtualHost *:80>
        ServerName www.mywebsite.devcom
        ServerAlias www.mywebsite.devcom
        DocumentRoot /var/www/magento/
        ErrorLog /var/log/mywebsite/es/error.log
        CustomLog /var/log/mywebsite/es/access.log combined

<Directory /var/www/magento>
  Options FollowSymLinks
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>
</VirtualHost>

I have configured HTACCESS this way

RewriteCond %{HTTP_HOST} ^(.*)mywebsite\.devcom
RewriteRule .* - [E=MAGE_RUN_CODE:base]
RewriteCond %{HTTP_HOST} ^(.*)mywebsite\.devcom
RewriteRule .* - [E=MAGE_RUN_TYPE:website]

RewriteCond %{HTTP_HOST} ^(.*)mywebsite\.deves
RewriteRule .* - [E=MAGE_RUN_CODE:spain]
RewriteCond %{HTTP_HOST} ^(.*)mywebsite\.deves
RewriteRule .* - [E=MAGE_RUN_TYPE:website]

I have configured Magento backend to have different URL for base url and static files url

The result is that Magento is loading the HTML page but all static content have 404 error since doesn't load from domain cdn.mywebsite.deves.

I have checked my configuration and I don't understand if there is an error in the Magento guide or something in my setup or a bug in the Magento code.

Anybody is experiencing the same issue?


texts:
We want to create a different page, very similar to the contact page, in which we ask for feedback about our service.

The idea is to have an exact copy of the /contact page, changing only the name of fields and the descriptive text at the top of the page.

How do we copy all the elements of the /contact page and rename them to created a new page linked to the /feedback url ?


texts: Magento BUG : Not able to delete Products Attributes Option/Labels?

texts:
If i delete one of the attributes values and save, keep the value exist, it's not delete.. how can i solve the issue magento error.

  Note:

  php.ini   =>   max_input_vars = 8000000 (master Value)

  .htaccess =>    php_value max_input_vars 8000000

How can i solve the issue?


texts: Magento 2 CE: Front controller reached 100 router match iterations Issue

texts:
I'm using Magento 2 CE Version 2.1.0

Taking reference of http://inchoo.net/magento-2/routing-in-magento-2/ for Routing.

My Router.php Controller Code

public function match(\Magento\Framework\App\RequestInterface $request) {

    $identifier = trim($request->getPathInfo(), '/');

    if (strpos($identifier, 'test') !== false) {
        $request->setModuleName('moduletest')->setControllerName('test')->setActionName('test');
    } else {
        //There is no match
        return;
    }

    return $this->actionFactory->create(
                    'Magento\Framework\App\Action\Forward', ['request' => $request]
    );
}

I found @ vendor\magento\framework\App\FrontController.php

public function dispatch(RequestInterface $request)
{
    \Magento\Framework\Profiler::start('routers_match');
    $routingCycleCounter = 0;
    $result = null;
    while (!$request->isDispatched() && $routingCycleCounter++ < 100) {
        /** @var \Magento\Framework\App\RouterInterface $router */
        foreach ($this->_routerList as $router) {
            try {
                $actionInstance = $router->match($request);
                if ($actionInstance) {
                    $request->setDispatched(true);
                    $this->response->setNoCacheHeaders();
                    if ($actionInstance instanceof \Magento\Framework\App\Action\AbstractAction) {
                        $result = $actionInstance->dispatch($request);
                    } else {
                        $result = $actionInstance->execute();
                    }
                    break;
                }
            } catch (\Magento\Framework\Exception\NotFoundException $e) {
                $request->initForward();
                $request->setActionName('noroute');
                $request->setDispatched(false);
                break;
            }
        }
    }
    \Magento\Framework\Profiler::stop('routers_match');
    if ($routingCycleCounter > 100) {
        throw new \LogicException('Front controller reached 100 router match iterations');
    }
    return $result;
}

I have downloaded http://inchoo.net/magento-2/routing-in-magento-2/ gitHub code & installed & working fine. But it's not working for my custom module.

When i type http://localhost/magento2/mymodule/examplerouter it goes to InChoo Controller router not mine.

How to solve this issue?


texts:
I'm using Magento 1.9.2.2 and I made a catalog price rule with a condition, so only products that belong to some manufacturer will be discounted. I activated and applied this rule but in the front-end anything happened. The promotion should start and finish today at 23:59!
How can I view the changed prices in the front-end?


texts: I want to know what is the difference between Magento v2.3.1 (iFrame) and Magento v2.2.3 (Redirect)


texts: What's the point/gain/advantage of knockout.js in Magento 2?

texts:
I am trying not to let this slide into a rant. I am a long time magento 1 developer and just recently started with m2. I was really excited about the prospects of greater performance and the absense of prototype. Then I stumbled into knockout.js and the fact that a default installation of magento 2 loads hundreds (yes, effing hundreds!!!) of javascript files (2+ MB for JS alone). What is wrong with these people?

The user experience due to asynchroneous loading of JS is outright terrible. Not only does it take forever to load but also when you THINK that the page is done loading and ready for use elements keep popping up or are NOT ready for use. One of the worst examples: form validation. Forms are submittable without validation as long as the corresponding JS is not done loading.

THE worst example: the checkout. The most sensible part of a shop takes ~10 seconds to load, riddled with hacky popups and slow response times.

Developing this (still trying to wrap my head around, hence this post) feels a bazillion times more complicated and time consuming. The seemingly simplest tasks (move blocks around, implement custom js functionality or remove default magento ui functions) take forever and are splattered over multiple layers and code.

I just don't see the advantage here. The shop creates more data to load, developing is more time consuming and the result is the exact oposite of slick, lean or fast.

IMO: a little custom ajax would get the job done a whole lot better with a tiny fraction of the overhead.


texts: Magento 2 Uncaught TypeError: Constr is not a constructor when returning functions on Knockout Js

texts:
i'm trying to get functions from a JS file in a Knockou file, like this:
quote.js
define(['jquery', 'uiComponent', 'ko','Vendor_GetQuote/js/ajax-request'], function ($, Component, ko, ajaxrequest) {
    'use strict';

And I try to access like this
ajaxrequest.functionA();
ajaxrequest.functionB();

With just one function it works, but with 2 or more it does not.
This is my ajax-request.js file
define(
    [
        'jquery'
    ],
    function(
        $
    ) {
        'use strict';

        var methods = {
            functionA: function() {
                console.log('This is from module A, functionA');
            },

            functionB: function() {
                console.log('This is from module A, function B');
            }
        };

        return methods;
     }
);

This is the error I'm getting:
Uncaught TypeError: Constr is not a constructor
Can someone orient me?
Thanks!


texts: Error in configuration scope "default config" in General>Web

texts:
When going to Default Config > Web I get the following error.

  There has been an error processing your request

Invalid config field backend model: adminhtml/system_config_backend_web_secure_offloaderheader
Trace:
#0 /home/wengkomole/public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(328): Mage::throwException('Invalid config ...')
#1 /home/wengkomole/public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(229): Mage_Adminhtml_Block_System_Config_Form->initFields(Object(Varien_Data_Form_Element_Fieldset), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
#2 /home/wengkomole/public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(164): Mage_Adminhtml_Block_System_Config_Form->_initGroup(Object(Varien_Data_Form), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
#3 /home/wengkomole/public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php(92): Mage_Adminhtml_Block_System_Config_Form->initForm()
#4 /home/wengkomole/public_html/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(107): Mage_Adminhtml_Block_System_Config_Edit->initForm()
#5 /home/wengkomole/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#6 /home/wengkomole/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit')
#7 /home/wengkomole/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /home/wengkomole/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#9 /home/wengkomole/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 /home/wengkomole/public_html/index.php(87): Mage::run('', 'store')
#11 {main}

On the other hand when selecting current configuration scope (Main Website) I don't get the error.


texts: How to remove "brand" and "product code" from "product details" on product page?

texts:
On the product page of my Magento website there is this block called "Poduct Details". In this block there is the availability, the brand and the code of the product you're viewing.
Now I want to remove the Title of the block & the brand & the product code. Only I have no clue how to do this.

Below, I added a screenshot. Basically, I want to remove everything in the red circle, except for the green part, so the availability.

Is this even possible, and if yes, how?

Thanks in advance.


texts: UPS stopped working from yesterday in Magento 2

texts:
I was using UPS in my Magento 2 store, from today I found that the shipping methods are not fetched and they are displayed with the message

Unfortunately we cannot provide a shipping quote at this time

I tried to enable debug log for UPS and no log was found. The same issue does occur in the dev site too from today. Please find the configurations

So I tried UPS in another live store where UPS type was UPS XML, it was displaying shipping rates fine. I switched type to UPS and the shipping rates weren't fetched. I checked it in fresh Magento too. Does anyone have an idea about this? Else anyone facing the same problem? Whether might it be an issue with UPS API service?


texts: Disable stock check / decrease when shipping an order in Magento 2.3.1

texts: I have a Magento 2.3.1 shop with external software managing my stock levels. I have disabled the Decrease Stock When Order is Placed setting but with the new Magento MSI in Magento 2.3, the stock is still checked and decreased when creating a shipment. Is there a way to disable this behaviour?


texts: how to create city state country dropdown UIComponent in magento 2 admin form

texts:
how to create city state country dropdown UIComponent in Magento 2 admin form,
like when we select one country then state of that country is shown.

Thanks,


texts:
I am trying to figure out how to achieve the following via the Magento REST API:

Create a shipment (to fulfill an order's line items)
Void a shipment
Add or update the order notes

Can you confirm if this can be done and/or how to do this?


texts: Compile: Extra parameters passed to parent construct: $context

texts:
This has been asked a few times I know and I studied all of them and I also get the ieda what went wrong. However I cannot adapt those solutions to my issue.

I have a Class Post which extends \Magento\Backend\App\Action:

namespace Vendor\Module\Controller\Adminhtml;

abstract class Post extends \Magento\Backend\App\Action { ...

And I have a class Save that extends this \Vendor\Module\Controller\Adminhtml\Post:

namespace Vendor\Module\Controller\Adminhtml\Post;

class Save extends \Vendor\Module\Controller\Adminhtml\Post { ...

Class Post has the following __construct():

public function __construct(
        \Vendor\Module\Model\PostFactory $postFactory,
        \Magento\Framework\Registry $coreRegistry,
        \Magento\Backend\App\Action\Context $context
    )
    {
        $this->_postFactory           = $postFactory;
        $this->_coreRegistry          = $coreRegistry;
        parent::__construct($context);
    }

Class Save has the following __construct():

public function __construct(
    \Vendor\Module\Model\Upload $uploadModel,
    \Vendor\Module\Model\Post\File $fileModel,
    \Vendor\Module\Model\Post\Image $imageModel,
    \Vendor\Module\Model\PostFactory $postFactory,
    \Magento\Framework\Registry $registry,
    \Magento\Backend\App\Action\Context $context
)
{
    $this->_uploadModel    = $uploadModel;
    $this->_fileModel      = $fileModel;
    $this->_imageModel     = $imageModel;
    $this->_backendSession = $context->getSession();
    parent::__construct($postFactory, $registry, $context);
}

As far as I understand, the Post Class takes 3 Parameters in construct and I provide 3 Parameters to parent construct in Save Class. However when I execute setup:di:compile, I get the following error:

Vendor\Module\Controller\Adminhtml\Post\Save
        Extra parameters passed to parent construct: $context. File: /html/magento2/app/code/Vendor/Module/Controller/Adminhtml/Post/Save.php

Why is this happening and how can I fix this? I have been trying for hours, but I can't get rid of it...

The following is one of the threads I found, but like I said I can't adapt this on my own:
Error : Extra parameters passed to parent construct: $coreRegistry

NOTE: Of course I created the needed protected variables accordingly, so there is no issue here.


texts: Contact Us page has disappeared Magento 1.9.0.1

texts: We used the default contact form and now the page has reverted to the "404 error page"  I've tried to find the CMS page to edit this if it had become disabled, but it seems like it's not even listed in CMS pages.  Thank you in advance. -John


texts:
I need get special price my Magento 2 product, I can get price via:
$priceHelper = $objectManager->create('Magento\Framework\Pricing\Helper\Data');
echo $priceHelper->currency($product->getFinalPrice(), true, false);

but I can't get special price, I have block:

                          <meta itemprop="priceValidUntil" content="2016-09-30 00:00:00">
                          Special Price
                          <span class="price" id="product-price-<?php echo $id ?>">
                          <?php echo $product->getSpecialPrice();  ?>

in content meta I need get date until ended special price and getSpecialPrice, but this won't working properly. Where my mistake?