texts:
may i have some assistance , I can't login to admin panel and the notification is as follows :

  There has been an error processing your request Exception printing is
  disabled by default for security reasons. Error log record number:
  155187663629

may i have some solution please


texts: Magento 1.9 getting Authorize.Net return values

texts: I am having difficulty with getting some specific values from Authorize.Net. I am looking for the Transaction ID and the Credit Card Name (Visa, MasterCard, etc). I have tried loading the Transaction ID by using $order->getTransactionId() with no success. Also using $payment->getMethodInstance()->getCcType(); for the card name. My code runs after a sales_order_place_after event in an observer. Any suggestions?


texts: Programatically add tracking to shipment - Mage_Api_Model_Resource_Abstract->_fault('not_exists')

texts:
I create shipments programatically and try to set a tracking number like this:

// ... snipped; code that prepares shipment data ...

// Create Shipment
$shipment = $order->prepareShipment($item_qtys);
$shipment->register();
$shipment->sendEmail(false)
         ->setEmailSent(false)
         ->save();
$transactionSave = Mage::getModel('core/resource_transaction')
         ->addObject($shipment)
         ->addObject($shipment->getOrder())
         ->save();
$order->save();

// Add Shipment Tracking Number If Available
if (!empty($order_info->TrackingNumber)) {

    var_dump($shipment->getId());
    var_dump($order->getShippingCarrier()->getCarrierCode());
    var_dump($order->getShippingCarrier()->getConfigData('title'));
    var_dump($order_info->TrackingNumber);
    echo "\r\n";

    Mage::getModel('sales/order_shipment_api')
        ->addTrack(
            $shipment->getId(),
            $order->getShippingCarrier()->getCarrierCode(),
            $order->getShippingCarrier()->getConfigData('title'),
            $order_info->TrackingNumber
        );
}

When the above code executes, I get the following output & exception:

string(7) "1598070"
string(13) "productmatrix"
string(15) "Shipping Option"
string(14) "TEST1234567890"

not_exists - Stack Trace: #0 /var/www/public_html/app/code/core/Mage/Sales/Model/Order/Shipment/Api.php(187): Mage_Api_Model_Resource_Abstract->_fault('not_exists')
#1 /var/www/public_html/app/code/community/Mycompanyname/Mymodulename/controllers/Mymodulename/ApiController.php(1266): Mage_Sales_Model_Order_Shipment_Api->addTrack('1598070', 'productmatrix', 'Shipping Option', 'TEST1234567890')
#2 /var/www/public_html/app/code/community/Mycompanyname/Mymodulename/controllers/Mymodulename/ApiController.php(82): Mycompanyname_Mymodulename_Mymodulename_ApiController->NewOrderShipment('{"MagentoOrderI...')
#3 /var/www/public_html/app/code/community/Mycompanyname/Mymodulename/controllers/Mymodulename/ApiController.php(66): Mycompanyname_Mymodulename_Mymodulename_ApiController->Handle_Request('NewOrderShipmen...', '{"MagentoOrderI...')
#4 /var/www/public_html/app/code/local/Mage/Core/Controller/Varien/Action.php(421): Mycompanyname_Mymodulename_Mymodulename_ApiController->v2Action()
#5 /var/www/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('v2')
#6 /var/www/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))
#7 /var/www/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#8 /var/www/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#9 /var/www/public_html/index.php(103): Mage::run('default', 'store')
#10 {main}

Any idea what's causing the error? Is this the incorrect way to add tracking number?

Is it possible to set tracking number as you are creating the shipment?

I've also tried to achieve this using a different method like this:

// If order can be shipped
if ($order->canShip())
{
    // Create shipment
    $shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($item_qtys);
    $shipment = new Mage_Sales_Model_Order_Shipment_Api();
    $shipmentId = $shipment->create($orderId);

    // If tracking number is available
    if (!empty($order_info->TrackingNumber))
    {
        // Add shipment tracking
        $shipment->addTrack(
            $shipmentId,
            $order->getShippingCarrier()->getCarrierCode(),
            $order->getShippingCarrier()->getConfigData('title'),
            $order_info->TrackingNumber
        );
    }
}

This also gives me the following error:

  order_not_exists - Stack Trace: #0
  /var/www/public_html/app/code/core/Mage/Sales/Model/Order/Shipment/Api.php(138):
  Mage_Api_Model_Resource_Abstract->_fault('order_not_exist...')


texts:
magento1.9.3
I am in trouble with option correspondence method.
I sell 'red dress'.

S size dress is +2, +4, +6 inches length
M size dress is +2, +4 inches length
Add some options as a common option.

Because there is inventory in the fabric, there are stocks of "red dress", not each size.
Can this be processed with Configurable Product?
Is there any other solution?
※Additional notes
There was a lack of explanation.
"Custom option" can not change options for each size.
"Configurable product" makes "simple products" for each size, but we manage inventory in cloth so we want to manage all together without choosing size.
In addition, there are products with many common option items, it is not realistic to create all options with "simple products".
What you want to do is "Choose a size", "Choose a different Length option depending on size", "Choose an option not related to size".


texts: Magento 2.1.2 Update from 2.1 layout XML Problems

texts:
I work in developer mode.

i just update my 2.1 to 2.1.2 by composer! Everything seems ok.
Than after:

php bin/magento setup:upgrade
php bin/magento indexer:reindex
php bin/magento cache:clean
chmod -R 777 pub var

I can access without problems the admin Backend. => OK

Than i try to access the category index list => Error

The system.log say:

  [2016-12-17 11:30:19] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_8d2b930ee1b3294024ee6f3e306d04854 and handles
  default, catalog_category_view, catalog_category_view_type_layered,
  catalog_category_view_type_layered_without_children,
  catalog_category_view_id_3: Bitte korrigieren Sie die XML-Daten und
  versuchen Sie es erneut.  [] []
    [2016-12-17 11:30:19] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_8a7ccd8094436548b564a588f6303121c and
  handles 2columns-left: Bitte korrigieren Sie die XML-Daten und
  versuchen Sie es erneut.  [] []
          [2016-12-17 11:30:19] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_86f1b068ec7ccf4878f9284dd1137afd1 and
  handles catalog_product_prices: Bitte korrigieren Sie die XML-Daten
  und versuchen Sie es erneut.  [] []

So .. i dont understand where i have to look! I try to remove this files from
my custom layout .. but this has no effect. The error is the same.

Can it be a problem from the custom extensions?

Hope somebody has a solution!


texts: Using API to convert bundled orders to shipments - Not Working

texts:
I'm trying to convert bundled product orders to shipments, but the API keeps returning NULL.  I've dug into the code a little bit and it looks like:

$shipment = $order->prepareShipment($itemsQty);

is return NULL

The orders can convert to shipments fine in the Admin, any idea why the API would be failing?

My API call is very simple and works for all other product types:

$newShipmentId = $proxy->call($sessionId, 'sales_order_shipment.create', array($orderincrmentid, array()));

Any thoughts are appreciated.


texts:
I need your help for creating price rule for shopping cart

I want to give a customer 100 $ discount if they buy 3 items with subtotal above or equal 400 $ .if the items on the cart is from category 82 then the price rule should not work

condition
f ALL  of these conditions are TRUE :
Subtotal  equals or greater than  400
Total Items Quantity  greater than  2

Action
If ALL  of these conditions are FALSE :
Category  is  82

the issue now if the customers add three items where the total above 400 $ and one of these items or two is belong to category 82  here the price will applied which actually I don't need it

e.g Item 1 = 50 $ can apply the rule
item 2 40 $ can apply the rule
then item 3 = 320 $ can't apply the rule >> from category 82

on that case the rule shouldn't apply although the subtotal is above 400 and the total qty is above 3 .. but actually the item which allow to get the discount not making my condition true
item qty here is 2
subtotal for this 2 items is less than 400 $

is there away to solve this issue  ???


texts: Magento 2 created robots.txt/sitemap.xml in `http/` but not `pub/`

texts:
I have created a robots.txt and sitemap.xml files using Magento UI but when trying to access www.mydomain.com/robots.txt or www.mydomain.com/sitemap.xml it gives me 404 not found.

I found that robots.txt and sitemap.xml file are created in mydomain/http/, however, the pub directory is set to be my root so moving the file to the pub fixes the issue.

Why Magento created the files in this location?
If I want to make changes to the robots.txt file, I can't use the native Magento feature?
What is the best solution to this?

I am using NginX and added this to my configuration file which "solves" the issue, however I am not sure if this is the best solution:

# robots
location = /robots.txt {
    alias /var/www/example.com/html/robots.txt;
}

# sitemap
location = /sitemap.xml {
    alias /var/www/example.com/html/sitemap.xml;
}

I am using Magento 2.1.8.


texts: How to get list of Wishlist product on popup in homepage?

texts: I have added a wishlist icon on my header, I need to show my list of wishlist product if customer click the wishlist icon as a popup. Any reference thanks.


texts: Exclude Free Shipping for Specific State: Magento 2.3.1

texts:
how to off free shipping for specific states.

Example:

I have free shipping for all items over item total $100, calculated by FedEx.

I do not want to have free shipping for USA state of Hawaii, Alaska.

Please advice.

Thank you,


texts: Custom admin menu redirecting to dashboard in Magento 2

texts:
I have created custom admin menu but when clicking on the menu it is redirecting to dashboard.

Here is the xml within etc/adminhtml/menu.xml :

    <?xml version="1.0"?>
     <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
     <menu>
       <add id="Cubet_RMA::rma" title="Cubet RMA" resource="Cubet_RMA::rma" module="Cubet_RMA"  sortOrder="20"/>
       <add id="Cubet_RMA::managerma" title="Manage RMA" resource="Cubet_RMA::Rmaadmin" parent="Cubet_RMA::rma" action="rmaadmin/rmaadmin/index" module="Cubet_RMA" sortOrder="20"/>
   </menu>
 </config>

Here is the xml within etc/adminhtml/routes.xml:

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

Here is the Controller/Adminhtml/Rmaadmin/Index.php code:

<?php
 namespace Cubet\RMA\Controller\Adminhtml\Rmaadmin;
 class Index extends \Magento\Backend\App\Action
{

const ADMIN_RESOURCE = 'ListReturns';

protected $resultPageFactory;
public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $resultPageFactory)
{
    $this->resultPageFactory = $resultPageFactory;
    parent::__construct($context);
}

public function execute()
{
   $return = $this->resultPageFactory->create();
   // $return->setActiveMenu('Cubet_RMA::rma');
   // $return->getConfig()->getTitle()->prepend((__('Manage RMA Requests')));
   return $return;
}
}

Please help me on this.


texts:
I'm trying to filter the data collection from 4 hours to now and I have the below code but its not working.
public function getWishlistProduct($wishlistid){

$to = date("Y-m-d h:i:s");
$from = strtotime('-4 hours', strtotime($to));
$from = date('Y-m-d h:i:s', $from);

$wishlist= $this->getCollection()->addFieldToFilter('wishlist_id', ['eq'=>$wishlistid])
                                    ->addFieldToFilter('added_at', array('from'=>$from, 'to'=>$to));
return $wishlist;

}

Could anyone please help?


texts: Use Rewards Points in PayPal Express Review Page

texts: How can Customer Pay with rewards points in PayPal express Review Page


texts: how to remove security patches from magento site

texts:
we installed magento security patches before one month

after that we did lot of chnages to our site.

now some features are not working that was working before one month.

we are not sure whether security patches is the reason or not.

is there any way to remove the security patches .


texts: Magento 2: how can Override vendor\magento\module-sales\Block\Adminhtml\Order\View.php to remove/disable "Ship" button

texts:
To  Disable/Remove “ship” Button from sales->order->view (click) -> Ship
I commented   in core file  vendor\magento\module-sales\Block\Adminhtml\Order\View.php   below code .

if ($this->_isAllowedAction(
       'Magento_Sales::ship'
) && $order->canShip() && !$order->getForcedShipmentWithInvoice()
) {
       $this->addButton(
            'order_ship',
            [
                 'label' => __('Ship'),
                 'onclick' => 'setLocation(\'' . $this->getShipUrl() . '\')',
                 'class' => 'ship'
            ]
       );
 }.

now how  can i  ovveride block to  remove this function


texts: Update Product Descriptions programmatically

texts:
I'm trying to build a module that gets product-data externally and updates existing products to do so.
Fetching the products hasn't been a problem,I've been able to do so in a number of ways.
Updating the Description- and Short Description-Texts of the products however seems trickier.
I've found numerous sources citing a setDescription function of the Magento\Catalog\Model\Product Class. That seems to have been removed in recent versions of Magento though. Is the functionality just hidden in one of the other Setters?


texts: Adding structured data / rich snippets to existing code without affecting template

texts:
I've been doing some reading and following some tutorials to implement structured data / rich snippets code into my store. It's been easy to follow and understand, however now I'm in a situation where I'd like to add my MPN (Manufacturer Part Number) to the feed.

I have successfully added other schema micro data by simply adding to existing div classes. The problem is that I have a box that is negatively affected by using a div class in line.

         <?php echo $this->getTierPriceHtml() ?>
         <?php echo $this->getChildHtml('alert_urls') ?>
         <?php echo $this->getChildHtml('product_type_data') ?>

<?php echo $this->__('MPN: ') ?><?php echo $_product->getData('mpn')?>

<?php echo $this->__('WEB ID: ') ?><?php echo $_product->getId(); ?>

How can I declare an itemprop inline with my  code that would not negatively impact the nicebox class?


texts: How to sanitize custom Customer attributes?

texts:
I've created a customer attribute for the Customer model, and I added it to the Customer grid.

This works like magic, simply adding the attribute to the frontend registration and edit forms allows a user to save them, and the admin grid displays them. No problemo.

When viewing the customer grid, however, user inputted html (including  tags!!) is interpreted by the browser. This is a problem.

How can I either:

a) Somehow hijack the post data and clean it up before it's saved to the customer record.

or

b) Clean up data for custom columns as the admin grid is populated.

'a' appears to be the way the latest patch (7405) has fixed many of the core files that handle user input, but I'm more interested in 'b' right now, because this problem is probably exploitable in most 3rd party modules that take user input and display it in an admin grid. I'd like to figure out a way to protect the admin panel from any custom fields.

Thanks for your insights.


texts: how to load css file just before body instead of head

texts:
Below is code of my default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="My_Slider::css/betterslider.css"/>
    </head>
</page>

i want css to be loaded js before body end tag , how can this be done please help with same.


texts: Re-add left block after it's been removed

texts:
Running Magento 1.9 CE.

I am trying to re-add a left block after is has been removed in base.

base/default/layout/storelocator.xml:

<dealers_index_index translate="label">
    <update handle="storelocator_index_index"/>
    <label>Store Locator</label>
    <remove name="right"/>
    <remove name="left"/>
    ...

jason/default/layout/local.xml:

<dealers_index_index translate="label">
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>

    <reference name="left"/>
</dealers_index_index>

I was hoping to simply re-add left without having to explicitly set the elements with left as they change depending on customer logging, etc.

Is there an add or reset command?


texts: Remove the custom design tab in magento category edit page

texts: Remove the custom design tab from magento category edit page.


texts: Magento 1.9.3 : Product custom options and product attribute price in cart, checkout page, invoice and admin

texts:
Please check following link:

https://www.superbuniforms.com/medical-lab-coat-women-sky-blue

Please check "Interested in Embroidery" checkbox. One product option's section open. Here, two options already selected("One time designing logo fee Rs. 300") and checked(Per Embroidery Logo Charges र 35.00). Now, add this product in cart and check in cart.

In cart section, product unit price in without selected options price. Product option's price is displaying separately. But added in subtotal. When you increase product quantity product price and Per Embroidery Logo Charges र 35.00 are increase with quantity but ("One time designing logo fee Rs. 300") is not increased.

One time logo desinging fee apply only one time for every product order but per embroidery logo charges increse with quantity. Means if any customer ordered 2 quantity of product and choose One time logo designing fee 300 and per embroidery logo charges 35 which already selected when click on "interested in embroidery" checkbox.

In cart section, need (product price* 2 quantity)+ 35*2 quantity) + (300*1)  = product subtotal

I need implement for Magento 1.9.3. How to do for Magento? Please suggest. Reference site is built in Opencart.


texts: Submit button not visible and apply coupon

texts:
on my checkout page of website,

The apply coupon button and the submit button are not visible in safari. If i hover over the areas you will see what i mean.

I believe this can be changed using css.
Could someone help. Im losing sales


texts: Magento 1.9.3.8 Full https causes double / ending

texts:
I made my entire site https by changing the unsecure_url to https rather than http. Then in my .htaccess I added:

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]

RewriteCond %{HTTP_HOST} !^www\.MYSITE\.co.uk
RewriteRule (.*)http://www.MYSITE.co.uk/$1 [R=301,L]

However, I'm faced this the weird issue of having a double trailing slash the end of my URL's when I visit my site via:

http://www.mysite.co.uk
mysite.co.uk
https://mysite.co.uk

However, I am lost as to why the double trailing slashes is occurring, would anyone be able to kindly help myself?  Auto-redirect to Base URL config is also set to:

  YES ("301 moved permanently")

Check the Network tab in Firefox I can see that when accessing the site as https://mysite.co.uk it will redirect to http://www.mysite.co.uk then https://www.mysite.co.uk. However, www.mysite.co.uk will correctly direct to https:www.mysite.co.uk.


texts:
command line user does not have read and write permissions on
  generated directory. Please address this issue before using Magento command line

when I was trying to run php bin/magento indexer:reindex.

And I found I get the exactly same error when I tried to run the php bin/magento lines, I checked the post Error after magento upgrade, and have already changed the permission of generated folder, and then give bin/magento file to 744 (executable), and I used ls -l, the ownership of the folder is below to my account. I am using Magento 2.2, so there is no di folder under var folder.
So why does this error happen?

Thanks for any advises.


texts: Magento 2: how endpoints (REST) to get data from database

texts:
How endpoints <host>/rest/<store_code>/V1/carts/mine/estimate-shipping-method
to get data from a database or mention function or class that helps this API to get data from the database?

Because I am so confused about how this API to get data from the database.


texts: Additional information tab not working anymore

texts:
I had an additional information tab on our product view page which displayed Attributes set to be 'Visible on Product View Page on Front-end'.

I deleted the attributes as they had been named incorrectly but when I created a new attribute with the same setting & in the correct attribute group it does not show in a additional information tab anymore.  The additional information tab  seems to be not working.

I've checked the store scope when I added content to the new attribute from the Manage Products > Edit Product admin page.  I'm not sure what I could be missing?

I've refreshed my cache & re-indexed too.

Here are my screen shots of the setting.


texts: Add a back button to payment.html in module

texts:
I'm trying to add a back button to payment.html in my module.

I added the button in the html in my module like this:

    <form id="co-payment-form" class="form payments" novalidate="novalidate">
        <input data-bind='attr: {value: getFormKey()}' type="hidden" name="form_key"/>
        <fieldset class="fieldset">
            <legend class="legend">

            </legend>

            <button class="button action continue primary" data-bind="goToPrevStep()">

            </button>

        </fieldset>
    </form>

But i'm unsure on the best way to add the js. I tried overwriting the payment.js but ofcourse then i also need to copy over the all the dependancies.

Is there any better way to do this.

I know I need something like this

        goToPrevStep:function(){
        stepNavigator.next();
    },

That is dependent on stepNavigator. But i'm unsure where to exactly put it.

Or is this the best solution? I feel like there should be a prettier solution, right?


texts:
How to install Magento 2 in AWS with git?
I am using linux mint as my local OS.
Now  I would like to install Magento 2 in AWS with git.
So that I can push code to AWS after working on file from
my local machine.
How can I do this ?


texts: No crontab for user when trying to set up cronjob in command line

texts:
I'm a total newbie here, and I need some help. I'd just installed Magento 2.1.3, and I got this

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

I've tried to follow the instructions found in the link below, but when I come to the part where it involves crontab and a text editor, the console says that there is no cron tab found for the user that I'm logged in as.

HOW do I get around this?
Appreciate your help :)
Thanks in advance!
http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-bkg


texts: Error sending emails "Magento\Framework\Mail\MimeMessage"

texts:
Every time magento has to send an email to the customer either for sale, or for anything that has to do with operations that require sending an email to the customer.

  I have checked the log system.log and it shows me the following error

[2020-05-27 00:03:26] main.ERROR: Content must be string or resource; received "Magento\Framework\Mail\MimeMessage" [] []

Before I installed Mageplaza SMTP, I have configured it and the test does send me an email correctly


texts: Add new element to the api method catalogProductCreate

texts:
How do I add new element to the api method catalogProductCreate. The element to add is hardness String

Please Help me


texts: How to display a div on any page except: homepage, checkout, success page?

texts:
Currently this works for not displaying on the homepage but still displays on /checkout/cart & /onepage/ pages.

<?php if(Mage::getBlockSingleton('page/html_header')->getIsHomePage()): ?>
<?php else: ?>

Example Content

<?php endif; ?>

Any advice would be really appreciated?

Thank you.


texts: How can I have Luma Files in My Magento 2.0?

texts:
I'm wandering on the internet for my question and i didn't find an answer for such a silly question... Everywhere you can see Luma Theme with nice boxes and swatches and blocks etc. but when you choose Luma Theme you have none of them. How can I have these files installed on my magento? Where can I find all the Luma Blocks and Widget?

See attached


texts: Issue with Customer EAV in Magento 2.2.1

texts:
I have this EAV "abn" which is required during customer registration and can only be modified by administrator, so no need for it in frontend customer edit.

"customer_account_edit" flag is common to both frontend and backend. remove it, EAV cannot be modified from administration, keep it, frontend account edit shows error "abn is required value".

I can use a hidden field or hide the field with CSS in frontend, but is there a better way to do this ?

$customerSetup->addAttribute(Customer::ENTITY, 'abn', [
                'type' => 'varchar',
                'label' => 'ABN',
                'input' => 'text',
                'required' => true,
                'visible' => true,
                'user_defined' => true,
                'sort_order' => 10,
                'position' => 10,
                'system' => 0,
                'unique' => false,
                'is_used_in_grid' => false,
                'is_visible_in_grid' => false,
                'is_html_allowed_on_front' => true,
                'visible_on_front' => true
            ]);

            $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'abn')
            ->addData([
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => ['customer_account_create','adminhtml_checkout','adminhtml_customer', 'customer_account_edit', 'checkout_register'],
            ]);


texts:
I'm trying to debug an issue with a custom GraphQL module. I want to log the POST data that's being sent to it. I know it is being sent, because the response works OK for the most part. There's just a small language issue, which could form a question in itself, but as it's custom code it would take a small dissertation to explain.
So for this question I just want to focus on why, when I call $this->request->getPost(), I get an empty object.
Here's my code:
<?php

declare(strict_types=1);

namespace Mycompany\CatalogGraphQl\Model\Resolver\DataProvider;

use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\App\RequestInterface;

class ConfigurableProduct {

    private $productRepository;
    private $storeManager;
    private $request;

    public function __construct(
        ProductRepositoryInterface $productRepository,
        StoreManagerInterface $storeManager,
        RequestInterface $request
    ) {
        $this->productRepository = $productRepository;
        $this->storeManager = $storeManager;
        $this->request = $request;
    }

    public function getData($productSku) {

        // quick and dirty logging
        $logfile = "/tmp/magento.log";
        file_put_contents($logfile, print_r($this->request->getParams(), TRUE), FILE_APPEND);
        file_put_contents($logfile, print_r($this->request->getPost(), TRUE), FILE_APPEND);
        file_put_contents($logfile, print_r($_POST, TRUE), FILE_APPEND);

        $currentStoreId = $this->storeManager->getStore()->getID();
        $product = $this->productRepository->get($productSku, false, $currentStoreId, true);
        return [
            'master' => $product->getData(),
            'type_id' => $product->getTypeId(),
            'row_id' => $product->getRowId(),
            'model' => $product
        ];

    }

}

As you can see I'm trying to log $this->request->getPost(), $this->request->getParams() and even $_POST. $_POST is an empty array. getParams() gives me only query string parameters. And getPost() gives me this:
Laminas\Stdlib\Parameters Object
(
    [storage:ArrayObject:private] => Array
        (
        )

)

Why is it not letting me get at the POST data?


texts: Magento 2.2.4 - Back Button in Admin Always Displays as "Back to register or connect an account"

texts:
After updating to Magento 2.2.4 I have noticed that the admin area "Back" button now reads "Back to register or connect an account" wherever you are within the backend.

From what I can tell is seems to be coming from translations within the new Amazon pay and login module:

amzn/amazon-pay-and-login-magento-2-module/src/Core/i18n/en_US.csv:"Back","Back to register or connect an account"

So feel I may just need to remove this line here or apply differently as this is applying to every back instance in my admin area.

Is there a way to just overide this translation and apply to the admin area without modifying the core code (or a better solution)?

Normally the structure from within vendor is like so:

Vendor/module-module-name

From there I can overide for example in my admin theme like so:

Vendor_ModuleName/il8n/en_US.csv

This module however has src/Core within the path and is also missing the module- at the beginning of the module folder so am unsure the correct way to override and was hoping someone could enlighten me?

e.g.

app/design/adminhtml/ThemeVendor/CustomAdminTheme/Amzn_AmazonPayAndLoginMagento2Module/src/Core/i18n/en_GB.csv


texts: How can I add customer specific price for configurable and group product?

texts:
ITEMS group 1 group 2

10ml $3.00 $2.92

20ml $4.25 $4.14

35ml $6.50 $6.33

40ml $10.00 $9.75

for proper format please see http://snag.gy/qBL5Q.jpg

I have configurable products in different bottle size, I want to set price for different customer group as per attached screenshot.

quick help please


texts: Magento 2: Browser console error on hard refresh

texts:
I am facing some weird issue with Magento 2.2.5 version. When I first-time open website, I am getting lots of js errors. (Screenshot attached)

After this, when I only press F5 button (normal refresh) then the errors are gone. Again I pressed Control+F5 (Hard refresh), facing the same errors in console.

I have tried clearing cache, static content deploy, merging JS/CSS, 777 folder permission on var/* and pub/* but no luck.

Can anyone help me with this?


texts: Unable to enable the Payflow Pro and Express Checkout in my magento 2 website

texts:
I am trying to enable Paypal Payflow Pro checkout in my website.
I gave the credential in the admin panel.

Enable this solution  select box is by-default disabled.

I received only username and password from the client.
What i missed in this setup? Please help me?


texts: DateTime UI Component - adjust the timezone

texts: I created a time field by the Q&A Magento 2 - How to add the DateTime UI Component, and I also set the store TimeZone is "Asia/Shanghai". But when I click the "Go Today", it always show the time of UTC timezone. How to fix it?


texts: Grunt compile of LESS fails with Error compiling lib/web/css/docs/source/docs.less

texts:
I'm hoping to get some advice. I pulled a project that I haven't touched in some time and in developer mode I ran 'grunt exec' followed by 'grunt less' and once running 'grunt less' I receive the following error. Magento 2.2.6

Running "less:documentation" (less) task

    NameError: .lib-url-check is undefined in lib/web/css/docs/source/_utilities.less on line 402, column 5:
    401     //  "Call" the mixin
    402     .lib-url-check(@_icon-image);
    403     Warning: Error compiling lib/web/css/docs/source/docs.less Use --force to continue.

Aborted due to warnings.

The code for around line 401:

.example-url-check-false {
    //  Set usage image path to false
    @_icon-image: false;

    //  "Call" the mixin
    .lib-url-check(@_icon-image);

    //  Will return 'false' and outputs nothing
    .lib-css(background, #eee @lib-url-check-output no-repeat 0 0);
}

This file is an unmodified core file, how do I go about debugging the cause of this issue/resolve.

I'd appreciate any help I can receive.

Thanks!


texts: Call to a member function getLoadedProductCollection() on boolean Search Query issue

texts:
im trying to separate the search query text from result.phtml and place it in its own template.
So basically ill have the product collection in results.phtml, and then the search query text "your search result no. products whatever" in searchtitle.phtml.
However im receiving Call to a member function getLoadedProductCollection() on boolean while trying to call the result.php functions from my own template file.
<move element="search.result" destination="main" />
<move element="sidebar.main" destination="page.top" />

<referenceContainer name="page.top" htmlTag="section" htmlClass="container-fluid w-100 p-0 bg-white">
    <block class="Magento\CatalogSearch\Block\Result" name="search.title" template="Magento_CatalogSearch::searchtitle.phtml" />
</referenceContainer>

searchtitle.phtml
<?php if ($block->getResultCount()): ?>
    <h1 class="text-center">
        <?php echo 'We found ' . $block->getResultCount() . strstr($block->getSearchQueryText(), " ") ?>
    </h1>
 <?php endif; ?>

Im doing this as i want to move the search query text around the page in the layout, however, because the product collection and search query text are rendered in the same template file they're moving together and i want to place something between them, and unfortunately this cannot be called in the template file, so thats no a possibility.
Thanks


texts: Creating a custom Resource (not mysql) - general approach

texts:
I'm assuming here, that it makes sense to create a custom Resource if you have a datasource other than MySQL. Basically, there is an online service which I'm communicating with through http requests. And I want this service to have an accessibility layer like MySQL does by default in Magento.

The plan is to not download anything to the server, but rather download it as needed (eg when ->load($id) is used, just download the data for this one object).

I'm a little lost as to where I need to start, most likely because I don't know Magento all too well yet. I'm figuring I need

a new implementation of Mage_Core_Model_Resource_Abstract (which I assume will just be where "normal" resources would be in my module, just extending something different and implementing different stuff)
read / write adapters

Am I missing something? Would you kindly point me to the right classes or tell me what I need to reconsider? Pretty lost at the moment...


texts: How to call javascript function from Observer file in Magento 2

texts:
I have created a custom js file in my custom module.
app\code\Vendor\Module\view\frontend\layout\default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
     <script src="Vendor_Module::js/test.js"/>
 </head>

app\code\Vendor\Module\view\frontend\web\js\test.js
function Test(json){
 console.log('Test Web',json);
}

Then used add to cart event.
app\code\Vednor\Module\etc\events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
  <event name="checkout_cart_product_add_after">
    <observer name="vendor_module_observer_checkoutcartproductaddafter"
      instance="Vendor\Module\Observer\Checkoutcartproductaddafter" />
  </event>
 </config>

Vendor\Module\Observer\Checkoutcartproductaddafter.php
class Checkoutcartproductaddafter implements \Magento\Framework\Event\ObserverInterface
{

private $image;
public function __construct(
    \Magento\Catalog\Helper\Image $image
{
    $this->image = $image;
}

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $event = $observer->getEvent();

    $eventData = $event->getData('quote_item');
    $item = ($eventData->getParentItem() ? $eventData->getParentItem() : $eventData);
    $product = $item->getProduct();
    $productId = $product->getId();
    $imageHelper = $this->image;
    $productImageUrl = $imageHelper->init($product, 'product_page_image_large')->getUrl();
    $OrgPrice = (float)$product->getPrice();

    $prepareJson = array(
            'event_name' => 'Added To Cart',
            'event_data' => array(
                'productId' => $productId,
                'productName' => $product->getName(),
                'productDescription' => $product->getDescription(),
                'productShortDescription' => $product->getShortDescription(),
                'productSku' => $product->getSku(),
                'productUrl' => $product->getProductUrl(),
                'productImage' => $productImageUrl,
                'productOriginalPrice' => $OrgPrice,
                'productQty' => (float)$eventData->getQty(),
        )
    );

    $json = json_encode($prepareJson);
    echo '<script type="text/javascript">
            require(["jquery", "jquery/ui"], function($){
            $(document).ready(function(){
                console.log("inside observer");
                Test('.$json.')
            });
         });</script>';
    return $this;
    }
 }

So whenever Add to cart is happened, I am trying to call my js function. but which is not happening.
Same I have to achieve for all the main events in magento. so created the common js function and trying to send the data in each observers.
In the above example i have mentioned Add to cart event to see if that works.
Can anyone help me with this. Thanks!!


texts:
I noticed that tinyMCE often strips 'wrong' html tags. Like divs inside a tags and sometimes spans. I found out that you can add some configuration to disable this behaviour but i'm not sure how to implement it. After some playing around i came to this script but it doesn't actually prevent the stripping and i'm not sure why. I'm using M2.3.4 with TinyMCE 4 but it would be nice if the script would work for tinyMCE 3 to to use it for multiple shops.
BB\TinyMCEStripping\Plugin\WysiwygConfig.php
<?php
declare(strict_types=1);

namespace BB\TinyMCEStripping\Plugin;

class WysiwygConfig
{
    /**
     * @param \Magento\Ui\Component\Wysiwyg\ConfigInterface $configInterface
     * @param \Magento\Framework\DataObject $result
     * @return \Magento\Framework\DataObject
     */
    public function afterGetConfig(
        \Magento\Ui\Component\Wysiwyg\ConfigInterface $configInterface,
        \Magento\Framework\DataObject $result
    )
    {
        $settings = $result->getData('settings');
        $settings['valid_children'] = '+a[div]';

        $settings['trim_span_elements'] = false;
        $settings['verify_html'] = false;
        $settings['cleanup'] = false;
        $settings['convert_urls'] = false;

        $result->setData('settings', $settings);
        return $result;
    }
}

BB\TinyMCEStripping\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">

    <type name="Magento\Ui\Component\Wysiwyg\ConfigInterface">
        <plugin name="plugin_wysiwyg_config"
                type="BigBridge\TinyMCEStripping\Plugin\WysiwygConfig"
                sortOrder="10"/>
    </type>

</config>

BB\TinyMCEStripping\etc\module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="BB_TinyMCEStripping" setup_version="1.0.0"/>
</config>

BB\TinyMCEStripping\registration.php
<?php

use Magento\Framework\Component\ComponentRegistrar;

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

Anyone have an idea how to finish this script?


texts:
Magento 2.3.3
Is it somehow possible to send mails directly without queue? Searched a bit but found nothing helpful. Maybe there is a SMTP extension which supports it?
Thanks!


texts: How to add/update product from magento 1 to magento 2 website

texts:
Website 1 - www.domain1.com (Magento 1)

Website 2  www.domain2.com(Magento 2)

If any product is uploaded on Magento 2 I want to also upload on Magento 1

it's possible?


texts:
TL; DR: Is there any reason why the simple products associated to a configurable product have to be in the same attribute set as the configurable product itself? I mean, is there any technical reason? I know the "common sense" reason. If you sell a pair of shoes then all the versions depending on color and size have to be shoes also.
Long version: I had a task to "merge" some configurable products. I mean from 2 or more to make only one. I didn't want to do them manually because of the amount of products and I didn't want to go through $product->load(..)->set...()->save() because of the amount of time it took to run the script. So I short-circuited  the process because I was sure that none of the simple products overlapped. There was a unique combination of size and color. I did this:

Mage::getResourceSingleton('catalog/product_type_configurable')
    ->saveProducts($mainConfigrableProduct, $simpleProductIds);

where $simpleProductIds is an array of all simple product ids associated all to the configurable products that need to be merged.
This worked perfectly for most of the products, but there were a few that has issues.
If I called

$productIds = $product->getTypeInstance()->getUsedProductIds()

I would get all the simple product ids, but in the backend only a few of them appeared. After digging for some time I found out that the only ones that were shown were the ones in the same attribute set as the configurable product. The other attribute set is very similar to the first one, just some minor differences but it contains the configurable attributes (size and color).
And now the strange thing. In the frontend I expected to see either all the products ($productIds in the code above) or only the products in the same attribute set. Well there was something between.

20 associated product ids - 5 sizes, 4 colors
10 associated products in the backend - 5 sizes, 2 colors - the other 2 colors (10 products) were in a different attribute set
15 combinations in the frontend - 5 sizes 3 colors (???)

I was able to solve the issue by changing the attribute set for the products that didn't appear, but I'm still puzzled.

Note: Don't try this at home. Or you can try it at home but not on a live server.


texts: Magento 2: Move up-sell product to product.info.details tab

texts:
I would like to move my up-sell products into a custom tab on product view page and can't find a way. How can it be done by modifying catalog_product_view.xml.

Please advise, thanks.


texts:
this bug is driving me nuts and I do not know how to fix it.
The following scenario:
We have sample articles. Each has a cost without tax of 0.30 €
German VAT is 19% usually. Now I put 4 samples into the cart. 3 of them get a price of 0.36 €, 1 gets 0.35 € (see screenshot)
My calculation settings are:

Catalog Prices: Excluding tax (This sets whether catalog prices entered from Magento       Admin include tax) --> Our prices are set without tax
Tax Calculation Method Based On = Total (even if I change this to row or subtotal, nothing changes)

The prices seem 1:1 as the output when I inspect the elements.
See here:
And here:
But as said, the calculation is wrong. Either all products here should have a price of 0.36 € or all should have 0.35 € but not mixed up.
Does anybody out there have an idea, how I can fix this so that prices for the same product have the same price incl. tax?


texts:
I have created a custom admin user and gave access rights to access all the magento modules.

Now when i hit the url to get product info by passing sku in url from postman.

  http://local.m2.com/rest/V1/products/24-MB02

and select authorization type basic auth with username and password which i have created from admin, it gives me error

  Consumer is not authorized to access %resources.

how can i fix that or is there any way to access Magento API's using basic auth?


texts: How to get already selected Shipping method and shipping Carrier using ajax in Checkout page Magento 2?

texts:
Basically I am trying to get the pre-selected shipping method and shipping carrier on the page load. Also it should capture the shipping method and shipping carrier as soon as the customer selects another radio button. So my question is how can I get shipping method as per above conditions? I have been referring to the code below. It would be really helpful in my learning if anyone can give any suggestion or advice. I am really excited to understand this concept of how shipping methods works. Thanks .Though I am trying my best to figure out the solution and will keep updating if I come across anything relevant.

\app\design\frontend\company\porto_base_child\Magento_Checkout\web\template\shipping-address\shipping-method-item.html

            <input type="radio"
                   class="radio"
                   ifnot="method.error_message"
                   ko-checked="element.isSelected"
                   ko-value="method.carrier_code + '_' + method.method_code"
                   attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
                        'checked': element.rates().length == 1 || element.isSelected" />

            <each args="element.getRegion('price')" render="" />

                <input type="radio"
                       attr="'value' : method.method_code, 'id': 's_method_' + method.method_code" />


texts: M1 to M2 migration - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry

texts:
I am in the process of migrating a site from M1 to M2
I have run the following command successfully a few times:
bin/magento migrate:delta --auto /app/code/Vendor/Migration/etc/opensource-to-opensource/1.9.4.5/config.xml

The last time I ran it the following error was displayed:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1617
  3-1' for key 'CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID'

Any ideas?


texts: Magento1: Hide zero shipping price in checkout shipping method step

texts:
i have a problem during the checkout step "shipping method".
I have configured a shipping method string in backend (config->sales->flat rate->method name) which is shown, but there is also the price added after that string. Of course this is correct but i don´t want to see zero prices (which occurs when delivery address is e.g. Egypt):

Well i already figured out that "app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml" is responsible for that (line 58-65) and that "code/core/Mage/Checkout/Block/Onepage/Shipping/Method/Available.php" probably could be overwritten for like doing some price filtering, but i really only want to hide that zero price if it occurs (so the configured backend string should be shown) not whole groups or anything like that.

Can anyone tell me how exactly I have to check for zero prices in available.phtml to achieve my goal (because by now i failed miserably doing so xD) or give me a proper solution by overwriting a class method if there is any i missed so far ?

Thank you !


texts: i applied this patch but getting this error saving rejects app/mage.php i have check all previous patches installed and also compare file is same.


texts:
We are launching a new e-commerce store soon. When a customer placed an order for first time then we want to give a unique coupon code to customer.

In Magento we have option for cart rules and catalog rules but not for customer or sales related options.

Any one suggest me how can I do this marketing?


texts:
I have installed a new theme, I created the i18n directory with the csv file.
I entered this command to create the dictionary:

 php magento2/bin/magento i18n:collect-phrases --output="magento2/app/design/frontend/OrangeCo/orange/i18n/en_US.csv" magento2/app/design/frontend/OrangeCo/orange

To take effect I entered:

 bin/magento setup:static-content:deploy

The problem is that some link or button name are not translated.


texts: Why I can't change any configuration in admin panel?

texts:
I have all access to the admin panel by my user, I tried to use production and developer mode, I keep seeing the options locked as the image below.

I can't click into the Use Default option, it's locked too.

How could I debug or solve it?


texts: Magento Dashboard page show blank only header and footer show and same as cache management page

texts:
Magento Dashboard show blank page only header and footer show, And same as cache management page show blank.

what is the issue how to solve this.


texts:
I wish to change the tax amount in checkout programmatically I am using following code let me know If I am making any mistake.

$session= Mage::getSingleton("checkout/session");
$quote_id = $session->getQuoteId();
$quote = Mage::getModel("sales/quote")->load($quote_id);
$items = $quote->getAllItems();
foreach($items as $item) {
   $item->setTaxAmount(0);
   $item->setBaseTaxAmount(0);
   $item->setPriceInclTax($value);
   $item->setBasePriceInclTax($value);
   $item->save();
   $quote->save();
}


texts: How can I change the template loading order?

texts:
As we all may know, when you set a template package at the admin it'll use it's default folder to provide the .xml and .phtml files. If the system doesn't find the necessary file, it will load it from 'base/default'. How can I change that? I want to add another folder for Magento to check before it goes looking for it at the base structure.

For example:

current

your_theme_package (if not found ->) base_package

what I'm looking for

your_theme_package (if not found ->) your_base_package (if not found ->) base_package


texts:
I tried to add a simple div into my Magento 2 theme.
I've added this code to

  /app/code/design/frontend/MyCompany/MyTheme/Magento_Theme/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <referenceContainer name="columns.top">
      <container name="topline" as="topline" htmlTag="div" htmlClass="topline" before="page.header">
        <block class="Magento\Framework\View\Element\Template" name="top.line" template="Magento_Theme::topline.phtml" />
      </container>
    </referenceContainer>
  </body>
</page>

And I added this file with some test content:

  /app/code/design/frontend/MyCompany/MyTheme/Magento_Theme/templates/topline.phtml

Of course, I've tried other answers here in StackExchange, but nothing worked. I read that when there's no content, the dom even does not appear - is that correct? But main question: what's wrong with my code? Btw, mage cache cleared.


texts: Add filter to getLoadedProductCollection()

texts:
In my magento store (ce-1.9.0) I have setup a custom product attribute:

custom_depth_check

And the attribute has the setting of

Used in Product Listing : Yes
Used for Sorting in Product Listing : Yes

I now need to filter any getLoadedProductCollection() with this attribute. The attribute will either be set at:

null
0
1

I need to filter all instances of getLoadedProductCollection() so that it will EXLCUDE any products with

custom_depth_check : 1

I have tried to clear and reload like so:

$_productCollection=$this->getLoadedProductCollection()
->clear()
->addAttributeToFilter('custom_depth_check', array('neq' => 1));

But that results in an empty collection. I also tried adding ->load() at the end but again nothing comes up.

I have to stored this collection into an array for specific field such as name, price, description, images etc.

how can i achieve this.


texts: Magento 2 : How to focus google map on Tokyo and Yokohama by default

texts:
I want focus google map on Tokyo and Yokohama by default.

My map like this

I want my map like this by default

Please help me ! Thanks all


texts: Export all categories & products then import them

texts:
I have a website with categories & products. Some of the categories & products also have images attached.

I want to:

Export all the categories & products.
Delete all the categories & products from another website.
Import the first exported categories & products into this new website.

Is there a fast way to do this?

P.S.2 My other websites are cloned. They have the same attributes.

P.2.3 I need to do this without any purchased tools.


texts: "https://github.com/scandipwa/base-theme" not able to run after install nodemodule also , Anybody can u tell me how to run this?

texts:
Hi  There anybody help me with this error ???
 i am working as a react developer,As per the magneto official docs scandipwa base-theme configured with react so i tried that.

After cloned the "https://github.com/scandipwa/base-theme" i installed nodemodule but when i am trying to run it "npm run watch" ,
At 1st compile i got

"> scandipwa-base@1.0.0 watch /home/chiranjivi/Desktop/base-theme

  webpack-dev-server --config ./src/config/webpack.development.config.js

ℹ ｢wds｣: Project is running at http://scandipwa.local/

ℹ ｢wds｣: webpack output is served from /

ℹ ｢wds｣: Content not from webpack is served from /home/chiranjivi/Desktop/base-theme

ℹ ｢wds｣: 404s will fallback to /index.html
Browserslist: caniuse-lite is outdated. Please run next command npm update

"After that it's throwing error"

  ERROR in
  ./src/app/component/MyAccountTabListItem/MyAccountTabListItem.style.scss
  (./node_modules/css-loader/dist/cjs.js??ref--5-2!./node_modules/postcss-loader/src??ref--5-3!./node_modules/sass-loader/lib/loader.js??ref--5-4!./node_modules/sass-resources-loader/lib/loader.js??ref--5-5!./src/app/component/MyAccountTabListItem/MyAccountTabListItem.style.scss)
      Module build failed (from ./node_modules/sass-resources-loader/lib/loader.js):

Error:
      Something wrong with provided resources.
      Make sure 'options.resources' is String or Array of Strings.

      at Object.module.exports (/home/chiranjivi/Desktop/base-theme/node_modules/sass-resources-loader/lib/loader.js:71:18)"

How to resole it's???


texts: How can I implement HttpMethod (HttpMethodNameActionInterface) for ActionInterface in a controller?

texts:
This class Magento\Framework\App\Action\Action is deprecated:

What is the interface to be implemented in the controller action?
How should I implement the interface in the controller action?
What should the controller structure with the implemented interface look like?

Below is this warning that identifies with the implementation of the Action Interface.

The class VendorName\ModuleName\Controller\Routing\ControllerAction does not restrict processed HTTP methods by implementing a HttpMethod nameActionInterface


texts: Magento Go Fonts Assets not loading in IE9-10 and Firefox

texts:
I'm working on a Magento Go site at the moment. I purchased a web font from Font Spring and uploaded the 4 font files (eot, woff, ttf and svg) via the admin system using the Font Assets tool.

When I insert the fonts the following css code is added to my custom css:

../css_editor_fonts/ProximaNova-Sbold-webfont.eot
../css_editor_fonts/ProximaNova-Sbold-webfont.ttf
../css_editor_fonts/ProximaNova-Sbold-webfont.woff
../css_editor_fonts/ProximaNova-Sbold-webfont.svg

I've then applied those relative paths to the correct cross-browser compatible @font-face declaration, see below:

@font-face {
    font-family: 'proxima_nova_ltsemibold';
    src: url('../css_editor_fonts/ProximaNova-Sbold-webfont.eot');
    src: url('../css_editor_fonts/ProximaNova-Sbold-webfont.eot?#iefix') format('embedded-opentype'),
         url('../css_editor_fonts/ProximaNova-Sbold-webfont.woff') format('woff'),
         url('../css_editor_fonts/ProximaNova-Sbold-webfont.ttf') format('truetype'),
         url('../css_editor_fonts/ProximaNova-Sbold-webfont.svg#proxima_nova_ltsemibold') format('svg');
    font-weight: normal;
    font-style: normal;

}

The font is referenced in my custom css like so:

font-family: 'proxima_nova_ltsemibold';

This works in IE7/8 and latest Chrome, but not in IE 9/10 or Firefox.

I think the reason the font isn't working in IE9/10 and Firefox is due to a cross-origin request which is something I've seen discussed quite a lot, and my IE console contains this error:

  @font-face failed cross-origin request. Resource access is restricted.

There is an edit that can be made to an htaccess file to enable the fonts to work in those browsers - its called Access-Control-Allow-Origin from what I've read.

Does anybody know if you can update or create an htaccess file for Magento Go?

Cheers.


texts: How can I send email based on selection - Magento contact

texts:
I want to make a functionality that based on what I select in contact form (I've add a select box in the contact form).

For example if I select a department from the select box I want that the email goes to that department and not to the central email for contact form.

How can I do this?


texts: how to add additional charge for order before 12 pm magento2.2.1

texts:
i want to add the option for user have to choose the delivery time before 12pm and add extra charge for it in the cart.

Could you please help me for configure it, i have tried to create a condition in shipping rules but i dont have option for choose time.

if there is free extension please suggest me a link or guide me a way to configure it.


texts:
Hey I am new to Magento and I am trying to see what I can do.
I have watched a lot of videos that tell me "how to change theme?"

But in my "store>general>design" I don't get the right possibility too change my theme.

I got a search engine robot instead of category change.


texts:
The magento was installed in a testing environment.

1 - I copied all files from the folder and uploaded it to the production server folder.

2 - I exported the database and imported it into the production base.

3 - I put the appropriate permissions:

   "sudo find var vendor pub / static pub / media app / etc -type f
  -exec chmod u + w {} \;

  sudo find var vendor pub / static pub / media app / etc -type d -exec
  chmod u + w {} \;

  sudo chown -R www: www-data / var / www / html / magento sudo chmod u
  + x bin / magento "

4 - Modwrite settings in production apache:

  /etc/apache2/sites-enabled/000-default.conf

<Directory / var / www />
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow, deny
    allow from all
</ Directory>

  sudo service apache2 restart

a2enmod rewrite "

5 - In the apache conf file I made the change:

   /etc/apache2/apache2.conf

   Options Indexes FollowSymLinks
   AllowOverride None
   Require all granted

6 - I changed the memory of php to = php_value memory_limit 256M

7 - I cleaned the cache files of the var/cache/* folder

8 - The .htaccess file is missing from the /var/www/html/ magento folder

Ask for help from you, everything I thought I could resolve I did.
But the problem persists, help me.


texts: Magento 2 Professional Developer certification study guidelines

texts:
I want to take to the exam of the Magento 2 Professional Developer Certification.

Before, I have read "swiftotter" website study guidelines online. This time "swiftotter" provide study guideline free but now they take fees of study guidelines.

Anyone have this study guideline? then please give me.

Thanks in Advanced.


texts:
(yes-I am new and sorry not advanced)
my logos are blurry (Magento 1.9.2), uploading a different file in backend (configuration/general options/custom logo) doesn't help. Especially sticky header (=small logo) on mobile looks really bad.
I assume the answer is to upload a logo twice the size of what I want to display and then downsize via styles.css, right?! in line 1170 of styles.css I find the following, but changing width:147px; height:42px; didn't do the trick. any ideas? thanks!!!

header#header .small_logo strong{
    position:absolute;
    top:0;
    left:-120px;
    width:0;
    height:0;
    font-size:0;
    line-height:0;
    text-indent:-999em;
    overflow:hidden;


texts:
I have set up a tax rate of 21% (Belgian Tax). This tax rate applies to all products (Taxable Goods) through the needed Tax Rule.

Let's take a product with a price of 6.82€ (tax included). Magento shows "[Inc. Tax €1.18]" on the Price tab for this product.

This is completely wrong: 6.82€ * 0.21 = 1.4322€ (-> compared to 1.18€)

As a result, the tax information on the shopping cart and on invoices are totally wrong.

I have this set-up in System > Configuration > Tax:

Tax Calculation Method Based On: Total
Tax Calculation Based On: Shipping Origin
Catalog Prices: Including Tax
Shipping Prices: Including Tax
Apply Customer Tax: Before Discount
Apply Discount On Prices: Excluding Tax
Apply Tax On: Custom price if available

I can't find what is going wrong. Any help would be fully appreciated.


texts: how can i add pagination in product images in admin? any have idea about this.


texts:
I have a page where I have an option for pagination having an option "All".
Clicking on "ALL" loads all the available products but since it is trying to all the product collection and then display, it is taking huge time.
Anyone having a better solutions on this to tackle?

I am thinking to adopt a away for lazy loading but need a ray to start with!


texts: BCC shipment email only when "Send shipment email" is checked

texts:
I need to BCC the shipment email to an email-address whenever I send the email to the customer.
I have added the BCC address in

  Backend - System - Configuration - Sales section - Sales Emails tab

however this does also BCC the shipping email when not sent to the customer.
I send it to the postal service first for processing, and later to the customer when Magento has received the tracking information.
I therefore need to add BCC to the template instead.
Anyone know where and how to achieve this?


texts: How to use collection factory model in Unit Test magento 2

texts:
I have a custom extension with model with structure like this in database:

+----------------------------------+
|entity_id | customer_id | balance |
+----------------------------------+
|     1    |      3      | 7100000 |
|     2    |      5      | 1250000 |
+----------------------------------+

I usually use my model in __construct  function in controller like this:

public function __construct(
.... ,
/Namespace/Module/Model/CreditFactory $credit
... ,
){
  $this->credit = $credit;
}

and i can use to store and retrieve data from my model collection easily like this:

//retrieve Data
$credit = $this->credit->create()->load('1');
$anotherCredit = $this->credit->create()->getCollection()
    ->addFieldToFilter('customer_id','5')->getFirstItem();
$balance = $credit->getBalance();
$anotherBalance = $anotherCredit->getBalance();
//Store Data
$amount = 1000;
$endCreditBalance = $balance - $amount;
$credit->SetBalance(endCreditBalance);
$credit->save();
$endAnotherCreditBalance = $balance + $amount;
$anotherBalance->SetBalance(endAnotherCreditBalance);
$anotherBalance->save();

I tried to create unit test to compared the saved value with the value i want to store like this:

protected function setUp()
{
 $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
 $this->customerCredit = $objectManager->getObject(\Namespace\Module\Model\CreditFactory::class);
}

public function testSend()
{
 $credit = $this->credit->create()->load('1');
 $anotherCredit = $this->credit->create()->load('2');

 $balance = $credit->getBalance();
 $anotherBalance = $anotherCredit->getBalance();
 $amount = 250;
 $endCreditBalance = $balance - $amount;
 $credit->SetBalance(endCreditBalance);
 $credit->save();
 $endAnotherCreditBalance = $balance + $amount;
 $anotherBalance->SetBalance(endAnotherCreditBalance);
 $anotherBalance->save();
 $result = array(
          'credit_balance' => $credit->getBalance(),
          'another_credit_balance' => $anotherCredit->getBalance()
 );
 $expected = array(
          'credit_balance' => $endCreditBalance,
          'another_credit_balance' => $endAnotherCreditBalance
 );
 $this->assertEquals($expected, $result);
}

but i always got an error like this:

  Error: Call to a member function load() on null

and i don't know if the rest of the code will work just fine or not


texts: Magento 2 override add wishlist controller?

texts:
I tried to override add wishlist controller from the custom module but it's not working.

app/code/Demo/Wishlist/etc/frontend/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\Wishlist\Controller\Index\Add" type="Demo\Wishlist\Controller\Index\Add"/>
</config>

app/code/Demo/Wishlist/Controller/Index/Add.php

 <?php

namespace Demo\Wishlist\Controller\Index;

use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\App\Action;
use Magento\Framework\Data\Form\FormKey\Validator;
use Magento\Framework\Exception\NotFoundException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Controller\ResultFactory;

/**
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class Add extends \Magento\Wishlist\Controller\Index\Add
{
    /**
     * @var \Magento\Wishlist\Controller\WishlistProviderInterface
     */
    protected $wishlistProvider;

    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $_customerSession;

    /**
     * @var ProductRepositoryInterface
     */
    protected $productRepository;

    /**
     * @var Validator
     */
    protected $formKeyValidator;

    /**
     * @param Action\Context $context
     * @param \Magento\Customer\Model\Session $customerSession
     * @param \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider
     * @param ProductRepositoryInterface $productRepository
     * @param Validator $formKeyValidator
     */
    public function __construct(
        Action\Context $context,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider,
        ProductRepositoryInterface $productRepository,
        Validator $formKeyValidator
    ) {
        $this->_customerSession = $customerSession;
        $this->wishlistProvider = $wishlistProvider;
        $this->productRepository = $productRepository;
        $this->formKeyValidator = $formKeyValidator;
        parent::__construct($context, $customerSession, $wishlistProvider, $productRepository, $formKeyValidator);
    }

    /**
     * Adding new item
     *
     * @return \Magento\Framework\Controller\Result\Redirect
     * @throws NotFoundException
     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
     * @SuppressWarnings(PHPMD.NPathComplexity)
     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
     */
    public function execute()
    {
        echo "From custom module calling";
        exit;

    }
}

I have followed the below reference link in the clean default magento2.3.2 EE but no luck.

http://hkpatel201.blogspot.com/2017/02/magento-2-overriderewrite-wishlist-controller.html

Can any one know the reason what I was missed here?


texts: Magento 2 - The product that was requested doesn't exist

texts:
Magento2.3.0

I have the following error in var/log/exception.log any idea how to come this error

  main.CRITICAL: The product that was requested doesn't exist. Verify
  the product and try again. {"exception":"[object]
  (Magento\Framework\Exception\NoSuchEntityException(code: 0): The
  product that was requested doesn't exist. Verify the product and try
  again. at
  /var/www/vhosts/exmp.com/httpdocs/vendor/magento/module-catalog/Model/ProductRepository.php:290)"}
  []

Thanks


texts:
I'm having a problem with the gty (and just with the guantity) when importing the products from csv. I'm doing the import from system -> import/export -> import -> Replace Existing Complex Data.

I must say that all the custom attributes and other values are imported with 100% success, but the gty field just want accept the number, either in the format for example "10" or "10.0000". It is always a zero, which is not correct.

I have tried all the possible solutions i could think off, but couldn't figure this out.

What i'm doing wrong! thanks


texts:
I am not able to access product details using SOAP API while i call api url i am getting Error:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://127.0.0.1/test_magento_2/soap/default?wsdl&services=catalogProductTypeListV1' : failed to load external entity "http://127.0.0.1/test_magento_2/soap/default?wsdl&services=catalogProductTypeListV1" in /opt/lampp/htdocs/test_magento_2/api.php:59 Stack trace: #0 /opt/lampp/htdocs/test_magento_2/api.php(59): SoapClient->SoapClient('http://127.0.0....', Array) #1 {main} thrown in /opt/lampp/htdocs/test_magento_2/api.php on line 59

I am using magento 2.1.5
and I have also set necessary setting in php.ini files for soap like
extension=php_soap.dll
extension=php_openssl.dll
i am facing this issue in my local system and in live server.

My code for call SOAP API:

$token = 'kxij7mg931mxc3h2hy7dyvxm9m3fy4k4';
$opts = ['http' => ['header' => "Authorization: Bearer " . $token]];
$wsdlUrl = 'http://127.0.0.1/test_magento_2/soap/default?wsdl&services=catalogProductTypeListV1';
$context = stream_context_create($opts);
$soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'context' => $context]);
$soapResponse = $soapClient->__getFunctions();
var_dump($soapResponse);


texts: Magento 2 add customer group as Email Template variable

texts:
In magento 2 it is possible to create Email Template variables, however, those variables are html or plain text.

I'd like to create a variable containing the user group, so i can use this variable to show different text for different user groups.

Thanks in advance!


texts: M2 Change layout of category page with XML

texts:
I have created a page http://www.extenderstore.com.au/shipping.html and I would like to change the layout to 2 columns with left bar. I made a file in Magento_Catalog/layout/ called catalog_category_view.xml with the code:

<?xml version="1.0" encoding="utf-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

But it's not working?


texts: reload grid when click on button and filter grid

texts:
I add some buttons in the top of my grid that shows orders statuses.
https://pasteboard.co/I5lM7c8.png

I want send parameter to Magento grid to filter and reload the grid

for example, when I click completed orders button, it should be list completed orders in the grid.

  protected function _prepareCollection()
    {
        $collection = Mage::getModel('my_model')->getCollection();
        $this->setCollection($collection);
       return parent::_prepareCollection();
    }

I can't get url parametrs in the block to fitter collection

is there any way to filter magento gird from outside the grid


texts: Magento 2 How to create table setting in admin system configuration?

texts:
According magento 1, we extend from "adminhtml/system_config_backend_serialized_array" to create a table like this :

My question is : How we create it in magento 2 ?

Edit:
 Finally, with @Marius help : it's User-Agent Exceptions field in System=>Configuration=>General=>Design=>Design Theme.

We can create a new table configuration based on this field by looking at it's codes
"Magento\Config\Block\System\Config\Form\Field\Regexceptions"


texts:
We have a develop branch.
Every new feature gets created on a branch that runs off the develop branch.
Then a pull request is made to the develop branch.

This triggers our CI/CD and slowly but surely makes it way to the master branch and deployed live after all the quality checks and tests are validated.

Here's our issue:

Developer1 creates a branch off develop for feature 1.
Developer 2 creates a branch off develop for feature 2.
Then, developer1 creates a pull request that includes an updated composer.json and composer.lock.
His PR gets approved and merged.
Then, developer2 tries to do a pull request to the develop branch but there's a conflict, because the composer.json and composer.lock were modified on the develop branch by developer1.

What's the best way to go about this?

Should developer2 first merge the develop branch back into his feature2 branch?

Or is there a better way of managing composer introduced merge conflicts?


texts:
We have came across a bug in Magento regarding Quantity is not accepting 0.5 on invoic and it is apparently a common issue. https://github.com/magento/magento2/pull/23943/files
I have found the solution on git hub but I just need some help regarding this.
I know you should not edit any file in vendor/... but try to overwrite it by put the files under app/... as you can see in the github solution.
My question is, when I have copied all of the files and put them under app/.... as referred in github, do i need to create a registration.php to make it work? and do i need anything else?
Any help is appreciated .


texts: How to get ajax values into php variables and set to sql queries?

texts:
in my .phtml file inside of script tag there is a code like below

require(['jquery'], function($) {
            var Calculation = function(evt) {

                var width = jQuery('#width').val();
                var height = jQuery('#height').val();

                //Ajax
                jQuery.ajax({
                showLoader: true,
                url: '<?php echo $this->getUrl('helloworld/index/ajax'); ?>',
                data: ({
                        Width: width,
                        Height: height
                    }),
                    type: "POST",
                    dataType: 'json'
                })
                .error(function(err){
                    console.log(err);
                })
                .done(function(data) {
                    console.log(data.Width);
                    console.log(data.Height);
                });

            };
            $('#width,#height').on('change', Calculation);

        });

you can see, It will return some height and width

how can i use those values in sql query

<?php
    $sql = " SELECT price_component FROM base_price WHERE width="get width" AND height="get height" ";
?>

How can I do that

  How can i get those width and height in to php?

i used below code

<?php
echo $_POST['Width'];
?>

but it will give a error like saying undefined index Width


texts: PayPal Express checkout - review page doubling total amount

texts: Everything is OK in the Cart and on the PayPal site. However, when returned to the Review page - the Total prices are doubled. I tried looking at frontend/base/default/template/paypal/express/review/details.phtml but it seems fine - I don't see where it's doubling. Where can I find this? Here is a screenshot.


texts: Magento 2.1.7 Upgrade to 2.2.x - Error converting field `value` in table `dgtl_quote_item_option`

texts:
I'm trying to update Magento 2.1.7 to Magento 2.2.x but I keep coming across this error when I run the upgrade command in the CLI.

Upgrading data.. Error converting field `value` in table `dgtl_quote_item_option` where `option_id`=1943, 1949 using Magento\Framework\DB\DataConverter\SerializedToJson.
Fix data or replace with a valid value.
Failure reason: 'Unable to unserialize value, string is corrupted.'

I'm not sure what has made the string corrupt - the string in the value column is indeed incomplete. Anyone had any similar issues?

I'm not sure how to get around this and resolve the problem. Any help would be massively appreciated.


texts: How to define $_canCapture and $_canCapturePartial protected vars for banktransfer payment?

texts:
I would like to be able to generate invoice with unpaid status when payment has been made via banktransfer.

I managed to create the invoice, but I read here that in order to be able to set the status to pending, the $_canCapture and $_canCapturePartial protected vars of the payment method may be set to true.

How can I set these vars properly to true for banktransfer?


texts: How can i Check the user is log in or not?

texts: I have a html file not a .phtml file, i want to check custom is log in or not in html file, how can i do this?


texts: Magento 2 Remove Add to Cart button and Add New Custom Button

texts:
I am creating a module. I have create one custom product attribute which value is YES/NO.

if product attribute value is Yes then Add to Cart Button hide And Show Custom Button

if product attribute value is NO then Add to Cart Button show And hide Custom Button

Note: code works everywhere when Add To Cart Button show in Website Not for Specific Page.
Please Help Me.


texts: How to place order in magento 2 using REST API?

texts:
Preconditions

I have using REST API for placing order in PHP coding.
And then i have to set this to my android app.
Steps to reproduce

And i have following the steps of
a.) create empty cart b.) add items c.) post billing address d.) post estimate shipping methods e.) get shipping info f.) get payment info g.) place order
But Shipping Address is not set in my backend and the shipping methods returning empty array [ ].
Shipping info is also returning empty array.
billing address is generating the ID but it is not saving in my backend but it posts my address details..
Expected result

For Example:

Shipping Methods :

[
{
"carrier_code": "flatrate",
"method_code": "flatrate",
"carrier_title": "Flat Rate",
"method_title": "Fixed",
"amount": 15,
"base_amount": 15,
"available": true,
"error_message": "",
"price_excl_tax": 15,
"price_incl_tax": 15
},
{
"carrier_code": "tablerate",
"method_code": "bestway",
"carrier_title": "Best Way",
"method_title": "Table Rate",
"amount": 5,
"base_amount": 5,
"available": true,
"error_message": "",
"price_excl_tax": 5,
"price_incl_tax": 5
}
]

Actual result is attached in screenshot,
Thanks in advance


texts: Access order history with the payment method not used anymore?

texts:
I used to have one Stripe extension and have some order histories with it.

Now I use different extension for Stripe payment, so I don't need the previous one. And I also do not want to keep as it is not compatible with the Magento 1.9.2.4 .

However, if I uninstall the old extension , sure I cannot access order history.

Is there any way to see an order history without the old extension installed?


texts:
You have created a module controller that responds to the following URL: /mycompany/product/load/id/123.
Which two methods will load the product model by ID as specified in the URL? (Choose two.)

  A. \Magento\Catalog\Model\ResourceModel\Product::load($productModel,
  $id)

  B.
  \Magento\Catalog\Model\ResourceModel\Product\Collection::load()->fetchById($id)

  C.
  \Magento\Catalog\Model\ResourceModel\Product\Collection::fetchItemById($id)

  D. \Magento\Catalog\Api\ProductRepositoryInterface::getById($id)


texts: How to create an extra field in attribute information

texts:
I am trying to add a field to the attribute information section. This should be an text field for multistore ( just like the manage titles section).

Magento version: 2.2.6

Here's what I got now:

I created a custom module.
A plugin:
app\code\Custom\Module\Plugin\Block\Adminhtml\Product\Attribute\Edit\Tab\front.php

use Magento\Framework\DB\Ddl\Table;

class Front
{
    /**
     * @param Magento\Config\Model\Config\Source\Yesno $yesNo
     */
    protected $scopeConfig;

    public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig

    ) {
        $this->scopeConfig = $scopeConfig;
    }

    public function aroundGetFormHtml(
        \Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front $subject,
        \Closure $proceed
    )
    {

        $form = $subject->getForm();
        $fieldset = $form->getElement('front_fieldset');
        $fieldset->addField(
            'label_field',
            'text',
            [
                "type" => Table::TYPE_TEXT,
                'name' => 'label_field',
                'label' => __('Label field'),
                'title' => __('label_field'),
                'note' => __('label_field'),
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                'translate' => 'label',
                "nullable" => true,
                'system' => 0,
            ]
        );

        return $proceed();
    }
}

And I also created A upgradeschema to create the field in the catalog_eav_attribute table;

class UpgradeSchema implements UpgradeSchemaInterface
{
    /**
     * {@inheritdoc}
     */
    public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $installer = $setup;
        $installer->startSetup();
        $installer->getConnection()->addColumn(
            $installer->getTable('catalog_eav_attribute'),
            'label_field',
            [
                'type' => Table::TYPE_TEXT,
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                "nullable" => true,
                'default' => '',
                'comment' => 'label field',
                "system" => 0,
                'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
            ]
        );
        $installer->endSetup();
    }
}

The field is created in attribute information -> Frontend properties aswell as the column in the db.
Also the value is being saved but I am not able to see it in the backend.
The endgoal is to save the attribute as text ( preffered for multistore ) and show the value in a phtml file. I seem to be stuck at retrieving the data in the  backend.

This is my first time asking a question so if any more / less info is needed let me know.


texts: Magento 2 manipulate shipping address fields in chekout via knockout.js

texts:
i already know how to add new field to shipping address form in checkout, but i need to modify the behavior of some fields. For example:

there is a checkbox "Deliver to Packing station";
if checkbox is selected, "street" fields becomes hidden and not required, but 2 new fields ("Packing station #" and "Post #") becomes visible and required.

I completely stuck with that. I'm not very familiar with knockout, just have read some lessons on it.
Any help/ideas? (except "go learn knockout.js" :))


texts: Is there any API for creating and editing catalog price rules in Magento 2.2.x

texts:
I needed to perform this task for a customer where I have to create, edit and delete catalog price rules in his magento site based on some backend functionality in another system he runs internally in his organization. While searching I got to know that although there is an API to handle shopping cart price rules:

    GET    /V1/salesRules/:ruleId
    GET    /V1/salesRules/search
    POST   /V1/salesRules
    PUT    /V1/salesRules/:ruleId
    DELETE /V1/salesRules/:ruleId

  (ref)

there is none to handle catalog price rules (as mentioned here)

Is there possible solution or will it require creation of custom API to handle these rules?


texts:
I'm trying to create a custom indexer on Magento2.

I defined a mview.xml and one indexer.xml as follows:

indexer.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
    <indexer id="my_indexer" view_id="my_indexer" class="My\Indexer\Model\Indexer\Fulltext">
        <title translate="true">My Indexer</title>
        <description translate="true">My Indexer</description>
    </indexer>
</config>

mview.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Mview/etc/mview.xsd">
    <view id="my_indexer" class="My\Module\Model\Indexer\Fulltext" group="indexer">
        <subscriptions>

        </subscriptions>
    </view>
</config>

I can see the new indexer in the Magento backend and I can run a reindex from the command line, but when I try to modify a product from backend it does not trigger the mview as I would expect.

It does not call the execute method in the Mview or Indexer class, but it works correctly if called from command line.

Any idea?


texts:
By default, Magento will choose the price assigned to "ALL GROUPS" over the price assigned to a customer group if customer group's price is higher than ALL GROUPS price.

I want to override this logic and show the customer group's price even ALL GROUPS price is lower.

I just want to determine which class and method should I override for me to implement this. Any idea?


texts: What are the valid tags inside a update layout custom handler?

texts:
It seems the only child that is allowed in a custom handler is <reference> ?

I am trying to define a custom handler which has a <block> as a child, and it would only show the handle in the parsed handle list only when I used <reference> as first children in the custom handler tag content.

I am trying to define a custom handler to be used with <update> tag.


texts: Add new custom field in magento 2 contact form

texts: Could you please help to add a new custom field in Magento 2 contact form.


texts: magento 2 how to set quantity 0 to 1 on listing page (category page)

texts:
<input type="number"
                       name="qty"
                       id="qty"
                       maxlength="12"
                       placeholder="1"
                       value="<?php /* @escapeNotVerified */ echo $block->getProductDefaultQty() * 1 ?>"
                       title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty form-control"
                       data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"
                       />

I have changed quantity from admin panel 0 to 1 it's working on the product page but it's not working on the category page please check my above code which I have used on the listing page.

This is one solution I have found but it's not working on category page


texts: display configurable product name underneath the price?

texts: is there a way to display configurable product name underneath the price or anywhere?


texts: In which table the products quantity are stored?

texts: What is database table namewhich store the product quantity in Magento 1.9


texts:
I need to save to db current date & "current date + 7days" values. For this I'm using following function. But how to add 7 days to this.

 Mage::getModel('core/date')->date('Y-m-d H:i:s');

Thanks in advance.

Update:

$res = Mage::getModel('rad_inventorypieces/reserve');
$date = new Zend_Date(Mage::getModel('core/date')->timestamp());
$res->setCreatedDate($date);
$date->addDay('7');
$res->setExpiryDate($date);


texts: Can we use captials letters for vendor name

texts: As per Magento 2 documentation can we use full capital letters for vendor name (i.e RSE). Also, can I get any Magento document for this?


texts: Show specific category on Magento 1.9.2.3 Homepage

texts:
I have gone through many posts here and on other sites where they specify using code:

{{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” category_id=”4″ template=”catalog/product/custom_list.phtml”}}

To display a category in a block on my homepage , but it never works.  I'm running Magento 1.9.2.3 with the default rwd theme.

Thanks


texts: How do you create a module to extend a core Magento 2 class and template?

texts:
I have the following class:

\Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Select

I would like to add another method to it. Then I would like this template file to call that method (ie. I want to create a template file and block in my module and use this template to display):

app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml

I have created and registered the module but I am unsure where to begin.

I think the only way to modify core classes is by creating a plugin.

But wait we want to add an additional function to a block, so just changing the result of a function or overriding it entirely is not going to work for us. So modification is not good enough we need to extend that class.


texts: How to customize product list page in Magento 2

texts:
I am new to Magento and want to customize the product list page. I want to add some text on the product if that product is available in more options(already configured this in admin).  Something like attached screenshot

I am sure I need to do something with catalog_category_view but not sure how to achieve this.


texts: What is the difference between block and widget code?

texts:
This code gives me a bunch of products:

 {{block type="catalog/product_list" limit="4" category_id="13" template="catalog/product/list.phtml"}}

This code gives me nothing:

 {{widget type="catalog/product_list" limit="4" category_id="13" template="catalog/product/list.phtml"}}

Why does the "block" version work out of the box and the widget code does not?


texts: Magento 2.2.6 redirect 302 loop with iwd onepage checkout extension

texts:
I have problem with iwd onepage checkout extension in my store. Now Magento 2.2.6 but earlier versions too.

If IWD Onepage checkout is enabled by cli, https://domain.com/checkout/cart is working.
But when user click "proceed to checkout" redirect loop is starting.

This is 302 redirect loop between https://domain.com/checkout and https://domain.com/onepage address.

I was check many other posts similar like that:
 - redirect loop in adminpanel
 - or between http and https for the same address
 - cookie settings and clear browser cache
 - clear/disable nginx by engintron for cpanel
but it's not solution for me.

Option like web/secure/use_in_frontend and web/secure/use_in_adminhtml is enabled and store, adminpanel, checkout (without iwd opc) is working good. However clear instalation second shop in https://domain.com/testshop with this extension is working.

IWD Opc extension has some custom empty cart page. But in my store it is no display (extension is enabled but only default empty page is working). But with empty cart, there is no redirect loop (and no problem:))
I was try change theme to clear luma - with the same effect.

Do you have any idea to solve this problem with redirect loop?


texts: Magento 2 Programatically add product to cart with additional options

texts:
I want to add product to cart with some additional data. My code adds the product to cart,but the additional info is not saved properly.
I want to display the additional content in cart like custom option
http://i.prntscr.com/KzmHQqaNSYGhOt3buzlK1A.png

Here is my code

    namespace Namespace\Module\Controller\Index;

use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\App\Action\Context;

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

    protected $resultPageFactory;
    protected $_productRepository;
    protected $_cart;
    protected $formKey;
    private $serializer;

    public function __construct(
        Context $context,
        \Magento\Catalog\Model\ProductRepository $productRepository,
        \Magento\Checkout\Model\Cart $cart,
        \Magento\Framework\Data\Form\FormKey $formKey,
        \Magento\Framework\Serialize\SerializerInterface $serializer,
        PageFactory $resultPageFactory
    ) {
        $this->resultPageFactory = $resultPageFactory;
        $this->_productRepository = $productRepository;
        $this->_cart = $cart;
        $this->formKey = $formKey;
        $this->serializer = $serializer;
        parent::__construct($context);
    }

    public function execute()
    {
        $post = $this->getRequest()->getPostValue();
        $additionalOptions['print_style'] = [
            'label' => 'Print Style',
            'value' => 'Test',
        ];
        $params = array(
                'product' => 4,
                'qty' => 1,
                'options' => array('additional_options'=>$this->serializer->serialize($additionalOptions))
            );
            $_product = $this->_productRepository->getById(4);
            $this->_cart->addProduct($_product,$params);
            $this->_cart->save();

        echo 'success';

    }
}

How can I do it?


texts: Why are browsers failing to load some static content?

texts:
Using Magento 2.2.6.

I just installed a brand new install of 2.2.6 using Apache on OS X High Sierra, and with both Chrome and Firefox, after logging into the admin, the subnavigation does not work, and inspecting the page shows 12 js files have failed to load:

http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/mage/requirejs/mixins.js
http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/mage/adminhtml/globals.js

etc.

There are 70 odd other js files that load just fine:

http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/js/theme.js
http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/Magento_Ui/js/lib/knockout/bootstrap.js

etc.

When I curl the failed files, the file content comes back properly:

curl http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/mage/utils/strings.js
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
define([
    'underscore'
], function (_) {
    'use strict';

    var jsonRe = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;

    return {

        /**
         * Attempts to convert string to one of the primitive values,
         * or to parse it as a valid json object.
         *
         * @param {String} str - String to be processed.
         * @returns {*}
         */
        castString: function (str) {
            try {

etc.

I've run rm -rf var/cache/* pub/static/adminhtml/* and static:content:deploy multiple times with no change.

Is there a reason these files are failing to load and if so how can I fix it?


texts: Which is best magento language translator extension?

texts:
Make your store accessible across different geographies with Language Translator from Biztech. It’s an ideal extension for customers to view products of your store in their regional language. It will allow you to manage multilingual stores more effectively and target a wider customer base. With Magento Language Translator admin can easily search and translate any string(supported by your store locale settings) from the store. With Language Translator admin can translate Products, CMS Page Data, Static Blocks, Product Reviews and Tags with Mass Translation.

  https://www.magentocommerce.com/magento-connect/language-translator.html


texts:
In Magento 1.9 I get URL of a product image with:

$image = $imageHelper->init($product, $imageType)->resize(X, Y);
$imageUrl = $image->toString();

It gives me URL like: http://store.domain/media/catalog/product/cache/1/thumbnail/75x75/9df78eab33525d08d6e5fb8d27136e95/m/s/msj009t.jpg

This works, but this URL leads to cached image which is wiped out every time the Magento's image cache is flushed. Then this URL stops to work and I need to generate new URL.

Is there any way how to get a "permanent" image URL which would work even when a cached image is deleted (so it'd regenerate it when it's deleted)?

I have the very same problem even with Magento 2. The code I use there is:

$this->imageHelper->init($product, $imageType)->resize(X, Y);
$imageUrl = $this->imageHelper->getUrl();

Thanks a lot for any help!


texts: Can different magento websites installations use same Database?

texts:
I intially had an instance of magento installed that was using a databse, then i intalled another intance of Magento Using the same database, but the problem that occured is that now my old website is getting redirected to new website.

I had previously configured my old Website's url from localhost to somethingElse.com, but now it is only localhost. I am not able to understand what has happened.

So, is there a method such that both the websites use the same Database and that i am not able to access my first website via Url, so some solution that doenot use admin panel?

and can someone also explain me what change has takken place due to my new installtion on same dataBase?


texts: Adding Bootstrap RTL LESS to Magento 2 theme

texts:
I need to include bootstrap-rtl LESS files to my theme when using fa_IR locale.

So I did:

Add those downloaded LESS files to: app/design/frontend/<Vendor>/<Theme_Name>/web/i18n/fa_IR/css/source/bootstrap-rtl.
Import the main LESS file (bootstrap-rtl.less) in _extend.less at same directory above: @import 'bootstrap-rtl/bootstrap-rtl.less'
Because this bootstrap-rtl package need bootstrap variable I copied bootstrap LESS file in same directory above, and changed import line:8 in bootstrap-rtl.less to : @import "../bootstrap/_variables.less". So now it can access to bootstrap variable.

The Problem Is:

when using this command to deploy static contents:

php bin/magento setup:static-content:deploy

It will return some error (58 Error) like this:

variable @grid-float-breakpoint is undefined in file C:/xampp7/htdocs/Magento_2.1.9/var/view_preprocessed/css/frontend/<Vendor>/<Theme_Name>/fa_IR/css/source/bootstrap-rtl/type-rtl.less ...

and these styles will not compile at the end.

You Should Know:

My theme inherits from another theme that using bootstrap as External UI Library source, So is there any conflict in bootstrap styles with my theme and it's parent theme?
I'm using Magento 2.1.9 with PHP 7.0.22 and XAMPP 3.2.2.

Thanks in advance.