texts: Undefined index - app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 145

texts:
Fresh install of 1.9.1 and I can not get the images to swap on the product page.

I've followed the setup here: http://www.magentocommerce.com/knowledge-base/entry/ee1141-ce191-configurable-swatches

But I have no idea why the images are not changing. If anyone has run across this please let me know, my searches have been fruitless.

Notice: Undefined index: red  in /home/xxx/public_html/adev/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 145

Notice: Undefined index: red  in /home/xxx/public_html/adev/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 151


texts: getting this error "Skipping import row, required field "website" is not defined" when importing customer list in dataflow import method


texts: magento 2 : event to capture the cart price rule coupon?

texts:
How to get the coupon code which customer enters in the checkout page and giving custom discounts to the customer according to the country code using observers.

please help me out.


texts:
I want To set auto pricing configurable(Parent) Products At backend  Parent Price should be come lowest price  from simple(child)Products. except  $0 price product.
Thanks


texts: Changing firstname and lastname on the checkout page without influencing the registration page

texts:
On the checkout page, you have the firstname and the lastname from the following code:

<li class="fields">
    <?php echo $this->getCustomerWidgetName()->toHtml(); ?>
</li>

But if you have a problem, the HTML code is already mounted from the file name.phtml and that same form is used on the new clients' registration page and I would need to make modifications to the same HTML and CSS.

How could I proceed so that I could make changes to it, without this influencing the new customer registration page (customer / account / create /)?


texts: After changing cookie path, customers where unable to login in account and checkout page

texts:
I've just changed cookie path settings in magento admin. After this, on storefront, I'm unable to login as customer or on checkout page (on checkout page it redirects to empty cart). However if I open another browser everything works fine as it creates new cookie.
if I change the cookie path to previous, it works fine.
I want that, on cookie path change, it immediately reflect on storefront as we have to change the cookie path on live environment and those issues are not good for customer/visitor to face.
Is there any solution?


texts: field of type link in admin form is not rendering value

texts:
My class extends from Mage_Adminhtml_Block_Widget_Form, which has declaration for _prepareForm method with code for myfield as follows

  $fieldset->addField('myElementId', 'link', array(
      'label'     => 'myLabel',
      'href' => 'http://magento.stackexchange.com',
      'value'  => 'myElementValue'
    ));

This field is rendering all except value (i.e, myElementValue).

Can any one help me with this?

Billions of Thanks in Advance

EDIT:

My class name - MyNameSpace_MyModule_Block_Adminhtml_MyBlockGroup_ClassExtendingFormContainer_Tab_Form

This class defines the _prepareForm function as follows:

 protected function _prepareForm()
 {
       $form = new Varien_Data_Form();
       $this->setForm($form);
       $fieldset = $form->addFieldset('someElementId',array('key'=>'value'));

      $fieldset->addField('myElementId', 'link', array(
                      'label'     => 'myLabel',
             'href' => 'http://magento.stackexchange.com/',
              'value'  => 'myElementValue',
            ));

      $fieldset->addField('myElementId2', 'text', array(
                    'label' => 'myLabel2',
                    'name' => 'myElementId2',
             ));

  $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
      $fieldset->addField('myElementId3', 'date', array(
                     'name'   => 'myElementId3',
                     'label'  => 'myLabel3',
                     'width'=>"100px",
                     'image'  => $this->getSkinUrl('images/grid-cal.gif'),
                     'input_format' => Varien_Date::DATE_INTERNAL_FORMAT,
                     'format'       => $dateFormatIso,
                     'time' => true,
        ));

     if ( Mage::registry('SomeRegistrySetinCurrentControllerAction') )
     {
       $form->setValues(Mage::registry('SomeRegistrySetinCurrentControllerAction')->getData());
 }

 return parent::_prepareForm();
 }

It is rendering date, text fields in the form but not link.


texts: Magento 2: Set order status to complete programmatically results in "Please provide payment for the order"

texts:
i would like to set order to complete programmatically after they have been processed in another software. This is the typical code i found all over the internet:
$orderId = 1000120319;
$order = $objectManager->create('\Magento\Sales\Model\Order') ->load($orderId);
$orderState = \Magento\Sales\Model\Order::STATE_COMPLETE;
$order->setState($orderState)->setStatus($orderState);
$order->save();

All i get is this result:

Uncaught Magento\Framework\Exception\LocalizedException: Please provide payment for the order.

What i have to do, to set the payment completed as well?
Thanks for your help in advanced
Best regards


texts: Magento 2: Get Coupon Code for Order in Order Success Observer

texts:
I created an observer with event checkout_onepage_controller_success_action. I need applied coupon code on checkout onepage success in magento 2. I have to send order coupon code to third party with Curl. Do you know, how we can retrieve coupon code used for the order on order success page?

Here is my observer code:

$orderIds = $observer->getEvent()->getOrderIds();
$lastorderId = $orderIds[0];
$order = $this->orderFactory->load($lastorderId);
// echo $order->getQuoteId(); // show quote ID
// echo $order->getDiscountAmount(); // show discount amount

/* Here I need applied Coupon Code */


texts:
Here is great module for stock Status From Enru magento-stock-status

but now issue is its works on save action.
I want to set it Cron Job. cron job run On Daily basis  Kindly let me know how can i set cron job For this module strongly thanks in Advance


texts: Magento2 Apply All Catalog Rules via CLI

texts:
In Magento 1, there was a need to Magento run "Apply Catalog Price Rules" via a script on periodic basis to make sure all Catalog Rules have been applied to appropriate products for appropriate customer groups.
How can this be done in Magento2? Is there a need to do it still or is there system event that handles this?


texts: Magento 2 admin user role not custom menu

texts:
Hi my custom menu not showing admin user role.

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="Retailers_Company::retailers" title="Retailers" module="Retailers_Company" sortOrder="10" resource="Retailers_Company::retailers"/>
    <add id="Retailers_Company::add_new" title="Retailers Account Management" module="Retailers_Company" sortOrder="20" parent="Retailers_Company::retailers" action="company/vendor" resource="Retailers_Company::add_new"/>
    <add id="Retailers_Company::add" title="Add Account Manager" module="Retailers_Company" sortOrder="20" parent="Retailers_Company::retailers" action="company/index/add" resource="Retailers_Company::add"/>
    <add id="Retailers_Company::account" title="View Account Manager" module="Retailers_Company" sortOrder="20" parent="Retailers_Company::retailers" action="company/index/account" resource="Retailers_Company::account"/>
    <!--<add id="Retailers_Company::parent" title="Company" module="Retailers_Company" sortOrder="100" resource="Retailers_Company::parent"/>
    <add id="Retailers_Company::index" title="Company Index" module="Retailers_Company" sortOrder="10" action="company/index" resource="Retailers_Company::index" parent="Retailers_Company::parent"/>-->
    <!--<add id="Retailers_Company::add_row" title="Retailers Account Management" module="Retailers_Company" sortOrder="20" parent="Retailers_Company::retailers" action="company/company" resource="Retailers_Company::add_row"/>-->
</menu>
</config>

etc/adminhtml/acl.xml

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
 <acl>
    <resources>
        <resource id="Magento_Backend::admin">
            <resource id="Retailers_Company::sample" title="Retailers" sortOrder="10" >
                <resource id="Retailers_Company::items" title="Retailers Account Management" sortOrder="20" />
            </resource>
        </resource>
    </resources>
  </acl>
</config>

Index.php(controller)

<?php
 namespace Retailers\Company\Controller\Adminhtml\Vendor;

 class Index extends \Magento\Backend\App\Action
 {
/**
 * @var \Magento\Framework\View\Result\PageFactory
 */
protected $_resultPageFactory;

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

/**
 * Grid List page.
 *
 * @return \Magento\Backend\Model\View\Result\Page
 */
public function execute()
{
    /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
    $resultPage = $this->_resultPageFactory->create();
    $resultPage->setActiveMenu('Retailers_Company::items');
    $resultPage->getConfig()->getTitle()->prepend(__('Retailers Account Management'));

    return $resultPage;
}

/**
 * Check Grid List Permission.
 *
 * @return bool
 */
protected function _isAllowed()
{
    return $this->_authorization->isAllowed('Retailers_Company::items');
}
}


texts: Magento 2.3.4 Server Transfer - No homepage/admin Access Denied

texts:
I decided to do a copy of my production server(2.3.4) to a local machine running Centos 8 for development testing.

Moved file/folders and did a database dump. Got everything to install and files/db installed. Manually changed URL in the database to the localhost IP. Made sure the env file had an updated DB connection.
Magento commands all run great.

Yet when I browse to the site I get "Access Denied". I also get this browsing to the admin URL.

Checking the apache log files I get the below error when try accessing the site.

  [Sun May 17 03:26:44.887007 2020] [proxy_fcgi:error] [pid 1557:tid 14
  0028793571072] [client 192.168.0.223:43658] AH01071: Got error 'Unabl
  e to open primary script: /var/www/html/index.php (Permission denied)
  \n'

I tried looking it up but have not found any reason that would cause this. I have TRIPLE CHECKED all permissions on every file/folder.
If I replace Index.php in my apache root folder I get a test site to show up fine.
My production site is hosted by Siteground, Is there a chance it also uses Nginx AND Apache? Not familiar with Nginx, but it is the only thing that pops up when I google the error. My production site used .htaccess files so I figured Nginx wasn't a thing on it.

UPDATE: Discovered SELinux security issues with files. Discovered this via trying to load Http:/(web address)/info.php and got the same access denied error.

When running restorecon on info.php it would now resolve! Thinking this is my issue I ran it on my web directory var/www/html. I no longer get the Access Denied error loading the page or in the Apache logs.

Sadly it did not fix my site. It now just loads a blank screen with no error. Also no error in the logs. Any one have any ideas why? Did I possibly mess up permission issues trying to fix the previous issues. Is there a way to output a error message?
Thanks!


texts:
I am trying to get the shipping price from the quote on the cart page for the entire order.

I have tried multiple things including:

Mage::getModel("checkout/session")->getQuote()->getShippingMethod()->getPrice();

$rates = Mage::getModel("checkout/session")->getQuote()->getShippingAddress()->getAllShippingRates();
foreach($rates as $rate){
    $rate->getPrice();
}

What can I do to get the shipping price in the Magento cart?


texts: Applied PATCH_SUPEE-6285 - Do I need to do anything else?

texts:
After being prompted to install the new patch I went ahead and did so straight away.

But now I've gone back and looked at the .sh file I noticed there is changes being made to template files.

I had a custom theme and I also have a onestep checkout extension installed on my site, do I need to apply the patch to those somehow or do I not need to worry?


texts: Cellspacing and cellpadding doesn't apply to tables in WYSIWYG editor in Magento 1.x

texts:
In one of my client's websites(Magento CE 1.9.2.4), the product description needs to have a table structured content with cellspacing and cellpadding applied.

Now when he tries to apply that style to editor from code and then he switches to UI view and then back to HTML Code view then the added cellspacing and cellpadding gets removed automatically.

Now he needs to apply those two properties badly, so anyone can suggest a way around this, is this an editor limitation in Magento 1.x versions ?


texts: upgrade from magento 2.2.5 to 2.3 error Front controller reached 100 router match iterations Issue

texts:
As I upgraded my magento from 2.2.5 to 2.3 all works fine but when trying to access the website an iteration error appear saying:

  Front controller reached 100 router match iterations Issue.

After searching for solutions online and all fails except that someone say something about old cached data is corrupted, so I remove var/cache then clean and flush cache but the error still appears.

I solved the problem by disabling cache for configuration so the cache status now is like this:
Current status:

                        config: 0
                        layout: 1
                    block_html: 1
                   collections: 1
                    reflection: 1
                        db_ddl: 1
               compiled_config: 1
                           eav: 1
         customer_notification: 1
            config_integration: 1
        config_integration_api: 1
                     full_page: 1
             config_webservice: 1
                     translate: 1
                        vertex: 0

I think this is a temporary and not a professional solution, anyone may help me figure it out and solve the problem of config cache?


texts: How to migrate Magento1.x module to Magento2.x?

texts: If i want to migrate Magento1.x module to Magento2.x how we can do this and how would be good according to its accuracy it should be a good approach?


texts: REST API Order including a configurable product

texts:
When I get a order which includes a configurable product there seems to always be two order items for it. The first being the configurable product with price set to zero and the second being the simple product that the customer has selected with the correct price. The second one references the first one with the field parentItemId.

My question then is: when I export the order items to our internal order system, is it safe to always just ignore items which are of product type configurable and export the one of product type simple as I would with a regular simple product? Or is there anything else I need to keep in mind?


texts:
I'm trying to find a product using its name on magento but it renders alot of products that have nothing in common with the product. I set to "No" the searchable parameter for all other attributes so it doesn't look in description or others to make sure i have a unique result but i don't get it.

When i search by SKU, i do get a unique result.

Is there anything I may have looped.


texts: Show Default values option in store switcher in admin product edit page

texts:
I am using Magento Enterprise Edition and I am super admin of it.

For some admins, I have allowed only particular store to be accessed.

For me, the default values option in store switcher of product edit page is displayed.

For the admin who have limited access, the default values option is not displayed.
Somebody help me to display the default values option


texts: Access single variable values globally in magento wihin .php files

texts:
I want to access $brandId in all other .php files in magento.. How do I do it?

$brandId = array_search($brand_name, array_map('strtolower',$this->getAvailableBrands())); is in code/core/mybrandpages/Brand/Block/Brandproductlist.php

I want to use the same $brandId values in various file as follows without calling that function multiple time.

code/core/mybrandpages/Brand/Block/Pager.php
code/core/mybrandpages/Brand/Block/Brandtoolbar.php


texts: Magento2.2.5 change create account link in top right header

texts:
I want to change the URL of the "create An account" link that is on the top right of the site. I want the link to instead of being  customer/account/create/ I want it to be  customer/account/login

I believe I have to edit the default xml file that is

app/design/frontend/Smartwave/porto_child/Magento_Customer/layout

here is the file just not sure how to edit it

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="header.links">
        <block class="Magento\Customer\Block\Account\Customer" name="customer" template="account/customer.phtml" before="-"/>
        <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="account/link/authorization.phtml"/>
    </referenceBlock>
    <block class="Magento\Theme\Block\Html\Header" name="header" as="header">
        <arguments>
            <argument name="show_part" xsi:type="string">welcome</argument>
        </arguments>
    </block>
    <move element="header" destination="header.links" before="-"/>
    <move element="register-link" destination="header.links"/>
    <move element="top.links" destination="customer"/>
    <move element="authorization-link" destination="top.links" after="-"/>
  </body>
</page>


texts: product attribute setting image value store in witch data table in magento 2?

texts: in that setting we set brands logo so i need to know that image store in witch data table


texts:
i am getting category by below code

  public function  get_categories($categories)
{ //This is the recursive function created and here we pass the a collection of categories.
  //$array is a variable to store all the category detail .
    $array = array();
    foreach($categories as $category) {

            $cat = $this->getCategoryModel()->load($category->getId());
            $array[$category->getLevel()][$cat->getId()]= array('id' => $cat->getId(), 'level' => $cat->getLevel(), 'name' => $cat->getName(), 'url' => $cat->getUrl(), 'display_mode' => $cat->getDisplayMode(), 'image' => $cat->getImageUrl('wizard_icon'), 'description' => $cat->getWizardQuestion(), 'categories' => [] ); //In this line we get an a link for the product and product count of that category
            if($category->hasChildren()) {  //if category has children or not. If yes then it proceed in inside loop.
                 $children = $category->getChildrenCategories(); // $children get a list of all subcategories
                $array[$category->getLevel()][$cat->getId()]['categories']=  $this->get_categories($children); //recursive call the get_categories function again.
                }

        }
    return  $array;
}

but the issue is

$this->get_categories($children);

This issue causes multiple queries instead of one and negatively affects site performance.


texts:
I would like to install a second language on an existing site.this language is swiss-german(ch_de).
I downloaded an existing package but is only version beta.what is the difference with a stable version?

Secondly after installing my new view, only the internal elements were translate.all my pages, category, products have not been translate.comment should I do to perform the translation.


texts: Need to know more explanation about each and every xml elements for config.xml in module/etc/config.xml

texts:
I need to know each and every xml elements (for which cases the elements can use) in module/etc/config.xml file
then only i can create the module based on my requirement.

Eg:

  global
  models
  blocks
  adminhtml
  rewrite
  observers etc


texts: How to setup Access_Control_Allow_origin & From origin blocked by CORS in Nginx for Mageno 2 multi-Website store?

texts:
My main website store URL: test.website.in
Second website store URL : grocery.website.in
Initially, i developed multi-website in the localhost, and its working also but after move to live server main website working but second website store not working.

.htaccess:
SetEnvIf Host grocery.website.in* MAGE_RUN_CODE=grocery
SetEnvIf Host grocery.website.in* MAGE_RUN_TYPE=website

Note : Followed this tutorial still facing issues.


texts:
I know there are nice ways to install Magento Modules (from Connect) and from GitHub (if composer.json is provided).

(as described in http://magebase.com/magento-tutorials/composer-with-magento/)

Is it possible also to install the basic Magento package (for example CE 1.7.0.2) using Composer?

Did anybody already try that? (if successfully or not)


texts: Add condition after place order button clicked

texts:
I'm new on Magento... I want to put this condition below after the user clicks on button to place an order to validate the card form just after confirm the order.

if (!$creditCardToken || !$senderHash) {
            $missingInfo = sprintf('Token do cartão: %s', var_export($creditCardToken, true));
            $missingInfo .= sprintf('/ Sender_hash: %s', var_export($senderHash, true));
            Mage::helper('ricardomartins_pagseguro')
                ->writeLog(
                    "Falha ao obter o token do cartao ou sender_hash.
                    Ative o modo debug e observe o console de erros do seu navegador.
                    Se esta for uma atualização via Ajax, ignore esta mensagem até a finalização do pedido.
                    $missingInfo"
                );
            Mage::throwException(
                'Falha ao processar seu pagamento. Por favor, entre em contato com nossa equipe.'
            );
        }


texts: Get Min. and Max. price while have special price in product in magento 1.9

texts:
We need min. and max. price from specific category products,

we have tried this query,

$productColl_1 = Mage::getModel('catalog/product')->getCollection()
                        ->addCategoryFilter($categoryModel)
                        ->addAttributeToSort('final_price', 'desc')
                        ->setPageSize(1)
                        ->load();
         echo $max_price = $productColl_1->getFirstItem()->getPrice();

Issue is in this its giving only base on base price but not considering special price for getting minimum price.


texts:
I just want to execute some code during remove wishlist item like m1 does with controller_action_predispatch_wishlist_index_remove event. I have checked with Magento 2 all events on https://cyrillschumacher.com/magento2-list-of-all-dispatched-events/ URL. There is no event for remove wishlist item.

Is there any way to perform this?

Any help would be appreciated.

Thanks in advance.


texts: How to use one coupan code for multiple prices discount?

texts:
I am trying to set up a coupon which will give different discounts depending on how much is in the cart.
So for example:

Spend £20+ get 10% off
Spend £40+ get 20% off
Spend £60+ get 25% off

I want to use only one coupon code. Can anyone help me in this.


texts: How to identify and delete stray attributes

texts:
I'm trying to figure out how to identify stray attributes that do not belong to an attribute set.

We've got so many duplicate attributes, and we're having a hard time figuring out what is actually being used.

Also I heard that having lots of attributes will slow down the site. If we can delete the attributes we are not using, that would certainly help.

Please advise.


texts: Magento2: After Installing Elastic search and Configuration product page not working

texts:
I have installed elastic search 7.8 and configured it with Magento 2.3.4 but when I open the product page, it's not working, and also when I search any product it shows me an error.
> Type Error occurred when creating object:
> Magento\Framework\Search\Response\QueryResponse, Argument 3 passed to
> Magento\Framework\Search\Response\QueryResponse::__construct() must be
> of the type integer, array given, called in
> /home/ubuntu/environment/the-new-craftsmen/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
> on line 121


texts:
I need to show something based on store id on Magento 2

for example;

<?php
$storeManager = \Magento\Framework\App\ObjectManager::getInstance()->get('\Magento\Store\Model\StoreManagerInterface');
if ($storeManager->getStore()->getStoreId() == 1):
?>

        <a class="button-sticky-bottom" href="<?php echo $this->getUrl('') ?>" >

            <?php echo __('Language'); ?>

<?php else: ?>

        <a class="button-sticky-bottom" href="<?php echo $this->getUrl('') ?>" >

            <?php echo __('Language1'); ?>

<?php endif; ?>


texts: Can I create + sell sample products with magento 2.3.3

texts:
I tried looking online but cant find any plugins that do what I want.
I want to sell sample products for free, for example say I am selling T-shirts at $10 and I want to sell a sample of the T-shirts for free.
First I need the free product to be listed, then I need the shopper to be able to add the free product to the cart and finally go through the standard checkout process.
Can anyone provide me either a plugin, or a resource to learn how to do this myself.


texts: Magento 2.2.0 upgrade, error attribute type is not allowed

texts:
I was able to upgrade a Magento store from 2.1.6 to 2.2.0. The backend
  is working very good, but I am encountering an exception on the front
  office.

  The exception message says: Element 'block', attribute 'type': The
  attribute 'type' is not allowed.

  The whole situation is described in the next post from GitHub:
  https://github.com/magento/magento2/issues/11839

  I'm new in Magento. Could give me a link which describes from where
  should I remove the invalid type attribute or other attributes or from
  where can I refactor it?


texts: Magento 1.9 : Change response to all XMLConnect APIs

texts:
I want to make changes to all the responses that's sent from the xmlconnect module.
What I see is that it uses Zend library Abstract.php setBody method to return the response.
But if I do any kind of modification in the $content value of the method it either breaks the code or doesn't return the main response.
So, is there a proper way to make the change which I am missing.
setBody method is as follows:
    public function setBody($content, $name = null)
  {
    if ((null === $name) || !is_string($name)) {
        $this->_body = array('default' => (string) $content);
    } else {
        $this->_body[$name] = (string) $content;
    }
    return $this;
 }


texts: Magento 2.2.3: Merging error in data migration tool

texts:
Acutally, We migrated our data once but now most of development has done. So, i need to merge new data in existing database. I fired migrate:delta command but gives error: Deltalog for customer_entity is not installed

please help to resolve this error...


texts:
I added attribute to invoice using \Magento\Sales\Setup\SalesSetupFactory->addAttribute.

Now i need to show that attribute in invoice_new e-mail. Is there a way to programmatically add that variable to e-mail? Ideally to be show in Insert variable "window" .


texts:
I'm writing an subscription model that reorders specific orders a preset amount of times. My reorder function works fine as long as it is only run once, but if several orders are created in a loop, the cart contents aren't cleared between creation, causing the new orders to have the previous orders items added on each run along with the items on the original order.

This is the function I use for the reorder:

    public function reorder($subscription)
{
    // Trying to clear the session data
    Mage::getSingleton('adminhtml/session_quote')->clear();

    //Load the bases order and the model for the order create
    $order = Mage::getModel('sales/order')->loadByIncrementId($subscription->getBaseOrderId());
    $model = Mage::getSingleton('adminhtml/sales_order_create');

    //Set reorder mode and create new quote
    $order->setReordered(true);
    $reorder = $model->initFromOrder($order);

    //Create the order
    $newOrder = $reorder->createOrder();

    //Get new Increment ID and add meetingdetails to new order
    $newId = $newOrder->getIncrementId();
    $this->addMeetingDetails($order, $newId, $subscription);
}

The Mage::getSingleton('adminhtml/session_quote')->clear(); that is called first does not accomplish what I hoped for.

The following screenshot of the order list displays what happens

Could anyone advise me on how I clear the adminhtml cart contents at each run, to ensure the cart content of the first order isn't added to the following orders?


texts: Magento login admin page FATAL ERROR / WHITE SCREEN

texts:
My Magento login admin page has a FATAL ERROR / WHITE SCREEN
I've looked at the other questions which were similar but haven't been able to fix it. My site is at
Problem:
Attempts to Fix:
Another post said to:

"In your app/etc/local.xml set disable_local_modules to true and check. If it loads fine then the issue is in one of your custom modules"*
Clear Cache

I followed these instruction but the Admin login page is still a white screen.
ERROR LOGS
/Var/Report:
::::::::::::One of the files in /var/report there was an error:::::::::::::


texts: Error on config:set : path does not exists

texts:
I run bin/magento config:show | grep theme that returns

  design/theme/theme_id - 5

Then i write bin/magento config:set design/theme/theme_id 0 that returns

  The "design/theme/theme_id" path does not exist

Why it happens?
Using Magento 2.2.7


texts: Can't install module using composer on Magento 2.1

texts:
I am trying to install M2ePro module on my Magento ver. 2.1.8 application using composer and getting this error:

[http]$ php-7.0 /usr/local/bin/composer require m2e/ebay-amazon-magento2

  Could not find a matching version of package m2e/ebay-amazon-magento2.
  Check the package spelling, your version constraint and that the
  package is available in a stability which matches your
  minimum-stability (alpha).

The spelling of the package is correct, I have tried defining the version of the module (The only one available is 1.3.2):

[http]$ php-7.0 /usr/local/bin/composer require m2e/ebay-amazon-magento2:1.3.2

However get the same error so I believe stability of this module is "Beta" and I have "minimum-stability (alpha)" set so beta modules should be installed with no problems.?

I looked for solution in composer docs but could find anything about installing beta: https://getcomposer.org/doc/03-cli.md#require

Or was I looking in the wrong place?

I managed to successfully install the module on my development site and didn't receive this error so I thought it might be due to the fact that my Magento application was in the "Production" mode but setting the mode to "Developer" did not solve my problem.

UPDATE:

I just found this thread: Error in using composer to install a module in Magento 2.0. The answer to this question is that you need to  define the package as repository. The package is from marketplace and this is content of my composer.json:

"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": [
    {
        "type": "composer",
        "url": "https://repo.magento.com/"
    }
],

I have previously installed modules from marketplace using composer with no problems.


texts: Magento 2 set created time and updated time in database

texts:
I am using php function now() to set current date and time.But getting an error.

So please help me how can I set current date time in magento 2.


texts: Grunt - is it possible to watch custome module less files?

texts:
I figured out how to watch less files changes inside my custome theme folder using Grunt, but is there any way how to watch less files in custome module?

Let's assume module like so:

    app/code/Esencis/Nakup

For example, I would like to watch changes of file:

    app/code/Esencis/Nakup/view/frontend/web/css/mycss.css

Removing pub/static and var/generation files does work, however it is not much effective.


texts: Magento 2: Which are the conditions to use with addFieldToFilter?

texts:
What are the conditions that I can use with the addFieldToFilter?

Thanks


texts: How can I add IP Based login in magento admin.

texts:
I want to add IP based Magento admin login. I have tried below code:

# Restrict admin access

RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123

RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123

RewriteCond %{REQUEST_URI} admin [NC]

RewriteRule ^(.*)$ / [F,L]


texts: Magento product "Save Button" not working

texts:
I am running Magento 2.2.2 and suddenly the products cant be saved anymore. Clicking the save button has no effect at all. There are no errors in the console. The network tab in Chromes dev tools shows no traffic when the button is clicked. I redeployed, cleared cache, nothing helped.

Any ideas where to start looking?


texts: How can I add different meta open graphs for homepage and single product pages?

texts:
When I post the link of my site on facebook, the image added was 2 images, logo and other one. Facebook displayed the first ones. So I needed to add in default_head_block.xml file (app/design/frontend/Venustheme/kasitoo/Magento_Theme/layout)

the following code:

<meta property="og:type" content="website" />
<meta property="og:title" content="Sitename" />
<meta property="og:description" content="description site lorem ipsum" />
<meta property="og:url" content="http://sitename.ro/" />
<meta property="og:site_name" content="MyOrganic" />
<meta property="og:image" content="http://sitename/pub/media/facebook.jpg" />

The problem is that this overrides the meta open graphs from single product page. That are located in

general.phtml in vendor/magento/module-catalog/view/frontend/templates/product/view/opengraph

<meta property="og:type" content="og:product" />
<meta property="og:title" content="<?php echo $block->escapeHtml($block->getProduct()->getName()); ?>" />
<meta property="og:image" content="<?php echo $block->escapeUrl($block->getImage($block->getProduct(), 'product_base_image')->getImageUrl()); ?>" />
<meta property="og:description" content="<?php echo $block->escapeHtml($block->getProduct()->getShortDescription()); ?>" />
<meta property="og:url" content="<?php echo $block->escapeUrl($block->getProduct()->getProductUrl()); ?>" />
<?php if ($priceAmount = $block->getProduct()->getFinalPrice()):?>
    <meta property="product:price:amount" content="<?php /* @escapeNotVerified */ echo $priceAmount; ?>"/>
    <?php echo $block->getChildHtml('meta.currency'); ?>
<?php endif;?>

Where should I add the metas for homepage, in order to work properly the metas for single product pages??


texts:
Below is soaporderapi.php created root folder.It is working fine getting order responce but i need to show responce as xml format

<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);

require('vendor/zendframework/zend-server/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client/Common.php');

$wsdlurl = 'https://magento2.com/index.php/soap/default?wsdl&services=salesOrderRepositoryV1';

$token = 'vvqicf96h5hp3tv03s472jaidg16xapd';

$opts = ['http' => ['header' => "Authorization: Bearer ".$token]];
$context = stream_context_create($opts);

$serviceArgs = array('searchCriteria'=>
    array('filterGroups' =>
        [
            array ('filters' =>
                [
                    array('field' =>'increment_id',
                          'value' => '000000055',
                          'condition_type' => 'eq')
                ]
            )
        ]
    )
);
$soapClient = new \Zend\Soap\Client($wsdlurl);
$soapClient->setSoapVersion(SOAP_1_2);
$soapClient->setStreamContext($context);
$result = $soapClient->salesOrderRepositoryV1GetList($serviceArgs);//array('searchCriteria' => $serviceArgs));

echo "<pre>"; print_r($result);

https://magento2.com/ordersoapapi.php I am excuting file like this getting array object format


texts: Magento 2 var/lib/mysql/release is taking up 52 G of memory

texts:
Due to some reason my Magento 2 ver. 2.3.3 website is taking too much space from the server . Is there anything I can do about this or something I just have to deal with?
I was looking at this but it didn't really help me.

https://stackoverflow.com/questions/61955774/magento-2-2-6-var-lib-mysql-folder-is-taking-43-gb-of-disk-space


texts: customer mail is not showing in custom sales grid

texts:
Here is my collection below.I tried to rewrite the sales order grid with adding another column as email .The column came but the result for the column email is not displaying in my custom grid. On checking with collection->getData(); I am getting 'customer_email" but it's not populating in grid.

  protected function _prepareCollection() {

            $collection = Mage::getResourceModel($this->_getCollectionClass());

     $collection->getSelect()->join('sales_flat_order', 'main_table.entity_id = sales_flat_order.entity_id',array('customer_email' => 'customer_email'));
    }
$this->setCollection($collection);
        //print_r($collection->getData());exit;
        return parent::_prepareCollection();

    }

and adding column is here

$this->addColumn('customer_email', array(
        'header'=> Mage::helper('sales')->__('Email'),
        'type'  => 'text',
        'index' => 'customer_email',
        'align'    => 'customer_email',
  'filter_index' => 'sales_flat_order.customer_email',
        ));

Anyone who have faced this scenario earlier please guide me to get my self out,thanks in advance.


texts: Magento 2 - Moving navigation make issue in responsive

texts:
I'm moving navigation menu in Header container, I'm using the below code in default.xml of my theme:

<move element="catalog.topnav" destination="header.container" after="logo"/>

This works fine, but when I view this in mobile/responsive view, the menu doesn't show the correct Navigation items,instead it's displaying Header Links (Sign up, Sign In).

Without moving in the Header, the responsive menu is correct what is expected.


texts: Magento2 - Creating Table Rate for Fedex Shipping Options

texts:
I'm new to Magento so please excuse my novice approach.

I'm trying to offer Fedex express shipping method to my customers;

Fedex Overnight; Fedex 1 Day; Fedex 2 Day

I'm using a third party warehouse and unfortunately I'm unable to connect via API with their Fedex Account ID.

Instead the warehouse has provided me with their Fedex Rate card and I'm trying to use table rates to set prices.

So I have exported the Table Rates (Weight vs Destination .csv)

However I'm not sure how to specify the zones and different speeds (overnight, 1day, 2day) within the spreadsheet


texts: Magento 2 : DHL shipping is not giving rates for UAE webite

texts: I am using my DHL credentials in my UAE based magento website. The problem is I am not receiving any shipping rate when I select country UAE. For India and United states I receive rate. As far as I know, zip code is not applicable in UAE and DHL needs zip code with country to calculate rates. Does anybody have an idea how to get DHL working for a UAE magento website?


texts: Transactional Emails are instant OR they are based on cron file?

texts:
I have a magento website setup and development is also almost completed, but i am bit confused about transactional emails.

If a customer buy something from my webiste, does magento sends the email on INSTANT BASES. Or does it wait for the cron to execute on its specified time.?

I need this clarification before i hunt for something else.

Any help would be greatly appreciated.


texts: Magento2 + Need to display Configurable Drop Down option on category page

texts:
I need to display the only Size attribute drop-down on a category page listing. Size is a configurable option & Catalog Input Type for Store Owner value is Dropdown.

I have enabled Used in Product Listing property enable.


texts: Magento 2 - Add Product Search functionality using Ajax in Custom Admin Form

texts:
I had created an admin form in Magento 2. I had taken a text field for the product search. I want to search for a product by entering Product Name / SKU / ID in the text field. How could I do it? I want to search product by adding custom ajax search functionality?

Please find the attached screenshot for my custom admin form.

Any help would be appreciated. Thanks in advance..!


texts: SQL error when programmatically adding image to product

texts:
I am updating products programmatically and then adding images to them via

  $product->addImageToMediaGallery($file, array( < flags > ), true, false);

For some products, this works just fine, for others it gives me

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`db11057204-walthermagestaging`.`catalog_product_entity_media_gallery_value`, CONSTRAINT `FK_CAT_PRD_ENTT_MDA_GLR_VAL_VAL_ID_CAT_PRD_ENTT_MDA_GLR_VAL_ID` FOREIGN KEY (`value_id`) REFERENCES `c), query was: INSERT INTO `catalog_product_entity_media_gallery_value` (`value_id`, `store_id`, `label`, `position`, `disabled`) VALUES (?, ?, ?, ?, ?)

I have not been able to determine a pattern yet.

It says that a foreign key constraint fails, but in the error message, the target of the FK is cut off after the first letter, which leaves me clueless. Where to look? What to do?

EDIT

Since these products are created automatically, could it be that there is no media_gallery eav attribute? If so, how can I check?


texts: Flat Shipping rate for per 3 product in magento?

texts:
I am trying to create a shipping rule in magento. In this rule I need some functionality like $50 per 3 products will add as shipping rule. If someone added 4 items to 6 items in cart, then the shipping charges should $100 ($50 for first 3 pair of items and other $50 for remain items).

But i am stuck and didn't found any extension or solution for this.


texts:
I'm working on a 1.9.3.6 project in which the header has
<script type="text/javascript" src="http://mage1936.local/skin/frontend/mytheme/default/"></script>
that causes a 403 console error

I've tried to find all modules and layout files adding js to head and missing the file name. but looks like not that case and not the way I should trace this issue.

How should I trace a case like that?


texts: CE1.9.1 Please make sure your password match issue during User registration

texts:
I am encountering this issue in CE1.9.1.

When a User registers (doesn't matter if it's during checkout or from the Create an Account link) the user keeps getting the password mismatch error even though the password is re-entered correctly.

The form validation does not indicate a miss-match, but once a user clicks on Register it returns the mismatch error.

There is no errors in the chrome console...

I found this: "Please make sure your passwords match" - Password error in Checkout with New Registration form

But I don't believe it is the same error.

I need to fix it soon, any help is greatly appreciated!


texts: If Statement for attribute value is set to no

texts:
Just trying to write an if statement for this situation:
We do have some attributes which could have 3 values: empty space, yes and no.

The statement should require a yes value to display a jpg and if the no or empty is set display nothing or unset the jpg.

Now i am not sure about the syntax of that statement. What works so far is to display the jpg if the value exists in the first place.

So this is the syntax yet:

<?php $jpg= ''; ?>

<?php
if ($_product->getAn_55() != 0 && $_product->getAn_55() != ""):; ?>

<?php echo ($jpg);?>

<?php endif?>

Now i was trying within the above sytanx like

<?php
elseif ($_product->getAn_55() == false ):; ?>
<?php unset ($jpg)

and
<?php
elseif ($_product->getAn_55() == no ):; ?>
<?php unset ($jpg)

Which both doesn't work. So, whats the correct syntax for checking if a attribute has value set to yes or no?

I generally wonder, what value has to be set in the statement for text value or number value or MySQL Option Value and where to find it.

Would be nice, if anyone could give me some quick hint on this


texts:
i want to use "Curaçao" as a country. It is listed in the "vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml" but i do not see it in the country drop down list.

Does anyone know how i can get it to show up in the list? Thank you.


texts:
I have a problem of changing the image of configurable product in ajax cart based on product image. I want to have product image in ajax cart after selection.

Here is the controller code which should reflects the change.

if (!$this->_getSession()->getNoCartRedirect(true)) {
if (!$cart->getQuote()->getHasError()){
 $message = $this->__('%s was successfully added to your shopping cart.', $product->getName());
$img = "init($product, 'image')->resize(60,null)."' />";
$tmp_product = '

'.$img.'

'.$message.'

';
$check = 'success';


texts: Removing ID at the end of Get Request from Magento 2

texts:
I have written a custom html script which is saved in a custom block and displayed on a product page, which is a GET request and fetches the data from a node service on another service,

when the request is sent , Magento is adding a Number which im not sure why is it adding, it is not the cache version or the SID(&_=1567760378803).

https://test.test.eu/api/getProducts?&type=101&height=5&unit=1002&breadth=3&length=10&_=156776037880....


texts: Magento1: VAT Validation using EU VIES service

texts:
Magento is using  EU VIES (VAT Information Exchange System) service to validate the VAT-IDs (http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl)

Is it reliable and how Magento is using it?

As VIES/Web team proposes following recommendation to ensure validation can be performed without blocking:

you perform 20k or less requests for VAT validations per day,
you perform up to 5 validations to a unique VAT number per day,
you avoid performing blank or null or white space or corrupted or invalid (syntax, length) validations
you perform validations preferably until 10:00 am CET and/or after 18:00 CET


texts: "Specified date is invalid" error in Magento ticket shop in all non english Browser languages

texts:
I have the following problem: I am making a website for ticket sales in Senegal with Magento - the products have special dates and you can search them with a calendar function. You click on a day on the calendar and then it shows you all events on that day.

So here`s the problem: It does only work in Browsers that use English language. In any other browser language I get the error message: "Specified date is invalid."

Does anybody know what do I have to do so it works with all other Browser languages, too?

Thank you in advance


texts: Can someone give detailed explanation about scheduling in Magento 2 cron job?

texts:
I am using Magento CE 2.0.0.

I set up cron job for my custom task but I could not make it run every 15 minutes.
So can someone provide detailed explanation about how to correctly set up schedule?

Firstly, there is a configuration for cron in admin:

This parameters are for generating "cron_schedule" table in database.
How these parameters affect on my task scheduling (I'm using group "default")?

On server I must set up task in crontab to run magento cron:run.
So in my case it (crontab -l):

  */15 * * * * /usr/bin/php /srv/www/my_directory/bin/magento cron:run

In magento devdocs there is the note:

What does it mean? Do I have to include my command twice in crontab? For example:

  */15 * * * * /usr/bin/php /srv/www/my_directory/bin/magento cron:run; /usr/bin/php /srv/www/my_directory/bin/magento cron:run

Lastly, there is a cron job configuration in Magento 2 crontab.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job name="my_custom_job" instance="My\Module\Cron\MyCustomJob" method="execute">
            <schedule>*/15 * * * *</schedule>
        </job>
    </group>
</config>

I set it to run every 15 minutes.

So how to put all these things together?
I want to run my custom task every 15 minutes.

Here is the debug.log:

> [2016-09-23 12:00:03] main.DEBUG: MyCustomTask {"is_exception":false} []
> [2016-09-23 12:15:03] main.DEBUG: MyCustomTask {"is_exception":false} []
> [2016-09-23 13:00:03] main.DEBUG: MyCustomTask {"is_exception":false} []
> [2016-09-23 13:30:03] main.DEBUG: MyCustomTask {"is_exception":false} []
> [2016-09-23 14:45:03] main.DEBUG: MyCustomTask {"is_exception":false} []
> [2016-09-23 16:00:03] main.DEBUG: MyCustomTask {"is_exception":false} []
> [2016-09-23 16:45:03] main.DEBUG: MyCustomTask {"is_exception":false} []


texts: Simple products price missing for bundle product options

texts:
I've migrated store from Magento 1.9.3.9 CE to Magento 2.3.3 CE

All entities migrated successfully but suddenly I checked few bundle products and found that it options which are simple products which don't have price.

Bundle option contains the simple products which have prices in the table but it doesn't come up with M2.

Whereas it's working fine if I add manually to Magento\Bundle\Block\Catalog\Product\View\Type::getSelectionItemData
it's working fine.

Also after a selection when I moved to cart it showing price there.but not at optionConfig JSON.

https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php#L247

Printing above is returning price null.

I've checked pricing tables it has prices for simple products.

Any solution to this now it's getting irritating since it has price in the database.

Does anyone have a clue about this issue? Any help would be appreciated.


texts:
Magento2 how to Authenticate user by Mac Address? Also how to get and set MAC address in Magento2

Requirements:-

Super Admin Can set one field while user creates in admin panel. The field name is "Mac Address".  And Save it in a database.(statically input)
once Newley created the admin user is login with this appropriate mac address then and then is an authentic person and then he allows to login.
otherwise he will not allow to login.


texts: Prevent scroll bar from not moving at the top

texts:
How can i prevent my scroll bar to not move at the top on click event.
Visit https://wazoodle01.wsisites.net/knowledge-base/order-information/wholesale-faq.html# and click on any option listed below.You will see the scroll bar goes to the top. How to prevent that.
here is my code .

 `<script type="text/javascript">jQuery(document).ready(function(){
jQuery('.faq-main-content').hide();jQuery('.faq-main-content.faq-content').hide();
jQuery(".faq-content-header").delegate('a','click',function(e){
    if(jQuery(e.target).data('link')!=='redirect'){
        jQuery(e.target).toggleClass('question_minus').parent().next('.faq-content').slideToggle();e.preventDefault();
        }});
        jQuery(".faq-header").delegate('a','click',function(e){
            jQuery(e.target).toggleClass('section_minus').parent().next('.faq-main-content').slideToggle();
            if((jQuery(e.target).parent().next('.faq-main-content').children('.faq-content').is(':visible'))){
                jQuery(e.target).parent().next('.faq-main-content').children('.faq-content').slideUp();
                if(jQuery(e.target).parent().next('.faq-main-content').children('.faq-content-header').children('a').is(".question_minus")){
                    jQuery(e.target).parent().next('.faq-main-content').children('.faq-content-header').children('a').removeClass('question_minus');
                    }}

e.preventDefault();
 })});</script>`


texts:
My client uses his sales reports every day and the statistics used
to be updated every day. We have recently moved to a new server and
suddenly this has stopped happening - we have to manually click
'Refresh Statistics'.

I decided to try and find out what refreshes this data and could not
find where it's done. We have a cron job running every 20 mins, but
I'm not aware of a task which is supposed to refresh reports data.
Also as a side-note which may be related, we have found that catalog
promotions are suddenly switching off for what seems like no reason.
I know there's a cron task that applies catalog rules every night,
but I would only expect this to keep cron jobs going rather than
stop them... so I'm wondering if the two issues could be related?

If anyone has any answers to my first question I'd really appreciate it.


texts: How to send token with magento2 SOAP wsdl Request

texts:
How to invoke soap wsdl request for magento2 in SOAPUI.

I have created a soap wsdl request in SOAPUI using my URL http://192.168.0.1/Magento2/soap/default?wsdl&services=customerCustomerRepositoryV1. When i invoke request its giving error Consumer is not authorized to access %resources. To overcome this i have found another request http://192.168.0.183/M2EE/soap/default?wsdl&services=integrationAdminTokenServiceV1 which is giving token.

But how to send token in customerrepository request.

Customer Save Request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:def="http://192.168.0.1/M2EE/soap/default?services=customerCustomerRepositoryV1">
   <soap:Header/>
   <soap:Body>
      <def:customerCustomerRepositoryV1SaveRequest>
         <customer>
            <email>pprasad@gmail.com</email>
            <firstname>prasad</firstname>
            <lastname>p</lastname>
         </customer>
      </def:customerCustomerRepositoryV1SaveRequest>
   </soap:Body>
</soap:Envelope>

Customer Save Response
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="http%3A%2F%2F192.168.0.1%2FM2EE%2Fsoap%2Fdefault%3Fservices%3DcustomerCustomerRepositoryV1%26wsdl%3D1">
   <env:Body>
      <env:Fault>
         <env:Code>
            <env:Value>env:Sender</env:Value>
         </env:Code>
         <env:Reason>
            <env:Text xml:lang="en">Consumer is not authorized to access %resources</env:Text>
         </env:Reason>
         <env:Detail>
            <m:GenericFault>
               <m:Parameters>
                  <m:GenericFaultParameter>
                     <m:key>resources</m:key>
                     <m:value>Magento_Customer::manage, self</m:value>
                  </m:GenericFaultParameter>
               </m:Parameters>
            </m:GenericFault>
         </env:Detail>
      </env:Fault>
   </env:Body>
</env:Envelope>


texts: sub-category not showing on specific theme

texts:
When I change to other theme, it is working.
I checked header.phtml and topmenu.html but they look fine.
What am I missing??
I use magento 1.9.2.4.


texts: Magento 2 add script before closing body tag

texts:
What is the proper way to add a script before the closing body tag in magento 2?

I want it to be available to all pages.

UPDATE:

I've got in myvendor/mytheme/Magento_Theme/layout/default.xml with:

<referenceContainer name="before.body.end">
    <block class="\Magento\Framework\View\Element\Template" template="Theme_Module::js.phtml" name="module_js"/>
</referenceContainer>

And the js.phtml inside /Magento_Theme/templates

Should that be right?


texts: Is it possible to clear registry of OrderRepository?

texts:
I have a mass action which saves hundreds of orders via OrderRepository.
And sometimes the process fails with PHP Fatal error:  Allowed memory size of XXX bytes exhausted

Because save() method of class OrderRepository adds order to array $registry. And garbage collector cann't destroy these objects because there are links on them.

public function save(\Magento\Sales\Api\Data\OrderInterface $entity)
{
    //Some code

    $this->registry[$entity->getEntityId()] = $entity;
    return $this->registry[$entity->getEntityId()];
}

So, I want to flush the registry or free up memory in Magento way.

*PS I know $order->save(); is workaround. It gets much less memory than OrderRepository->save() But it is deprecated.


texts: Where in a custom module can you declare / consolidate all of your custom functions

texts:
I am building an admin module which extends the sales order mass actions.

I am at the point where I have added my module to the mass action dropdown, and am receiving the post data in my controller.

My question is what is the correct method to add in my custom functions that process and return data back to the controllers and where would I store them in best practice?

Eg if I am collecting the post data in my controller like so:

$orderIds = $this->getRequest()->getPost('order_ids', array());

and then I go through the orders like so and want to use a custom...

foreach ($orderIds as $orderId){
            $order = Mage::getModel('sales/order')->load($orderId);
            echo myCustomFunction($orderId);
        }

Where would I store this custom function, and how would I call it into the controller?
Usually outside of Magento I would create something like a functions.php file and put an include_once but I have a feeling that isn't the best way to go with the Magento architecture.


texts:
In Magento 2.3.x
When trying to use tax at the section store -> sales -> tax:
The following exception:
    Exception #0 (Exception): Warning: Invalid argument supplied for
foreach() in /xxx/xxx/xxxx/xxxxxxhttpdocs/store/vendor/vertex/
module-tax/Block/Adminhtml/Config/Form/Field/ShippingCodes.php on line 101


texts: Can't find InstallSchema in Cms/Wishlist module Magento 2.3

texts:
I am newbie for Magento 2 development. Sometime, I reference Magento Core module.
But still Magento 2.3, I can't find Cms/Setup/InstallSchema.php

Where I can find it?


texts: Double the Shipping Charges for certain items count at the cart

texts:
I wish to modify the shipping cost Double if they add more than 5 items at the cart.

class ChangeShipping_MyCarrier_Model_Carrier extends
    Mage_Shipping_Model_Carrier_Abstract implements
    Mage_Shipping_Model_Carrier_Interface
{
    protected function _getStandardShippingRate()
    {
        $rate = Mage::getModel('shipping/rate_result_method');
        $rate->setCarrier($this->_code);
        $rate->setCarrierTitle($this->getConfigData('title'));
        $rate->setMethod('standand');
        $rate->setMethodTitle('Standard');

        $items_count = Mage::helper('checkout/cart')->getItemsCount();
        if ($items_count > 6) {
            $rate->setPrice(19.99);
        } else {
            $rate->setPrice(9.99);
        }
        $rate->setCost(0);
        return $rate;
    }
}

This function executes flawless without IF condition but shows error then.


texts:
I have searched many time for this problem, but I have not found a solution for this feature. I will show all available categories from specific store view as a list on a single page. The feature now, I need a filter for this list like this page e.g. Order by ASC and Order by categories.

Have anyone a answer or a solution for me?
Thanks.


texts:
I am trying to do a refund in Magento 2 using the invoice. It seems that multiple items are not supported. This is just an example where an invoice with all the order_item_ids are 100% correct but it will not work. However, if i only have one item it will work. The error i get is that the credit memo contains the wrong article which is not true.
{
"items": [
    {
        "order_item_id": 102902,
        "qty": 1
    },
    {
        "order_item_id": 102906,
        "qty": 1
    },
    {
        "order_item_id": 102908,
        "qty": 1
    }
],
"notify": true,
"arguments": {
    "shipping_amount": 0,
    "adjustment_positive": 0,
    "adjustment_negative": 0
}

}


texts: Magento category controller full page cache issue

texts:
I'm using 3rd party fpc extension. When i enable fpc observer calling only once, next time & onwards the observer code not executing. When i exclude entire category controller, view action from fpc is working fine.
Can you help me on this issue?

event xml:

<catalog_controller_category_init_after>
    <observers>
        <sfm>
            <class>Dcw_Sfm_Model_Observer</class>
            <method>ymmsCheck</method>
        </sfm>
    </observers>
</catalog_controller_category_init_after>

Observer.php

<?php
class Dcw_Sfm_Model_Observer
{
    public function ymmsCheck(Varien_Event_Observer $observer) {
        $sfm='';
        if (isset($_COOKIE["sfm"]))
            $sfm = $_COOKIE["sfm"];
            $sfmx = '';
        if (isset($_COOKIE["sfmx"]))
            $sfmx = $_COOKIE["sfmx"];

        if ($sfm != '' && $sfmx != '') {
            $currentUrl = Mage::helper('core/url')->getCurrentUrl();
            if (strpos($currentUrl, 'sfm') == false) {
                if ($sfm == 1) {
                    $type = "style";
                } else if ($sfm == 2) {
                    $type = "family";
                } else if ($sfm == 3) {
                    $type = "model";
                }
                $currentNewUrl = $currentUrl . "?sfm=" . $sfm . "&" . $type . "=" . $sfmx;
                $response = Mage::app()->getFrontController()->getResponse();
                $response->setRedirect($currentNewUrl);
                $response->sendResponse();
            } else {
                return;
            }
        }else {
            return;
        }
    }
}
?>


texts: 2.3.3 Unable to Reindex Catalog Search: 'index catalogsearch_fulltext_scope1: does not support DELETE'

texts:
I have migrated from Magento1.9 to Magento2.3.3.

When running the reindexer command I got the following error:
index catalogsearch_fulltext_scope1: does not support DELETE (enabled=0) [ DELETE FROM catalogsearch_fulltext_scope1 WHERE id > 0], all other indexes run just fine.

Error logs don’t appear to be throwing any errors related to this issue.

UPDATE
Thought the issue was related to DB Triggers having the wrong user, but all triggers are owned by the same user


texts: How do you disable the admin panel Inbox Notification pop up?

texts:
We've all had this at one point or another, I've looked around and cannot find anything obvious.

How can you disable the pop up window that is displayed when you login to the admin panel when there are new messages?

Note: I do not want to disable the message feature completely, I just don't want to have the pop-up appear when I login.


texts: Magento 2: How to implement a block for a Shipping method

texts:
I need two fields to appear under the delivery method when activated and disappear when another method is selected.
At the moment I have them under methods. But I need to wedge between them as shown in the picture


texts:
In magento 1.9.2.2, how to remove about us page from top navigation only.

The image is shown below..

Is there any way to remove it from admin panel?


texts: How to select an associated product of a configurable product to display in catalogsearch page?

texts:
Without any configuration, the green pant is shown by default when I search for 'yoga pant'. My question is How can I make, for example, blue pant size 34 and its price and stock status as well to display instead? I'm in Magento 2.3 btw.
Thank you.


texts:
I need to use a layout update for cms page.

I've created a file called cms_page_view_selectable_home_HomePageBlocks.xml

<?xml version="1.0" encoding="utf-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="page.wrapper">
      <container name="main-content-outer" before="main.content">
        <block class="Magento\Cms\Block\Block" name="tm_slider">
            <arguments>
                <argument name="block_id" xsi:type="string">tm_slider</argument>
            </arguments>
        </block>
        <block class="Magento\Cms\Block\Block" name="tm_category_banner_cms">
                 <arguments>
                      <argument name="block_id" xsi:type="string">tm_category_banner_cms</argument>
                 </arguments>
           </block>
            <block class="Magento\Cms\Block\Block" name="tm_subbanner_CMS">
            <arguments>
                <argument name="block_id" xsi:type="string">tm_subbanner_CMS</argument>
            </arguments>
        </block>
           <block class="Magento\Cms\Block\Block" name="tm_special_cms">
                <arguments>
                     <argument name="block_id" xsi:type="string">tm_special_cms</argument>
                </arguments>
             </block>
             <block class="Magento\Cms\Block\Block" name="tm_homepage_service_cms">
            <arguments>
                <argument name="block_id" xsi:type="string">tm_homepage_service_cms</argument>
            </arguments>
        </block>
        <block class="Magento\Cms\Block\Block" name="tm_Products_CMS">
            <arguments>
                <argument name="block_id" xsi:type="string">tm_Products_CMS</argument>
            </arguments>
        </block>
        <block class="Magento\Cms\Block\Block" name="tm_Singlebanner_CMS">
            <arguments>
                <argument name="block_id" xsi:type="string">tm_Singlebanner_CMS</argument>
            </arguments>
        </block>
        <block class="Magento\Cms\Block\Block" name="tm_manufacture">
            <arguments>
                <argument name="block_id" xsi:type="string">tm_manufacture</argument>
            </arguments>
        </block>
        <block class="Magento\Cms\Block\Block" name="tm_blog">
            <arguments>
                <argument name="block_id" xsi:type="string">tm_blog</argument>
            </arguments>
        </block>
      </container>
    </referenceContainer>
</page>

I'm able to selecte it in CMS Page Edit Form, but nothing shows in frontend.

There is something wrong?


texts: How to add Mobile custom field in Customer Registration Form in magento?

texts: How to add Mobile custom field in Customer Registration Form in magento ?


texts: Get simple product Id from configurable in Magento2?

texts:
I have configurable product with 3 colors(red,Blue,green) in drop down.If I have selected red color product,How to get red color product Id in product page

If anyone knows please help me


texts: When i login the backend of magento2 have a Fatal error

texts:
When i login the backend of magento2 have a fatal error:

  Fatal error: Only variables can be passed by reference in E:\www\magento2g\app\code\Magento\Backend\view\adminhtml\templates\system\search.phtml on line 31

The file search.phtml code is as follows:


texts: Magento 2 adding a custom link in a new column to product_listing.xml

texts:
Trying to add a new column with a link into magento 2 product_listing.xml that passes entity id to a custom module.

I have created the Ui Component [company]/[module]/Ui/Component/Listing/Column/EditActions.php (see below), however I do not know how to add it to the layout. [company]/[module]/view/adminhtml/ui_component/product_listing.xml

See screenshot for an rough mock up https://prnt.sc/os44w1

<?php
namespace [company]\[module]\Ui\Component\Listing\Column;

use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;
use Magento\Cms\Block\Adminhtml\Page\Grid\Renderer\Action\UrlBuilder;
use Magento\Framework\UrlInterface;

class EditActions extends Column {

    /** @var UrlBuilder */
    protected $actionUrlBuilder;

    /** @var UrlInterface */
    protected $urlBuilder;

    /**
     * @var string
     */
    private $_viewUrl = '[router]/content/view';

    /**
     * @param ContextInterface $context
     * @param UiComponentFactory $uiComponentFactory
     * @param UrlBuilder $actionUrlBuilder
     * @param UrlInterface $urlBuilder
     * @param array $components
     * @param array $data
     * @param string $editUrl
     */
    public function __construct(
        ContextInterface $context,
        UiComponentFactory $uiComponentFactory,
        UrlBuilder $actionUrlBuilder,
        UrlInterface $urlBuilder,
        array $components = [],
        array $data = []
    )
    {
        $this->urlBuilder = $urlBuilder;
        $this->actionUrlBuilder = $actionUrlBuilder;
        parent::__construct($context, $uiComponentFactory, $components, $data);
    }

    /**
     * Prepare Data Source
     *
     * @param array $dataSource
     * @return array
     */
    public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as & $item) {
                $name = $this->getData('name');
                if (isset($item['entity_id'])) {

                    $item[$name]['contentassist'] = [
                        'href' => $this->urlBuilder->getUrl($this->_viewUrl, ['id' => $item['entity_id'], 'store_id' => $item['entity_id']]),
                        'label' => __('link')
                    ];

                }
            }
        }

        return $dataSource;
    }
}


texts: Product image not zooming in properly when hovering on image at product detail page

texts:
In my product page detail when i try to hover the product image there's only white box with low opacity overlaying at the top of my image like this :

Usually in Magento 2, when hovering the image it will zoom in the part where the image is hovered like this:

I've tried to edit view.xml in my app/design/frontend/theme, but i can't get it to work, here's the code:

<var name="magnifier">
            <var name="fullscreenzoom">5</var>  <!-- Zoom for fullscreen (integer)-->
            <var name="top"></var> <!-- Top position of magnifier -->
            <var name="left"></var> <!-- Left position of magnifier -->
            <var name="width"></var> <!-- Width of magnifier block -->
            <var name="height"></var> <!-- Height of magnifier block -->
            <var name="eventType">hover</var> <!-- Action that atcivates zoom (hover/click) -->
            <var name="enabled">true</var> <!-- Turn on/off magnifier (true/false) -->
        </var>


texts: Downloadable Products are blank in admin order screen, also cannot complete order

texts: Running Magento 1.9.0.1, brand new install with just a few plugins on it. When a downloadable product is purchased on our website, the admin order screen under "Items Ordered" is completely blank. The order is also stuck in "processed", we cannot complete it. Clicking "invoice" just shows a blank invoice screen.


texts: catalog_product_index_group_price table is empty after saving products

texts:
I have this problem where the catalog_product_index_group_price database table is flushed when I save a product. Only the product I'm saving is left in catalog_product_index_group_price.

After a reindex of the 'Product Prices' all group prices are regenerated.

When I change the setting of the 'Product Prices' indexes to 'Update on save' the problem does not arise.

Is this a general bug? Or am I having a conflict somewhere? I have not extended or overwritten any related core code.

Current version is CE 1.9.0.1


texts:
I added the following to my local.xml:

<default>
    <system>
        <filesystem>
            <tmp>{{root_dir}}/var-instance/tmp</tmp>
        </filesystem>
    </system>
</default>

I'm running Magento in a multi-server environment, and /var is on an NFS. However, I noticed that Dataflow imports were using /var/tmp to store local copies of downloaded files, and that's very slow over NFS. So I created the /var-instance/tmp directory, and pointed Magento there.

Dataflow is correctly writing it's temp files there, however those files are not being deleted when Magento is done with them.

This might actually be two problems. 1) Maybe changing the tmp directory isn't a good idea; I'm open to suggestions. 2) Maybe Dataflow never deletes it's temp files, and this has nothing to do with me changing the path.

Can anyone help?


texts: How to create a send email button for my homepage in magento?

texts:
I have an email button but it will open microsoft outlook when I'm trying to send the email. So I got 2 questions:

How do I correctly implement an email button in Magento?

I want to show the message you normally get when sending an email via contact form.(Success message)

<form id="contact" action="mailto:123@gmail.com" method="post">

<button type="submit">Send</button>
</form>


texts: Product Create via API - not showing in admin panel

texts:
We create products via the Magento API, these are simple products.

We only have 1 website and 1 store in this website.

We were creating products with store 1 set, these would create the products , but require and update call for them to show in the admin panel / front end.

We have since moved to using store 0 as were informed that store 1 was not actually correct (long story)

Now we have the effect that creating the product will return and ID and it is visible on the front end, but not in the admin panel.

It seems we still requite and update call to 'activate' the product, and then an index + layout cache to be cleared to show in the admin panel.

Is there something we could be missing in the product create call that could be causing this (we let magento create the url-key etc)

We are running 1.9.1.0 and using the XMLRPC API

Thanks

Alex


texts: How to setup multiple stores with multiple languages each?

texts:
I try to figure out the best way to setup multiple stores sharing the same catalog.

I don't have a problem to set up the store with 2 languages (de,en). Adding stores in one language is not a problem too, since they will use the "admin" values (e.g. german). But I want to (programmtically) add stores that will each have 2 language views:

main store -> storeview de / storeview en
extra store1 -> storeview de / storeview en
extra store 2 -> storeview de / storeview en
.....
extra store 50 -> storeview de / storeview en

So far, it looks like I have to import the second language in each store view?


texts: Related products are not visible in product page in magento 2.3.1

texts:
I am facing an issue that related products are not visible in the product view page.

How can I show related products on the bottom section of the product view page?

Please help to find the solution.
Thanks


texts:
I have this code to show big image

$productImageUrl = $block->getUrl('pub/media/catalog').'product'.$_product->getImage();

but how i can call URL for small img of product


texts: Dynamically changing the shipping carrier name

texts:
I have a custom shipping carrier that allows customers to specify a delivery date. Its config.xml defines method name as

<default>
        <carriers>
          <deliverybydate>
               <active>0</active>
               <model>deliverybydate/carrier_deliverybydate</model>
               <title>Delivery date of your choice</title>
               <name>Delivery By Date</name>
               <deliveridatenote>Delivery on date of your choice</deliveridatenote>
               <deliverydate>1</deliverydate>
               <deliverytime>0</deliverytime>
               <deliverydatetoday>0</deliverydatetoday>
               <deliverydaterange>7</deliverydaterange>
               <deliverytimerange>08.00-09.00 AM,</deliverytimerange>
               <price>10.00</price>
               <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
            </deliverybydate>
         </carriers>
    </default>

How can we change the <name>Delivery By Date</name> dynamically. I searched for a while, but didnt got any solution.


texts: Adding to cart: E_ERROR: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 24 bytes)

texts:
We're seeing in new relic some reports of the below when users are adding items to the cart:

E_ERROR: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 24 bytes)
in Varien_Simplexml_Element::descend called at /var/www/vhosts/www.domain.com/html/lib/Varien/Simplexml/Element.php (195)
in Varien_Simplexml_Element::descend called at /var/www/vhosts/www.domain.com/html/lib/Varien/Simplexml/Config.php (153)
in Varien_Simplexml_Config::getNode called at /var/www/vhosts/www.domain.com/html/app/code/local/Mage/Core/Model/Config.php (671)
in Mage_Core_Model_Config::getNode called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Catalog/Helper/Data.php (298)
in Mage_Catalog_Helper_Data::getOldFieldMap called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Catalog/Model/Product.php (129)
in Mage_Catalog_Model_Product::_initOldFieldsMap called at /var/www/vhosts/www.domain.com/html/lib/Varien/Object.php (100)
in Varien_Object::__construct called at /var/www/vhosts/www.domain.com/html/lib/Varien/Data/Collection.php (562)
in Varien_Data_Collection::getNewEmptyItem called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php (406)
in Mage_Catalog_Model_Resource_Product_Collection::getNewEmptyItem called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php (1053)
in Mage_Eav_Model_Entity_Collection_Abstract::_loadEntities called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php (871)
in Mage_Eav_Model_Entity_Collection_Abstract::load called at /var/www/vhosts/www.domain.com/html/lib/Varien/Data/Collection.php (741)
in Varien_Data_Collection::getIterator called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php (1495)
in Mage_Catalog_Model_Resource_Product_Collection::addOptionsToResult called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php (182)
in Mage_Sales_Model_Resource_Quote_Item_Collection::_assignProducts called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php (139)
in Mage_Sales_Model_Resource_Quote_Item_Collection::_afterLoad called at /var/www/vhosts/www.domain.com/html/lib/Varien/Data/Collection/Db.php (581)
in Varien_Data_Collection_Db::load called at /var/www/vhosts/www.domain.com/html/lib/Varien/Data/Collection.php (741)
in Varien_Data_Collection::getIterator called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Sales/Model/Quote.php (1697)
in Mage_Sales_Model_Quote::isVirtual called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Sales/Model/Quote/Address.php (489)
in Mage_Sales_Model_Quote_Address::getAllItems called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Sales/Model/Quote/Address.php (541)
in Mage_Sales_Model_Quote_Address::getAllNominalItems called at /var/www/vhosts/www.domain.com/html/app/code/core/Mage/Sales/Model/Quote/Address/Total/Nominal/RecurringAbstract.php (98)

Any ideas, please?

I have no idea what can be causing this and google is not turning up much!


texts: Date filter wrong. Magento always converts the start/end date in a wrong format (UTC)

texts:
If I pull up a sales report and filter shipped by 6/1/16 - 6/30/16 I get a weird result (doesn't match a 3rd party report). When I inspect the final sql query Magento sends to the database I noticed wrong dates:

  2016-06-01 04:00:00' AND sfo.created_at <= '2016-06-30 04:00:00

but actually I was expecting

  2016-06-01 00:00:00' AND sfo.created_at <= '2016-06-30 23:59:59

Debugging turned out this happens because Magento is calculating the dates on base of UTC time:

Mage_Core_Model_Locale -> const DEFAULT_TIMEZONE  = 'UTC';

This happens twice actually:

Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Date::_convertDate()
Mage_Reports_Model_Resource_Report_Collection::timeShift()

Why is Magento converting the date filter in a wrong format? Since its a constant value I can't have anything configured wrong in backend.

Anyone an idea? As always: Thanks!


texts: Magento 1.9.2 : Hide specific categories form new arrival section

texts:
I want to hide some specific categories form new arrival section on the homepage. I am using following code but not able to achieve.

$_helper = $this->helper('catalog/output');
$_productCollection = Mage::getResourceModel('reports/product_collection')
    ->addAttributeToSelect('*')
    ->setVisibility(array(2,3,4))
    ->setOrder('created_at', 'desc')->setPageSize(6);


texts: Magento 2 Dynamic text in order email based on products bought

texts: I would like to display different text in the order confirmation emails depending on the items customer purchased . For example, when customer bought Gift Cards, when I'd like to show some extra text like terms & condition in the confirmation emails. What's the best approach to this?


texts: Cart Rules for tiered promotion with exclusions

texts:
I'm trying to run a simple rule based on cart subtotal. If itfalls between 2 amounts, a $ discount gets applied.

The problem starts when I need to set conditions about what items can be "counted" towards this subtotal. I.e, certain items are to be excluded.

I can't seem to get this to work. Is it even possible? I defined conditions under "Apply the rule only to cart items matching the following conditions (leave blank for all items)." but it did not do what I want.


texts: How to get product_options for sales_order_item by API Rest?

texts: How to get product_options for sales_order_item ? I need the price of simple product (bundle)


texts: I have a problem with Chinese flood bots qq.com bots

texts:
we are running linux debian dedicated server for our website...

I have a problem with CHINESE bots qq.com bots they are connecting to my website all the time. about 5000 - 10.000 different IPS .. they give me about 15-25 GB of bandwith per day of usage could this be giving issues to my website for slower loading ??

what would be the best thing to block complet china country from connecting to my website ? i have read many forums on how to do this also i have checked this website https://www.howtoforge.com/nginx-how-to-block-visitors-by-country-with-the-geoip-module-debian-ubuntu
for somehow i am unable to get this to work for me on my website i have done all what the website tells you to do and i have tryed to block "US" country and i used a vpn to connect to my website to see if i would get redirected but i could visit the website normaly so its not working...

also the problem is the list GeoLiteCountry , GEOIP - downloading from the websites everywhere the link is unavaliable anymore - anyone has any idea on how to get a valid up to date country IP-LIST

what is the best free software i can use to monitor bandwith daily and how could i get an output option also on which-country ips are connecting to my website and how many per day
thanks


texts:
I want to give Magento 2 Certification exam. I have some question regarding this exam. can any buddy give my questin's answer?

1) Can I reschedule my examination date, time and center all of this?

  I have found this in about the exam:-
  Based on Magento Open Source (2.2) and Magento Commerce (2.2), but
  applicable to those using any version of Magento 2.

2) Can the exams question is related to Magento version 2.2.X? Or 2.2.X and above? Currently, Magento latest version is 2.3.0. it is included in this exam or not?


texts: How to add new input field in cart page in magento2?

texts: In Magento2, I want to add/show custom input field in checkout page and save it to my custom field from Sales_order and Quote table in database.


texts: Adding new order field to API response: /V1/orders/:id without using extension_attributes

texts:
So basically I want to extend the existing web-service /V1/orders/:id for adding new order field (say: erp_id).
It's a field in sales_order table and it's available when you load the $order object.

My main concern here is not to use the extension_attributes node for adding this new field. I want it to be on the same level as other standard fields.
The reason behind this is we already have many third parties relying on this structure.

So far gathered the key files for extension seems to be:

Magento\Sales\Api\OrderRepositoryInterface (service interface for the API)
Magento\Sales\Api\Data\OrderInterface (data interface for the API result)
Magento\Sales\Model\OrderRepository (concrete class for service interface)
Magento\Sales\Model\Order (concret class for data interface - esp. getters and setters)

Some similar queries waiting for an answer:

https://github.com/magento/magento2/issues/5582

== EDIT ==
If you edit as below, you can have the custom field on the top-level in the SOAP response.

File: app/code/Magento/Sales/Api/Data/OrderInterface.php

//...
/*
 * ERP ID
 */
const ERP_ID = 'erp_id';
//...
/**
 * Gets the ERP Id
 *
 * @return int
 */
public function getErpId();

/**
 * Sets the ERP Id
 *
 * @param int $id
 * @return $this
 */
public function setErpId($id);

File: app/code/Magento/Sales/Model/Order.php

/**
 * {@inheritdoc}
 */
public function getErpId()
{
    return $this->getData(OrderInterface::ERP_ID);
}

/**
 * {@inheritdoc}
 */
public function setErpId($id)
{
    return $this->setData(OrderInterface::ERP_ID, $id);
}

It's that simple logically. But the problem here is overriding the interface.

Another Question:
is this possible in Magento 2 <preference for="Magento\Sales\Api\Data\OrderInterface" type="My\Custom\Api\Data\OrderInterface" />
(i.e. overriding of one interface by another)


texts:
I have a few questions about Magento admin/backoffice performance.
How well does Magento handle multiple users in the backoffice editing, removing and inserting products? What about multiple users uploading images to different products?
In such a scenario, is it acceptable to set reindexing on automatic?
My guess is "Of course not!" but I'd like to hear somebody with more experience than me.


texts: get order collection by product attribute option value in Magento2

texts:
I am trying to fetch full order collection by product attribute option.

I have a "brand" attribute with options "option_1", "option_2", "option_3". This attribute is assigned against each product sku.

I have a written a cron file which triggers everyday.

In that file i need to fetch all the orders where product sku with attribute set as "option_1".

I have used below code to get the order collection for past 2 days.

Class Cronfile{

protected $searchCriteriaBuilder;
protected $sortBuilder;
protected $orderRepository;
public function __construct(
 \Magento\Sales\Api\OrderRepositoryInterface $orderRepository,
    \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
    \Magento\Framework\Api\SortOrderBuilder $sortBuilder
){
  $this->orderRepository = $orderRepository;
  $this->searchCriteriaBuilder = $searchCriteriaBuilder;
  $this->sortBuilder = $sortBuilder;
 }

public function getOrderCollection(){
    $searchCriteria = $this->searchCriteriaBuilder
      ->addFilter('status','pending','eq')
      ->addSortOrder($this->sortBuilder->setField('entity_id')
      ->setDescendingDirection()->create())
      ->setPageSize(100)->setCurrentPage(1)->create();

    $to = date("Y-m-d h:i:s"); // current date
    $from = strtotime('-2 day', strtotime($to));
    $from = date('Y-m-d h:i:s', $from); // 2 days before

    $ordersList = $this->orderRepository->getList($searchCriteria);
    $ordersList->addFieldToFilter('created_at', array('from'=>$from, 'to'=>$to));
    foreach ($ordersListas $orderItem) {
        echo $orderItem->customerEmail();
   }
}
}

Here i need to fetch all the orders with the product attribute option value.

can someone help me on this please? Thanks in advance!!


texts: Magento 1.9 Banner Slider is not displayed on the frontend

texts:
I set my slider and my banners. I inserted the block in the cms page with the correct ID but the slider is not displayed.
I checked this post too: Banner slider not showing
If I try to change the banner date it is saved on 01/01/1970 at 01:00:00


texts: Applying Catalog Price Rule to Advanced Pricing

texts:
I am new to Magento so I apologize in advance if this has already been asked and answered (if so, can you please point me there?)
We are running Magento 2.3.5 Community Edition.
We have multiple Customer Groups (say, Group 1, Group 2, Group 3, etc.). For the same SKU, we have different price for each of these Customer Groups (Price 1, Price 2, Price 3, etc.). These different prices are specified in the Advanced Pricing.
We now want to run a 10% OFF promotion for that SKU such that each customer group gets 10% of their individual group price. So, for example, Group 1 discounted price will be Price 1 less 10%, Group 2's price will be Price 2 less 10% and so on.
Is this possible to do from Admin Panel using Catalog Price Rule? I tried creating a rule there but it only applies to the General or NOT LOGGED IN group; it doesn't apply to other Customer Groups.
Or, is there a module available that will let me do this?
Thank you very much!


texts:
I want to add some fields to the widget.xml file of a third-party module.
Can I rewrite this file?

I thought duplicating it but the original widget could be used too.


texts: How to get data of radio button and checkbox in frontend form?

texts:
I have one form in frontend. In that i have so many radio button and checkbox.

Now when i edit that form that time i want set data of radio button and checkbox.

my phtml

<?php echo $this->__("FRI");?>

<input class="allday" type="checkbox" name="availableday[Friday][9-12]" value="9AM - 12AM">

<input class="allday" type="checkbox" name="availableday[Friday][12-6]" value="12PM - 6PM">

<input class="allday" type="checkbox" name="availableday[Friday][6-9]" value="6PM - 9PM">

<?php echo $this->__("SAT");?>

<input class="allday" type="checkbox" name="availableday[Saturday][9-12]" value="9AM - 12AM">

<input class="allday" type="checkbox" name="availableday[Saturday][12-6]" value="12PM - 6PM">

<input class="allday" type="checkbox" name="availableday[Saturday][6-9]" value="6PM - 9PM">

    *<?php echo $this->__('Gender');?>

            <input type="radio" id="male" class="validate-one-required" name="gender" value="0" >

                    <?php echo $this->__("Male");?>

                <input type="radio" id="female" name="gender" value="1" >

                        <?php echo $this->__("Female");?>

In radion button save value like 0 or 1,but in checkbox i save string like this

{"Friday":{"12-6":"12PM - 6PM","6-9":"6PM - 9PM"},"Saturday":{"12-6":"12PM - 6PM","6-9":"6PM - 9PM"}}

so how to get selected  radio button and checkbox


texts:
I have a client who has added al their products to Amazon. We brought them all down to Magento via one plugin and I have after some custom code and a CSV gotten all their attributes into Magento so we have a copy of the Amazon site on Magento.

I'm having a world of hurt trying to get any form of Amazon fulfillment working through magento though. I've tried the plugin by WebTex which gives no logs, no feedback, has no documentation and is just not helping. It has set all my products quantity to 0 after I assume not being bale to connect, find the products ro get the quantity.

I installed M2EPro and have tried to get this working but when I go to Manage listings and 3'rd party listings I get a error no the page. I assume I need to make a 3'rd party listings to bring down the Amazon quantities (The Amazon side is now taking ales so has updated quantities.)

I've looked at some other plugins but they all seem to have just as useless documentation, no instructions and I can't see them working.

I've picked this project up off another developer and am now way past the deadline so even though I know this isn't a usual Stack exchange question I'll ask anyway.

How at this point in time can I get quantities of products synchronizing from Amazon to Magento, use Amazon fulfillment and update Amazon when Magento makes sales? I'm 3 plugins down and at my wits end.


texts:
I want to create a grid to display hours from a collection.
So I add the date column like this:

    $this->addColumn ( 'date_birthday', array (
            'header' => 'Date of birthday',
            'align' => 'right',
            'width' => '100px',
            'type' => 'datetime'
            'index' => 'mydate'
    ) );

In my collection there is: (it's simplified)

1  2017-11-08 18:00:00
2  2011-11-08 12:00:00
3  3017-11-08 10:00:00

The grid displayed is:

1  2017-11-08 19:00:00
2  2011-11-08 13:00:00
3  3017-11-08 11:00:00

With the 'datetime' attributes you can see that all my hours displayed have 1 hour more than the collection.
And without this attributes hours are displayed properly.

Any idea ?
Thanks !

EDIT: I try that but it doesn't works

        $this->addColumn ( 'date_birthday', array (
            'header' => 'Date of birthday',
            'align' => 'right',
            'width' => '100px',
            'time' => 'true',
            'type' => 'datetime',
            'format' => Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM),
            'index' => 'mydate'
    ) );


texts: Live site blank in frontend or keep on loading and never load

texts:
I am facing Strangest Problem ever in magento. we are using 1.9.0 version.

from last 2 months, our live site is "blank" or "keep on loading" for used browsers. Means in this browser we visited the site lot of times.

in some browsers, its working fine. in some showing blank.

but backend is working fine in all browsers.

we are facing problem in chrome, mozilla , opera and all other browsers.

1)If we clear the browser history[cache and cookies], than its working.

2)If we open the same site in private window , its working.

3)If we open the site in freshly installed browsers, its working for some time. again blank after we used the site.

4)If we clear the var/session folder, than it will start to work for all browsers for some time. again site blank.

5)sometimes, site will be keep on loading and it will never load....

I checked system.log & exception.log . but seems there are no errors related to this. we are using https for secure pages. even we have live Andriod app for this site. sometimes we will get Fatal errors  :

**Fatal error**: Allowed memory size of 536870912 bytes exhausted (tried to allocate 85 bytes) in /lib/Zend/Db/Statement/Pdo.php or lib/Varien/Object.php or /lib/Varien/Db/Select.php or app/code/core/Mage/Core/Model/Config.php

we set memory_limit = 1512 Mb in php.ini

in .htaccess we have following files.

php_value memory_limit 1512M
php_value max_execution_time 18000

we uncommented this :

ini_set('display_errors', 1);

but no error displaying in frontend. This is apache error log :

child pid 23845 exit signal Segmentation fault (11), possible coredump in /etc/apache2

Really struggling to solve this problem. Is this problem related to our code or is this problem related to server side ?

is browser cookie is the main problem ? If so what need to do to solve this cookie problem for all browsers. why its started working once we clear session folder?

we face these issues when browsing our site.


texts: Magento 2 eWay Payment Gateway Error - A server error stopped your order from being placed. Please try to place your order again

texts:
Eway payment getting an error A server error stopped your order from being placed. Please try to place your order again

Note : Amount received in eWAY payment gateway, but order not created in magento2.
ewayrapid_debug.log : https://justpaste.it/8qla2


texts:
i'm new with magento, but i need help with API rewrite.
I've added some methods up to Catalog_Product_Api_V2 which are working well.
I can also call them with SOAPv2.
Now i want to add product attributes product "catalogProductAttributeCreate(...)" but now  i'm getting this error message:
Fatal error: Uncaught SoapFault exception: [3] Invalid api path. ...

Here's my SOAPv2 Call:

$data = array(
    "attribute_code" => "test_attribute",
    "frontend_input" => "text",
    "scope" => "1",
    "default_value" => "1",
    "is_unique" => 0,
    "is_required" => 0,
    "apply_to" => array("simple"),
    "is_configurable" => 0,
    "is_searchable" => 0,
    "is_visible_in_advanced_search" => 0,
    "is_comparable" => 0,
    "is_used_for_promo_rules" => 0,
    "is_visible_on_front" => 0,
    "used_in_product_listing" => 0,
    "additional_fields" => array(),
    "frontend_label" => array(array("store_id" => "0", "label" => "some label"))
   );

   $result10 = $client->catalogProductAttributeCreate($session, $data);

Here's my config.xml

<catalog>
    <rewrite>
        <product_api_v2>MyCompany_MyModule_Model_Catalog_Product_Api_V2</product_api_v2>
    </rewrite>
</catalog>

Do I overwrite all the standard methods like "create, update, info, etc."?
Please help me... :)


texts:
I am trying to get orders for a specific customer through API:

GET on      https://domain.com/index.php/rest/V1/orders

and header parameter is

Authorization Bearer x1v9pvmag5rvkb0vgekpdtwri6ak1pxh

but also get error

{"message":"Consumer is not authorized to access %resources","parameters":{"resources":"Magento_Sales::sales"}}

Please help.


texts: Unable to find Magento Connect Manager in magento ver 2.0.2

texts: This is system tab of my magento admin panel where connect manager should be, but it is not there:


texts: M2: Can't decrease qty in cart: Attention The requested qty is not available

texts:
I have Magento 2.3.5 installed. Let's say we have 3 of Product A in stock and I add 5 of them to cart. It shows a notification at the cart saying: The requested qty is not available. That is fine and correct.
Then I try to decrease the qty at the cart by setting the qty to 3 and press update button. The update does not work and it throws this dialog: Attention The requested qty is not available. So it seems impossible to change the qty smaller in cart.
Currently only solution is to remove product from cart and re-add it with qty 3 to cart at the product page.
Is there way to fix this so that it is possible to update cart with smaller qty?


texts:
{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento configuration.

I got this error in Magento admin.

what does it mean?