texts: How to add product list on left side and checkout summary right sidebar in custom page

texts: I want to create a custom page in my custom module which is having product listing on main container and Order summary panel (just like checkout page) as right sidebar so that user can add product and see the result on cart sidebar.


texts:
For alignment purposes, I'd like to insert price into a table. My other attributes are showing within the table but price goes out completely even though the code is within the table.

Code

<?php echo $this->__('MSRP: ') ?>
<?php echo mage::helper('core')->currency($_product->getMsrp(),true,false); ?>

<?php echo $this->__('Price: ') ?>
<?php echo $this->getTierPriceHtml() ?>

How can price be displayed in a table?


texts:
My site is not working even, My admin also.
I HAVE TRIED getversion() method in app/mage.php
but still, I am not able to get the version of Magento.

Can anyone suggest me, please?


texts: Object DOM Document should be created. Magento 2

texts:
I'm trying to login in Magento 2 Admin Panel when I try to login to Admin Panel firstly the login page comes perfectly like

but after when I logged In it gives me an error

  Exception #0 (Magento\Framework\Exception\LocalizedException): Object DOMDocument should be created.

you can also see the error in the image below

now what is the problem n how can I solve this? Thanks


texts: Create uncollected invoices (customers have 30 days to pay) in Magento 2.3.1

texts: When I create an order manually for a customer who places his order over the phone, I need to create his PDF invoice in order to send it. But when I do this, the invoice is created already paid, but I need to create invoices for PDF orders and they are not paid because customers have 30 days to pay it. How can I do this? Any ideas?


texts: Magento 2 with Varnish sometimes does not redirect HTTP to HTTPS

texts:
Our Magento 2 is setup with https on all pages (unsecure and secure, "use secure on frontend", etc.).

However sometimes when I enter ourdomain.com it redirects (correctly) to https and sometimes it remains http

How can I force that every single time ourdomain.com will redirect to https?

This is very important for SEO (otherwise Google will think they are two separate pages - http://ourdomain.com and https://ourdomain.com - and will think it is duplicate content).

I have tried flushing and cleaning the cache. I have reindexed.

I have even tested this with 301 redirect programs and they do not register a redirect from http to https (they just show 200 OK for http).

I am using Magento 2.2.5. Varnish is enabled and Pound gets the https pages (ssl termination; via.

Please help


texts: Set two fields in one row in admin form magento2

texts:
I have created a custom form in magento2 admin via below code and it's working fine, but my form is too long, so I want to set two or more fields in one row And can divide fields in multiple tabs, Just like in Product edit form in admin.
Here is my code-

   protected function _prepareForm()
{
    $model = $this->_coreRegistry->registry('booking_address');

    $form = $this->_formFactory->create(
        ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]
    );

    $form->setHtmlIdPrefix('address_');

    $fieldset = $form->addFieldset(
        'base_fieldset',
        ['legend' => __('General Information'), 'class' => 'fieldset-wide']
    );

    if ($model->getId()) {
        $fieldset->addField('address_id', 'hidden', ['name' => 'address_id']);
    }

    $fieldset->addField(
        'plz',
        'text',
        ['name' => 'plz', 'label' => __('PLZ'), 'title' => __('PLZ'), 'required' => true]
    );

    $fieldset->addField(
        'street',
        'text',
        ['name' => 'street', 'label' => __('Street'), 'title' => __('Street'), 'required' => true]
    );

    $fieldset->addField(
        'latitude',
        'text',
        ['name' => 'latitude', 'label' => __('Latitude'), 'title' => __('Latitude'), 'required' => true]
    );

    $fieldset->addField(
        'longitude',
        'text',
        ['name' => 'longitude', 'label' => __('Longitude'), 'title' => __('Longitude'), 'required' => true]
    );

    $fieldset->addField(
        'code',
        'text',
        ['name' => 'code', 'label' => __('Code'), 'title' => __('Code'), 'required' => false]
    );
    //=START=========Want to show these fields in new tab and two in each row==============

    $fieldset->addField(
        'sunday',
        'multiselect',
        ['name' => 'sunday', 'label' => __('Sunday'), 'values' => $this->getLocationTimes()]
    );
    $model->setData('sunday', $sunday);
    $fieldset->addField(
        'monday',
        'multiselect',
        ['name' => 'monday', 'label' => __('Monday'), 'values' => $this->getLocationTimes()]
    );
    $model->setData('monday', $monday);
    $fieldset->addField(
        'tuesday',
        'multiselect',
        ['name' => 'tuesday', 'label' => __('Tuesday'), 'values' => $this->getLocationTimes()]
    );
    $model->setData('tuesday', $tuesday);
    $fieldset->addField(
        'wednesday',
        'multiselect',
        ['name' => 'wednesday', 'label' => __('Wednesday'), 'values' => $this->getLocationTimes()]
    );
    $model->setData('wednesday', $wednesday);
    $fieldset->addField(
        'thrusday',
        'multiselect',
        ['name' => 'thrusday', 'label' => __('Thrusday'), 'values' => $this->getLocationTimes()]
    );
    $model->setData('thrusday', $thrusday);
    $fieldset->addField(
        'friday',
        'multiselect',
        ['name' => 'friday', 'label' => __('Friday'), 'values' => $this->getLocationTimes()]
    );
    $model->setData('friday', $friday);
    $fieldset->addField(
        'saturday',
        'multiselect',
        ['name' => 'saturday', 'label' => __('Saturday'), 'values' => $this->getLocationTimes()]
    );
    $model->setData('saturday', $saturday);

    //==END========Want to show these fields in new tab and two in each row==============

    $form->setValues($model->getData());
    $form->setUseContainer(true);
    $this->setForm($form);

    return parent::_prepareForm();
}

Please let me know how I can do this.

Thanks


texts: Create a new referenceContainer for specific CMS page in Magento 2

texts: How would you create a new referenceContainer in Magento 2 on home page only?


texts: Magento2: Show price on bundle option summary

texts: I want to show selected bundle options price in the summary block at right. By default, it only shows the selected option from the bundle product. Thanks.


texts: Is it possible to change/replace the custom function argument in magento 2

texts:
I just want to change/replace the custom function arguments, not constructor arguments.

This is third party module function, which have wrong argument.

public function addAttachment(\Fooman\EmailAttachments\Model\Api\AttachmentInterface $attachment)
{
    $this->message->createAttachment(
        $attachment->getContent(),
        $attachment->getMimeType(),
        $attachment->getDisposition(),
        $attachment->getEncoding(),
        $this->encodedFileName($attachment->getFilename())
    );
}

I want to replace argument from

  \Fooman\EmailAttachments\Model\Api\AttachmentInterface $attachment

to

  \VladimirPopov\WebForms\Model\Api\AttachmentInterface $attachment

Now, function looks like below:

public function addAttachment(\VladimirPopov\WebForms\Model\Api\AttachmentInterface $attachment)
{
    $this->message->createAttachment(
        $attachment->getContent(),
        $attachment->getMimeType(),
        $attachment->getDisposition(),
        $attachment->getEncoding(),
        $this->encodedFileName($attachment->getFilename())
    );
}

I have tried to overwrite this function by preference through the di.xml, But it's generating below error:

  [Exception]
  Warning: Declaration of Vendor\Modulename\Model\Preference\Mail\Transp
  ortBuilder::addAttachment(VladimirPopov\WebForms\Model\Api\AttachmentInterf
  ace $attachment) should be compatible with VladimirPopov\WebForms\Model\Mai
  l\TransportBuilder::addAttachment(Fooman\EmailAttachments\Model\Api\Attachm
  entInterface $attachment) in
  app/code/Vendor/Modulename/Model/Preference/Mail/TransportBuilder.php
  on line 28

I have taken help from this article : https://alanstorm.com/magento_2_object_manager_argument_replacement/
But, here i got about only to change constructor arguments.

I don't know, is it possible for not? Please suggest.


texts: Magento2.3.1: Website is not opening in chrome browser but opening in Mozilla

texts:
I am working on https://www.depoto.com/.

Suddenly, The website is not opening. I can see that The website is opening in another browser like Mozilla. I am trying to open in Google Chrome.


texts: Restrict double click on delete in minicart in magento 2

texts:
In minicart of magento 2, when click on delete icon, confirm popup is open. after confirm, it take sometime time to delete. till the time we are able to click multiple time. and popup will come multiple time.

How to stop multiple time click on delete button?

 events['click ' + this.options.button.remove] =  function (event) {
             event.stopPropagation();
            confirm({

                content: self.options.confirmMessage,
                actions: {
                    /** @inheritdoc */
                    confirm: function () {
                        self._removeItem($(event.currentTarget));
                        location.reload();

                    },

                    /** @inheritdoc */
                    always: function (e) {
                        e.stopImmediatePropagation();
                    }
                }
            });


texts: Magento 2 Checkout Page, different price setup

texts:
Currently I'm on a magento project and somehow, I can't understand the logic behind this last page.

The Currency that I've got is EURO, and in the /vendor/magento/zendframework1/library/Zend/Locale/Data/pt_PT.xml says that the numbers are grouped by "." and decimal cases by ",".

The screenshot below shows on the right side, how its supposed to be. However, the left side is on a completly different pattern and I can't seem to find where to make this change.


texts: is Admin Panel is a module like others in magento?

texts:
We can see that adminhtml is in core codepool like any other core modules.

So is it possible to disable this module like others?

But there is no options at:

system > configuration > advanced > Disable Modules Output

and also no xml file in app/etc/modules.


texts:
how can I open a PDF directly within Chrome, without having the "save as" option. Currently, my links with target="_self" still get opened as "save as".

Any tips? Thanks!


texts: How can I realize following custom option constellation?

texts:
At the moment I'm creating all my products over custom options.

Let's say I got 2 main - custom options for my product(Choose between standard model and custom model):

A - standard (colour, length.. is already configured)

B - custom -> The customer can decide which colour and length he wants to have.

So If customer picks option A - he doesn't need to care about the other option and if he picks option B he doesn't need to care about A. The point is, that B needs "Required Fields" so he must always check option B wherever he wants it or not. Of course you could just set the fields to non-required but that's not the way I want to go. Maybe he can get the choice to choose between those first main options first before he(if he chooses B) can chooses the custom option. And yes I could also create two products but that's not what I want.


texts: Log User in programatically for Magento 2 (via Contoller)

texts:
I have a process in Magento 1 to log user in using the below;

$session = Mage::getSingleton('customer/session');

$email = $this->getRequest()->getParam('email');
$password = $this->getRequest()->getParam('password');

//log user in
$session->login($email, $password);

//then check session/is logged in
if (Mage::getSingleton('customer/session')->isLoggedIn()) {

  //successfully logged in user

}

I wish to process the same in Magento 2, but unsure if $session->login() can be executed or is there another function in:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->get('Magento\Customer\Model\Session');

//or Magento equivalent for below;
$session = Mage::getSingleton('customer/session');


texts: Add required Checkbox for Newsletter subscription form

texts:
Is there a way to add a required checkbox to the newsletter subscription form?
The idea is to make the user agree to the privacy policy before subscribing for the Newsletter.


texts: How to set the value of checkbox in gift_message to the database

texts:
I have added a custom checkbox to my magneto cart page for gift message. I want to add value 1 to the gift_message table's "remove_tag" column (which i added) if the checkbox is checked.

How can i achieve it?

Which all files need to be changed?

Any help will be appreciated.

Below is the screenshot of that custom checkbox which i added.


texts: Magento2.3: How to add additional fields in My Account page?

texts:
I need to add additional fields in the Account information section on My Account page.

In order to do that, where I have to add the code?

Any help will be appreciated!


texts:
I'm using the webapi with a service controller to load some product attributes and replace them on the product detail page.

Now I need a whole block also.
So far, I didn't face any problem. I fetched Result LayoutFactory and added a handle "catalog_product_view" and after that I just used

$resultLayout->getLayout()
        ->getBlock('my_product_attachments')
        ->getAttachments();

But then Magento told me that there are no blocks.

Isn't it possible to get the block content while I'm inside a service controller ?


texts: Is it possible to sort Email order confirmation by SKU

texts:
My website is on MAGENTO 2
Any time that a customer send an order I received an email confirmation with SKU, DESCRIPTION, PRICE.

But I need that this email report is sorted by SKU. is it possible?
is it also possible to put VAT NUMBER OF CUSTOMER in this email?

thanks.
TEOS


texts: Magento 2: Add 2 JS files in that depend on each other in checkout page

texts:
I tried to add 2 js files in checkout page using require-config.js from a custom extension like this:

app/code/Vendor/Module/view/frontend/requirejs-config.js

var config = {
    "map": {
        "*": {
            'GAP': 'Vendor_Module/js/gap',
            'GAP-PICKER': 'Vendor_Module/js/gap-picker-min'
        }
    }
};

The gap.js and gap-picker-min.js are located under app/code/Vendor/Module/view/frontend/web/js, the gap-picker-min.js will be depended on gap.js , but when i tried to call the GAP function like this:

define([
    'jquery',
    'GAP',
    'ko',
    'Magento_Ui/js/form/element/abstract',
    'Magento_Checkout/js/model/quote',
    'Magento_Checkout/js/model/shipping-service',
    'Magento_Checkout/js/model/shipping-rate-registry',
    'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
    'Magento_Checkout/js/model/shipping-rate-processor/new-address',
    'GAP-PICKER'
], function ($,GAP, ko, Component, quote, shippingService, rateRegistry, customerAddressProcessor, newAddressProcessor) {
    'use strict';
    return Component.extend({
        initialize: function () {
          console.log(GAP);

it shows undefined


texts:
we enabled compiler in backend. If you set to enabled then the file /includes/config.php changes to

define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
#define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');

Now I see some posts also about uncommeting the second line
http://www.expertwebadvisor.com/manually-enable-disabled-the-compiler-in-magento/

question: but what does COMPILER_COLLECT_PATH do? and why is it not uncommented when I enable compile?

Many thanks


texts: Magento 2.3.2 Failed to load the "Magento_Checkout/js/view/billing-address/list" component

texts:
I am using one-step checkout and getting an error in checkout console. and also page redirects to /noroute/ 404 page.

  [ERROR] Failed to load the "Magento_Checkout/js/view/billing-address/list" component.

I have checked in Magento 2.3.2 release note and see there is a change in the checkout, so I think it showing an error because of this.

so I just want to know how to resolve error Failed to load component

Any help would be appreciated! Thanks.


texts: How to get the number of times a product has been ordered

texts:
I need the number of orders made by each product.

I have the object

\Magento\Catalog\Model\Product

With that object I can retrieve the Id, price, name, etc. But no idea how to get the number of orders made. Don't see any method to achieve that. There are getQty() that I really don't know what retrieves. it's always null.

I only have the alternative to search the object "sells" or something like that,  loop it and retrieve all sells made with that product. but c'mon, I think it has to be an easier way.


texts: Magento 2 : Add new Product attribute options

texts:
I have added a product attribute programmatically.
so in store->product->attribute it shows option values readonly.
Is it possible to add new option from admin side ?

Ex.

because it is system generated attribute ('user_defined' => false) it doesn't show 'Add' button.

so how can I add more option or new option. (not programmatically)
Thanks in Advance !!


texts: Magento2: How to display total sold qty under product name

texts:
I wanted to display under the product name on list.phtml:

Total Purchased: 25 people

but on product page I need display:

96 people bought total 115 pieces

Anyone have any idea?


texts: How to send new order emails through SMTP Pro using Observer

texts:
I'm running Magento 1.9.2.4 and it's not sending new order emails if I choose a certain payment method.

I know the error is in the payment method because cron jobs are running and every other payment method sends their new order email. I'm using SMTP Pro (aschroder).

This faulty payment method let's me choose the order state after the payment is accepted.

I'd like to use an Observer to send new order emails, and triggers when a certain state is chosen for an order.

There are several guides out there explaining how to set an observer, but I'd like to know how can I call SMTP Pro to send the email.


texts: Magento2 - Messed up file permissions. Any way to reset?

texts:
I accidentally run some magento's command as root user and some directories and files have messed up permissions.

Is there any way to reset the permissions because currently I'm getting errors such as:

  UnexpectedValueException: The stream or file
  "/var/www/shop//var/log/system.log" could not be opened: failed to
  open stream: Permission denied in
  /var/www/shop/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:108
  Stack trace: #0


texts: Modify dynamically created product url in magento 2

texts:
I have enabled "Use Categories Path for Product URLs". Because of this, I get category path in product url. But when we search the product, it redirect to the product url that does not contain category path.

I want same url always whether from catalog page or from search.

Please tell me how to achieve this. I am going to have single category for single product always.

Thanks !


texts: How to make everything to start from Right to left (RTL) in magento 2?

texts: If i want to make Arabian site how to change the direction from right to left (RTL).For example Luma logo everything should start from right to left.


texts: Magento2: Custom comapre button functionality

texts:
How to add custom compare button with check-box. The page should be not refreshing.

Please check below screenshot

My Magento v2.0.17


texts: Magento 2 : getCustomAttribute() returning Object insted of Value

texts:
I am using customer repository interface, to fetch some values, of the customer.

I have added a custom attribute "Authnet_Account_Number".

I am trying to fetch the value of it by,

$customer = $this->_customerRepository->getById($customerId);
$authnetAccountNumber = $customer->getCustomAttribute("authnet_account_number");

But when I print $authnetAccountNumber,

it is showing value "object"


texts: Trying to obtain the "real" value (not the id) MAGENTO database -sql

texts:
I dont know why i am not getting what i want after executing my query
  AND i was not able to find an attribute.

Let me explain everything:

First off, i wanted to get all the products that had these attributes:

SKU, code_brand, code_business_unit, code_line, code_group, code_business and min_sale_qty

This is my query:

SELECT main.entity_id,main.sku,code_brand.value AS code_brand, code_business_unit.value AS code_business_unit, code_line.value AS code_line, code_group.value AS code_group, code_business.value AS code_business

FROM catalog_product_entity AS main

LEFT JOIN catalog_product_entity_int AS code_brand
ON main.entity_id = code_brand.entity_id
LEFT JOIN catalog_product_entity_varchar AS code_business_unit
ON main.entity_id = code_business_unit.entity_id
LEFT JOIN catalog_product_entity_varchar AS code_line
ON main.entity_id = code_line.entity_id
LEFT JOIN catalog_product_entity_int AS code_group
ON main.entity_id = code_group.entity_id
LEFT JOIN catalog_product_entity_int AS code_business
ON main.entity_id = code_business.entity_id

WHERE code_brand.attribute_id = (
    SELECT attribute_id
    FROM eav_attribute
    WHERE attribute_code LIKE 'code_brand'
    AND `entity_type_id` = (
        SELECT entity_type_id
        FROM eav_entity_type
        WHERE entity_type_code = 'catalog_product'
    )
)
AND code_business_unit.attribute_id = (
    SELECT attribute_id
    FROM eav_attribute
    WHERE attribute_code LIKE 'code_business_unit'
    AND `entity_type_id` = (
        SELECT entity_type_id
        FROM eav_entity_type
        WHERE entity_type_code = 'catalog_product'
    )
)
AND code_line.attribute_id = (
    SELECT attribute_id
    FROM eav_attribute
    WHERE attribute_code LIKE 'code_line'
    AND `entity_type_id` = (
        SELECT entity_type_id
        FROM eav_entity_type
        WHERE entity_type_code = 'catalog_product'
    )
)
AND code_group.attribute_id = (
    SELECT attribute_id
    FROM eav_attribute
    WHERE attribute_code LIKE 'code_group'
    AND `entity_type_id` = (
        SELECT entity_type_id
        FROM eav_entity_type
        WHERE entity_type_code = 'catalog_product'
    )
)
AND code_business.attribute_id = (
    SELECT attribute_id
    FROM eav_attribute
    WHERE attribute_code LIKE 'code_business'
    AND `entity_type_id` = (
        SELECT entity_type_id
        FROM eav_entity_type
        WHERE entity_type_code = 'catalog_product'
    )
)

It works but i am not getting the correct results, take a look at this picture:

Why, what is going on?

Also, i was not able to find this attribute: min_sale_qty

After executing this query i got no results:

select
backend_type from eav_attribute
where attribute_code like "min_sale_qty"

I found this attribute in this table:

This is the database diagram:


texts: Bestselling Product link in Magento 2.2.0

texts:
I have successfully listed the best selling products, but how should I give it a link to open the same product in the product detail page whenever we click on it. The same product should open at the detail page which is clicked. Below is my code..

<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $objectManager->create('Magento\Reports\Model\ResourceModel\Report\Collection\Factory');
$collection = $productCollection->create('Magento\Sales\Model\ResourceModel\Report\Bestsellers\Collection');
$conf = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface')->getValue("web/unsecure/base_url");
// echo $conf;

$collection->setPeriod('month');
//$collection->setPeriod('year');
//$collection->setPeriod('day');
foreach ($collection as $item) { ?>

<?php $productId = $item->getProductId(); //Product Id

            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $product = $objectManager->create('Magento\Catalog\Model\Product')->load($productId);
            $image = $conf."pub/media/catalog/product/".$product->getImage();
            echo "" ?>

<?php echo $item->getProductName(); ?>

<?php echo $item->getProductPrice(); ?>

<?php }

?>


texts:
I have applied this tag in my layout.xml to no index layered nav ( i have an ajax layered nav and also ive added rel=nofollow in the filter.phtml but i want to be sure)

Path- /app/design/frontend/mytheme/default/layout

 <layout>
<catalog_category_layered>
<reference name="head">
<action method="setRobots"><meta>NOINDEX,FOLLOW</meta></action>
</reference>
</catalog_category_layered>

<catalog_category_layered_nochildren>
<reference name="head">
<action method="setRobots"><meta>NOINDEX,FOLLOW</meta></action>
</reference>
</catalog_category_layered_nochildren>

    </layout>

Thanks


texts:
I am using "Argento" theme which is using tm navigation pro extension to display top navigation. I used the following script for top navigtion.

<script type="text/javascript">

document.observe("dom:loaded", function() {
    navPro("navigationpro-top", {
        show_delay: 100,
        hide_delay: 100,
        dropdown_side: "right"
    });
});
new accordion('navigationpro-top');
</script>

<script type="text/javascript">

document.observe('dom:loaded', function() {
    $('nav-top-toggle').observe('click', function() {
        $('nav-top-toggle').next().toggleClassName('shown');
    });
    new MobileNavigation();

    $('mobile-navigation-toggle').observe('click', function() {
        $('nav-top-toggle').next().toggleClassName('shown');
    });

});
</script>

The problem is if i click the mobile togglers it only shows main menu only. I couldn't track what i am missing. How to fix this?


texts: DB user requires SUPER privilege to create attributes (SQLSTATE[42000])

texts:
When I try to create an attribute for this one EE 1.13.1.0 installation, it gives me the following error. myuser is the MySQL user for the Magento installation with table, mytable.

SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need the SUPER privilege for this operation

This user has the following GRANTS just like any other MySQL users for different development instances I have.

GRANT ALL PRIVILEGES ON `mytable`.* TO 'myuser'@'192.%'

I can create products and anything else, but I just can't create attributes. If I set Super_priv to Y then FLUSH PRIVILEGES, the user can perform attribute creation, but none of the other users I have set up for different instances require Super_priv to be Y.

What's going on?


texts: Special Price showing at a value of 35 lower in front-end

texts: I am experiencing a strange glitch with low value products. If the difference between the price and the special price is below £35, the special price is showing as £0. If I change the price to more than £35 difference everything resorts to normal. I've uploaded via magmi and via the magento product backend but the issue occurs either way, which makes me think something has gone awry with a config setting somewhere. Anyone ever had any experience of this or have any idea what might be causing it?


texts: Hide Accound Dashboard Link depending upon customer group

texts: I have added two links to customer dashboard "Proposals" and "Documentaion". I have also added a customer group "xyz". I want to only show the mentioned group.  Similarly, I want to hide these two links for other groups.


texts: Magento-2 How to fix 'echo' error in magento Marketplace technical review report?

texts:
I use echo in the class file in my extension.

Magento marketplace not allow echo/print_r/eval().

How to solve this problem ?


texts: Problems While Creating Product Attribute With InstallData

texts:
I've created InstallData for creating product attribute with default options to be set yes like,

used_in_product_listing  and is_used_for_promo_rules

Probelm is only used_in_product_listing is setting up to Yes while execute InstallData not for Promo Code Rule.

$eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY, 'brands', [
            'type' => 'text',
            'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
            'frontend' => '',
            'label' => 'Brands',
            'input' => 'select',
            'group' => 'General',
            'class' => 'brands',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'visible' =>    true,
            'required' => false,
            'user_defined' => true,
            'default' => '1',
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'is_used_for_promo_rules' => true,
            'used_in_product_listing' => true,
            'unique' => false
                ]
    );

Can anyone guide me regarding this ?


texts: Ajax loader image is not displaying in ajax call in Magento2

texts:
I try to to call ajax call its working fine but loader image is not displaying at the time of loading

below is a code when you change country it will call ajax call and load region

<script type="text/javascript">
                require([
                'jquery',
                'mage/template',
                'jquery/ui',
                'mage/translate'
            ],
            function($, mageTemplate) {
               $('#edit_form').on('change', '#country_id', function(event){
                    $.ajax({
                           url : '". $this->getUrl('test/*/regionlist') . "country/' +  $('#country_id').val(),
                           type: 'get',
                        dataType: 'json',
                           success: function(data){
                                $('#region_id').empty();
                                $('#region_id').append(data.htmlconent);
                           }
                        });
               })
            }

        );
        </script>

and controller file is
app\code\Sugarcode\Test\Controller\Adminhtml\Lists\Regionlist.php

<?php
/**
 *
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

namespace Sugarcode\Test\Controller\Adminhtml\Lists;

/**
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class Regionlist extends \Magento\Framework\App\Action\Action
{
            /**
         * @var \Magento\Framework\View\Result\PageFactory
         */
        protected $resultPageFactory;
    /**
     * @var \Magento\Directory\Model\CountryFactory
     */
    protected $_countryFactory;

        /**
         * @param \Magento\Framework\App\Action\Context $context
         * @param \Magento\Framework\View\Result\PageFactory resultPageFactory
         */
        public function __construct(
            \Magento\Framework\App\Action\Context $context,
            \Magento\Directory\Model\CountryFactory $countryFactory,
            \Magento\Framework\View\Result\PageFactory $resultPageFactory
        )
        {
            $this->_countryFactory = $countryFactory;
            $this->resultPageFactory = $resultPageFactory;
            parent::__construct($context);
        }
    /**
     * Default customer account page
     *
     * @return void
     */
    public function execute()
    {

        $countrycode = $this->getRequest()->getParam('country');
        $state = "<option value=''>--Please Select--</option>";
        if ($countrycode != '') {
            $statearray =$this->_countryFactory->create()->setId(
                    $countrycode
                )->getLoadedRegionCollection()->toOptionArray();
            foreach ($statearray as $_state) {
                if($_state['value']){
                    $state .= "<option >" . $_state['label'] . "</option>";
            }
           }
        }
       $result['htmlconent']=$state;
         $this->getResponse()->representJson(
            $this->_objectManager->get('Magento\Framework\Json\Helper\Data')->jsonEncode($result)
        );
    }

  }

can any one help me ! :-)


texts: How to implement a Gift Wrap option on shopping cart page

texts:
I have to implement a 'Gift Wrap Order' at shopping cart page.

Calculation

If the sub-total is less than $50 it will charge a $5 for wrap.
and if the sub-total is $50 or higher 'Gift Wrap' is free of charge.

Requirement

This option is available on shopping cart page.
Above calculation is for order subtotal.
No special wrapping paper selection needed just this check box.
If this option is enabled by the customer, it should notify with the order.

Can these requirements implement? If so can you suggest or guide me how to do it?


texts:
I have been using magento 1.9.0.1 and when I click on the  "Show/Hide Editor" button in CMS Pages it does nothing and showing up with blank white screen.

Please assist me to fix this issue.

Thank you


texts:
I am trying to Implement same thing Magento is doing when we run web installer wizard.

  Magento is creating sample data (Attributes, Products, Categories)
  using Setup\SampleData\InstallerInterface class.

I've tried same thing for creating atrtibute.

But I failed I did same thing as core code.

Created CSV and setup script as They did.

But seems to be not working for me.

I checked on internet i can't find any topic related to Setup\SampleData\InstallerInterface

Hope any Mage Master will respond me here.

PS: I'm doing this because I'm failing to create Product attribute with some default options as I mentioned here.

Thanks in Advance.


texts: How to display MSRP / RRP on product page

texts:
I'm looking to display the value I have set in "Manufacturer's Suggested Retail Price" on the product page.

I was hoping it was going to be as simple case of adding something like the following to view.phtml, unfortunately it doesn't seem to be.

<?php echo $this->getMSRPPriceHtml($_product); ?>


texts: Magento bms/erp migration from 1.9.3.2 to 2.3.4

texts:
I am doing the bms/erp migration from 1.9.3.2  to 2.3.4 and created a custom map xml for that but getting this error while migrating data:
[Exception]
Notice: Undefined offset: 146 in /var/www/html/magento/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 817.


texts:
Currently, I am using ajax to add an coupon to the cart.  This requires a success/error message to display to the user.  However, it seems that i'm unable to retrieve this error/success message without a redirect (something ajax does away with) and the message itself is always displayed on the next pageview.

Is there an easy way to work around this?

The message is set using this in the observer:

Mage::getSingleton('core/session')->setCouponCodeError($error);

This doesn't seem to work in the controller (after the event has been dispatched):

$message = Mage::getSingleton('core/session')->getCouponCodeError();


texts: I want to remove tax rate shows in Order Invoice magento2

texts: I don't want to show the tax rate showing on the invoice of order how can I remove that anyone has an idea?


texts: Magento 2 getMediaGalleryImages() return null

texts:
I am writing an import product job on Magento 2. I want to delete all product images if I need to update the product. I try to use $product->getMediaGalleryImages() to get all the images from the product but it returns null after running. I ensure that the product has an image. Follows is the code I tried.

$product = $objectManager->create('\Magento\Catalog\Model\Product');
$product = $product->getCollection()->addFieldToSelect("*")->addAttributeToFilter('sku', 'sku-01')->getFirstItem();
$images = $product->getMediaGalleryImages(); // it return null

And follows is the code to upload product image.

$product->setMediaGallery(array('images' => array(), 'values' => array()))
                            ->addImageToMediaGallery($image_directory, array('image', 'thumbnail', 'small_image'), false, false);


texts: What do I do when an extension overwrites a class globally and I want to use the original?

texts:
We're using an extension which globally overwrites the Mage_Catalog_Block_Product_List_Toolbar block.

<global>
    <blocks>
        <catalog>
            <rewrite>
                <product_list_toolbar>Amasty_Shopby_Block_Catalog_Product_List_Toolbar</product_list_toolbar>
            </rewrite>
        </catalog>
    </blocks>
</global>

While the extension works in the context of a layered navigation category, the rewritten class doesn't work properly when we insert an arbitrary product list into another (custom) view in our own in-house module. If we take out the extension overwrite just for testing purposes, everything works fine.

How can we undo an extension's rewrite just for our own controller, without editing the extension developer's community code?


texts: Get all attributes under default attributes set with their groups in Magento

texts:
I want to fetch all attributes under default attribute set with their groups in magento. I used below code for fetching the attributes but how can i split with their Groups.

$attributes = Mage::getModel('catalog/product_attribute_api')->items('4');
foreach ($attributes as $_attribute)
{
    echo '<pre>' . print_r($_attribute);
}

Thanks in advance!.


texts: Magento 2 MTF: Several test methods in one Class

texts:
I used Magento 1 testing framework. It was outdated because of using Selenium RC instead of Webdriver, but it had one very useful feature - you could place as many test methods in class (TestCase) as you wished.

In Magento 2 I see that structure is the following that one TestCase class contains only 1 test method.

Is there any posibility to put several test methods in one class?


texts:
I am trying to install Magento 2 on my localhost. I can access magento 1.9 files but magento 2 folder is not shown under /localhost.

When I type localhost/magento-2.3 to URL it says A "50X error occurred - Sorry, the page you are looking for is currently unavailable. Please try again later." How to fix this?


texts: How to correctly setup Varnish cache on Magento 2.3 with SSL?

texts:
I am trying to configure Varnish cache on Magento 2.3 with SSL termination, but no luck so far.

Here is my configuration:

/etc/apache2/ports.conf

Listen 8080

<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

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

<VirtualHost *:8080>

/etc/apache2/sites-available/magento2.conf

<VirtualHost *:8080>
     ServerAdmin contact@website.com
     DocumentRoot /var/www/html/magento2/
     ServerName website.com
     ServerAlias www.website.com

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

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:443>
        ServerName website.com
        ServerAlias www.website.com
        DocumentRoot /var/www/html/magento2/

        ProxyPreserveHost on
        ProxyPass / http://127.0.0.1:8080/
        RequestHeader set X-Forwarded-Port "443"
        RequestHeader set X-Forwarded-Proto "https"

        SSLEngine On
        SSLCertificateFile /etc/ssl/certs/website.com.crt
        SSLCertificateKeyFile /etc/ssl/private/website.com.key
        SSLCertificateChainFile /etc/ssl/website.com.ca-bundle
        <Directory /var/www/html/magento2/>
                Options Indexes FollowSymLinks MultiViews
                Order allow,deny
                AllowOverride All
        </Directory>
</VirtualHost>

/etc/varnish/default.vcl

backend default {
    .host = "52.56.108.15";
    .port = "8080";
    .first_byte_timeout = 600s;
    .between_bytes_timeout = 600s;
    .probe = {
        .url = "pub/health_check.php";
        .timeout = 2s;
        .interval = 5s;
        .window = 10;
        .threshold = 5;
   }
}

/etc/default/varnish

DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
     -f ${VARNISH_VCL_CONF} \
     -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
     -p thread_pool_min=${VARNISH_MIN_THREADS} \
     -p thread_pool_max=${VARNISH_MAX_THREADS} \
     -p http_resp_hdr_len=65536 \
     -p http_resp_size=98304 \
 -p workspace_backend=98304 \
     -S ${VARNISH_SECRET_FILE} \
     -s ${VARNISH_STORAGE}"

Magento Cache config:

Access list: 127.0.0.1
Backend host: 52.56.108.15
Backend port: 8080
Grace period: 300

Here is how my response headers look at this point:

Cache-Control: max-age=0, must-revalidate, no-cache, no-store
Connection: Keep-Alive
Content-Encoding: gzip
Content-Security-Policy: upgrade-insecure-requests
Content-Type: text/html; charset=UTF-8
Date: Fri, 22 Mar 2019 18:00:29 GMT
Expires: Thu, 22 Mar 2018 18:00:29 GMT
Keep-Alive: timeout=5, max=100
Pragma: no-cache
Server: Apache/2.4.29 (Ubuntu)
Set-Cookie: PHPSESSID=fh1hcnrcvs4u25lp1kqq7sv8br; expires=Fri, 22-Mar-2019 19:00:29 GMT; Max-Age=3600; path=/; domain=website.com; HttpOnly
Set-Cookie: form_key=Hu9gu1oJeyjVzCjm; expires=Fri, 22-Mar-2019 19:00:29 GMT; Max-Age=3600; path=/; domain=website.com
Strict-Transport-Security: max-age=31536000
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-UA-Compatible: IE=edge
X-XSS-Protection: 1; mode=block

Can anyone help with this issue? Thanks in advance!


texts: How to get the store id from the any category id

texts:
So I have the category id and I would really like simply the store id. Ideally I do not want to simply load the store completely as I only need the id.

Here my meaning of category id is: One Root Category is assigned to store. My Structure of categories are:

Root Category

Main Category

Cat1

Cat11

Like this type of structure lots of categories , child categories , their child categories and so on. When i pass id of any category then i want store id in which they are present. Either i pass category or child or child of any child category id.


texts: Magento 1.9 Order not able to cancel payment done by PayPal?

texts:
After void the order from PayPal, the order not able to cancel in magento backend the error like  PayPal gateway has rejected request. Authorization is voided (#10600: Authorization voided).
How can i cancel the order?


texts: Magento CE 1.9.2.2 Catalog Price Rules not applying?

texts:
I am running 1.9.2.2 and when I set a catalog price rule I get nothing in the front end.

I flush the caches, I manually delete /var/cache/* and I've tried reindexing the product prices... Still nothing. In the DB I can see the catalog price rule in the mgwp_catalogrule table but there isn't anything in the mgwp_catalogrule_affected_product table...

Do I need to run a cron job that i don't know about or something...?

Any help appreciated - this is killing me ;(


texts:
Currently i'm running magento version 1.8.1 with mysql 5.5
I'm about to upgrade the database to percona server

I was wondering whether its safe to upgrade to percona server 5.6?
Because there are some articles around the web that talks about issues like this.


texts: search result page showing error while trying to show current category and child category in sidebar of magento

texts:
I used the following code

   <?php
$_helper = Mage::helper('catalog/category');
$children = Mage::registry( 'current_category' )->getChildrenCategories();
$parent = Mage::registry( 'current_category' );  ?>

    <a href="<?php echo $_helper->getCategoryUrl($parent); ?>"><?php echo $parent->getName() ?>

    <?php foreach( $children as $child ): ?>

<a href="<?php echo $_helper->getCategoryUrl($child); ?>"><?php echo $child->getName() ?>

    <?php endforeach; ?>

to show current category and child category on each page it working well but when i search any term in the search box then it will show product but in sidebar it will show fatal error. so any one can suggest me the solution of this problem any help will be important for me.


texts: performance problems on a Cloud hosting account

texts:
I have installed the newest version of the Magento shopping cart 1.9.1 and we are having serious performance problems (extremely high load, server running out of memory...)

Is there something we can do to improve performance? Is the following hardware/software sufficient? (they keep saying that Magento is known for being memory usage intensive and we should upgrade but I'm already paying $60/month for this)

vCPUs/Ghz  2 / 1.8Ghz
Dedicated RAM  2048MB
Cloud Storage  60GB
Bandwidth     2000GB
Operating System    linux
Perl Version    5.10.1
Apache Version  2.2.29
PHP Version     5.5.24
MySQL Version   5.6.23

Any suggestions would be greatly appreciated! ;-)


texts: Getting 404 Error In Admin from Extensions

texts: I am using Magento v1.8. I am trying to install extensions by using Magento Connect Manager. Everything works fine till the installation of the extension. But the Moment I click on the Extension via System > Configuration > Extension it gives me a 404 Error Page. Evertime. It's happening with every extension. Please let me know what should I do...?


texts: Magento 2 Override Magento\Paypal\Model\Payflowpro::isAvailable()

texts:
I want to override isAvailable() method of Magento\Paypal\Model\Payflowpro.php

I have tried below steps but it is not working for me.

app/code/Moduleoverride/Payflowpaypal/etc/module.xml

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

app/code/Moduleoverride/Payflowpaypal/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Moduleoverride_Payflowpaypal',
__DIR__
);

app/code/Moduleoverride/Payflowpaypal/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Paypal\Model\Payflowpro" type="Moduleoverride\Payflowpaypal\Model\Payflowpro" />
</config>

app/code/Moduleoverride/Payflowpaypal/Model/Payflowpro.php

namespace Moduleoverride\Payflowpaypal\Model;

class Payflowpro extends \Magento\Paypal\Model\Payflowpro
{
  public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null)
    { echo "This is working";exit;
    }
}


texts: author name while packaging magento extension?

texts:
I'm packaging a Magento extension to be submitted to the Magento Connect.

I'm having one confusion though. What should I set the User field to in Authors section ?

The guidelines doc says that Package using “User Name” not “Screen Name” or the upload will result in an error.

Now my confusion is that what it is the username they are referring to ?
Is it the First Name + Last name as in the screenshot below ?


texts: I need help. I want to charge a flat rate shipping charge for items shipped to Canada under a specific category. How can I do that?


texts:
Working on a client installation and trying to enter the access keys so I can connect to Magento Marketplace, I receive the following error upon saving the config:

Failed to connect to repo.magento.com port 443: Connection timed out

I confirmed that TLS is current - set to 1.2 on the Magento server (this was mentioned as a potential issue in another forum).

The current installation does NOT have an SSL certificate - could this be the problem?

If not, any other ideas?

**** EDIT ****

I found some articles talking about open SSL potentially being the issue. I hope some of this information helps to pinpoint the issue

I updated by open SSL, version is now:
[root@s50-63-160-164 public_html]# openssl version
OpenSSL 1.0.2r  26 Feb 2019

Verified that the same version is being used by PHP by running phpinfo() script:
OpenSSL 1.0.2r 26 Feb 2019

Ran some additional tests per the following article:
https://github.com/magento/magento2/issues/5239

$context = stream_context_create();
$contents = file_get_contents('https://repo.magento.com/packages.json', false, $context); // this fails

$context = stream_context_create();
$contents = file_get_contents('https://packagist.org/packages.json', false, $context); // this succeeds

[root@s50-63-160-164 public_html]# openssl s_client -connect repo.magento.com:443 -tls1_2

connect: Connection timed out

connect:errno=110

[root@s50-63-160-164 public_html]# openssl s_client -connect repo.magento.com:443 -tls1_1

connect: Connection timed out

connect:errno=110


texts: Check if a simple product with same config options exist in a configurable product's associated products

texts:
I am importing products from my eBay store. To get products, I have created a script which creates products from eBay response data.

When I run the script for the first time, It creates all the products in my magento store. But for some of the products, there is no sku defined in eBay response data, so I have generated a random sku for those products.

My problem is when I try to run the script again to update the products, it does not get the products for which I have generated random sku value.

Is there any way I can compare config option values with all the available associated products to get right product to update.


texts: Magento 2.2 Replace Default USPS Shipping Method Names in Cart and Checkout

texts:
I am trying to override the default USPS shipment method titles in Magento CE 2.2 that show up in the cart and during checkout.  I have created a plugin, USPSChange, and although I'm not getting any errors and I know the plugin is executing, it is not replacing the text.

Does anyone see anything amiss in my code below or have any other suggestions? Thanks in advance!

namespace Testing\USPSChange\Model\Quote\Address\RateResult;

class Method extends \Magento\Quote\Model\Quote\Address\RateResult\Method {
 public function afterSetPrice($subject) {
    if ($subject->getMethodTitle() === "Priority Mail 2-Day") {
        $subject->setMethodTitle("Priority Mail");
    }
    return null;
 }
}


texts: Move a specific widget to another container via XML

texts:
I want to move a specific widget, lets name it demoWidget to the top container, when it is on a site.

How can I achieve this?

I've thought about this solution, but have no idea how to do it:

give the widget a specific name in CMS page (like name="demoWidget")
on CMS page XML tab, use <move>in order to move name="demoWidget"

If name="demoWidget" is not there, will there be an error and if so how can I set conditions correctly?


texts: I have store on Magento shopping cart. And it takes much time to manage the store. So I'm interested in a high quality extensions.


texts:
I have extended the phtml file

/vendor/magento/module-catalog/templates/product/price/amount/default.phtml`.

I want to get the msrp price and attribute set id in the extended template in both list page and view page.

I have used the following code

<?php $product = $this->helper('Company\Module\Helper\Data')->getCurrentProduct();?>
<?php $msrp = $product->getMsrp();?>
<?php $attributeSetId = $product->getAttributeSetId();?>

In view page it is working fine. But in list page getting error as 'Call to a member function getMsrp() is null'.


texts: How to add filter on a renderer column in Magento 2?

texts:
I have created a custom module with grid. See below image:

Column product sku is render using product_id

<column name="product_id" class="Lime\SN\Ui\Component\Listing\Column\ProductSku">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="label" translate="true" xsi:type="string">Product SKU</item>

            </item>
        </argument>
    </column>

I want to add filter on renderer column, but its not working, how can I custom default filter function in magento 2?


texts:
I have html / css template I created weeks ago, and I want to apply these HTML / CSS to magento? how can I do that? I already copied the blank theme to make modifications on it. When I accepted the job, I didn't expect Magento to use XML for its layouts.

I don't want to use the default Magento 2 html structure, I have my own bootstrap / css / html conventions. So I want to change the whole structure (head tag, body tag), and use *.css instead of *.less files. I just want it simple.. I'll care about Magento conventions later.

I never worked with Magento, and I don't understand these xml files. My boss wanted Magento, and I have to do it in 2 weeks (one week has already passed, trying to understand the documentation).

Magento doesn't pity newcomers

Thank you.


texts: Multiselectbox for custom table in Product-Edit Page not displaying Selected values. in Magento 2.5

texts:
I have created a multi-selectbox using Ui component and getting data from a model to display in Option-fields.

Data is saving in my custom table. but when i click on the same product to edit, the selected options are not showing as selected.

product_form.xml

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="customproducts">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Add values</item>
                <item name="provider" xsi:type="string">product</item>
                <item name="dataScope" xsi:type="string">data.product</item>
                <item name="sortOrder" xsi:type="number">2</item>
                <item name="collapsible" xsi:type="boolean">true</item>
                <item name="opened" xsi:type="boolean">false</item>
                <item name="ns" xsi:type="string">product_form</item>
            </item>
        </argument>

    <field name="myvalues">
       <argument name="data" xsi:type="array">
           <item name="options" xsi:type="object">Myvendor\Mymodule\Model\Source\Myvalues</item>
           <item name="config" xsi:type="array">
               <item name="dataType" xsi:type="string">text</item>
               <item name="label" translate="true" xsi:type="string">Values</item>
               <item name="formElement" xsi:type="string">multiselect</item>

           </item>
       </argument>
    </field>
 </form>

model\source\Myvalues.php

 use Magento\Backend\Block\Template\Context;
    use Myvendor\Mymodule\Model\ResourceModel\Item\Collection;
    use Myvendor\Mymodule\Model\ResourceModel\Item\CollectionFactory;

    class Myvalues implements \Magento\Framework\Data\OptionSourceInterface
    {
        protected $_request;
        public function __construct(
             \Magento\Framework\App\RequestInterface $request,
            Context $context,
            CollectionFactory $collectionFactory,
            array $data = []
        ){
            $this->collectionFactory = $collectionFactory;
            $this->_request = $request;
        }

        public function getMyvalues(){
            return $this->collectionFactory->create()->getItems();
        }

        public function toOptionArray(){
            $productId = $this->_request->getParam('id');
            $vals      =  $this->getMyvalues();
            $val_array = [];
            foreach($vals as $valrows){
                $val_array[] =["value" => $valrows->getId(),'label' => $valrows->getName()];
            }
            //print_r($data_arr);
            return $val_array;
        }

}


texts: Wishlist Share controller url is wrong in Magento 2?

texts:
I want to share my wishlist with anyone But When I am clicking on Share wishlist button then it is redirecting to wrong controller URL.
https://example.com/wishlist/index/index/wishlist_id/12/

It must be redirected to Share controller URL must be like: https://example.com/wishlist/index/share/wishlist_id/12/


texts:
I install wish-list module in our project. When i call any API of this module it showing some error:

Fatal error:  Uncaught Error: Cannot instantiate interface Ipragmatech\Ipwishlist\Api\WishlistManagementInterface in /opt/lampp/htdocs/foxministry_v2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:73
Stack trace:
#0 /opt/lampp/htdocs/foxministry_v2/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer-&gt;create('Ipragmatech\\Ipw...')
#1 /opt/lampp/htdocs/foxministry_v2/vendor/magento/module-webapi/Controller/Rest.php(305): Magento\Framework\ObjectManager\ObjectManager-&gt;get('Ipragmatech\\Ipw...')
#2 /opt/lampp/htdocs/foxministry_v2/vendor/magento/module-webapi/Controller/Rest.php(216): Magento\Webapi\Controller\Rest-&gt;processApiRequest()
#3 /opt/lampp/htdocs/foxministry_v2/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest-&gt;dispatch(Object(Magento\Framework\App\Request\Http))
#4 /opt/lampp/htdocs/foxministry_v2/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Intercept in /opt/lampp/htdocs/foxministry_v2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73

{"messages":{"error":[{"code":500,"message":"Server internal error. See details in report api\/946085665948"}]}}

Anybody help me for removing this error.


texts: How to Import Orders Programmatically with all the product type in Magento2?

texts: I am Looking for the Order Import Programmatically with capable of importing all the product types and multiple products able to import that also I need specific billing details to be included.


texts:
In magento we have following areas by default.

admin
adminhtml
catalog
crontab
doc
frontend
global
setup
webapi_rest
webapi_soap

How to disable particular area? for example front end area?

update:
completely remove frontend area.

I need only rest ,soap, adminhtml, admin, setup, cron.


texts: Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid method Vendor\Modulename\Model\Doccountmodel::create

texts:
I have created a crud model for custom table in a  module but when i have called that model to do operations I am getting a error

public function __construct(Context $context , \Vendor\Modulename\Model\Doccountmodel $doccountfactory,  Session $customerSession)
    {

        $this->_customerSession = $customerSession;
        $this->doccountfactory = $doccountfactory;
        parent::__construct ( $context );
    }

public function execute(){
  $sampleModel = $this->doccountfactory->create();

    // Load the item with ID is 1
    $item = $sampleModel->load(1);
    var_dump($item->getData());

}


texts: What is the alternative way of DataFlow module for Magento2

texts:
Lot's of extension uses DataFlow module of Magento1 for data mapping and export/import product.

Is there any way to handle data mapping in Magento2 for importing product?


texts: A common function for all payment gateways?

texts: I want to add a new functionality to magento when a particular order is succeeded. I am wondering is there any common function where all the payment gateways reaches before destroying the order session information so I can pick the new order information like customer, credit card etc for the new functionality and then redirect to the success page.


texts: How to call a custom created extension model in phtml file of magento 2?

texts:
I am finding the way to call my custom extension's model inside my phtml file. and i am using the following code to get the model inside my phtml file.

<?php $price_rules=$objectManager->getModel('Startupready_Myrules/Quantitybreaks');
$price_rules->load($priceRuleList); ?>

But after calling like this. I found that no css of js are applying in the front-end. Is there any way to call my custom created extension's model? Thanks in advance.


texts: Installation issues on packaging a module: Magento 2

texts:
I created a custom module in Magento 2 and then tried to package it for submitting it to the Magento marketplace. I followed this link in order to create a composer file and packaging of the module:

How to Create Extension Package in Magento 2?

After the packaging and submission of the module in Marketplace, the module was rejected from the technical review with Installation Errors as below,

Command:
composer require vendor/module:1.0.0'
Installation issue:
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for vendor/module 1.0.0 -> satisfiable by vendor/module[1.0.0].
- Conclusion: remove magento/framework 100.0.19
- Conclusion: don't install magento/framework 100.0.19
- vendor/module 1.0.0 requires magento/framework ~100.1.10 -> satisfiable by magento/framework[100.1.10, 100.1.11].
- Can only install one of: magento/framework[100.0.19, 100.1.10].
- Can only install one of: magento/framework[100.0.19, 100.1.11].
- Installation request for magento/framework (locked at 100.0.19) -> satisfiable by magento/framework[100.0.19].

Installation failed, reverting ./composer.json to its original content.
[Pipeline] }
[Pipeline] // stage
[Pipeline] sh
[DockerOperationsPHP70Magento21CEVarnish] Running shell script
+ echo Failure

On searching I found the below link that has the same issue as mine but the solution could not much help me out here.

Installation of extensions using CLI have issues composer require

Also, I developed the module in magento 2.1.1.
Is there anything that I am doing wrong? Do I need to change the magento/framework in my composer.json file to something else?
My Composer file is as below,

{
  "name": "vendor/module",
  "description": "This is the description of the module.",
  "type": "magento2-module",
  "version": "1.0.0",
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "require": {
    "magento/framework": "~100.1.10"
  },
  "authors": [
    {
      "name": "Vendor",
      "email": "test@testing.com",
      "homepage": "http://www.test.com/",
      "role": "Developer"
    }
  ],
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "Vendor\\Module\\": ""
    }
  }
}

  Conclusion: don't install magento/framework 100.0.19

What does this mean? I am not using the 100.0.19 anywhere, then why am I getting this error?

I am in a real trouble wit this. Can anyone please help?


texts: Magento 2: How to center the Related Products block in product pages?

texts:
On Blank theme, Related Products block is aligned to the left.

How can I align the block so the products are aligned at the center of the page?

I tried using "text-align: center" but this causes the product name and price are also aligned to center. Product name and price should stay aligned left.


texts: How to use SearchCriteria Builder for the Magento2 orders between two dates

texts:
How can I convert following M1 code to M2 code using SearchCriteria Builder.
Note: api_status is a custom column in sales_order table
    $dateTo = date('Y-m-d H:i:s');
    // 1 hour before current time
    $dateFrom = date('Y-m-d H:i:s', time() - 3600);

    $orderFrom = date('Y-m-d H:i:s', strtotime($dateFrom));
    $orderTo = date('Y-m-d H:i:s', strtotime($dateTo));

$orders = Mage::getModel('sales/order')->getCollection()
    ->addAttributeToFilter('created_at', array('from' => $orderFrom, 'to' => $orderTo))
    ->addAttributeToFilter('api_status', array('eq' => '2'));

If I do not want to use following code.
use Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory;

public function __construct(
    CollectionFactory $orderCollectionFactory,

)
{

    $this->orderCollectionFactory = $orderCollectionFactory;
}

$collection = $this->orderCollectionFactory()->create()
     ->addAttributeToFilter('created_at', array('from' => $orderFrom, 'to' => $orderTo))
    ->addAttributeToFilter('api_status', array('eq' => '2')


texts: Steps to a successful Magento Payment Bridge Installation

texts: I am trying to setup our new Magento EE v1.12 installation and because of our credit card processing requirements we have decided to use Authorize.net with Magento Payment Bridge. My biggest problem is that the documentation on Payment Bridge is not very clear on how to setup the software. Does anyone have clear step by step instructions on how to setup the Payment Bridge. Also, in the documentation they say that the Payment Bridge software should be installed on a separate server from the Mysql database. Is this a requirement or a recommendation? If we choose to install the software on the same server as the database, how will this affect our PCI compliance? Any help is greatly appreciated.


texts: Chnage after login page to dashboard to manage products in admin

texts:
I want to change after login url in admin panel.
It is currently opening dashboard page.
How can I change it to another url?


texts: Shipment create not working programmatically

texts:
I am using below code to create shipment programmatically.

$shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($qty);
$shipment->register();
$shipment->sendEmail(true)->setEmailSent(true)->save();

But nothing is happening. No shipment is created in back-end and no error is reported.


texts: Remove sidebar in checkout custom step - Magento 2

texts:
I have created a new custom step in the checkout and I want to hide the sidebar in this custom step.

Note: I only want to hide the sidebar in my custom step, not in other steps.

Does anyone know how I can achieve this?

Thanks


texts:
I'm having some issues setting up admin routing.

My menu.xml file is as follows, note the custom route /manufacturer/grid.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<menu>
    <add id="Amrita_Manufacturer::manufacturers_second_level"
         title="Manufacturers"
         module="Amrita_Manufacturer"
         sortOrder="9999"
         resource="Amrita_Manufacturer::manufacturer"
         parent="Magento_Catalog::inventory"
         action="/manufacturer/grid"
    />
</menu>

routes.xml looks like this

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

and my Index.php file is located in the following directory  Amrita\Manufacturer\Controller\Adminhtml\Grid

Am i doing something wrong, I've tried a number of different suggestions and the menu link just redirects to the dashboard page?


texts: Configurable product in Magento 1.9, breaks attributes to individual products

texts:
When i create a configurable product with size, the product breaks into individual products like the image given
The number next to the name is the size number


texts:
I've started with magento2 two months ago, and I was developing APIs, So I've some issue with how magento code is called.

for example if I press on category to display its products, what are sequence of functions called so that products displayed.


texts:
I want to create custom shipping module in Magento2. For that I need to create carrier.php.
Which steps should I follow while creating Carrier.php?
Help would be appreciated.:)


texts: When a child theme was created customer login did not work

texts: I created a child theme having parent as blank and then the customer login did not work, can some one please help me with this


texts:
We have updated an older site to a new version of Magento and given it a new look. It is live and everything is working except I can't change any user roles. When I go into System->Permissions->Roles->Add role (or click on an existing role) I get a blank screen. If I turn php errors on in index.php file I get the following error:

Fatal error: Class 'Mage_Adminfee_Helper_Data' not found in /home/sites/website/public_html/app/Mage.php on line 547

And in the system log it shows this error:

Warning: include(Mage/Adminfee/Helper/Data.php): failed to open stream: No such file or directory  in /home/sites/gwebsite/public_html/lib/Varien/Autoload.php on line 93

Any advice would be appreciated.

Thanks


texts: can I reupload my magento package extension in magento connect after 2 days of submitted?

texts: I submitted(2 days ago) my package extension in magento connect website for review.Now I realized that I added wrong PHP version while creating package extension.I created package extension using magento version 1.9.Can I now add new extension version and upload  or wait reply from magento connect team ? what I do in this situation ?


texts:
In order to ease future Magento upgrades, I am working to extract custom modules and put each in the its own tidy git repository.

However, many of these modules depend on Magento-agnostic code that lives in lib/. Since multiple modules depend on it, I can't very well hack together a composer.json and put the dependency in app/code/*/NameSpace/Module/vendor/.

Currently, my plan is to deploy the code using modman, but I could set up a firegento-style composer repository if that gives more flexibility.

What processes do you recommend for quick, reliable deployments? Thanks!


texts: What is the proper format for checkbox validation in Magento 2?

texts:
Using 2.1.5, I have a custom front end form with a set of text elements built (roughly) as:

    My Field:

        <input  id="my-field" name="my-field" data-validate="{required:true}" size="20" type="text" />

This looks fine and the validation displays properly. However, adding a checkbox input type isn't working the same way:

    My checkbox:

        <input  id="my-checkbox" name="my-checkbox" data-validate="{required:true}" type="checkbox" />

The validation seems to be working, but there is no message displayed. If, using How to make checkbox mandatory on register page in Magento 2 as an example, I remove the .control div and add a .choice to the wrapper div, the validation works and the message is displayed properly, but all formatting based on the .control class is lost, making the checkbox element not have the same UI as the rest of the form:

    My checkbox:
    <input  id="my-checkbox" name="my-checkbox" data-validate="{required:true}" type="checkbox" />

Is there a way to have the checkbox element use the same classes as the rest of the form, but also have the validation messaging visible?


texts: Magento 2.1 module installation error: Component Dependency Check fails due to SSL/Crypto error

texts:
When trying to install a module via the Component Manager of Magento 2.1, I get the following error during the Readiness Check:

Command "update" failed: Loading composer repositories with package information
<warning>The "https://repo.magento.com/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed</warning>
<warning>https://repo.magento.com could not be fully loaded, package information was loaded from the local cache and may be out of date</warning>
<warning>The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed</warning>
<warning>https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date</warning>
Updating dependencies (including require-dev)

I followed several explanations and solutions, but none seem to fix this issue. I'm using PHP 7.0.8, the latest version of Composer and the latest build of OpenSSL on my CentOS (7.2.1511) system. Furthermore I tried this fix for error:14090086 by loading the latest Mozilla Root Certificate Bundle.

Running "composer diagnose" yields one set of errors:

Checking composer.json: FAIL
The version field is present, it is recommended to leave it out if the package is published on Packagist.
Defining autoload.psr-0 with an empty namespace prefix is a bad idea for performance
require.magento/product-community-edition : exact version constraints (2.1.0) should be avoided if the package follows semantic versioning
require.composer/composer : unbound version constraints (@alpha) should be avoided

But this doesn't seem the to explain SSL-errors, right? The solution of Alan Storm gives some help, but according to Magento my CentOS version should be fine. The weirdest thing is that I'm able to execute "composer update" just fine through CLI ("php composer.phar update" to be precise, since it's not included in my $PATH). Does anyone have an idea why SSL/Crypto is still failing?


texts:
I've been running a csv import into magento and getting the error Cannot get autoincrement value

Currently I've done the following to try and resolve the problem:
Gone into the database and make sure dataflow_profile_history & dataflow_batch has auto increment enabled via phpMyAdmin
Exported current product list and reimport it, getting the same error.


texts: Display Sort by option on Top and Pagination at bottom

texts:
On my product listing page, I need to change the display of Toolbar and Pager.

On top, I want to display Sort by option while on bottom I need to display Pagination

How can I achieve this ?

Please Guide.

Thanks.


texts: How to get MSP Recaptcha Module on custom Form?

texts:
I have a custom form inside a modal in a configurable product page which requires MSP Google ReCaptcha to be implemented. I tried to include the Recaptcha block in my layout file but it is not showing up.

 <block class="Magento\Framework\View\Element\Template" name="custom-modal" template="Vendor_module::custom-modal.phtml" >
     <block class="Magento\Swatches\Block\Product\Renderer\Configurable" name="product.info.options.swatches_inside_modal"   />
 </block>

If anyone knows how to solve this let me know.


texts: Changing order of shopping cart totals is not working after changed the sequence from admin panel

texts:
I appreciate your solution for resolving my problem.

I have changed the cart totals sequence from my admin panel but it is not reflecting on the front end.
Steps for changing a sequence from admin panel: System->Configuration->Sales->Checkout Total Sort Order
Please find below my environment details which I am using on my production environment.Please help me!

magento version 1.9
php version 5.6
server nginx


texts: Magento: Fatal error: Cannot override final method Mage_Core_Model_Abstract::clearInstance()

texts:
I am getting the following error message:

  Fatal error: Cannot override final method Mage_Core_Model_Abstract::clearInstance() in /var/www/html/app/code/core/Mage/Catalog/Model/Product.php on line 38 Warning: include(Mage.php): failed to open stream: No such file or directory in /var/www/html/lib/Varien/Autoload.php on line 93 Warning: include(): Failed opening 'Mage.php' for inclusion (include_path='/var/www/html/app/code/local:/var/www/html/app/code/community:/var/www/html/app/code/core:/var/www/html/lib:.:/usr/share/pear:/usr/share/php') in /var/www/html/lib/Varien/Autoload.php on line 93 Fatal error: Class 'Mage' not found in /var/www/html/app/code/core/Mage/Core/functions.php on line 244 Warning: include(Mage.php): failed to open stream: No such file or directory in /var/www/html/lib/Varien/Autoload.php on line 93 Warning: include(): Failed opening 'Mage.php' for inclusion (include_path='/var/www/html/app/code/local:/var/www/html/app/code/community:/var/www/html/app/code/core:/var/www/html/lib:.:/usr/share/pear:/usr/share/php') in /var/www/html/lib/Varien/Autoload.php on line 93 Fatal error: Class 'Mage' not found in /var/www/html/app/code/core/Mage/Core/Model/Resource/Session.php on line 108

Only the main page does not open anymore. If I open any product via direct URL or category it works! Magento Backend also works fine.

Does anybody have a clou? Google told me, that it could be a problem with APC Cache, but also with disabled APC it does not work.

Hope I can get some help here :-). Thanks!!


texts: Currency.php: Fatal error: Call to a member function getCode() on a non-object

texts:
I use Magento ver. 1.8.1.0 and when I go one my website I've got this error:

  Fatal error: Call to a member function getCode() on a non-object in app/code/core/Mage/Directory/Model/Currency.php on line 193

When I choose USD for currency in Configuration -> Currency setting, it's ok, but after, with my payment method it doesn't work because it need CHF (Swiss franc) so if I choose CHF for Currency I have the Fatal error for all the website...

On line 194 I have this function:

public function convert($price, $toCurrency = null)
{
    if (is_null($toCurrency)) {
        return $price;
    } else {
        $rate = $this->getRate($toCurrency);
        if ($rate) {
            return $price * $rate;
        }
    }

    throw new Exception(Mage::helper('directory')->__('Undefined rate from "%s-%s".', $this->getCode(),$toCurrency->getCode()));
}

and the getCode() function:

/**
 * Get currency code
 *
 * @return string
 */
public function getCode()
{
    return $this->_getData('currency_code');
}

I don't know what is wrong, somebody can help me?
Thank you


texts: Best practise to extract file changes from base and default to a custom package

texts:
I am quiet new to magento and have a few questions about creating a custom template. The underlying magento version is 1.7.0.2.

Background: A few developers had the job to create a custom theme for a web shop. The problem is, that they have manipulated directly the default/default and base/default directories.

My job: Extract the changes and create a custom package/theme to get an updatable state.

Question: What is the best way to archive a custom theme, is my approach good?

My Approach:

Download clean default and base packages from the magento version used for the web shop
Create a custom package: <custom_package>
Set default/default as parent of <custom_package>/default as shown here (http://alanstorm.com/magento_parent_child_themes)
Copy all files from default/default to <custom_package>/default which have been manipulated
Copy all files from base/default to <custom_package>/default which have been manipulated and are not already implemented in default/default or <custom_package>/default
Replace base and default package by the clean downloaded ones
Do the same with the skin stuff
Activate <custom_package>
Testing! I am working with git, so i can switch back and create another installation to check for unwanted changes

Result: clean and updatable base and default packages and a custom package.

Is this a good approach? What would you recommend? Or should i copy all files from default/default, maybe if nearly every file has been touched?

Thanks in advance!


texts:
I want to add some of my categories on homepage, not all but three or four of them by category id. I read something that I have to create a list.phtml and add this as follows to my homepage cms content:

{{block type="catalog/navigation" name="catalog.category" template="catalog/category/list.phtml"}}

But I am using a custom theme and in this theme exists a mdl-banner.phtml file (path: customtheme/template/catalog/product) which displays a slider on homepage. This file looks as follows:

<?php
    $config = Mage::getStoreConfig( 'bannerslider/homepage' );
?>

            <?php echo $this->getLayout()->createBlock('bannerslider/default')->setTemplate('mdl/bannerslider/bannerslider.phtml')->setBannersliderId(1)->toHtml(); ?>

Now I just want to add some categories there where the comment  is.

So I changed this file as follows:

<?php
    $config = Mage::getStoreConfig( 'bannerslider/homepage' );
?>

        <?php $specialCategoryIds = array( '5', '6', '7' ); ?>
        <?php foreach ( $this->getStoreCategories() as $category ): ?>
            <?php $categoryId = $category->getId(); ?>
            <?php if ( !in_array( $categoryId, $specialCategoryIds ) ) continue; ?>
                <?php $open = $this->isCategoryActive( $category ); ?>
                <?php if ( $open ): ?>
                    <a href="<?php echo $this->getCategoryUrl( $category )?>">
                        <?php echo $category->getName(); ?>

                <?php endif; ?>
            <?php endif; ?>
        <?php endforeach; ?>

            <?php echo $this->getLayout()->createBlock('bannerslider/default')->setTemplate('mdl/bannerslider/bannerslider.phtml')->setBannersliderId(1)->toHtml(); ?>

But now I am getting a blank screen on homepage, because I think I have to say magento that categories are enabled for my homepage, but I don't know where I have to do this because I didn't used a list.phtml? Hope you understand my problem and can help me :)

EDIT:

I changed this file again to:

<?php
    $config = Mage::getStoreConfig( 'bannerslider/homepage' );
?>

        <?php echo $this->getLayout()->createBlock('catalog/navigation')->setTemplate('catalog/category/list.phtml')->toHtml(); ?>

            <?php echo $this->getLayout()->createBlock('bannerslider/default')->setTemplate('mdl/bannerslider/bannerslider.phtml')->setBannersliderId(1)->toHtml(); ?>

and its working now for me, but is this a good solution?


texts: Magento-2.0.15: Ui-Component Ui Element Ui-select not looking properly and showing two label

texts:
I am trying to create a ui-select element using ui-component form, for fullfil my requirement in admin section.

I have written code as below:

<field name="vendor_id">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">[...]\[...]\Model\Source\Vendor</item>
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Assign to Vendor</item>
                <item name="componentType" xsi:type="string">field</item>
                <item name="formElement" xsi:type="string">select</item>
                <item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
                <item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
                <item name="filterOptions" xsi:type="boolean" >true</item>
                <item name="showCheckbox" xsi:type="boolean">false</item>
                <item name="chipsEnabled" xsi:type="boolean" >false</item>
                <item name="disableLabel" xsi:type="boolean">true</item>
                <item name="multiple" xsi:type="boolean" >false</item>
                <item name="listens" xsi:type="array">
                    <item name="newOption" xsi:type="string">toggleOptionSelected</item>
                </item>
                <item name="source" xsi:type="string">event_info</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
</field>

And the result of the above code is shown below with marked issue:

Issues are:

1) Two label as "Assign to vendor" is incorrect

2) Select box width is so small may be due to second label

3) I have made showCheckbox to false so checkbox should not be there.

4) Filter/search is happen on click on search icon or press enter but not by enter key for search.

Can Anyone suggest what I should add to the above code for fullfil my requirements and what wrong I am doing.

I have looked into many post like below but not resolved my issue.

UiComponent Ui Element Ui-select Not Properly Working

How to properly populate ui-select component

Magento2 file reference for the component

Please note my magento version on which I am working is magento 2.0.15.

Please let me know in case of any query.

Thank you.


texts: Magento 2 - Why does `sales_order_save_commit_after` not fire when user is not logged in?

texts:
I am using an observer to handle some logic when a new order is created or updated. The observer listen to sales_order_save_commit_after event, but I noticed that when the user is not logged in this event does not fire. What is the reason that it does not trigger in this case? Can it be substituted with some other event?

P.s. I checked some other events, like sales_order_save_after but the items are still not saved when it triggers and checkout_onepage_controller_success_action does not work in case of creating the order from admin.


texts: Magento 2: Error while create category programmtically: Call to undefined method Magento\Catalog\Model\ResourceModel\Category\Flat::getEntityTable()

texts:
I am creating a category programmatically in magento 2 in controller, but I am getting error Call to undefined method Magento\Catalog\Model\ResourceModel\Category\Flat::getEntityTable()
I have also run indexing to solve a problem but no luck.
Note: I have enabled flat categories in configuration.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $url = \Magento\Framework\App\ObjectManager::getInstance();
            $storeManager = $url->get('\Magento\Store\Model\StoreManagerInterface');
            //$state = $objectManager->get('\Magento\Framework\App\State');
            //$state->setAreaCode('frontend');
            /// Get Website ID
            $websiteId = $storeManager->getWebsite()->getWebsiteId();
            echo 'websiteId: '.$websiteId." ";

            /// Get Store ID
            $store = $storeManager->getStore();
            $storeId = $store->getStoreId();
            echo 'storeId: '.$storeId." ";

            /// Get Root Category ID
            $rootNodeId = $store->getRootCategoryId();
            echo 'rootNodeId: '.$rootNodeId." ";
            /// Get Root Category
            $rootCat = $objectManager->get('Magento\Catalog\Model\Category');
            $cat_info = $rootCat->load($rootNodeId);

            $categorys=array('Levis','Wranglers'); // Category Names
            foreach($categorys as $cat)
            {

            $name=ucfirst($cat);
            $url=strtolower($cat);
            $cleanurl = trim(preg_replace('/ +/', '', preg_replace('/[^A-Za-z0-9 ]/', '', urldecode(html_entity_decode(strip_tags($url))))));
            $categoryFactory=$objectManager->get('\Magento\Catalog\Model\CategoryFactory');
            /// Add a new sub category under root category
            $categoryTmp = $categoryFactory->create();
            $categoryTmp->setName($name);
            $categoryTmp->setIsActive(true);
            $categoryTmp->setUrlKey($cleanurl);
            $categoryTmp->setData('description', 'description');
            $categoryTmp->setParentId($rootCat->getId());
            $categoryTmp->setStoreId($storeId);
            $categoryTmp->setPath($rootCat->getPath());
            $categoryTmp->save();
            }


texts:
I am trying to display all prices with 4 decimals (i know a little bit weird but the customer demanded this). I have overwritten Mage/Core/Store, changed the currency.php precision in the Zend lib and adjusted Mage_Directory_Model_Currency.

In the backend, all my prices are displayed correctly but in the frontend i receive a price rounded to 2 decimals followed by 00. Especially the tier price is very crucial.

Since i dont have any knowledge in pricing i have tried some tutorials on Magento Forum with no success. I also tried 2 extensions with no luck.

Any help?


texts: Display custom price in all the web for a group of customers

texts:
I need to display a custom price for some products to a certain group of customers. I made it, but I only see the custom price in the product view page, and I need to display it in all the web. Now I see the regular price in the product list, and it should also display the custom price.

First I created the custom price attribute private_price for the products.

Then I created a module, and listen for the catalog_product_get_final_price event:

<events>
    <catalog_product_get_final_price>
        <observers>
            <catalog_product_get_final_price_handler>
                <type>singleton</type>
                <class>privatesales/observer</class>
                <method>modifyFinalPrice</method>
            </catalog_product_get_final_price_handler>
        </observers>
     </catalog_product_get_final_price>
</events>

and in the observer:

public function modifyFinalPrice(Varien_Event_Observer $observer)
{
    $isLoggedIn = Mage::getSingleton('customer/session')->isLoggedIn();
    /* If customer is logged in */
    if($isLoggedIn) {
        /* Get the logged in customer's group ID */
        $customerGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
        /* Check if the logged in customer's group ID matches with the ID you are after */
        if ($customerGroupId==2) {
            $product = $observer->getEvent()->getProduct();
            $privatePrice = (double) $product->getPrivatePrice();
            if ($privatePrice>0 && !empty($privatePrice) && !is_null($privatePrice)) {
                $product->setFinalPrice($privatePrice);
            }
        }
    }
}

I'm using magento 1.9.2.4

Update: I also tried the event catalog_product_load_after with same result, price changed in product view, but price remains unchanged in product list.


texts: What is the best Merchant Services for a platform of 1.9 version of magento?


texts:
My site: discountirrigation.com

The SSL was recently applied to all pages of the site instead of just the checkout. However, I can not sort or change the product layout view or select a product category after a search on the https version. The page will just freeze with the loading wheel spinning. If I do the same action on the http version, it works fine. What could be the cause of this?


texts: How to solve the error : "Could not save product "20072" with position 0 to category 7" in magento 2

texts:
While unasign the product from multiple categories to single category and trying to save the product, it thorow the error like below

  Could not save product "20072" with position 0 to category 7

I am saving the product mannually via admin end


texts: Magento 2 Custom Admin module 404 Not Found

texts:
I have been struggling with this error all day, I have tried all the solutions on Internet, but it keeps showing 404 Error when I click the link on my custom menu.

Here is my code

/app/code/Vendor/Module/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="Vendor_Module::menu" title="Sift Science" module="Vendor_Module" sortOrder="51" resource="Vendor_Module::menu"/>
        <add id="Vendor_Module::menu_item" title="Configuration" module="Vendor_Module" sortOrder="10" parent="Vendor_Module::menu" action="SiftMenu/ConfigMenu/" resource="Vendor_Module::menu_item"/>
    </menu>
</config>

Controller
/app/code/Vendor/Module/Controller/Adminhtml/ConfigMenu/SiftSetup.php

<?php

namespace Vendor\Module\Controller\adminhtml\configmenu;

use \Magento\Backend\App\Action;
use \Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
use \Magento\Framework\Json\Helper\Data;

class SiftSetup extends Action
{
    protected $resultPageFactory;
    protected $jsonHelper;

    public function __construct(Context $context, PageFactory $pageFactory, Data $jsonHelper )
    {
        $this->resultPageFactory = $pageFactory;
        $this->jsonHelper = $jsonHelper;
        parent::__construct($context);
    }

    public function execute()
    {

        die ("test module");

    }
}

routes.xml
/app/code/Vendor/Module/etc/adminhtml/routes.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="SiftMenu" frontName="SiftMenu">
            <module name="Vendor_Module" />
        </route>

    </router>
</config>


texts:
How can I use a variable in the follow href element:

Example, instead of https://mag.outdoorequipped.com/ I like to use a variable. But I do not know how to get it in Magento.

Kindly Simon


texts: Multiple Layout Files - How Are They Called?

texts:
I am a developer familiar with HTML, CSS and JavaScript but not Magento conventions. In particular, I'm having trouble with the layout files.

Some themes have one, some have over a dozen, and some are nested. How are these layout files called? I read somewhere else that they are all defined in a config.xml but I can't find that for each theme.

For example, in one theme I have in app/design/frontend/THEMENAME/default/layout

-local.xml
-sales
--billingagreement.xml
--recurring_profile.xml

In other themes I don't even have a local.xml. So my question is, I thought the layout files controlled the placement of blocks, widgets, the content in general. But how does the layouts work when there are multiple of them and they are specific to different programmatic circumstances?


texts: what is $block->getchildhtml() in topmenu.phml file

texts:
I was trying to do/learn something and i am at topmenu.phtml file , i have seen $block->getchildhtml() there and when i go to block which is
namespace Magento\Theme\Block\Html; with the name topmenu.php , i am not seeing any getchildhtml function there . I did research on what getchildhtml function is i have realized it is comming from the layout but when i go to layout which is default.xml file in the module-theme folder there is

<block class="Magento\Framework\View\Element\Template" name="store.menu" group="navigation-sections" template="Magento_Theme::html/container.phtml">
                <arguments>
                    <argument name="title" translate="true" xsi:type="string">Menu</argument>
                </arguments>
                <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="Magento_Theme::html/topmenu.phtml" ttl="3600" before="-"/>
</block>

there is no child of this block so from where this getchildhtml will see and print result ?


texts:
I know how to setup ACL for my module. I also know this method is responsible for ACL:
/**
 * @return bool
 */
protected function _isAllowed()
{
    return $this->_authorization->isAllowed(static::ADMIN_RESOURCE);
}

I want to know the real mechanism behind the ACL methods in Magento 2.
Does Magento hit the database tables (authorization_rule and authorization_role) every time the admin controller is invoked? (I believe it doesn't).
If it doesn't then how is this handled?


texts: Encryption / Decryption of customer data.

texts:
I want to encrypt customer data like email,name,addresses. I have created new class to encrypt and decrypt data.
For encryption , i'll have to use AccountController.php (i'll be overriding app/code/core/Mage/Customer module)
Please let me know where should i use encryption function in createPostAction()

public function createPostAction()
{

    /** @var $session Mage_Customer_Model_Session */
    $session = $this->_getSession();
    if ($session->isLoggedIn()) {
        $this->_redirect('*/*/');
        return;
    }
    $session->setEscapeMessages(true); // prevent XSS injection in user input
    if (!$this->getRequest()->isPost()) {
        $errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
        $this->_redirectError($errUrl);
        return;
    }

    $customer = $this->_getCustomer();

    try {
        $errors = $this->_getCustomerErrors($customer);

        if (empty($errors)) {
            $customer->save();
            $this->_dispatchRegisterSuccess($customer);
            $this->_successProcessRegistration($customer);
            return;
        } else {
            $this->_addSessionError($errors);
        }
    } catch (Mage_Core_Exception $e) {
        $session->setCustomerFormData($this->getRequest()->getPost());
        if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {
            $url = $this->_getUrl('customer/account/forgotpassword');
            $message = $this->__('There is already an account with this email address. If you are sure that it is your email address, click here to get your password and access your account.', $url);
            $session->setEscapeMessages(false);
        } else {
            $message = $e->getMessage();
        }
        $session->addError($message);
    } catch (Exception $e) {
        $session->setCustomerFormData($this->getRequest()->getPost())
            ->addException($e, $this->__('Cannot save the customer.'));
    }
    $errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
    $this->_redirectError($errUrl);
}

Thanks in advance


texts:
For my custom module I have get product by manufacturer. For template I have copied list.phtml.

On the template file pagination appears but it shows all product instead of selected limit per page. Sorting is not working too.

How can I make it work??

It is my block file:

protected function _getProductCollection()
{
    if (is_null($this->_productCollection)) {
        $layer = $this->getLayer();
        $brand_id = $this->getRequest()->getParam('id');
        $collection = Mage::getModel('catalog/product')->getCollection();
        $collection->addAttributeToSelect('*');
        $collection->addFieldToFilter(array(
            array('attribute' => 'manufacturer', 'eq' => $brand_id)
        ));
    }

    return $collection;
}


texts:
Patch 10570v2 no longer cause inability of customers to complete checkout when trying to register during checkout. It is working fine at my 1.9.3.8 store.

When i apply Patch 10752, looks like it undo Patch 10570v2. I can see files changes in Git. Result is the inability of customers to complete checkout when trying to register during checkout again.

Is there any way to apply 10752 without lost 10570v2?


texts: Magento2: Css loading issue on admin login page

texts:
On the Admin Login css/js is not loading, I don't have this problem anywhere else on my site.
How can i solve this?
I did

bin/magento setup:static-content:deploy
bin/magento, bin/magento setup:upgrade

cleared my cache multiple times but it's not working.


texts: Magento 2 Currency Rates Cron not run automatically

texts:
In Magento 2.1.8 website . currency rates does not automatically(cron) not working.

You can also show my "Scheduled Import Settings" into Below image