texts:
I want to write a observer that take a url and add ?param=1 in the end of urls. I write this code, but it appears to be not working.

        ...
        <events>
            <controller_front_init_routers>
                <observers>
                    <dk_images_observer>
                        <type>singleton</type>
                        <class>DK_Images_Model_Observer</class>
                        <method>interceptMethod</method/>
                    </dk_images_observer>
                </observers>
            </controller_front_init_routers>
        </events>
    </global>

and Observer.php

class DK_Images_Model_Observer
{
    public function interceptMethod($observer)
    {

        $url = Mage::helper('core/url')->getCurrentUrl() . '?param=1';
        $observer->getControllerAction()->getResponse()->setRedirect($url);

    }


texts:
I use the file: app\design\frontend\rwd\default\template\catalog\product\price.phtml

<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
     <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
</span>


texts:
I am trying to update my Magento 2 to the latest version, my system fails the readiness check with the below message:

  PHP Version Check Your PHP version is . The required PHP version is .
  Hide detail

  Download and install PHP from www.php.net using this PHP
  Documentation.

  For additional assistance, contact your hosting provider.

I understand this error might be linked to the SSL. Magento 2 by default uses ssl. I don't use ssl on my localhost and this error arises. I have to edit the config section of composer.json file in the root of magento. My composer.json must exist in this folder:

C:\xampp\htdocs\magento2\vendor\composer

It is not there. I have installed a composer file but I cannot change the .phar to .json to do the needful. Whenever I save this in .txt then in .json I get strange characters in the file like Τ�Yb �c�߶

How can I get the right composer.json file to change "disable-tls":true as per the below illustration?

Method 1: Disable-tls parameter:

"config": {
  "use-include-path": true
  "disable-tls":false
},

Method 2: Without disable-tls parameter (delete the line):

"config": {
    "use-include-path": true,
},


texts:
I can't save any product the system is keep on giving me this message

Notice: A non well formed numeric value encountered in /home/.../magento/lib/Varien/Image/Adapter/Gd2.php on line 344

Please I need your help to solve this issue, it's about a month i'm looking for a solution.


texts:
My store sell products of other stores and I would like to know how can i set a map, from Google Maps for example, in product detail page like the image below?

Thanks.


texts: adminhtml multiselect attribute selection problem

texts:
in Magento 1.9 admin panel, I have created a custom multi select category attribute but it doesn't show selected options after saving. Below is the code that I have used to create the attribute at category level.

<?php
$installer = $this;
$installer->startSetup();

$installer->addAttribute("catalog_category", "brands",  array(
'group'     => 'General Information',
"type"     => "varchar",
"backend"  => "",
"frontend" => "",
"label"    => "brands",
"input"    => "multiselect",
"class"    => "",
"source"   => "",
"global"   => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
"visible"  => true,
"required" => false,
"user_defined"  => false,
"default" => "",
"searchable" => false,
"filterable" => false,
"comparable" => false,
'option' => array ( 'value' => array('optionone' => array('First Option'), 'optiontwo' => array('Second Option'), 'optionthree' => array('Third Option'), ) ),

"visible_on_front"  => false,
"unique"     => false,
"note"       => ""

));

$installer->endSetup();

I don't understand what I'm doing wrong or what shall be done to show the selected values.


texts: What are the best resources to learn Magento API?

texts: Are there any complete tutorials/books/blogs available for learn Magento API from the beginning? Any suggestions will be appreciated.


texts: How to add "image()" formula in CSV export?

texts:
How to add "=image()" formula in $stream->writeCsv() CSV export?

Please help me I want to keep formula while export csv file.

Thanks in advance.


texts: Magento 2 - Get Subcategories of Specific Parent Category

texts: What I'd like to do is grab all of the child categories of a specific parent category. I'm assuming the best way to do this is by using the parent's ID and of those child categories that are returned, I'd like to grab their child categories as well.


texts: After logging in , My Accounts section in Mobile menu shows My Account, Wishlist and sign-out options twice in Magento 2

texts: I am using Porto theme. After logging into my account, in mobile I see options under my account displayed twice and sign-out thrice. Any suggestion would be greatly appreciated!


texts: Set "Sales Representative" as custom attribute in Customer - Magento 2

texts:
I created a module that save the name of the Admin logged in, into "Sales Representative" column at "sales_order" table.

It's working pretty fine.

Now i need to save the same value into custom attribute of customer.  (when a new customer is created by Admin in the customer page or create order page)

My code until now is:
InstallSchema.php

<?php
/**
 * Store Admin Name Order table save
 *
 * @category     Store
 * @package      Store_Sales
 */
namespace Emporio\Seller\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class InstallSchema implements InstallSchemaInterface
{
    /**
     * Install DB schema for a module
     *
     * @param SchemaSetupInterface $setup
     * @param ModuleContextInterface $context
     * @return void
     */
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        //$quote = 'quote';
        $orderTable = 'sales_order';

        //Order Grid table
        $setup->getConnection()
            ->addColumn(
                $setup->getTable($orderTable),
                'sales_representative',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    'length' => 255,
                    'comment' =>'Vendedor'
                ]
            );

        $setup->endSetup();
    }
}

events.xml

<?xml version="1.0"?>
<!--
/**
 * Store Admin Name Order table save
 *
 * @category     Store
 * @package      Store_Sales
 */
 -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="checkout_submit_all_after">
        <observer name="store_admin_checkout_submit_all_after" instance="Emporio\Seller\Observer\AdminCheckoutSubmitAllAfter" />
    </event>
</config>

AdminCheckoutSubmitAllAfter.php

<?php
/**
 * Store Admin Name Order table save
 *
 * @category     Store
 * @package      Store_Sales
 */
namespace Emporio\Seller\Observer;

use Magento\Framework\Event\ObserverInterface;

class AdminCheckoutSubmitAllAfter implements ObserverInterface
{
    /**
     * @var \Magento\Backend\Model\Auth\Session
     */
    protected $backendAuthSession;
    protected $logger;

    /**
     * @param \Magento\Backend\Model\Auth\Session $backendAuthSession
     */
    public function __construct(
        \Magento\Backend\Model\Auth\Session $backendAuthSession
    ) {
        $this->backendAuthSession = $backendAuthSession;
    }

    /**
     * Add sale repsentative name to the order table
     *
     * @param \Magento\Framework\Event\Observer $observer
     * @return void
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $adminUserName = $this->backendAuthSession->getUser()->getUserName();
        if ($adminUserName) {
            $order = $observer->getEvent()->getOrder();
            $order->setSalesRepresentative($adminUserName);
            $order->save();
        }
    }
}

What do I have to do to save the value as custom attribute of customer and save in DB ?


texts: Missing permission in /var folders after enable module

texts:
Basically, I'm not the only one who has encountered this: I run php bin/magento module:enable, page stops loading after that (see the accepted answer by TS)

Does anybody know how/why this happened and how can I fix this? I can always re-set the whole permission again after every enable/disable module but that's annoying.


texts: how to manage the SSL3 “POODLE” Vulnerability

texts:
can someone explain how we should manage the SSL3 “POODLE” Vulnerability for our stores? If I turn-off the https in the config, isn't that making my checkout process appear 'unsecure'.

So, what's the solution/best workaround for a shop owner right now?

Thanks

note: as you can tell me the phrasing of my question, this comes from someone with very little technically knowledge in this area! Thanks for answering appropriately.


texts: Magento API from magento1 or 2 to magento2.1

texts:
I want to have an api to transfer data from magento1 and magento2 to magento2.1 real time
I mean that want to change my magento2.1 price field if it changed from magento 1 or 2 websites
could you please explain me fully how should i do?


texts: Magento re-order button for ALL customers (also guest), simple copy order details

texts:
I would like to +1 this thread: http://www.magentocommerce.com/boards%20/viewthread/40273/#t428770

This quote from 'egyember' sums it up

  To be honest the reorder button would be very useful on Guest orders as we could just copy all the customer details (name, email,
  address) onto the new order. Currently, you have to manually copy over
  the details from the previous order.

Question: How can we add a re-order button on order-level, that does one thing only: copy all the order details to a new order.

(would be a simple and I think great extension)

Many thanks


texts:
I am getting the following error message when multiple attributes are selected in a category listing and pagination is clicked.

ERR (3): Warning: strlen() expects parameter 1 to be string, array given  in /home/site/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php on line 94

The error relates to this block of code:

    public function apply(Zend_Controller_Request_Abstract $request, $filterBlock)
{
    $filter = $request->getParam($this->_requestVar);
    if (is_array($filter)) {
        return $this;
    }
    $text = $this->_getOptionText($filter);
    if ($filter && strlen($text)) {
        $this->_getResource()->applyFilterToCollection($this, $filter);
        $this->getLayer()->getState()->addFilter($this->_createItem($text, $filter));
        $this->_items = array();
    }
    return $this;
}

I understand strlen only counts a string but can anyone tell me

Why it could be getting an array
Is this a bug in Magento (1.9.3.7)
How to fix?


texts:
I need to translate this string into Italian (Please refer to the first image).

I've tried editing the it_IT.csv file in app/i18n/antoniocarboni/ (as you can see in the second image).

I also deployed the static content but it does not work as I want?


texts: Configurable product options – get price difference in brackets

texts:
I know that a few themes have this by default but my one doesn't, and i just cant get this to work.

I have a configurable Product which has three options with different prices. I want to show the price difference to the linked simple product in brackets. So it should basically look like this:

Price: XX€

(x) option 1 –
( )  option 2 (+ 4,00$) –
( )  option 3 (+ 12,00$)

How do i do this?


texts: SKU custom column on sales order grid causing non-static issue

texts:
I have followed the guide here by Volodymyr Vygovskyi, everything is working well, apart from when you filter by a sku, it causes the issue:

  Strict Notice: call_user_func() expects parameter 1 to be a valid callback, non-static method
  Atwix_ExtendedGrid_Model_Observer::filterSkus() should not be called
  statically  in
  /Applications/XAMPP/xamppfiles/htdocs/mag19/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
  on line 468

Investigating this I can see that he has the following as his filter_condition_callback:

'filter_condition_callback' => array('Atwix_ExtendedGrid_Model_Observer', 'filterSkus'),

whereby the observer is being called statically here:

  'Atwix_ExtendedGrid_Model_Observer'

In my attempts to fix this, I changed this to the variable $this, which causes the filterSkus function to not be found.

Thus, I then attempted to move the filter function to the helper data.php file. This then led to the sku column in sales_flat_order_item to not be found.

Likewise also tried changing the string declaration of the observer to Mage::getSingleton('Atwix_ExtendedGrid_model_observer'). But, this then causes the following error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sales_flat_order_item.sku' in 'where clause', query was: SELECT COUNT(DISTINCT main_table.entity_id) FROM `sales_flat_order_grid` AS `main_table` WHERE ((sales_flat_order_item.sku like '%lab%'))

I am at a loggerhead with how to fix this issue, thus was hoping someone could help me.


texts: Are there any tools for generating a csv file for translations of a module? I.e. detecting calls to __() within a module and outputting the information into a csv ready to be used as a translation file for the module?


texts: Product's reviews not displaying in single page in Magento 2?

texts:
I am trying to get reviews in single product page. To do that I am using - <?php $_items = $block->getReviewsCollection()->getItems(); ?>

But after putting this, I am getting:

  Fatal error : Call to a member function getItems() on
  null...... .

why i am getting this error? any suggestion would be appreciate.


texts: How do I set my product page in Magento in Ascending direction permanently

texts:
I am just new to Magento and I need some help as to How do I set my products in Ascending direction permanently through admin. Every time I go into my website t automatically puts the products in Descending order.
Thank You
Karryn


texts:
I'm actually migrate my website from Magento 1.7.0.2 to Magento 2.1.9. After mapping all the attributes and field, Everything works like a charm.
Now I have a big work with my products from M1 to M2

Can I modify everything I need in M2 and run the DELTA step (without changing my config.xml file) to sync only new orders / customers even if my attributes / settings changed ?


texts: Skip required custom option validation of simple product in magento 1.9

texts:
I am trying to modify default magento functionality.
On product page i have two custom option of a simple product.

Color with option (Red, Blue, Black, Custom)
Size with option (S, L, XL)

I have added one extra filed in admin custom option area to add extra value for Custom color option.

Now i want to do following,

When i select Color = Custom, want to hide Size and user can add product without Size option. Both Option (Color and Size) are required.

I want to skip validation for only Custom color option. I am new to magento so dont know how to achieve this. Please suggest me something.

Thanks,

UPDATE:

I have added code to show/hide option base on selection. But when i click on add to cart button, i am getting error message Please specify the product required option(s).


texts: Image won't displayed on front end, but displayed in back end "Static Block"

texts:
I was adding static block on my website and insert the image, but the image won't displayed in front end, but in back end "static block" the image was displayed. This is the code :

Because it didn't work I try thi : The code above generate after you clicking insert.

but before you clicking it,it was different, so I hide the editor and put it to the  it was work for both front and back end. But after i was logged out from admin page, both of image on front and back end crashed again.

How can I make it visible at least in front end ?
If there's no solution for this, is there any method to insert the image ?

Thanks so much for reading it.


texts: how to use cookie-free domains in magento?

texts:
I analyzed my website on Gtmetrix.com for optimization and the result was this:

  There are 245 components that are not cookie-free:

http://mysite.com/media/css/dabf35e7cd79eb387a68eed1d5f3f925.css
http://mysite.com/media/css/38f74ae13bf9722265996c2842cba8a5.css
http://mysite.com/media/js/b5de567c1b6b9d971394b4d4887370a1.js
http://mysite.com/skin/frontend/fortis/default/images/logo.png
http://mysite.com/media/wysiwyg/infortis/fortis/menu/custom/01.png
http://mysite.com/media/wysiwyg/infortis/fortis/menu/custom/02.png
http://mysite.com/media/wysiwyg/infortis/fortis/menu/custom/03.png
http://mysite.com/media/wysiwyg/infortis/fortis/slideshow/01.jpg
http://mysite.com/media/wysiwyg/infortis/fortis/slideshow/02.jpg
http://mysite.com/media/wysiwyg/infortis/fortis/slideshow/03.jpg
http://mysite.com/media/wysiwyg/infortis/fortis/slideshow/04.jpg
http://mysite.com/media/wysiwyg/infortis/fortis/slideshow/banner/01.png
http://mysite.com/media/wysiwyg/infortis/fortis/slideshow/banner/02.png
http://mysite.com/media/wysiwyg/infortis/fortis/slideshow/banner/03.png
http://mysite.com/media/wysiwyg/infortis/fortis/icons/large/paintbrush.png
http://mysite.com/media/wysiwyg/infortis/fortis/icons/large/responsive.png
http://mysite.com/media/wysiwyg/infortis/fortis/icons/large/menu.png
http://mysite.com/media/wysiwyg/infortis/fortis/custom/banners/03.png
http://mysite.com/media/wysiwyg/infortis/fortis/custom/banners/11.png
.
.
.

  Serve static content from a different domain to avoid unnecessary
  cookie traffic.

how to solve this?


texts: Need to display Sub category list on custom page

texts:
I need to display Sub categories of current clicked category on custom page. How can I achieve this?

In short, If I explain my main category is displayed in menu, when I click on main category menu a page needs to be opened in which it subcategories will be displayed.


texts:
What's the best way to enable a WYSIWYG editor for transactional emails? I would of thought this feature came natively with Magento but it doesn't seem that way

I have found the following free extension however I have heard bad things about it so wanted to see if there is something better
http://urthemes.com/magento-wysiwyg-editor-for-transactional-emails.html


texts: Magento 2 : Unable to change product status after programmatic import

texts:
I am importing my product programmatically , the product status is set by default to disabled via this code

$product =$productFactory->create()->load($_product->getIdBySku($row["model"]));
$product->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED);
$product->save();

Now I need to enable products manually from dashboard but it is not changing, neither in bulk nor individually.

P.S : I have updated indexers and cleared cache.

P.S 2 : changing status programmatically works fine.

Please Help.


texts:
we have a magento webshop, version 1.7.0.2

To promote the webshop we are also particip[ate at fairs to promote our shop and sell our products there too.

But when selling a product a the fair, the magento stock isn't being updated untill we add the order to the store.
But many times the fairs are very busy, so you don't have the time to directly update the stock. And vice versa.

Is there a way, e.g. with a phone, to scan the product or enter the sku and update the magento stock right a way.

The main thing is that this could be done very quickyly, but without the need of a computer!

On the kind of fairs we only have a phone (ios and android)

Who has a solution for this?


texts: How to add new Column in Products Listing in Magento 2

texts:
I am trying to add one more column on the product listing.

I have tried to with below code.

_listing.less

/
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .page-products {
        .products-grid {
            .product-item {
                width: 100%/3;
            }
        }
    }

    .page-products.page-layout-1column {
        .products-grid {
            .product-item {
                width: 100%/5;
            }
        }
    }
    // I added this
    .page-products.page-layout-2columns-left,
    .page-products.page-layout-2columns-right {
        .products-grid .product-item {
            width: 100%/5;
        }
    }
 // Till here

    .page-products.page-layout-3columns {
        .products-grid {
            .product-item {
                width: 100%/2;
            }
        }
    }
}

Please help me where I am going wrong.


texts:
My Magento wont send Mails out and i see this Error in the /var/exception.log:

exception 'Mage_Core_Exception' with message 'Ungültiger Blocktyp: Mage_Imprint_Block_Field' in /homepages/42/d544673642/htdocs/magento/app/Mage.php:543
Stack trace:
#0 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Ung\xC3\xBCltiger Blo...')
#1 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('imprint/field', Array)
#2 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Model/Email/Template/Filter.php(169): Mage_Core_Model_Layout->createBlock('imprint/field', NULL, Array)
#3 [internal function]: Mage_Core_Model_Email_Template_Filter->blockDirective(Array)
#4 /homepages/42/d544673642/htdocs/magento/lib/Varien/Filter/Template.php(163): call_user_func(Array, Array)
#5 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Model/Email/Template/Filter.php(548): Varien_Filter_Template->filter('{{block type="i...')
#6 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Model/Email/Template.php(530): Mage_Core_Model_Email_Template_Filter->filter('{{block type="i...')
#7 /homepages/42/d544673642/htdocs/magento/app/code/community/Mage/Advancedsmtp/Model/Email/Template.php(48): Mage_Core_Model_Email_Template->getProcessedTemplateSubject(Array)
#8 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Model/Email/Template.php(508): Mage_Advancedsmtp_Model_Email_Template->send(Array, Array, Array)
#9 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Model/Email/Template/Mailer.php(84): Mage_Core_Model_Email_Template->sendTransactional('8', 'sales', Array, Array, Array, '1')
#10 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Sales/Model/Order.php(1354): Mage_Core_Model_Email_Template_Mailer->send()
#11 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Sales/Model/Order.php(1369): Mage_Sales_Model_Order->queueNewOrderEmail(true)
#12 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(139): Mage_Sales_Model_Order->sendNewOrderEmail()
#13 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->emailAction()
#14 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('email')
#15 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#16 /homepages/42/d544673642/htdocs/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#17 /homepages/42/d544673642/htdocs/magento/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#18 /homepages/42/d544673642/htdocs/magento/index.php(87): Mage::run('', 'store')
#19 {main}

in the system.log is see this error:

2015-01-27T09:40:57+00:00 ERR (3): Warning: Illegal offset type  in /homepages/42/d544673642/htdocs/magento/lib/Zend/Mail.php on line 574

Does anybody know what this means? I cant handle this. Please help me with a tip.

Thanks

Tamás


texts: how to solve The requested URL was not found on this server issue before magento2 installation?

texts:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
127.0.0.1
Apache/2.4.37 (Win32) OpenSSL/1.1.1a PHP/7.3.0


texts: How to remove default cart icon image in header from my custom theme?

texts:
I have developed custom theme, and added own cart icon image using
app\design\frontend\Mytheme\theme\web\css\source_extend.less
.minicart-wrapper .showcart::before {
    // content: "" !important;
    background: url('../images/cart.png') no-repeat;
    width: 27px;
    height: 25px;
    padding-left: 37px !important;
  }

But default cart icon image also shown, how to remove default one.


texts:
I have trouble with some API calls, which results in this error in the log.
Call to undefined method Mage_Catalog_Model_Resource_Product_Flat::loadAllAttributes()

As far as I can see the mentioned loadAllAttributes()-method is supposed to exist in the app/code/core/Mage/Catalog/Model/Category.php file. However, this is not the case. I have also tried checking a completely clean install of Magento, but can't find the mentioned method in the clean version of Category.php either.

Does anyone have a clue to what causes this error and how to fix it?


texts: magento multilanguge sort order of store

texts:
I have multilanguage multistore magento. Below is my store switchers code. Where can I put sort or ksort to arrange stores by ID not name. As by default store is sorted by name and its not what i want.

<?php if(count($this->getGroups())>1): ?>
<div class="language-switcher" style="margin-left:15px">
    <label for="select-store"><?php echo $this->__('Select Store') ?>: </label>
    <select id="select-store" onchange="location.href=this.value">
    <?php /*foreach ($this->getStores() as $_store): ?>
        <option value="<?php echo $_store->getUrl('') ?>"<?php if($_store->getId()==$this->getCurrentStoreId()): ?> selected="selected"<?php endif; ?>><?php echo $_store->getName() ?></option>
    <?php endforeach;*/ ?>
    <?php foreach ($this->getGroups() as $_group): ?>
        <?php $_selected = ($_group->getId()==$this->getCurrentGroupId()) ? 'selected="selected"' : '' ?>
        <option value="<?php echo $_group->getHomeUrl() ?>" <?php echo $_selected ?>><?php echo $this->htmlEscape($_group->getName()) ?></option>
    <?php endforeach; ?>
    </select>
</div>
<?php endif; ?>


texts:
In magento 1 paypal redirect message displayed on the page this way:
/app/design/frontend/base/default/template/paypal/payment/
"getRedirectMessage() ?>"
What function in magento 2 do the same? and which file is it in?


texts: How to add custom page before checkout for extra questionnaires ? Magento 1.9

texts:
I want to add custom page which will have a form with some questions.

Customer needs to fill out that form and then go to checkout. This form will be related to order and admin can see that filled form in order view.

Per order there will one questionnaires form.

Custom questionnaire page between cart and checkout page.

How do I achieve this?

Thanks.


texts: How to show all image product in description product

texts:
I use Magento 1.9.1
I want to show all image product in description, because it have protect by watermark
I have google search "how to", but code not working

This code not work, when i insert to description.html, all content after code not show, and image not show

<?php $_images
=Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages();?><?php if($_images){?><?php $i=0;foreach($_images as $_image){ $i++;?> <img src="<?php echo $this->helper('catalog/image')->init($_product,'thumbnail', $_image->getFile())->resize(108,90);?>" alt="<?php echo $this->htmlEscape($_image->getLabel());?>" title="<?php $this->htmlEscape($_image->getLabel());?>" /><?php }?><?php }?>

When I use this code, it only show 1 image first:

<?php echo 'helper('catalog/image')->init($this->getProduct(), 'image')->keepAspectRatio(true)->keepFrame(false)->resize(680, null).'"/>';?>


texts: Add product to wishlist using Ajax - get response message

texts:
I'm trying to implement adding product to wishlist using ajax. I have managed to do this but I can't get the success message from response ("You have added X product to wishlist").

require([

'jquery',

], function(jQuery){

    (function($) {

        $(document).ready(function(){

            $('#product-addtowishlist-button').click(function(){
                var parsedJson = $.parseJSON($(this).attr( "dtcustom" ));
                var url = parsedJson.action;
                var data1 = parsedJson.data;
                var current_prod = data1.product;
                var current_uenc = data1.uenc;

                formKey = $('input[name="form_key"]').val();
                var data = {
                    action   : "add-to-wishlist",
                    form_key : formKey,
                    product  : current_prod,
                    uenc     : current_uenc
                }

                $.ajax({

                    url: url,
                    data: data,

                    beforeSend: function(xhr, options) {
                        jQuery('#loading').show();
                    },

                    success: function(data,textStatus,jqXHR){
                        if (textStatus == 'success') {
                            //can't find success message in response html
                        }
                    }
                });
                return false;

            });

        });

    })(jQuery);

});

Adding product to wishlist usually redirects to Wishlist page, displaying a success message. But in this case response data does not contain that message.

Is there a better way to do the ajax call? Am I missing something here?


texts: Magento2 - admin special price input's are rounding value to 2 decimals

texts:
Referring to Magento2 - admin price input's are rounding value to 2 decimals
There is a perfect solution made by https://magento.stackexchange.com/users/86273/melvin for saving tier prices with 4 decimals.
I was wondering if there is any solution to save special prices as 4 decimals as well?
The code that Melvin made in Magento 2 is in /app/code/YourCompany/YourModule/Ui/DataProvider/Product/Modifier/Price.php
And the code is:
/**
 * Copyright © 2020 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Vicus\DecimalPrice\Ui\DataProvider\Product\Modifier;
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Magento\Catalog\Api\Data\ProductAttributeInterface;
use Magento\Catalog\Model\Locator\LocatorInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\UrlInterface;
use Magento\Ui\Component\Form\Field;
/**
 * Class Eav
 *
 * @api
 *
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 * @SuppressWarnings(PHPMD.TooManyFields)
 * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
 * @since 101.0.0
 */
class Price extends AbstractModifier
{
     public function __construct(
        LocatorInterface $locator
    ) {
        $this->locator = $locator;
    }

    public function modifyData(array $data)
    {
        if (!$this->locator->getProduct()->getId() && $this->dataPersistor->get('catalog_product')) {
            return $this->resolvePersistentData($data);
        }
        $productId = $this->locator->getProduct()->getId();
        $productPrice =  $this->locator->getProduct()->getPrice();
        $data[$productId][self::DATA_SOURCE_DEFAULT]['price'] = number_format((float)$productPrice, 4, '.', '');

        if(isset($data[$productId][self::DATA_SOURCE_DEFAULT]['tier_price'])){
             foreach($data[$productId][self::DATA_SOURCE_DEFAULT]['tier_price'] as $key => $tierPrice){
                $data[$productId][self::DATA_SOURCE_DEFAULT]['tier_price'][$key]['price'] = number_format((float)$tierPrice['website_price'], 4, '.', '');
             }
        }

        if(isset($data[$productId][self::DATA_SOURCE_DEFAULT]['special_price'])){
             foreach($data[$productId][self::DATA_SOURCE_DEFAULT]['special_price'] as $key => $tierPrice){
                $data[$productId][self::DATA_SOURCE_DEFAULT]['special_price'][$key]['price'] = number_format((float)$tierPrice['website_price'], 4, '.', '');
             }
        }

        return $data;
    }

    public function modifyMeta(array $meta)
    {
        return $meta;
    }

}```


texts: How to call static block by xml to phtml without refrence

texts:
I want to call a static navigation block in topmenu.phtml

I defined that in default.xml

<block class="Magento\Cms\Block\Block" name="top_links">
            <arguments>
                <argument name="top_links" xsi:type="string">top_links</argument>
            </arguments>
</block>

And calling in .phtml like this.

<nav class="navigation" data-action="navigation">
    <ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
       <?php echo $this->getLayout()->getBlock('top_links')->toHtml();?>
    </ul>
</nav>

But its not working please suggest how to do this.

I don't want to call direct on .phtml like this.

<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();?>


texts: Magento 2: set default data for an ui component field from DataProvider

texts:
I want to set a default value for an uiComponent field (shipping_id in this case) from the DataProvider (not from the form's XML, but from PHP). This is because the default value is dynamic (i am creating a new record based on a shipping id).
In my DataProvider:
    public function getData()
    {

        foreach ($this->collection->getItems() as $item) {
            $this->_loadedData[$item->getId()]['general'] = $item->getData();
        }

        if (empty($this->_loadedData)) {
            //set default values

            /** @var ShipmentInterface $shipment */
            $shipment = $this->persistor->get('shipment');
            $this->_loadedData['general']['shipment_id'] = $shipment->getEntityId();
        }

        return $this->_loadedData;
    }

and in my form's XML i am having a fieldset:
    <fieldset name="general">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">General</item>
            </item>
        </argument>
        <field name="shipment_id">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">number</item>
                    <item name="label" xsi:type="string" translate="true">Shipment ID</item>
                    <item name="formElement" xsi:type="string">hidden</item>
                </item>
            </argument>
        </field>
        ...
    </fieldset>

Anyway, the code above from the DataProvider is working partially, it loads existing data, but when adding, the hidden field has no value.
Any idea how to reference a field from a fieldset when adding/editing data?
What should be the structure of $this->_loadedData when adding/editing data?
Thank you.


texts: How to add custom checkout step after payment and review step?

texts:
I want to add an additional checkout step after the payment and review step.
if anyone knows the solution to add the custom checkout step after payment and review step then please add a solution here.

Thank you.


texts:
I want all the attributes of sales/order with their name and front-end label.
I've tried following. But its not working.

Mage::getResourceModel('sales/order_attribute_collection');

By following code i was able to get all the fields. But its not giving me Front-end labels. I want front-end labels as well...

$resource       = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
$tableName      = $resource->getTableName('sales/order');
$salesfield     = $readConnection->describeTable($tableName);

Thanks.

EDIT :
Browsing following folder structure

1. app\code\core\Mage\Sales\Model\Resource\Order\Attribute
2. app\code\core\Mage\Sales\Model\Entity\Order\Attribute
3. app\code\core\Mage\Sales\Model\Mysql4\Order\Attribute

I found Attribute folder does not have collection.php file like 'catalog/product' or 'customer' modules have.


texts: How to truly disable modules in magento2

texts:
I have a module that has errors when compiling.

I am disabling it via cli: magento module:disable Aheadworks_Layerednav.

Then magento module:status shows the module as disabled. Cleared cache, removed everything from var folder.

But then when I run magento setup:di:compile I get
Errors during compilation:

    Aheadworks\Layerednav\Block\Navigation
        Incorrect dependency in class Aheadworks\Layerednav\Block\Navigation in /data/web/public/app/code/Aheadworks/Layerednav/Block/Navigation.php
\Magento\Store\Model\StoreManagerInterface already exists in context object

My expectation was that disabled modules aren't compiled.


texts:
Warning:
  include_once(/home/archtraders/stationerypoint/includes/src/Mage_Core_functions.php):
  failed to open stream: No such file or directory in
  /home/archtraders/stationerypoint/app/Mage.php on line 36

  Warning: include_once(): Failed opening
  '/home/archtraders/stationerypoint/includes/src/Mage_Core_functions.php'
  for inclusion
  (include_path='/home/archtraders/stationerypoint/includes/src:.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php')
  in /home/archtraders/stationerypoint/app/Mage.php on line 36

  Warning:
  include(/home/archtraders/stationerypoint/includes/src/Mage_Core_Model_App.php):
  failed to open stream: No such file or directory in
  /home/archtraders/stationerypoint/includes/src/Varien_Autoload.php on
  line 94

  Warning: include(): Failed opening
  '/home/archtraders/stationerypoint/includes/src/Mage_Core_Model_App.php'
  for inclusion
  (include_path='/home/archtraders/stationerypoint/includes/src:.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php')
  in /home/archtraders/stationerypoint/includes/src/Varien_Autoload.php
  on line 94

  Fatal error: Class 'Mage_Core_Model_App' not found in
  /home/archtraders/stationerypoint/app/Mage.php on line 670

web : www.stationerypoint.com.au


texts:
I have a performance problem with Magento 2.1

In my shop, I have 90.000 products. I added these products to soap. When I did this it took round about 7 seconds for each article (product?) (Request>Response). In summary, it took a few days to init all products.

Now all the products are in the shop. All a few weeks I have to update some things on the articles (products). When I do this with soap again, it takes the same duration. When I do updates the shop is unusable. An example request and response are here: https://pastebin.com/aqnMJk98  https://pastebin.com/UAh0h8Zz

My server has a 12 core CPU, 24 GB RAM, and SSD. Its running Ubuntu 16.04 with Apache2 PHP7-fpm and MYSQL.

When I watch the update process I see that 5 cores with MySQL are at 100% PHP is working a little bit and the rest is idle. The ram is only a small amount used iotop says that my SSD is bored.

I watched the database performance and saw that Magento fired in the adding process thousands of commands to the database. Is this OK?

When I update it with the Magento CSV import it is much faster.

What can I do to speed this Magento2 up? In this situation its impossible to work well with this shop.


texts: Magento 2.3 use default value problem admin

texts:
In my magento 2.3 I have two store views. I noticed today in product page in every field which has store view, the use default value isn't working as expected.
For example:
I have a product in default store view with

Name: test
Attribute 1: test

I change store view to my English store, uncheck use default value and change same product:

Name: Test EN
Attribute 1: Test EN

Now I have default store view and English store view saved.
If I go back to product, English store and in

Name
Attribute 1

Press the use default value it should take the fields from the default store. Like in Magento 1. In my example:

Name: test
Attribute 1: test

But instead it gets null. Blank field
Has anyone this problem? Is this a bug?


texts:
Hello I have problem with fill vaues to UI form. I have dataprovider it send correct values in Array, but Form not fill. I know, when I have grid and i will send url for exmaple: /set/data/index/id/1 - it show data. But  I need fill data from table without URL request. Who can help me? Thanks.
public function getData()
{

$id_firmy = 1; // load data

$this->collection->addFieldToFilter('id',$id_firmy);

foreach ($this->getCollection() as $page) {
        $this->loadedData[$page->getId()] = $page->getData();
        print_r($page->toArray([]));
        die();
    }

return $this->loadedData;
}

Output array:
Array ( [id] => 1 [user_id] => 2 [jmeno] => name [prijmeni] => surname [firma] => firm, s.r.o. [ic] => 044612472 [dic] => CZ04143072 [ulice] => street 212 [mesto] => Prague [psc] => 21200 [telefon] => 7736123456 [email] => dawe@google.cz [stav] => 0 )


texts: Where are layout handles defined by a module?

texts:
I want to find all of the handles available for a module whether they are in vendor/magento/module/view/layouts/... or not.

What is the best way to see all of the handles that can be used for a module?


texts: How do I restore Magento Cloud environments deleted by GitHub integration?

texts:
I followed the instructions to setup a GitHub integration with my Magento Cloud Pro project. This project has not been made live yet, but has been in development for several months and therefore has 1k+ commits. I took a snapshot of my Integration environment and ran the command as documented:

magento-cloud integration:add --type=github --project ...

There were additional prompts that appeared after running, with what seemed to be reasonable defaults, which I accepted.

Build pull requests (--build-pull-requests)
Build every pull request as an environment? [Y|n]

Build pull requests post-merge (--build-pull-requests-post-merge)
Build pull requests based on their post-merge state? [y|N]

Clone data for pull requests (--pull-requests-clone-parent-data)
Clone the parent environment's data for pull requests? [Y|n]

Fetch branches (--fetch-branches)
Fetch all branches from the remote (as inactive environments)? [Y|n]

Prune branches (--prune-branches)
Delete branches that do not exist on the remote? [Y|n]

After the last question it created a webhook and created the integration.

Oh, then it deleted all my environments apart from Master, Production, and Staging.

I'm guessing it's the last prompt that screwed me up --prune-branches. Shame on me for not pausing to consider what that might do (note: this option isn't documented in the instructions).

What can I do to restore these environments?

Unlike deleting an environment through the Magento Cloud GUI, these appear to be gone. They aren't there and deactivated.


texts: Magento 1.9 Add new fields in registration form?

texts: I want to 3 additional fields in customer registration form (only for my Brasilian shop) and store these in the user data in the backend.


texts: In magento 2.3 I'm not able to remove white space around gallery image on product detail page

texts:
I have installed magento 2.3 version, and I'm not able to remove frame from fotoroma image.

I have tried to override/extend view.xml from parent theme and tried options like <frame>false</frame>, but that also didn't work.

Here is my extended view.xml:

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
    <media>
        <images module="Magento_Catalog">
            <image id="product_page_image_large" type="image" />
            <image id="product_page_image_medium" type="image">
                <width>518</width>
                <height>712</height>
                <frame>false</frame>
            </image>
            <image id="gift_messages_checkout_small_image" type="small_image">
                <width>368</width>
                <height>275</height>
            </image>
            <image id="mini_cart_product_thumbnail" type="thumbnail">
                <width>368</width>
                <height>275</height>
            </image>
            <image id="product_thumbnail_image" type="thumbnail">
                <width>368</width>
                <height>275</height>
            </image>
            <image id="rss_thumbnail" type="thumbnail">
                <width>368</width>
                <height>275</height>
            </image>
            <image id="sendfriend_small_image" type="small_image">
                <width>368</width>
                <height>275</height>
            </image>
        </images>
    </media>
</view>


texts: Magento Fatal Error Class 'Zend_Cache' not found

texts:
I'm getting this error when I try to open the backend at my Magento shop:

  Fatal error: Class 'Zend_Cache' not found in app/code/core/Mage/Core/Model/Cache.php on line 135

Anyone knows what to do?


texts:
I need to detect when a customer changes their password.

Here is my config file:

<?xml version="1.0"?>
<config>
    <modules>
        <Sri_log>
            <version>1.0</version>
        </Sri_log>
    </modules>
    <global>
        <models>
            <log>
                <class>Sri_log_Model</class>
            </log>
        </models>
        <events>
            <customer_save_before>
                <observers>
                    <log>
                        <type>singleton</type>
                        <class>log/Observer</class>
                        <method>detectPwdChange</method>
                    </log>
                </observers>
            </customer_save_before>
        </events>
    </global>
</config>

my observer.php

<?php
class Sri_Log_Model_Observer {

    public function detectPwdChange(Varien_Event_Observer $observer) {
        $event              = $observer->getEvent();
        $customer           = $event->getCustomer();
        $postData           = Mage::app()->getRequest()->getPost();

        if($customer instanceof Mage_Customer_Model_Customer && !$customer->isObjectNew()) {

            if( $postData['change_password'] == 1 && $postData['current_password'] != $postData['password'] ) {
                // Do something
                $file = 'test.txt';
                $message = "test\n\n";
                file_put_contents($file, $message, FILE_APPEND);

            }
        }

        return $this;
    }

}

My module is enabled so app/etc/modules/Sri_log.xml is ok but the event is not working.


texts: magento migrate:settings fails with prefix on destination database 1.9.3.1 to 2.3.3

texts:
Steps.

Edit vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.1/config.xml for database config at old and new databases.

    <source>
        <database host="localhost" name="old_database" user="old_user" password="PaSswOrD" />
    </source>
    <destination>
        <database host="localhost" name="new_database" user="new_user" password="PaSswOrD" />
    </destination>
    <options>
        <destination_prefix>ovh</destination_prefix>

My Old database has not prefix
New database has prefix ovh_ (I've tried on change in settings file to ovh_ also). Also tried <dest_prefix>ovh_</dest_prefix>
Execute magento migration tool

magento migrate:settings /home/tienda/tienda_develop/magento/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.1/config.xml

Get error:

[2019-11-05 16:27:15][INFO][mode: settings][stage: integrity check][step: Settings Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-11-05 16:27:15][ERROR]: Integrity check failed due to "core_config_data" document does not exist in the destination resource
[NOTICE]: Please check if table names uses prefix, add it to your config.xml file
[2019-11-05 16:27:15][INFO][mode: settings][stage: integrity check][step: Stores Step]: started
100% [============================] Remaining Time: < 1 sec

I work over official manual


texts: I have a store in Magento 2.1.7. My emails were working fine a few days ago but suddenly it stops working. I also noticed my config fields in the admin panel are also not editable anymore and I'm not able to change copyright text as well. I don't know what happened. I tried to clear magento cache but no success.


texts: Which Attribute Type for layered nav and filterable numeric value

texts: I would like to put an Attribute called "Volume" to my Magento Online Shop. Products should be sorted by this attribute and it should be filterable through the layered navigation. since text attributes are not filterable in layered navigation and multi select fields not sortable i actually dont know how to acomplish that. any idea maybe ? i was thinking about a price attribute but then it would be there in EUROs not in Liters for example...


texts: How can we create first time user : customer group in magento 2

texts: I wish to use coupons for first time user, for this want to create one custom customer group which will be only registered not buyer to website. How to achieve this ?


texts:
I sadly was deleting a core file and can't get it back.
It is this one:

  /magento/vendor/magento/module-sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php

Can someone post it?
Thanks!:-)


texts: What is the difference between getStoredData and getData?

texts:
I'm adding some custom logic in the admin when the customer is saved. I've created an observer on the customer_save_before event. I am using the following code to get the customer:

/** @var \Magento\Customer\Model\Customer $customer */
$customer = $observer->getEvent()->getCustomer();

While I was relying on $customer->getGroupId() to get the customer group ID for example I noticed some unexpected behaviour. It was returning the wrong value (it was returning id=1 but in the database the id=4).

Looking into the issue, I've noticed the getStoredData method on the \Magento\Framework\Model\AbstractModel (which is extended by  \Magento\Customer\Model\Customer) which returns the correct data form the database.

I wonder why getData is not returning the correct data in this case. I see that \Magento\Framework\Model\AbstractModel::storedData is being updated with the \Magento\Framework\Model\AbstractModel::_data by \Magento\Framework\Model\AbstractModel::updateStoredData on certain events, but I wonder how reliable storedData is.


texts: PHP Fatal error: Cannot declare class Zend_Mail_Message after composer update Magento 2.2.7

texts:
Does anybody know how to fix this? When running the index

PHP Fatal error:  Cannot declare class Zend_Mail_Message

I already tried

Deletion of cache, redis, generated folder etc
Setup upgrade and compilation

Search of class returns only this

find . -type f -exec grep "class Zend_Mail_Message" '{}' \; -print

class Zend_Mail_Message_File extends Zend_Mail_Part_File implements Zend_Mail_Message_Interface

./vendor/magento/zendframework1/library/Zend/Mail/Message/File.php
class Zend_Mail_Message extends Zend_Mail_Part implements Zend_Mail_Message_Interface

./vendor/magento/zendframework1/library/Zend/Mail/Message.php

I updated these packages through composer


texts:
I am in Magento 2.3.4,
I have added a main category to the root, but the menu does not show me in the front-end of the e-commerce

In the image it is shown that the category is enabled to be shown in the munu, however, it does not appear, is there a way to do it?


texts: Removed state and country from estimate shipping

texts:
I have removed region id from estimate shipping based on enter link description here

It seems that after this change I can't see/get taxes for a region. If I set the tax rule for USA and all regions then I can see tax field. If I set the same rule to be for a specific region then I am not able too see taxes.

Can someone give me an idea how to fix this?


texts: Magento 2: How to override UI component XML grid?

texts:
I need to override sales_order_grid.xml from ui_component of Magento_Sales.

I want to remove some part of it but I don't know how to override it, I know how to override phtml from the custom module but for ui_component I have no idea.

[EDIT]

I will have multiple admin account, I don't want them to have access to some options and also I don't want them to see useless columns. The less thing they have to do the better it is.

[EDIT2]

Ok, i find that I can make in custom module the sales_order_grid.xml file under view/adminhtml/ui_component/. So this is the file :

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="visible" xsi:type="boolean">false</item>
                    <item name="filter" xsi:type="string">dateRange</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                    <item name="dataType" xsi:type="string">date</item>
                    <item name="label" xsi:type="string" translate="true">Purchase Date</item>
                    <item name="dateFormat" xsi:type="string">MMM dd, YYYY, H:MM:SS A</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

As you can see, I try to set visible to false for created_at column.

Result : The column is still here, but not the filter panel like I show here :

Also, when I inspect element, and I set Display: none to the table, the block is here.


texts: PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento 2.3

texts:
When running php bin/magento setup:upgrade i see this error.
{"messages":{"error":[{"code":500,"message":"Server internal error. See details in report api\/499296787794"}]}}

Searching on my error_log_php i see this
    PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\Downloadable\Api\DomainManagerInterface in /home/user/MySite/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace:
#0 /home/user/MySite/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Downloa...')
#1 /home/user/MySite/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Downloa...')
#2 /home/user/MySite/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Downloa...', NULL, 'domainManager', 'Magento\\Downloa...')
#3 /home/user/MySite/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\Obje in /home/user/MySite/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50

I've seen suggestions for deleting var and generated folder, but it didn't work.
I'm interested in solving this since I need to install a new module.
What could be the issue, and I could solve this?

EDIT
I've also found that it could be a problem related to the leftovers of a badly removed module. If that is the case, how could I check for it? I haven't installed anything recently, so any issue related to this would be hard to track only with memory.


texts: How to override customerData folder's file in magento 2?

texts: I want to override app/code/Magento/Checkout/CustomerData/DefaultItem.php file. Becuase i have to change in this file. So how can i override this file


texts:
I need to set a particular product as related product for all the products.Here is the code that I've tried.

$product=$observer->getProduct();
$id=52;
$data=array(
            $id=>array(
                'position'=>2
            )
        );
$p=Mage::getModel('catalog/product')->load($product->getId());
$p->setRelatedLinkData($data);
$p->save();

But I get error

  Fatal error: Maximum function nesting level of '100' reached,
  aborting! in
  /var/www/magento/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php
  on line 205

Any pointers would be helpful.


texts: Getting value through javascript and REST api

texts:
The problem actually is defined in two steps:
1. How to define a REST Api which returns an array?
2. How to use that REST Api through javascript?

Description:
What I have done but not achieved results:
etc/frontend/webapi.xml:

<?xml version="1.0"?> <routes
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

    <route url="/V1/shetab/transaction/refid" method="POST">
        <service class="Amaj\ShetabPayment\Api\ShetabServiceInterface" method="getTransRefId"/>
        <resources>
            <resource ref="anonymous" /><!-- works even if user has been logged of -->
        </resources>
    </route>

</routes>

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="Amaj\ShetabPayment\Api\ShetabServiceInterface"
                type="Amaj\ShetabPayment\Model\ShetabService" />
</config>

Api/ShetabServiceInterface.php:

interface ShetabServiceInterface
{
    /** Returns Transaction Reference ID
     *
     * @param int $quoteId
     * @return string|null
     */
    public function getTransRefId($quoteId);
}

Model/ShetabService.php:

namespace Amaj\ShetabPayment\Model;

interface ShetabService implements \Amaj\ShetabPayment\Api\ShetabServiceInterface
{
    protected $_logger;

    public function __construc(
        \Psr\Log\LoggerInterface $logger
    ) {
        $this->_logger = $logger;
    }

    /** Returns Transaction Reference ID
     *
     * @param int $quoteId
     * @return string|null
     */
    public function getTransRefId($quoteId)
    {
        $this->_logger->info('getTransRefId is called: ' . $quoteId);
        $result = array(
            'transRefId' => 50
        );
        return json_encode($result);
    }
}

Javascript code:

define(
    [
        'jquery',
        'Magento_Checkout/js/model/url-builder',
        'mage/storage',
        'Magento_Checkout/js/model/error-processor',
        'Magento_Checkout/js/model/full-screen-loader'
    ],
    function (
        $,
        urlBuilder,
        storage,
        errorProcessor,
        fullScreenLoader
    ) {
        'use strict';

        return {
            getTransRefId: function(quoteId, messageContainer) {

                var result = storage.post(
                    urlBuilder.createUrl('/shetab/transaction/refid', {}),
                    JSON.stringify({
                        quoteId: quoteId
                    })

                ).fail(
                    function (response) {
                        errorProcessor.process(response, messageContainer);
                        fullScreenLoader.stopLoader();
                    }
                );
                console.log( JSON.stringify(result.responseText) );
            }
        };

    }
);


texts: magento 2 .Product Fields Auto-Generation / category Fields Auto-Generation, /meta tag description

texts:
Prepare Dynamic Solution For,

If product having no title, meta description as per the images then it will going to get the data from system configuration.

If category having no title, meta description as per the images then it will going to get the data from system configuration.


texts: *Solved* Warning: include(/public_html/includes/src/addon.php) [function.include]: failed to open stream: No such file or directory

texts:
Here's my site:
http://wholesale.navajomfg.com/

Yesterday I started receiving this error, it seems to happen whenever an addon module is called:

Warning: include(/home/navajo/public_html/includes/src/Clever_Cms_Model_Mysql4_Page.php) [function.include]: failed to open stream: No such file or directory  in /home/navajo/public_html/includes/src/Varien_Autoload.php on line 93

#0 /home/navajo/public_html/includes/src/Varien_Autoload.php(93): mageCoreErrorHandler(2, 'include(/home/n...', '/home/navajo/pu...', 93, Array)
#1 /home/navajo/public_html/includes/src/Varien_Autoload.php(93): Varien_Autoload::autoload()
#2 [internal function]: Varien_Autoload->autoload('Clever_Cms_Mode...')
#3 [internal function]: spl_autoload_call('Clever_Cms_Mode...')
#4 /home/navajo/public_html/includes/src/__default.php(23743): class_exists('Clever_Cms_Mode...')
#5 /home/navajo/public_html/includes/src/__default.php(23777): Mage_Core_Model_Config->getModelInstance('cms_resource/pa...', Array)
#6 /home/navajo/public_html/app/Mage.php(490): Mage_Core_Model_Config->getResourceModelInstance('cms/page', Array)
#7 /home/navajo/public_html/app/code/community/Clever/Cms/controllers/IndexController.php(10): Mage::getResourceModel('cms/page')
#8 /home/navajo/public_html/includes/src/__default.php(13872): Clever_Cms_IndexController->indexAction()
#9 /home/navajo/public_html/includes/src/__default.php(18235): Mage_Core_Controller_Varien_Action->dispatch('index')
#10 /home/navajo/public_html/includes/src/__default.php(17769): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /home/navajo/public_html/includes/src/__default.php(20369): Mage_Core_Controller_Varien_Front->dispatch()
#12 /home/navajo/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#13 /home/navajo/public_html/index.php(87): Mage::run('wholesale', 'website')
#14 {main}

If I delete the Clever_CMS.xml from the /modules folder (disabling it) the site works but the error reoccurs whenever I visit a page that calls another module.

Furthermore, the Product pages are completely blank - no code or anything (see http://wholesale.navajomfg.com/wine-stopper.html)

Also, in the admin, the "Pages" page doesn't show any pages or the frame to add pages, etc. It's just blank. The other pages in the CMS section (like Static Blocks) works as usual.

All I did yesterday was change some directory and file permissions. I've done my best to reset them all. Still, I don't see how changing permissions would cause this!

I'm not much of a programmer but I can typically follow technical instructions. Please help if you are able! Thanks!

*SOLVED**
I found the solution to this problem.

Flushed the cache, logged back out and back in
Then enabled the Compiler and Recompiled. (in System/Tools/Compilation)

It worked. Couldn't believe how simple the solution was - I thought I really broke the site!


texts: How to send transaction email with transaction email id magento2

texts:
I want to send transaction email with specific ID(transaction email id) with cron scheduled.

can anyone help me on this

thanks


texts: Magento2: Duplicated stores - base_url problem

texts:
We have store Store A installed in public_html/magento2 (available under live.storeAAA.com)
We duplicated public_html/magento2 ->
public_html/magento_copy
So we ended up with 2 folders with exactly the same contents:

public_html/magento2
public_html/magento_copy

Both installations use different DB (also clonned)
I set the web server so that url copy.storeAAA.com points to newly cloned folder (public_html/magento_copy).
Then, I changed in cloned DB (the one for public_html/magento_copy) all instances of live.storeAAA.com to copy.storeAAA.com.

Now, if I access copy.storeAAA.com it still redirects me to live.storeAAA.com.

Please let me know what I'm missing? Is there any other place (apart from the DB) where I have to change the base URL?


texts: How can we set a Button is By default selected in Magento 2?

texts: I need help, there are three buttons in my phtml file , In that page I want to one button is selected by default when the page is load or refresh in Magento 2?


texts: Apply gift vouchers to the total invoice amount (including taxes & shipping)

texts:
I am looking for a way to offer and process gift cards in Magento 2.3.4.

The vouchers should be able to be used to cover the entire shopping cart including all taxes and shipping costs. Is this possible without additional extensions in Magento 2.3.4?

I found out that it is possible to configure Gift Vouchers using Magentos shopping cart rules, but Gift Vouchers with a fixed discount value cannot be applied to the entire shopping cart (products incl. taxes & shipping) without further enhancements.


texts: Aheadworks Blog - Retrieving Category id and identifier on blog category view

texts:
I am working with the AW Blog extension ( http://www.magentocommerce.com/magento-connect/blog-community-edition-by-aheadworks.html ) and trying to find a way to retrieve the ID (should be a number) and the 'identifier' (the URL key) of the current blog category I am on when viewing a Blog category page, on the aw_blog/cat.phtml template file or any other template file I might call on that page (eg. a block in the sidebar, etc.)

Something in the form of:

<?php echo $currentBlogCat->getId(); ?>

and/or

<?php echo $currentBlogCat->getData('identifier'); ?> would be great.

I've tried searching through discussion boards and not had any luck yet. Any help would be greatly appreciated, thanks very much!

I'm using CE 1.7.0.2


texts:
I'm getting the next message when I try to add a widget on a block;

Insert Widget...

There has been an error processing your request

Class Magento\Widget\Controller\Adminhtml\Widget\Index\Interceptor does not exist

How can I solve this?


texts: Magento2: How can I logout customer from controller?

texts:
In Magento 2, I want to write a custom controller. Whenever anyone tries to call the controller

  URL (http://mymagento.com/mycontroller/index/index).

It should redirect to this controller an event dispatch should trigger to logout from Magento 2 site.


texts: Add a wysiwyg editor in custom category attribute

texts:
I have added a WYSIWYG editor in extension so that one can add a WYSIWYG editor in the attribute. So i added these think in the main.php

  array(
        'value' => 'wysiwyg',
        'label' => Mage::helper('catalog')->__('WYSIWYG Editor')
    ),

Now what i do for get the WYSIWYG editor in the category.


texts:
This relates to Magento 2.1.3. In final_price.phtml, when there is a special price, the regular price (or "old price") is also displayed.

Currently, my shop is set to display prices Excluding and Including Tax. The special price shows as both Excluding and Including, but the regular price shows only Including.

I need to change this so that I have the regular prices shown as either Excluding tax only, or both Excluding and Including tax.

The default code to display the regular price is:

<span class="old-price">
    <?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [
        'display_label'     => __('Regular Price'),
        'price_id'          => $block->getPriceId('old-price-' . $idSuffix),
        'price_type'        => 'oldPrice',
        'include_container' => true,
        'skip_adjustments'  => true
    ]); ?>
</span>

Unless I have missed a trick, it doesn't appear possible to change much in the behaviour/format of the amount rendering process. I've checked Magento's documentation for the pricing model which doesn't appear to have an answer for this situation.

The only way I've found is to remove the "skip_adjustments" line. This causes both Regular ex-vat and inc-vat prices to show, but it has a nasty unwanted side effect: on the Product page, the special price will be adjusted by JavaScript to the regular price. This renders this method pretty much unworkable.

Is there a better way to achieve this?


texts:
In my Magento 2 store, I want to be able to pass a custom URL parameter source to my order, so that when the order is complete, we know what value (if any) was in the query string for the source key.
Example: If a user gets to a product via
www.my-magento-2-store.com/my-product.html?source=facebook
...and ends up placing an order for that product, I want to record in the database that the source for that order was facebook.
Is there any way to do this? I have seen it set up this way on a Magento 1 store.


texts:
I need to create a page that automatically shows a list of all products with catalog rules applied. This page should also include layered navigation.

Which is te best way to achieve it?

I tried creating a page and link it to a block:

  {{block class="Vendor\ModuleName\Block\Sales"
  template="Vendor_ModuleName::sales.phtml"}}

And appended layered navigation in Layout Update XML area, linking Mageplaza_LayeredNavigation overriding Magento Layered navigation.

Then, in my module I created the sales.phtml page inside /view/frontend/templates with the view on it and the block/Sales.php, with a custom product collection.

protected function _getProductCollection()
{
    if ($this->_productCollection === null) {
        $layer = $this->getLayer();
        $this->_productCollection = $layer->getProductCollection();
        $params = $this->getRequest()->getParams();
        if(count($params)){
            // Make sure array key is attribute code
            foreach($params as $key => $value) {
                if ($key != "page_id") {
                    $this->_productCollection->addAttributeToFilter($key,array('eq' => intval($value)));
                }
            }
        }
        $this->_productCollection->getSize();
    }
    return $this->_productCollection;
}

The thing is that I'm able to show products correctly but when I filter I'm facing several problems:

It appends a search_tmp_xxx table that makes no result returned
It makes that layered navigation appends the attribute and value to url when filter applied but not refreshing data until you manually refresh the page
The attribute count in layered navigation does not count items correctly


texts:
Using Appoptics server monitoring tool which alerts should i set.
My site is in magento2.
Or a list of alerts to be set for php environment.Thanks


texts: Max customer order quantity, spend limit per month

texts: I want to apply restrictions for customers. A customer can have  maximum 99 orders per month and the total monthly purchase limit should be 500$.Any help.


texts: Avoid invalidating product flat table reindexing upon product attribute value save

texts:
Magento 1.7.

I noticed that when you update inventory quantities, a reindex of catalog_product_flat is not required.

That's useful, because I can set up a cron job to update inventory every night at 3 am. Importing the data for 20,000 items only takes about a minute. If reindex was required, it would add at least another 10 minutes.

Now, I want to also show Estimated Time of Arrival dates for out of stock items. I can import the data at the same time as the stock quantities. But if I create a regular attribute for that date, then every time I import, the index will be invalidated. Isn't that correct?

Is there any way I can create an attribute that works like stock quantity does, i.e. one that doesn't require any reindexing? I know there is a stock status index in 1.7, but it does not seem to get invalidated by just changing stock quantities (we use Manage Stock = No).

I was thinking that as a hack, I could use the "news_from_date" (which we don't use anyway) to hold that date.

UPDATE
I changed the question Title to better reflect what my problem really is.

Fundamentally, I want to avoid the catalog_product_flat_1 table reindex. Why? Because it drops the table and rebuilds it, and while that is happening the frontend is non-functional. With 70,000+ items to reindex (and more coming), the downtime is at least 5 minutes.

To avoid reindexing, I suggested creating an attribute that works like stock qty, but perhaps that is too hard to do.

What about saving each product and updating its index entry? I think that with UPDATE queries, the catalog_prodct_flat_1 table would continue working, and the frontend would continue working. Is that a correct assumption?

Do individual product saving methods update the index, or do they invalidate it?

As long as Magento is only sending update queries to the flat table index, I think the frontend would remain operational. A complete reindex renders the frontend unusable for some time.


texts:
I'm at a complete loss for this one at the moment.  Does anybody have any information as to how I can add a file upload field to checkout, and access this in an observer tied to sales_order_save_before?

I've gotten a file upload field to appear on checkout right now with a layout processor, but I am not sure how to actually pass the temp file location to my observer


texts: how to create custom module in magento2 to add customer attribute?

texts: While adding customer attribute to magento2 admin will not save automatically. The attribute is displayed in the account section. But could not save any value.Please help me tho resolve this?


texts: I need to sort the products in categories by newest. I've tried to do it with modifications on Models, but don't works.


texts: Update increment_id from an existing invoice/creditmemo

texts:
I imported orders to Magento and during the import, invoices and creditmemo have been created.
But I want to change the increment_id of these invoices/creditmemo so that it'll be coherent for accounting.

I update the increment_id in the database in the bases sales_flat_invoice and sales_flat_creditmemo. And I purged the caches before reloaded the admin panel page. But in the admin panel, there are the old numbers.

What can I do to update these id and make them visible from the admin panel ?
Or is it possible to generate the invoice and creditmemo choosing the id ?


texts: How to access fedex shipping method values

texts:
In magento admin -> system -> configuration -> sales -> shipping methods -> FedEx

in this we save Meter Number and other details.

How to access these values directly? and where these values store in database?


texts:
Actually I have an array. that array convert to JSON encodes format. but I can't access all the names from JSON array. now I want to access all the names. Is it possible?

[{"name":"JANETS","count":2},{"name":"ROYR","count":2}]


texts: How to customize the page via Layout Update XML section in a CMS page?

texts: I'm trying to add a new CMS block into the sidebar and remove all other blocks there, using only the Layout Update XML section in a CMS Page via the admin panel, how could I do it?


texts: How to move an attribute into another section en masse?

texts:
I have a product attribute in 'General' called 'download link' for example.

My goal is to move those values into the 'Additional Downloads' section, for each product.

I have started writing a PHP script for this with no luck.

Is there an effective way to migrate attributes across sections, preferably programmatically?

NB: There are over 9000 products


texts:
I've been trying to work out how this masonry layout has been achieved;

I've tried Isotope masonry, but cannot work out how they have created this layout with different image sizes that seem randomised.

http://www.acnestudios.com/shop-men/


texts: How do I make sure that customer file uploads are secure when using the file upload custom option?

texts: I have a request for customers to be able to submit drawing and image files via a custom option in Magento 1.7.0.2. I have the upload working I am just not sure if it is the most secure. It seemed to easy so naturally I'm a little paranoid. Any help with this is much appreciated.


texts:
I am making a module with a custom grid I am getting stuck on the router why am I getting a 404?

config.xml:

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <modulename before="Mage_Adminhtml">
                        Namespace_Modulename_Adminhtml
                    </modulename>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

adminhtml.xml:

<menu>
    <sales>
        <children>
            <modulename translate="title" module="namespace_modulename">
                <title>Modulename</title>
                <action>adminhtml/modulename</action>
                <sort_order>40</sort_order>
            </modulename>
        </children>
    </sales>
</menu>
<acl>
    <resources>
        <admin>
            <children>
                <sales>
                    <children>
                        <modulename>
                            <title>Modulename</title>
                            <action>adminhtml/modulename</action>
                        </modulename>
                    </children>
                </sales>
            </children>
        </admin>
    </resources>
</acl>


texts: Why can't one switch back to the default mode on Magento 2?

texts:
So I have switched to the developer mode while developing on a Magento 2 project using the following command:

php bin/magento deploy:mode:set developer

All good, I got this message and I developed the website fine:

  Current application mode: developer.

For some reasons, I wanted to go back to the default mode just to check the behavior of the website in this mode. No specific reasons to be honest, I just wanted to switch back to this mode.

So I ran the following command:

php bin/magento deploy:mode:set default

But I got this weird error with no further explanations:

Cannot switch into given mode "default"

I checked the following file that handles the mode settings Magento/Deploy/Console/Command/SetModeCommand.php and here's what I've found:

switch($toMode) {
    case State::MODE_DEVELOPER:
        $modeController->enableDeveloperMode();
        break;
    case State::MODE_PRODUCTION:
        if ($skipCompilation) {
            $modeController->enableProductionModeMinimal();
        } else {
            $modeController->enableProductionMode();
        }
        break;
    default:
        throw new LocalizedException(__('Cannot switch into given mode "%1"', $toMode));
}

How weird is that, Magento 2 is shipped in default mode but you can't switch back to that specific mode. What's the reason behind this ?

Edit: for those interested I ended up creating an issue on github: https://github.com/magento/magento2/issues/4292


texts: How to filter a custom attribute in customer grid?

texts:
I've created a custom customer attribute (postive_cust_id) and got it to appear in the admin customer grid (following the instructions of this guide: https://magentodeveloper.in/add-custom-attribute-to-customer-magento2.html)

To whit, this is now an attribute in the customer_eav_varchar table. When I try to filter the customer grid using this attribute specifically (i.e. clicking 'Filter' and entering a value in the attribute text field) I get "Something has gone wrong" modal popup. When I search in my logs I see this message:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column
  'postive_cust_id' in 'where clause', query was: SELECT COUNT(*) FROM
  customer_grid_flat AS main_table WHERE (postive_cust_id LIKE
  '%12675%')

How do I hook or extend the Customer Grid Filter to do a join for my attribute? e.g.

  SELECT count(*) FROM customer_grid_flat AS main_table

  INNER JOIN customer_entity_varchar cet ON cet.entity_id = main_table.entity_id

  WHERE cet.attribute_id = 169 AND (cet.value LIKE '%12675%')

I've hard coded the attribute id (169) but if this could do a number of inner joins based on the attribute code that would be preferred.


texts: Magento2 add extra fee in Muti Shipping Checkout

texts:
i want to add extra fee in multi shipping based on the item
if item is one than add $5
and
if 2 item than add $10

how can i do that ??

my collect function is like below

public function collect(
    Quote $quote,
    ShippingAssignmentInterface $shippingAssignment,
    Total $total
)
{

    parent::collect($quote, $shippingAssignment, $total);

    if (!sizeof($shippingAssignment->getItems())) {
        return $this;
    }

    $quote->setFee(0);
    $total->setTotalAmount('fee', 0);
    $total->setBaseTotalAmount('fee', 0);

        $getShippingAddresses = $quote->getAllShippingAddresses();
        foreach ($getShippingAddresses as $address) {
            $fee = 20;

            $totals = $address->getTotals();
            $address->setTotalAmount('fee', $fee);
            $address->setTotalAmount('fee', $fee);
        }

    return $this;
}

its not work, not add fee


texts: i have different payment Methods on my Checkout page i have also Purchase Oder payment Method on my checkout page i want purchase order payment method for just login customer how i achieve this in magento2


texts: Magento 2 : How to generate a collection from data models

texts:
If I understand correctly, Magento 2 moves more and more to the strict use of data models instead of creating models that are tied-in with their resource models and have all kind of business logic that, well... just are not within the responsibility of those models.

You can see this shift by looking at the naming used for the service contracts: Api/Data/xxxInterface are interfaces for data models. If you look at the customer module you can see the related data models in Model/Data/*. These are models that extend from AbstractExtensibleObject, which in it turn extends Magento\Framework\Api\AbstractSimpleObject.

Please, if anything if the above is mis-assumption or incorrect, please tell me what the proper Magento 2 philosophy is.

Now ...

I'm trying to create a module that uses solely data models and UI Components to generate the list and the form etc. This works fine, but as soon as I have to be able to create a collection, I have to provide a model that extends from Magento\Framework\DataObject. This is set in the _init() method of Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection:

/**
 * Define resource model
 */
protected function _construct()
{
    $this->_init(
        'Vendor\Module\Model\Data\Foo',
        'Vendor\Module\Model\ResourceModel\Foo'
    );
}

Now, if I do this, I get the exception:

Vendor\Module\Model\Data\Foo does not extend \Magento\Framework\DataObject

Which makes sense, because data models extend from Magento\Framework\Api\AbstractSimpleObject.

Now I don't want to create a dummy model just for this, that doesn't seem right, so I peeked how this is handled in the framework itself in Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult. This is a class that is used as a virtualType in di.xml and provides a collection for the listing. And like I said, that worked. So how did they pull this off?

Well it looked like they did:

$this->_init($this->document, $resourceModel);

And $this->document is the name of \Magento\Framework\View\Element\UiComponent\DataProvider\Document, which in it's turn extends \Magento\Framework\DataObject.

So with this knowledge, I edited my own collection like this:

/**
 * Define resource model
 */
protected function _construct()
{
    $this->_init(
        \Magento\Framework\View\Element\UiComponent\DataProvider\Document::class,
        'Happy\PrivateDownloads\Model\ResourceModel\Download'
    );
}

And now it works.

But, just because it works doesn't necessarily mean that this is the correct solution. So that's why I'm asking this question in the community:

Is this the proper way to create collections from data models?

Any answer / help / insights would be greatly appreciated!


texts: Can anyone explain step by how to add product to CART using REST API?

texts:
I tried this link http://devdocs.magento.com/swagger/index.html#/ - But not able to understand what exactly to do?

Please help me.


texts: Is it possible to add a VAT validation Check when user saves it (frontend)


texts: Inline translation: slowing magento down and other pros and cons?

texts:
I like to do my custom translations using the inline translation tool in M2.1.

My questions are:

What, in general, are the downsides of this method?
Are there any pros (apart from that the method is easy to use from the backend)?
Is this method slowing down the frontend loading time?
If so, does it slow the website down considerately?
Does this method add code to the page source that negatively affects SEO?


texts: Getting null value after save conditions rule in magento 2.2.x

texts:
How to get serializes product condition value in magento 2.2.x.?

Array
(
    [rule_id] => 3
    [title] => sdsds
    [description] => sdsdsd
    [range] => 0
    [making_from] => 5
    [making_to] => 0
    [status] => 1
    [conditions_serialized] => {"type":"Magento\\CatalogRule\\Model\\Rule\\Condition\\Combine","attribute":null,"operator":null,"value":true,"is_value_processed":null,"aggregator":"all"}
    [actions_serialized] => {"type":"Magento\\CatalogRule\\Model\\Rule\\Action\\Collection","attribute":null,"operator":"=","value":null}
    [customer_group_ids] => Array
        (
        )

    [website_ids] => Array
        (
        )

)


texts: Cart Shipping Estimate, adds custom validation to zipcode

texts:
How can I add a custom js validation in my cart estimation page? The default magento 2 behavior is that, on any change in my zipcode field, the estimation action starts and a spinner is showed, even when my zipcode isn't completed or is invalid. So, how can I adds a custom validation to my country zipcode code and trigger the estimation action only when the zip is valid?

PS: I have a custom shipping module, with the shipping-rates-validation-rules.js and shipping-rates-validator.js.
I've tried to add mix-ins validations, to create my custom zip validation, but without success, the spinner still appearing.

Thanks in advance!


texts:
Magento data migration tool gives the error after running this command.

Afate runing php bin/magento migrate:data -r -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.4/config.xml

  Error:  Record structure does not contain field alternate_group


texts: Update Options of a Select Element Dynamically using Knockout Js

texts:
I am looking for updating a custom Select Option at Checkout.

 <select name="city" id="city" data-bind="
    options: availableCities,
    optionsText: 'name',
    optionsCaption: 'Select City',
    value: 'type',
    event:{change : cityselection}"
>
</select>

I have assigned availableCities as an Observablearray like below in the Js script

var availableCitiesdata = ko.observableArray([]);

My issue is I don't know how I could dynamically update availableCitiesdata to get options in the search element.

I did check out multiple articles, but all seem to be confusing to me personally.

Any sort of help is appreciated. Thanks in advance!!!


texts: How many Theme licenses to buy on 1 Magento 2.x install with 3 websites/stores/storefronts each running on a separate domain?

texts:
Magento 2.4.2
Porto theme

I am setting up a new project on Magento 2.4.2 which will have 1 Magento installation running on a dummy (not used in the project at all) domain with 3 additional websites/stores/storefronts each set up on a different unique domain.
I want to to everything by the book so I was searching how many Porto licenses I need to buy and I came across this article on Porto's website:
https://smartwave.freshdesk.com/support/solutions/articles/12000052418--9-theme-forest-license-policy-
Is it correct then that if we have the primary domain which will not be a site at all and then the 3 addon domains each with it's own website/store/storefront, that we need 3 licenses?


texts: Not able to install modules with composer in Magneto 2.3.1

texts:
I have installed Magento 2.3.1 and PHP 7.2.31, I am trying install modules with composer and getting error like below,
Fatal error: Uncaught TypeError: Return value of Magento\InventoryComposerInstaller\Plugin_composer_tmp0::initModuleDeployment() must be an instance of Magento\InventoryComposerInstaller\void, none returned in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:69
Stack trace:
#0 [internal function]: Magento\InventoryComposerInstaller\Plugin_composer_tmp0->initModuleDeployment(Object(Composer\Script\Event))
#1 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(176): call_user_func(Array, Object(Composer\Script\Event))
#2 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(96): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Script\Event))
#3 phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php(205): Composer\EventDispatcher\EventDispatcher->dispatchScript('pre-update-cmd', true)
#4 phar:///opt/cpanel/composer/bin/composer/src/Composer/Command/RequireCommand.php(20 in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 69

Any solution on this?


texts: Magento2: Layered Navigation show Negative Price Filter

texts:
After migrating from  M1.9 to M2.3.1.
Layered Navigation Shows Negative price range

I remove all Negative prices manually. After that layered navigation filter shows the correct range and doesn't show the negative price range.

 But after running the commands :

sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento cache:clean
sudo php bin/magento cache:flush

All Negative values reverted and layered navigation show the Negative price range.
Why this happening?


texts: How to get credit card number and cvv code in redirect payment method

texts:
Basically i have this lines:

<?php

// Retrieve order
    $session = Mage::getSingleton('checkout/session');
    $orderIncrementId = $session->getLastRealOrderId();
    $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
    $billingaddress = $order->getBillingAddress();
    $shippingaddress = $order->getShippingAddress();
    $currencyDesc = Mage::app()->getStore()->getCurrentCurrencyCode();
    $totals = number_format($order->getGrandTotal(), 2, '.', '');
    $address = $billingaddress->getStreet();
    $address1 = $shippingaddress->getStreet();
    $payment = $_order->getPayment();

if($payment->getCcExpMonth() < 10){
    $expMonth = '0'.$payment->getCcExpMonth();
}
else{
    $expMonth = $payment->getCcExpMonth();
}

echo $expMonth;

echo substr($payment->getCcExpYear(),-2);

echo $payment->getCcNumber(); //lose

echo $payment->getCcCid(); //lose

?>
<form name="mygatewayform" method="post" action="https://banwire.com/qa/api/1/payment/direct">
<input type="hidden" name="CARD_OWN" value="<?php echo $payment->getCcOwner(); ?>">
    <button type="submit">Pagar Ahora</button>
</form>
<script type="text/javascript">
//document.mygatewayform.submit();
</script>

after the process in the checkout this redirect to /mygateway/rediret.phtml and this file, redirecto to gateway banwire, but
i need find the credit card number and cvv code just for send this form to banwire gateway, is there any way to do???


texts: Magento 2.3 custom email attachment not working

texts:
Custom email attachment file is not working in magento 2.3.
its working in Magento 2.2.X

  Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Mail\Message\Interceptor::createAttachment() in Mail/TransportBuilder.php

In magento 2.2.6 there is createAttachment method inside following path as same as magento 2.3

  vendor\magento\zendframework1\library\Zend\Mail.php

but its giving method not defined

Please give any suggestion regarding issue


texts: currency is not changing on cart page when change store in magento 2

texts: I have added the custom price for the product.I am changing the store when the product in the cart. Everything working fine except currency. Currency is not changing.


texts:
When loading values from a custom table I am joining the table twice. The first joing is to load the value for the default store and and the second joing is to load the store specific value. This is done in a similar way to the Mage_Core_Model_Resource_Variable::_addValueToSelect function.

My issue is that I have a problem with having hard coded values in functions. So having the store_id = 0 in this function does not sit correctly with me. So I went looking for a constant that could be used for the default value's store id. I was able to find Mage_Core_Model_App::ADMIN_STORE_ID which is the admin store id.

Is this the correct value to use? My confusion comes as the core code simply hard codes a 0 in place. Is the store_id set on default values really the admin store or is it just a nice coincidence that they are both 0?


texts: Error : "Call to a member function load() on a non-object "

texts:
I'm trying code like tutorial

http://devdocs.magento.com/guides/m1x/magefordev/mage-for-dev-5.html
But i can't get the same result . Please tell me why my code doesn't work

My error:

  Fatal error: Call to a member function load() on a non-object in C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Abstract.php on line 225

config.xml

<?xml version="1.0"?>
<config>
    <frontend>
        <routers>
            <weblog>
                <use>standard</use>
                <args>
                    <module>Magentotutorial_Weblog</module>
                    <frontName>weblog</frontName>
                </args>
            </weblog>
        </routers>
    </frontend>
    <global>
        <models>
            <weblog>
                <class>Magentotutorial_Weblog_Model</class>
            </weblog>
            <weblog_resource>
                <class>Magentotutorial_Weblog_Model_Resource</class>
                <entities>
                    <blogpost>

blog_posts

                    </blogpost>
                </entities>
            </weblog_resource>
        </models>
    </global>
</config>

IndexController

<?php
class Magentotutorial_Weblog_IndexController extends  Mage_Core_Controller_Front_Action {
    public function testModelAction() {
        $params = $this->getRequest()->getParams();
        $blogpost = Mage::getModel('weblog/blogpost');
        echo get_class($blogpost);
        //var_dump($blogpost);
        //echo("Loading the blogpost with an ID of ".$params['id']);
        $blogpost->load($params['id']);
        $data = $blogpost->getData();
        var_dump($data);
    }
}

Blogpost.php

<?php
class Magentotutorial_Weblog_Model_Blogpost extends Mage_Core_Model_Abstract
{
    protected function _construct()
    {
        $this->_init('weblog/blogpost');
    }
}


texts: Flat Catalog Product rebuild error in magento 1.3

texts:
Can any one help me to solve this error https://prnt.sc/omfwt3
I am getting this error when i try to Rebuild Flat Catalog Product in magento 1.3


texts: How to add "Buy Now" button in Magento 2.1 Product detail page along with add to cart? so the users can directly buy the product without adding into the cart.


texts: Megento2 Sorting Issue using custom attributes

texts:
I have a website created with magento 2 and it is working perfectly.

After adding a bunch of products, We've encountered some issues with it's sorting. Sorting is not working properly most times.

For example sorting with custom attribute product Net Weight, which results in First five or six with proper value (11,12,13,14) after that it shows (100,102,105 etc).

Then again it shows lower values. I have not yet done any changes to the core function.

Here is the link to the site Link to the category with net weight sorting

I think you guys can help me with it.


texts: Send specific email template depending on shipping method customer choose while placing an order in Magento 2

texts:
can we send specific email template depending on shipping method customer choose while placing an order in Magento 2. If yes, can you please share the solution.
Thank you!


texts: Magento 2 Join two table and dispaly value in grid

texts:
public function addCustomerData($filter = null)
    {
        $customersSelect = $this->customerResource->getConnection()->select();
        $customersSelect->from(
            ['customer' => $this->customerResource->getTable('customer_entity')],
            'entity_id'
        );
        if (isset($filter['customer_name'])) {
            $customerName = $this->customerResource->getConnection()
                ->getConcatSql(['customer.firstname', 'customer.lastname'], ' ');
            $customersSelect->where($customerName . ' LIKE ?', '%' . $filter['customer_name'] . '%');
        }
        if (isset($filter['email'])) {
            $customersSelect->where('customer.email LIKE ?', '%' . $filter['email'] . '%');
        }
        $filteredCustomers = $this->customerResource->getConnection()->fetchCol($customersSelect);
        $this->getSelect()->where('main_table.customer_id IN (?)', $filteredCustomers);
        return $this;
    }

here i am getting all default value i want to get customer attribute in customer_entity_varchar table and display it in grid how to do this


texts:
I am new to magento and I have two questions to ask you, I hope you can help me.

In fact I have to take care of a existing website.this website is in French and English and I have to add a view to put up Italian.

So I downloaded the Italian pack.
I have to translate a nearly 300 products.
I saw that I could do it by importing a CSV file.
But how do I do that knowing only the name and description should be updated to the Italian view.

for the csv files that are in the "Local" folder of the new Italian language, they told me it missing some of translations.so how do I identify missing translations?

thank you very much.


texts: Include customer group selection on registration form - Magento 2

texts: I'm using Magento 2.2.3 and what I want to achieve is to put a dropdown selection for customer group on the registration page because some of them are resellers. Is this possible and if so, how do we do this?