texts: How to get product collection in specific created CMS block?

texts:
In my InstallData.php file I have created a CMS block, like:

private function createCmsBlock()
{
    $blockData = [
        'title' => 'Title',
        'identifier' => 'Identifier',
        'stores' => [0],
        'is_active' => 1,
    ];
    $this->blockFactory->create()->setData($blockData)->save();
}

I want to retrieve a product collection in my block. I'm trying to retrieve it as:

private function getProductsCollection()
{
    $collection = $this->productCollectionFactory->create();
    $collection->addAttributeToSelect('*');
    $collection->setPageSize(3);
    return $collection;
}

But the question is where do I have to put getProductsCollection() function in my code to get it in my block?


texts: Module LESS results are different depending on use of grunt or setup:static-content:deploy

texts:
I am tying to break up my CSS, in a rather big module, so that it is easier to find the CSS I need. I have done something like the following in my _module.less:
 @import "module/_first-less";
 @import "module/_second-less";
 @import "module/_third-less";

It works fine if I run grunt commands and compile with grunt directly. However, when running bin/magento setup:static-content:deploy -f like you would on production server (without -f obviously) it seems to pick and choose what to apply out of them imports. I have checked other modules and I have seen similar being done elsewhere so I am a bit confused as to why this isn't working out for me.
I am running magento in Developer mode just in case that is any extra help.
UPDATE:

After further testing it doesn't look as if @import is the issue. I have consolidated all the LESS into the one _module.less & have the same issue. While using grunt the styles are all perfect. The issue is during bin/magento setup:static-content:deploy.


texts: Replacing certain text in product description

texts:
My website is www.officialphonerepairco.uk , the problem that I am having is :

I put address on all the product description, and I have about 5000 products. Now to delete the address from each product description is a time taking. So, is there any easy method to select all the products and then delete the address from all the product description.

Any Help with this problem will be highly appreciated.
Thank you


texts: "We can't save the customer" error after Migration - Magento 2.3

texts:
I have migrated store from Magento 1.7.0.2 to Magento 2.3.
When i Create the customer it shows me error "We can't save the customer."

I have checked log file and i can see log, "Class Magento\Eav\Model\Attribute\Data\Label does not exist".
I have checked this path, and Label.php does not exist.
Can you guys please help me?!!

Is there any issue related to customer attribute?
How can i debug and fix this issue?

Thanks,


texts: How To change/ edit category products position programatically?

texts:
I would like to set position-numbers of category products in one specific category according to sku instead of 0 (default).

Magento version 1.9

I have a csv including position with sku.
EX : "42-140107",
"43-140108",

42 : Position,

140107 : Sku

I Tried smething Like below

Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$categoryId = 156; //replace with your category id
$newPosition = ""; //To Be set according to sku
$category = Mage::getModel('catalog/category')->setStoreId(Mage_Core_Model_App::ADMIN_STORE_ID)->load($categoryId);
$products = $category->getProductsPosition();
//I Want to get the sku like above we getting the position
$all_products = $category->getProducts();

foreach ($products as $id=>$value){

    $products[$id] = $newPosition;//This $newPosition will change according to sku
}
$category->setPostedProducts($products);
$category->save();

My question is how to get the product sku & position from a relevant category and update the new position for category products?


texts: CE 1.9.1 - Automatically adjust product data from XML import

texts:
I have a site already configured on Magento CE 1.9.1.0 ... This site needs to integrate with a Point-of-Sale system for the bricks-and-mortar store. I have spoken to the developers of the Point-of-Sale system, and they have mentioned that whenever a sale is made in store or inventory is adjusted, the system will create an XML file for the order and upload it into a designated folder on the web server.

My challenge now is processing that XML file. I've been looking for an extension to assist with this, but thus far no luck finding any. I know that the solution will involve cron having to run every X number of minutes to check the folder to see if there are any files to process.

Please advise me on what my options are? Really in the dark on this one. Thanks!


texts:
Uncaught TypeError: element.attachEvent is not a function
    at Function.observe (prototype.js:5653)
    at klass.initialize (validation.js:98)
    at new klass (prototype.js:101)
    at klass.initialize (form.js:35)
    at new klass (prototype.js:101)
    at home:649
observe @ prototype.js:5653
initialize @ validation.js:98
klass @ prototype.js:101
initialize @ form.js:35
klass @ prototype.js:101
(anonymous) @ home:649
prototype.js:5734 Uncaught TypeError: element.dispatchEvent is not a function
    at fire (prototype.js:5734)
    at HTMLDocument._methodized [as fire] (prototype.js:438)
    at HTMLDocument.fireContentLoadedEvent (prototype.js:5820)
fire @ prototype.js:5734
_methodized @ prototype.js:438
fireContentLoadedEvent @ prototype.js:5820


texts: Magento 1.9 - automatically add comment with module / observer

texts:
I just started to write a module which adds a specific comment to all orders.
Therefore im hooking into sales_order_place_after

The code below unfortunaley not works...

  app/etc/modules/Easylife_Meta.xml

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

  app/code/local/Easylife/Meta/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Easylife_Meta>
            <version>0.0.1</version>
        </Easylife_Meta>
    </modules>
    <global>
        <models>
            <easylife_meta>
                <class>Easylife_Meta_Model</class>
            </easylife_meta>
        </models>
    <frontend>
        <events>
            <sales_order_place_after><!-- observe the event -->
                <observers>
                    <easylife_meta>
                        <class>easylife_meta/observer</class>
                        <method>autocomment</method>
                        <type>singleton</type>
                    </easylife_meta>
                </observers>
            </sales_order_place_after>
        </events>
    </frontend>
    </global>
</config>

  app/code/local/Easylife/Meta/Model/Observer.php

<?php
class Easylife_Meta_Model_Observer {
    public function autocomment($observer) {
        $order = $observer->getEvent()->getOrder();
        $history = $order->addStatusHistoryComment("comment");
        $history->setIsCustomerNotified(false);
        $order->save();
    }
}
?>


texts: Magento 2: Layered navigation filter list issue

texts:
Layered navigation filter returns empty result with below code. I want get active filter list

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$filterActive = $objectManager->create('\Magento\Catalog\Model\Layer\Resolver');
$layerActive = $filterActive->get();
$activeFilters = $layerActive->getState()->getFilters();


texts: Magento2: Asymmetric transaction rollback

texts:
Sometimes I found in log file issue:

Ran jobs by schedule.
string(32) "Asymmetric transaction rollback."
Ran jobs by schedule.
Ran jobs by schedule.
Ran jobs by schedule.

Anyone know how it is and how to solve this issue?


texts: Change bundle product's price after add to cart

texts: How can I change the price of a bundle product after it's added to the cart? Doesn’t matter if product type is fixed or dynamic, but its final price needs to change.


texts: How to get product category Id on product detail page Magento 2?

texts:
I have a product which have assigned into more than 5 categories. I want to show the category detail of that product on product detail page. But which category detail I need to show?

I want to show the category name of that category from where the user coming.

Can anyone suggest the solution?


texts: Magento 2 Reset Modify FROM select query

texts:
How can one modify the FROM in select query without losing the left joins innerJoin etc... ? as I have tried:

$collection->getSelect()->reset(\Zend_Db_Select::FROM)->from('table_2') but then I've lost all the leftjoin concat  etc...

Thanks


texts: Automatically input gtin number in products

texts:
I have over 50,000 products in Magento version 1.9.1.0 and I want to list them on google shopping.

My question is, are there any Magento extensions that will automatically generate GTIN numbers for all the 50,000 products I have?


texts: addAttributeToSelect not working with core/resource_iterator?

texts:
public function run()
{
    $products = Mage::getModel('catalog/product')
            ->getCollection()
            ->addFinalPrice()
            ->addAttributeToSelect('name')

    Mage::getSingleton('core/resource_iterator')
            ->walk($products->getSelect()->limit(10), array(array($this, 'getLine')));

}

public function getLine($args)
{
    var_dump($args['row']);
}

In my getLine() method I get no name but addFinalPrice() works:

array(16) {
  ["entity_id"]=>
  string(2) "61"
  ["entity_type_id"]=>
  string(1) "4"
  ["attribute_set_id"]=>
  string(2) "10"
  ["type_id"]=>
  string(6) "simple"
  ["sku"]=>
  string(15) "50-F01010001-03"
  ["has_options"]=>
  string(1) "0"
  ["required_options"]=>
  string(1) "0"
  ["created_at"]=>
  string(19) "2011-07-05 18:30:48"
  ["updated_at"]=>
  string(19) "2014-09-04 07:34:21"
  ["indexed_price"]=>
  string(7) "14.5000"
  ["price"]=>
  string(7) "14.5000"
  ["final_price"]=>
  string(7) "14.5000"
  ["minimal_price"]=>
  string(7) "14.5000"
  ["min_price"]=>
  string(7) "14.5000"
  ["max_price"]=>
  string(7) "14.5000"
  ["tier_price"]=>
  NULL
}

Same problem with image, price and every other attribute.


texts: Magento 2 - Table Rate shipping method not showing in cart & checkout page

texts:
I am using the Magento 2.3.1 for my store. I just only enabled Table Rate shipping method with Price Vs Destination.

After that I exported the sample format & updated country, zone values with shipping amount. Finally imported & saved the configuration and cleared cache.

But when I add to the product & checked the Cart & Checkout page but still the table rate value as 0 even I have selected proper Country & State.

Here is my imported csv file.

Can anyone let me know what's the issue?


texts:
I have installed Magento v2.3.4 website on VPS with below config:

OS: CentOS
CPU: 2 x 2.2 Ghz
RAM: 2 GB

Whenever the website is accessed, I see a sudden spike in CPU usage & it goes upto 100%. This causes website to load slow, even for just one user.

htop shows multiple of these command being executed:

Apache/httpd block generated via DirectAdmin responsible for above is:

<Directory /home/admin/public_html>
    <IfModule mod_fcgid.c>
            FCGIWrapper '/usr/local/safe-bin/fcgid73.sh /usr/local/directadmin/data/users/admin/php/mysite.com.ini -d sendmail_from="admin@mysite.com" -d open_basedir="/home/admin/:/tmp:/var/tmp:/opt/alt/php73/usr/share/pear/:/dev/urandom:/usr/local/lib/php/:/usr/local/php73/lib/php/" -d mail.log="/home/admin/.php/php-mail.log"' .php
                <FilesMatch "\.php$">
                    SetHandler fcgid-script
                        Options +ExecCGI
                </FilesMatch>
    </IfModule>
            suPHP_Engine ON
            suPHP_UserGroup admin admin
</Directory>

PS- I did a fresh installation of WordPress and CPU usage is around 10-20% for same command.

How should I address the issue for Magento? Please guide.


texts:
Is it true that varnish doesn't work with HTTPS?
Is there an alternative that works well with magento 2? For two reasons, one I don't think it works with HTTPS, and two it's causing me too much trouble and breaking my site.


texts:
I've created Custom Rest API endpoint which works fine on my local Magento instance but I'm getting an exception on the production server

"#0 [internal function]: MMA\CustomApi\Model\PayPal\Transparent\SecureTokenManager->getSecurityToken(1932)
#1 /home/public_html/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#2 /home/public_html/vendor/magento/module-webapi/Controller/Rest.php(244): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#3 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#5 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#6 /home/public_html/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#7 /home/public_html/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#8 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#9 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent('launch', Array)
#10 /home/public_html/vendor/msp/apienhancer/Plugin/AppInterfacePlugin.php(75): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#11 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(135): MSP\APIEnhancer\Plugin\AppInterfacePlugin->aroundLaunch(Object(Magento\Framework\App\Http\Interceptor), Object(Closure))
#12 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#13 /home/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, NULL)
#14 /home/public_html/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()
#15 /home/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#16 {main}"

Here is the link to my extension https://github.com/troublediehard/mma-customapi.

Any ideas what is the issue?

UPDATE: not sure what did change but now the problem is gone. But I'm still curious about what can lead to such an issue.


texts: SQLSTATE[42S02]: Base table or view not found: 1146 Table doesn't exist for extension

texts:
My magento database is created using table prefix.
After installing extension the table is created with prefix.
But while using the extension to save the data it throws exception as
 "SQLSTATE[42S02]: Base table or view not found: 1146 Table  (databasename.without prefix table name) doesn't exist"
for extension but the table name is present with prefix.
How to resolve it.
Where to make changes since in many of the extension it throws the same error.


texts:
my requirement is to add shipping cost in sales order grid,i added below code in _preparecolumns(),

$this->addColumn('base_shipping_amount', array(
    'header' => $helper->__('Shipping Amount (Base)'),
    'index'  => 'base_shipping_amount'
));

and added below code in _prepareCollection()

$collection->getSelect()->join(array('p' => 'sales/order_payment'), 'main_table.entity_id = p.parent_id', array(
    'payment_method' => 'method'
))

its giving me error . Any help would be appreciated.


texts: Removal of component in an XML listing from custom theme

texts:
I wish to remove a part from an XML page without editing the core file.

 <?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_bottom" template="Aheadworks_AdvancedReviews/ui/grid/toolbar">
    <paging name="listing_paging" class="Aheadworks\AdvancedReviews\Ui\Component\Review\Frontend\Listing\Paging" component="Aheadworks_AdvancedReviews/js/product/view/review/grid/paging/paging"/>
    <component name="awArWriteReviewControlListingBottom" component="Aheadworks_AdvancedReviews/js/product/view/review/write-review-control" displayArea="right-column"/>
</listingToolbar>
</listing>

The part i wish to remove is awArWriteReviewControlListingBottom.  How would I do this please in Magento 2.2?


texts: Render Top Level Categories as well as ALL Subcategories of a Specific store

texts:
I am able to get the list of categories of a current store as menu items using code:

<?php $_helper = Mage::helper('catalog/category') ?>
<?php $_categories = $_helper->getStoreCategories() ?>
<?php $currentCategory = Mage::registry('current_category') ?>
<?php if (count($_categories) > 0): ?>
        <?php foreach($_categories as $_category): ?>

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

                <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
                <?php $_subcategories = $_category->getChildrenCategories() ?>
                <?php if (count($_subcategories) > 0): ?>

                        <?php foreach($_subcategories as $_subcategory): ?>

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

                        <?php endforeach; ?>

                <?php endif; ?>

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

But, how do I get top level categories as well as all subcategories of a specific store using store id? I want to include main store categories as menu items in the second store.


texts:
I'm creating text box in sales->order->create new order admin form.
How to save text box value in table.In sales table ,created column name "custom_comment"...


texts: Magento 2 : How to Create Product Attribute With All Active Categories DropDown

texts:
I want to create product attribute with all active categories as it's drop down, please suggest valid method to achieve this.

My Requirement is something like below:


texts:
I'm running the command bin/magento catalog:image:resize after updating to Magento 2.3.2, because all the images stopped working in frontend.

The process is interrupted after a while with this kind of error:

  File '/pub/media/catalog/product/v/u/file_name.jpg' does not exist.

Is there a way to bypass these kinds of errors somehow?


texts:
I have installed and configured the paylike (payment method) in magento 2 using this link Magento 2 Paylike i have configured the sandbox(Test) api keys (details).

The order details showing correctly in the admin end

I) After order has been completed it redirects to checkout/cart instead of success page.

II) The order details doesn't showing in the customer dashboard (orders section).

Could you please suggest/help me how to debug & fix the above errors?


texts:
Some product images have .bmp format and do not show on the frontpage but we can see them in the backend product page in admin.

I double checked if images exist under the /media/catalog/product/ directory.

How can i solve this?

Here is an example:

http://www.petbesinleri.com/karlie-yavru-kopek-oyuncak-kemigi-pmu3154
http://181.224.129.45/karlie-yavru-kopek-oyuncak-kemigi


texts: Magento 2 : How to get store contact number and email address

texts: I want to display my magento 2 store contact detail & mail address in the frontend. How to get store contact and email address in magento 2 and display it in header.phtml file?


texts:
In the following list
https://devdocs.magento.com/guides/v2.4/reference/mftf/functional-tests.html
i want to run this test
UnassignProductsFromCategoryBySKUsTest
[Visual Merchandiser] Admin should be able to mass remove products to category by SKU
What actually command i have to use to run the test?


texts: How to setup a new language in magento2?

texts:
I found this website (https://crowdin.com/project/magento-2) and the respective instructions (http://www.vanderboon.net/wiki/Install_Magento_Crowdin_Translation). Unfortunatly even after doing everything explained I don't get the translations. I also changed the localization in the configuration.

I should had that I am not using the default luma theme but one that I bought.

How can I setup a new language in magento2?


texts: Magento 2: Modify authentication-popup.html form action

texts:
Authentication popup is the login popup that will appear if customer who are not logged in press Proceed to Checkout button in cart page.

For default, when customer sign in using authentication popup they will be redirected to the previous page (cart page).

I want to modify the redirect url after customer sign in from authentication pop up, they'll redirected to custom page. I have trying to locate the form action in Magento_Customer/view/frontend/web/js/view/authentication-popup.js but i can't find it.


texts:
I tried everything, but nothing seems to work.
This is my code:

  Block/Adminhtml/Customer/Group/Edit/Form.php

<?php

class Devra_Membership_Block_Adminhtml_Customer_Group_Edit_Form extends Mage_Adminhtml_Block_Customer_Group_Edit_Form
{

    protected function _prepareLayout()
    {
        parent::_prepareLayout();
        $form = $this->getForm();

        $fs = $form->getElement('base_fieldset');

        $fs->addField('customer_group_plan_price', 'text',
            array(
                'name'  => 'plan_price',
                'label' => 'Precio del plan',
                'title' => 'Precio del plan',
                'class' => '',
                'required' => false
            )
        );

        $customerGroup = Mage::registry('current_group');
        if( Mage::getSingleton('adminhtml/session')->getCustomerGroupData() ) {
            $form->addValues(Mage::getSingleton('adminhtml/session')->getCustomerGroupData());
            Mage::getSingleton('adminhtml/session')->setCustomerGroupData(null);
        } else {
            $form->addValues($customerGroup->getData());
        }
    }

}

  etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Devra_Membership>
            <version>1.0.0</version>
        </Devra_Membership>
    </modules>
    <global>
        <blocks>
            <adminhtml>
                <rewrite>
                    <customer_group_edit_form>Devra_Membership_Block_Adminhtml_Customer_Group_Edit_Form</customer_group_edit_form>
                </rewrite>
            </adminhtml>
        </blocks>
        <resources>
            <devra_membership_setup>
                <setup>
                    <module>Devra_Membership</module>
                </setup>
            </devra_membership_setup>
        </resources>
    </global>

</config>

  sql/devra_membership_setup/install-1.0.0.php

<?php

$installer = $this;

$installer->startSetup();

$conn->addColumn($installer->getTable('customer/customer_group'), 'customer_group_plan_price', array(
    'type'      => Varien_Db_Ddl_Table::TYPE_INTEGER,
    'unsigned'  => true,
    'nullable'  => false,
    'default'   => '0',
    'comment'   => 'Price of the plan',
));

$installer->endSetup();

I tried to add a controller with a save action, but it doesn't work too.


texts: Recently viewed items widget view should be like product listing / category page?

texts:
I have created recently viewed widget, and added this in product view page, but the product view I want is to be like as it is displaying on prodcut listing page/category product listing page.
how could I achieve this?


texts: Is there a local theme layout XML file other than local.xml?

texts:
I've built a theme by creating and editing the following file:

frontend/mypackage/default/layout/local.xml

I have a store view "site1", and wish to make exceptions on the default local.xml of "mypackage", so I created this file:

frontend/mypackage/site1/layout/local.xml

However, as soon as I create this file, Magento skips the default local.xml changes.

How do I tell Magento to use the local.xml from default, and add the changes in site1's local.xml to that?


texts: Full Page Cache not Working, no X-Magento-Cache-Debug header present

texts: The full-page cache is not working, when switching to developer mode, there is not even an X-Magento-Cache-Debug header


texts: Resolved - View Particular Product From the Grid

texts:
I have developed a custom module with a grid.
Also added a column named "View Product" to be able to navigate to the current product page.
With my current solution all "view" links redirect to products page, not to that particular product.
How can I fix that?

Thanks,

$product_id=$this->getRequest()->getParam('id');
$this->addColumn('view',
array(
'header'    => Mage::helper('catalog')->__('View Product'),
'width'     => '40px',
'type'      => 'action',
'getter'     => 'getId',
'actions'   => array(
array(
'caption' => Mage::helper('catalog')->__('View'),
'url'     => array(
    'base'=>'adminhtml/catalog_product/edit/id/$product_id',
    'params'=>array('store'=>$this->getRequest()->getParam('store'))
                ),
    'field'   => 'id'
     )
     ),
    'filter'    => false,
    'sortable'  => false,
    'index'     => 'stores',
    ));

Solution Type 2:
Also tried this solution but it redirects to the "New Product" page instead of the "Edit product" page.

$link= Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/edit/') .'id/$entity_id';
$this->addColumn('action_edit', array(
'header'   => $this->helper('catalog')->__('Action'),
'width'    => 15,
'sortable' => false,
'filter'   => false,
'type'     => 'action',
'actions'  => array(
 array(
'url'     => $link,
'caption' => $this->helper('catalog')->__('Edit'),
),
)
));


texts: I want to delete database values from the tables as I delete the cart items. how can i do that

texts:
i want to delete the items from the table "ms_rental_products" as i click the delete button in cart. how can i do that??

<?php
              function delRental()   //this is my deleting function.
                    {
                      $objectManager =   \Magento\Framework\App\ObjectManager::getInstance();
                      $customerSession = $objectManager->create('Magento\Customer\Model\Session');
                      $CID =  $customerSession->getCustomer()->getId();

                      $objectManager =   \Magento\Framework\App\ObjectManager::getInstance();
                      $connection = $objectManager->
                      get('Magento\Framework\App\ResourceConnection')->
     getConnection('\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION');
       $cart = $objectManager->get('\Magento\Checkout\Model\Cart');
       $cart_id = $cart->getQuote()->getId();
       $_sku=$cart->getQuote()->getSku();
       $sqlqry = "Delete from `ms_rental_products` WHERE `customer_id`='".$CID."' and `cart_id`='".$cart_id."' and `product_sku`='".$_sku."'";
       $connection->query($sqlqry);}

       ?>
              <a href="<?php /* @escapeNotVerified */ $block->delRental() ?>"
              title="<?= $block->escapeHtml(__('Remove item')) ?>"
              class="action action-delete"
               data-post='<?= /* @escapeNotVerified */ $block->getDeletePostJson() ?>'>

            <?= /* @escapeNotVerified */ __('Remove item') ?>


texts:
I have a strange problem and hope someone may have an answer, in my header I have a box saying items in cart.

When I add an item to my cart all works fine even when I'm on the home page, I then go to another page all is fine still, when I go back to home page the total clears and says 0 but when I go to basket the products I added are still there, go back to another page and works fine.

Problem seems only to be on home page.

After some research it looks like it might have something to do with an extension I am using Lesti FPC (Full Page Cache) and lazy blocks (i may be wrong) only thing is I'm not sure on what block name controls this or if it is even this causing the problem.

Another possibility mentioned was cookie lifetime although this is set to 86400 which I believe is plenty.

Any help would be greatly appreciated


texts:
I have a product that is sold in quantities of 25. If a customer orders one of the product, they actually receive 25.

However, in the warehouse, the product is not packaged in bundles of
25. When a customer places an order for 1, the warehouse ships 25 individual units.

How I can customize my inventory decrement for this product, so when a customer orders 1, the product's inventory count decreases by 25?

My client doesn't want to use the Magento's Quantity Increments tool. (For marketing reasons, they want to promote the product as a package and don't want the customer to have to enter "25" as the quantity.)


texts: How to insert a field on the billing address display

texts:
Is it possible to insert new information on the display at the billing address? I have already captured the data before and would like to show it in the admin panel, as shown in the image below.

Could anyone help me with this request?


texts: Where is the MARKUP that I can actually edit?

texts:
This is likely a duplicate question, but I honestly cannot find a good answer for where in your Magento install you find actual markup that resembles what you see on the actual site.

I've checked countless .xml files and .phtml files, but can find no reference to 'topSearch' anywhere. Is there some kind of logic that I am missing? Is this some elaborate joke? Is this complexity really necessary?

This:

  <?php echo $this->getChildHtml('topSearch') ?>

Renders this:

  <form id="search_mini_form" action="XXXX" method="get">

        <input type="text" name="q" value="" class="input-text" maxlength="128">
        <button id="search" type="submit" class="button" value="Search entire store here..." autocomplete="off"></button>

  </form>

And I can't find where the markup is.


texts: Bizarre login redirect to parallel instance after site migration

texts:
We recently had our website migrated to a different hosting company. The host performed the migration for us, we just had to do something with DNS. After the day or two, it was all good it seemed. Then after having a new SSL Certificate installed, something bizarre began to occur.

On this computer that I am using now, I can log into Magento, make changes, submit products to eBay... all good on this end. However, if I or anyone else logs into Magento back-end on a different computer, it's as if they are logging into a residual instance of Magento that reflects the state of our website prior to the migration.

For example, the orders are not updated from recent sales, validation tokens are expired, and any changes made do not reflect on the website, nor can I see them in the back-end when logging in from this computer. The only place you can see the changes is on a different computer (except this one) logging into Magento admin.

It's got the Host company stumped, and I am no o


texts:
I´m new in magento, But i like a lot.
I´m trying to figer out to calculate a price based on:
Product price, Quantity, number of inks.

And based on number of inks, it needs stencil price.
1 ink = 350
2 ink = 700

I hope someone can figure this out.
I Think i have try every e-store there is.


texts: Programatically create sub categories in magento

texts:
Im trying to create categories and sub categories programmatically in my custom module using the below code:

The below code is creating a category, but i need to create a child category.

<?php
require_once 'app/Mage.php';
Mage::app("admin");
try
{
$_categories = Mage::getModel('recipe/category')->getCollection()->getData();  //echo "<pre>";print_r($_categories);die;
$category = Mage::getModel('recipe/category');
$category->setTitle('NEW Cate');
$category->setUrlKey('new-category');
$category->setStatus(1);
$category->setIsActive(1);
$category->setDisplayMode(Mage_Catalog_Model_Category::DM_PRODUCT);
$category->setIsAnchor(1); //for active achor
$category->setStoreId(Mage::app()->getStore()->getId());
$parentCategory = Mage::getModel('recipe/category')->load($parentId);
$category->setPath($parentCategory->getPath());
$category->save();

$_categories = Mage::getModel('recipe/category')->getCollection()->getData();  //echo "<pre>";print_r($_categories);die;
$category = Mage::getModel('recipe/category');
$category->setTitle('Indian Cusines');
$category->setUrlKey('cusines');
$category->setStatus(1);
$category->setIsActive(1);
$category->setDisplayMode(Mage_Catalog_Model_Category::DM_PRODUCT);
$category->setIsAnchor(1); //for active achor
$category->setStoreId(Mage::app()->getStore()->getId());
$parentCategory = Mage::getModel('recipe/category')->load($parentId);
$category->setPath($parentCategory->getPath());
$category->save();
}
catch(Exception $e)
{
   var_dump($e);
}

So how to create child category ??


texts:
a Magento site has been hacked recently. The order created even after I just sign up.

Please Advise.

Thank you.


texts:
Magento 2.2.4,

How to remove the caption which is available on the image?. Is there any configuration available to disable it.


texts: Magento call custom payment method via XMLConnect

texts: it has been developed Android native app by Magento XMLConnect so now problem is that default Magento payment method display in an android app but custom payment method is not display in checkout android app so Where I should change or Should I override XMLCoonect module files or add code in custom payment module? it is going blank in my mind Please give me hint so I can approach that way.


texts: How to remove head category but keep subcategory in url magento

texts:
Currently my url structure is as following:

parameters: example.com/head-category/sub-category/product-name

actual url: example.com/gear/balls/superball-0192

I would like to change this to:

parameters: example.com/sub-category/product-name

actual url: example.com/balls/superball-0192

But only for the URL structure. The structure in the menu, head category = main item followed by sub-categories as a subitem.


texts: 500 Internal Server Error after file transfer

texts:
I have had some trouble setting up a magento store, some files seemed to be missing or had gone broken in my previous file transfer, so I decided to do another file transfer in binary mode using FileZilla, because I read that using ASCII could modify the files.

Upon completing the entire file transfer, I am getting an 500 Internal Server Error

See below for exact error message (with the exception of the contact your web host bit):

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

I've tried changing file permissions and on specific folders as suggested by some, without success. I have the magento-check.php  and magento-cleanup.php utilities on my root directory, but I can't seem to access them through www.yourdomain.com/magento/magento-cleanup.php etc..

Any help would be appreciated !


texts: I upgraded from Magento 1.9.2.2 to 1.9.2.3, can you tell me if should I install also the SUPEE 7405 or it isn't necessary? How can I know if my site is vulnerable?


texts: How to retrieve which layered navigation filters are applied in product list page in Magento 2?

texts:
I'm going to write a block to put in products list page. My question is how can I get to know which layered navigation filters are currently applied in the current list page ?

Any help will be appreciated.


texts: Antivirus block website due to JS:MagentoStealer-A [Trojan]

texts:
Avast Antivirus showing that our website is infected with JS:MagentoStealer-A [Trojan] and block to connect it.

The website works for those who don't use Avast.

What should I do?

Magento 1.9.4.2

Thanks!


texts:
I'm trying to setup Magento 1.9.0.1 under Apache 2.4.9 without the access_compat module. As of Apache 2.4 the old access control directives are deprecated [1] and should no longer be used. I'm now trying to convert magento's .htaccess to be compatible with both versions:

# apache 2.2
<IfModule !access_compat_module>
<IfModule !authz_core_module>
    Order allow,deny
    Deny from all
</IfModule>
</IfModule>

# apache 2.4
<IfModule access_compat_module>
    Order allow,deny
    Deny from all
</IfModule>
<IfModule authz_core_module>
    Require all denied
</IfModule>

This seems to work for external connections (browser, wget, ...) but does not work for Zend_Http_Client connections. Magento checks access to app/etc/local.xml in app/code/core/Mage/Adminhtml/Block/Notification/Security.php and read() succeeds with 200 OK returning the contents of said file.

Also, Apache does not log access to said file in its access log for some reason when accessed via Zend_Http_Client. wget access gets logged.

What did I miss? Any magic going on behind the scenes?


texts: How to rewrite this raw mysql query into magento way?

texts:
Can someone please help me convert this raw mysql query into proper magento code.

DELETE a1
FROM catalog_product_entity_decimal as a1
JOIN (SELECT a.value_id
FROM catalog_product_entity_decimal as a
JOIN catalog_product_entity_decimal as b
ON b.entity_type_id = a.entity_type_id
and b.attribute_id = a.attribute_id
and b.entity_id = a.entity_id
and b.store_id = 0
WHERE a.store_id <> 0
and a.value <> b.value) as b1
USING (value_id);

What it's trying to do is delete everything from catalog_product_entity_decimal where value is not equal to default.

I haven't worked with JOINs, so not sure how I can convert it.

UPDATE

As Marius mentioned, I suggested below to my lead but he says we must use joins and delete only different ones because ERP may recreate duplicate records again so running delete all is not good option as it takes up to 0.5 seconds more than conditional delete.

/**
 * Get the resource model
 */
$resource = Mage::getSingleton('core/resource');

/**
 * Retrieve the write connection
 */
$writeConnection = $resource->getConnection('core_write');

/**
 * Retrieve our table name
 */
$table = $resource->getTableName('catalog_product_entity_decimal');

$query = "DELETE FROM {$table} WHERE store_id <> 0";

/**
 * Execute the query
 */
$writeConnection->query($query);

Not sure how to achieve above with magento collection delete method.


texts: To use or not to use the ObjectManager directly?

texts:
Ok, so yesterday we had a big talk with other people from the Magento community regarding the direct use of the ObjectManager in classes/templates.

I'm already aware of the reasons why we shouldn't use the ObjectManager directly, quoting Alan Kent :

  There are several reasons. The code will work, but it is best practice
  to not reference the ObjectManager class directly.

  Because we say so! ;-) (better expressed as consistent code is good
  code)
  The code could be used with a different dependency injection
  framework in the future
  Testing is easier - you pass in mock arguments
  for the required class, without having to provide a mock ObjectManager
  It keeps dependencies clearer - it is obvious what the code depends on
  via constructor list, rather than having dependencies hidden in the
  middle of the code
  It encourages programmers to think about concepts
  like encapsulation and modularization better - if the constructor gets
  big, maybe it is a sign the code needs refactoring

From what I've seen in StackExchange, a lot of people tend to go for the easy/short/not recommended solution for example something like this:

<?php
//Get Object Manager Instance
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

//Load product by product id
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($id);

Instead of going through the painful but recommended process of:

creating a module
declaring preferences
inject dependencies
declare a public method

However, and here comes the dilemma, Magento 2 core files often call the ObjectManager directly. A quick example can be found here: https://github.com/magento/magento2/blob/develop/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Form.php#L57

So here are my questions:

Why is Magento doing what they recommend us not to do ? Does that mean there are some cases where we should use the ObjectManager directly? If so, what are those cases?
What are the consequences of using the ObjectManager directly?


texts: Selected payment method in quote not get changed to default when reload the onepagecheckout in magento 2

texts: I am having two payment methods Online payment and COD in Magento 2. But the default one is an online payment. When I reload the page, the online payment option gets selected by default(even if I changed to the COD option before reloading the page). But my problem is when I get the selected payment method from a quote, it showing as COD because of the last selected option. How can I handle this scenario in Magento 2?


texts: Cannot create property 'messages' on string '{'cart:


texts: Magento\Cms\Block\Widget\Block file location magento 2

texts:
How can i find where this function is written  <?=  $block->getText() ?>
what does it mean /* $block \Magento\Cms\Block\Widget\Block */ Is this file location or what.?

/* @var $block \Magento\Cms\Block\Widget\Block */

?>

 <div class="widget block block-static-block">
  <?=  $block->getText() ?>

  </div>*emphasized text*


texts: How to override core catalog block in product view page

texts:
Hi i'm newbie to magento, trying to override catalog price block to use my custom price.phtml (Coz it's conflicting if i do any css updates). To do this I have done below steps,

Copied app/code/core/Mage/Catalog/Block/Product.php to app/code/local/Mage/Catalog/Block/Product.php

In the copied file, about Line 61, changed

public function getPriceHtml($product)
    {
        $this->setTemplate('catalog/product/price.phtml');
        $this->setProduct($product);
        return $this->toHtml();
    }

to

public function getPriceHtml($product)
    {
        $this->setTemplate('catalog/product/customprice.phtml');
        $this->setProduct($product);
        return $this->toHtml();
    }

Is there any further config required to achieve this ?


texts:
This is a screenshot of my Magento Admin Panel in my image is a block not showing. Is there any way to solve this issue.

Magento 1.9.0.1


texts: Magento 2: How to add external image url / CDN url for product images on category and product details pages?

texts:
I am using Magento 2.3.3. I need help to add CDN url only for product's images on category and product details pages.

NOTE: Except product images, no images will come from CDN.

Thanks in advance.


texts: Fonts getting smaller when _theme.less is created

texts:
I'm running 2.1.2 but since 2.0.1 I'm facing the same problem.

I have a custom theme and when I created file "_theme.less" under my template's structure (web/css/source) all those icons based on fonts get smaller. I mean Cart, Heart (wish list) and Bars (to compare). The weird thing is that the problem persist even if this _theme.less file is totally empty. When I remove the file everything went back to normal (without my customs, of course)

My custom template has Luma as parent so I tried copying all Luma's fonts to my own folder, also copied Blanks fonts but didnt work:

myuser@server: app/design/frontend/CustomTemplates/MyTemplate/web/fonts# ls
Blank-Theme-Icons.eot  Blank-Theme-Icons.ttf   Blank-Theme-Icons.woff2  Luma-Icons.svg  Luma-Icons.woff   selection.json
Blank-Theme-Icons.svg  Blank-Theme-Icons.woff  Luma-Icons.eot           Luma-Icons.ttf  Luma-Icons.woff2

I'm flushing the cache before testing.

Any idea?
Thank you!


texts: Creating a Simple Admin Module - Routing Problem

texts:
All I'm trying to do is follow http://alanstorm.com/magento_admin_controllers basically to create a page in the admin section but it doesn't find it, 404.

IndexController.php:

<?php

class VMRReports_AdminHelloWorld_IndexController extends Mage_Adminhtml_Controller_Action {
    public function indexAction() {
        echo 'Hello Index!';
        $this->loadLayout();
        $this->renderLayout();
        }
}

config.xml:

<config>
        <modules>
                <VMRReports_AdminHelloWorld>
                        <version>1.0</version>
                </VMRReports_AdminHelloWorld>
        </modules>
        <admin>
                <routers>
                        <VMRReports_AdminHelloWorld>
                                <use>admin</admin>
                                <args>
                                <modules>VMRReports_AdminHelloWorld</modules>
                                <frontName>adminhelloworld</frontName>
                                </args>
                        </VMRReports_AdminHelloWorld>
                </routers>
        </admin>
        <adminhtml>
        <!-- The <layout> updates allow us to define our block layouts in a seperate file so are aren't messin' with the magento layout files.  -->
        <layout>
            <updates>
                <hello>
                    <file>hello.xml</file>
                </hello>
            </updates>
        </layout>
        <!-- The <acl> section is for access control. Here we define the pieces where access can be controlled within a role. -->
        <acl>
            <resources>
                <admin>
                    <children>
                        <hello module="VMRReports_HelloWorld">
                            <title>Hello Menu Item</title>
                            <children>
                                <example translate="title" module="hello">
                                    <title>Example Menu Item</title>
                                </example>
                            </children>
                        </hello>
                    </children>
                </admin>
            </resources>
        </acl>
    </adminhtml>
    <global>
        <helpers>
            <helloworld>
                <class>VMRReports_HelloWorld_Helper</class>
            </helloworld>
        </helpers>
        <resources>
            <helloworld_setup>
                <setup>
                    <module>VMRReports_HelloWorld</module>
                </setup>
            </helloworld_setup>
        </resources>
    </global>
</config>

What is wrong?


texts: How to get all stores collection include the store id 0 in magento 2

texts:
I have tried to get all the stores in Magento 2.

$stores = $this->storeManager->getStores();
$ids= array();
foreach ($stores as $storeId => $storeData) {
    $ids[] = $storeId;
}

print_r($ids);

output returns 1.

But in DB it has two store codes "admin" and "default":

How do I get both stores ids?


texts: choose attribute value while add to cart

texts:
If a product is having attribute, say color with it's Catalog Input Type as Multiple Select, then is Magento provide any way to choose a single attribute value from them while Add To Cart? Means if customer wants to choose red color from multiple others, then how he can do that?

Any solution for this is appreciated.

Thanks.


texts:
How do you import product images from a CSV file using System > Import/Export > Import?

I've followed suggestions from various sources but nothing works.  This is the format of the CSV file:

"sku","image","small_image","thumbnail"
90048,"test.jpg","test.jpg","test.jpg"

The file 'test.jpg' exists in the media/import folder so i'm not sure why this does not work.

We are using Magento CE 1.7.0.2.

When I run the import with the CSV file above the image does not get added to the product.


texts: Magento 2 remove lazy load header cart with items

texts:
We are currently developing a new Magento 2.3 store, but we find out that items in the cart in the header, are loaded quite late.

When we load a page on frontend, first the entire page loads and then the items in the header cart are loaded. So it first seems that there are no products in the cart and after a few seconds they are displayed.

Is there a way to load the cart with items instant, instead of the lazy load after the page is loaded completly?


texts: Magento2: Automatically unknown customer have registered in my website

texts:
I have installed fresh Magento2 setup. Automatically unknown customer  have registered in my website.

What the issue in my website. What do?


texts: How to not send email on order place from magento soap api v2

texts:
I have created a webservice using magento soap API v2 for placing an order in magento.

For this I have used below API :

$orderId = $soapClient->shoppingCartOrder($sessionId, $cartId);

This API placed order successfully and sent an email to customer email address. But I don't want to send email to customer on order placed.

But I wants to send email after inovoice creation :

$invoiceIncrementId = $soapClient->salesOrderInvoiceCreate(
        $sessionId,
        $orderId,
        $order_item
    );

For this I have used below code after invoice creation :

$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
$order->sendNewOrderEmail();

Above code send email successfully.

How to restrict shoppingCartOrder API to send email on place order?


texts: Magento2 Improper Breadcrumb On Product Detail Page

texts:
I'm using a custom theme for Magento2.2.4 & also used Magento Migration tool.

On product detail page, currently, breadcrumb format is (please visit on below link).

e.g- http://nimb.ws/V8paZS

But the right format should be:-

e.g- http://nimb.ws/ARX7YG


texts:
I want to add sorting in Review Listing. What is the logic to add Sort by ratings?

I have override method getReviewsCollection() of  Magento/Review/Block/Product/View.php So I have $this->_reviewsCollection on my hand.
Anyone has Idea how to apply sort on base of rating?


texts: Add new tab on product detail page Magento 2

texts:
I want to add an extra tab on product detail page just like review tab, It will  look like a product question tab. How can I do this?

My block file:

namespace Example\ProductQuestion\Block;

use Example\Framework\View\Element\Template;

class Question extends Template
{
    private $_productCollectionFactory;

    public  function __construct (
        Template\Context $context,
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->_productCollectionFactory = $productCollectionFactory;
    }

    public function getProduct()
    {
        $collection = $this->_productCollectionFactory->create();
        $collection->addAttributeToSelect('*')
            ->setOrder('created_at')
            ->setPageSize(5);
        return $collection;
    }
}


texts: Hide custom payment method based off product attribute

texts:
I'm using a custom module which already hides a payment method based off the quote grand total and a variable defined in the backend. But I need to also do another check, which will see if the product in the session quote contains a certain attribute and then show/hide the payment method.

This is what the file that determines this currently looks like:

class Pay4Later extends \Magento\Payment\Model\Method\AbstractMethod {

/**
 * Payment code
 *
 * @var string
 */
protected $_code = 'pay4later';

/**
 * Availability option
 *
 * @var bool
 */
protected $_isOffline = true;

protected $_isInitializeNeeded = true;

public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null){
    $required_cart = round(($this->getConfigData('min_loan')/90)*100);
    if($quote && $quote->getBaseGrandTotal() > $required_cart) {
        return true;
    } else {
        return false;
    }
}

public function getConfigPaymentAction()
{
    return ($this->getConfigData('order_status') == 'pending_payment')? null : parent::getConfigPaymentAction();
} }

I've tried to dump the $quote variable, but nothing happens.


texts: Magento2 - Cannot Resize Images due to error message In CLI

texts:
I'm currently trying to run the image resize command in the CLI for Magento2.3.2 but it keeps coming up with the following error as soon as I run the command:

mysite@dx1287:~/httpdocs$ php bin/magento catalog:images:resize

I get the error:

Warning: imagecreatefrompng(): gd-png: fatal libpng error: Read Error: truncated data  in /var/www/vhosts/mysite.com/httpdocs/vendor/magento/framework/Image/Adapter/Gd2.php on line 72

Does anyone now why this is happening and what I can do to fix it?


texts:
I am working to call Aramex Api for shipping rate in magento2.  I got php examples for Aramex, same as I follow below code to gert Shipping rate, But its throw Unknown SOAP client option

My Code:

  $params = array(
          "ClientInfo"              => array(
          "AccountCountryCode"  => "xxxxx",
          "AccountEntity"           => "xxx",
          "AccountNumber"           => "xxxxxxx",
          "AccountPin"          => "xxxxxxxxx",
          "UserName"            => "xxxxxxxxxxxxxxx",
          "Password"            => "xxxxxxxxxxxxxxxxxx",
          "Version"         => "v1.0"
        ),

        "Transaction"           => array(
          "Reference1"          => "80742"
        ),

      "OriginAddress"       => array(
          "City"                    => "xxxxxxx",
          "StateOrProvinceCode"         => "xxxx",
          "PostCode"                    => "xxxxx",
          "CountryCode"             => "xxxxxxxxxx"
        ),

          "DestinationAddress"  => array(
          "City"                    => "xxxxx",
          "StateOrProvinceCode"         => "xxxxx",
          "PostCode"                    => "xxxxxx",
          "CountryCode"                 => "xxxxxxxxxx"
        ),
        "ShipmentDetails"       => array(
        "PaymentType"            => "xxxxx",
        "ProductGroup"           => "xxxxx",
        "ProductType"            => "xxxxxxx",
        "ActualWeight"           => array("Value" => 2.25, "Unit" => "KG"),
        "ChargeableWeight"           => array("Value" => 2.25, "Unit" => "KG"),
        "NumberOfPieces"         => 1
      )
    );

    $soapClient = new \Zend\Soap\Client('/var/www/html/magento2/app/code/Vendor/Module/wsdl/aramex_rmkvwsdl.wsdl', array('trace' => 1));
    $results = $soapClient->CalculateRate($params);

Suggest Me, How to call custom api using zend soap client and get api response.


texts:
How to delete the item from cart in checkout?
File Magento_Checkout/web/template/summary/item/details.html

How to connect js file and delete item on click?


texts: Registry deprecated in magento 2.3, How to set data without Registry?

texts:
I am creating a custom blog, in which I use the \Magento\Framework\Registry and it is deprecated.

I searched for solution but I could only find the way to get the data without registry.

Is there's any way to set data without registry?


texts:
How to get cms page FullActionName()
$request->getFullActionName() == 'cms_index_index'

Now,i want to get cms pages identifier name at that cms page
In Magento 1, I used this Mage::getSingleton('cms/page')->getIdentifier() it will get all so that i want know what to do into Magento 2 ?


texts: How to add condition to the rate table (shipping methods)?

texts:
I'm using magento 2.3.4, I've added a "Price vs. Destination" condition, and I've uploaded my table of conditions in csv. but I would like to know if there is any way to apply the shipping amount with percentage X% of the subtotal of the order, and apply a certain percentage to different zip codes,
I have thought of modifying the file and adding more fields and making the internal conditions in the shipping module.
anyone have any idea how to implement these conditions?
example
The total amount of the order was 500, and the shipment goes to USA, HI, 15% of the total order would be applied to the shipment amount


texts: SSL Multidomain for Magento 2 on Google Cloud

texts:
I have the follow situation:

My Magento 2 installation has 4 stores and it is hosted in google cloud compute engine with the main domain as an IP address like 35.999.444.22. I have a SSL certificate for one of my stores domain. But it is not working. Do I have to get another SSL certificate for the main address: 35.999.444.22?

This is how I configure my nginx server replacing with my certificates. When I add this code I can't run nginx on docker anymore.

server {
listen 443;

ssl on;
ssl_certificate /etc/ssl/certs/ssl_bundle.crt;
ssl_certificate_key /etc/ssl/private/meusite.key;

ssl_protocols SSLv3 TLSv1;

ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;

server_name meusite.com.br;
}


texts: Filter with category and price magento 2

texts: After installing a new template, the filter with category and prices don't work


texts: Magento 1.9 Import/Export modules delivers no feedback during the import

texts:
Dear Magento community,

the ImportExport core module (not the slow DataFlow, but the "new" one which was introduced by 1.5) doesn't deliver any status information of import progress. I'm trying to import over 100k lines of customer data, which is why I cannot opt to MAGMI or any other reasonable alternative solution I'm aware of.

So I have to wait hours for the check of CSV file to finish only to get to know, that in the end over 100 lines are invalid (which is really not much, if you consider the file size).

Does someone have an idea, how I can add at least some primitive logging or on-screen information, which tells me some information about the check or import POST-request on the fly? E.g. how many lines were checked, where are errors etc. At least so much, that I can tell, that the scripts didn't stuck somewhere...

Many thanks for your feedback and kind regads,
Dimitri


texts: how to call a block directly from a page?

texts:
this is a beginner question for sure - so go easy on me?:

I'm calling some extension output using code such as this:

{{block type="downloads/link" id=123 title="Description"}}

This code works, when its in a static block, or a CMS page.

However, when I enter it into a category description panel (along with some other HTML/CSS), it doesn't work.. Magento will just output the code to screen. I'm guessing that Magento doesn't process the code within a category description panel, the same way it does in a static block.

This is annoying, as I now need to create 20 or static blocks, to show my block results in different places.

Is there someway to use a {{block}} call in other pages, perhaps wraping in other code? Using an extension?

I feel as though this question might be the answer, but the solution there doesn't really help me as it requires embedding even more code: how to call block in short description on product page?

Thanks.


texts: How to get first item of Varien_Data_Tree_Node_Collection

texts:
I am not being able to figure out how to get the first item in this type of collection: Varien_Data_Tree_Node_Collection

without knowing the key, is this possible?


texts: which phtml file is use for New Order Confirmation Template for Guest/Seller?

texts:
i have created and implemented the code to call product thumbnail and product url for "New Order Confirmation Template" thats is use for customers.my code is below

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($_item->getProduct()->getId());
$imagewidth=30;
$imageheight=30;
//$_product = $objectManager->get('Magento\Catalog\Model\Product')->load($_item->getProductId());
$imageHelper  = $objectManager->get('\Magento\Catalog\Helper\Image');
$image_url = $imageHelper->init($product, 'product_page_image_small')->setImageFile($product->getFile())->resize($imagewidth, $imageheight)->getUrl();

<a href="<?= $_item->getProduct()->getProductUrl(); ?>"> <?= $block->escapeHtml($_item->getName()) ?>

<?= /* @escapeNotVerified */  __('SKU'); ?>: <?= $block->escapeHtml($block->getSku($_item)) ?>

<a href="<?= $_item->getProduct()->getProductUrl(); ?>"> <img src="<?= $image_url?>">

This is my code which iam using in module-sales/view/frontend/templates/email/items/order in default.html. now this template get called in module-sales/view/frontend/templates/email
items.phtml to call default.phtml contents.

now my query is when i order something this customized mail along with product thumbnail and product url is going to customers but its not going to seller.

now what i have done is create an email template via sales configuration and callingthe same items.phtml block as below

Thank you{{config path="trans_email/ident_custom1/name"}} for your order.

{{block class="Magento\Framework\View\Element\Template" order=$order name="order_sms" template="module_sales::items.phtml" area="frontend"}}

when iam seeing my customized mail iam getting only
        Thank youCustom 1 for your order. and the block which i have mentioned at top is not reflecting. what is the issue and can please any body tell me what default email template is use to send out to new guest so that i can customize it accordingly confused.


texts:
I have a Magento 2 site that is loading slowly.

There are xhr POST requests to
Request URL:https://www.paypal.com/webapps/hermes/api/logger

origin:https://www.paypal.com
referer:https://www.paypal.com/webapps/hermes/component-meta?xcomponent=1&version=4&env=production

Two of these are successful and then the third gets cancelled.
This whole process delays the loading of the page by 5-7 seconds.

What are these requests and where are they coming from?


texts: Migrated Magento to new server. Cant get emails to send to customer

texts:
A little help please.

We've migrated our Magento (1.7) to a new server.  Everything is working fine except the email confirmation.  We're receiving orders, payments, etc.  But the emails are not sending to the customer.  We receive the order confirmation email fine but not the customer, nor the shipping, credit memo, etc.

I'm sure its probably just a little something we have to change but unsure where.  Have checked here, google.  have checked on magento for the email settings, server & office 365.  All of our magento & server settings appear to be the same (still have the other one to access able but disabled).  Office 365 only points to our domain.  The only difference i can think of is the new ip but nothing seems to be needing it as it all searches for the domain.  Last emails received from magento to customers was when it was still on the old server.

I've gone around in circles now & seem to be rechecking things several times again & again.

Any help would be greatly appreciated.  Thanks


texts: Magento 2 productCollection works differently on front end to separate script. why?

texts:
i'm new to magento, not programming.

can someone explain why the following code returns a different result depending on where it's called?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
$collection = $productCollection->create();
$sql = $collection->setStore(1)
    ->addCategoriesFilter(['in' => 11])
    ->addAttributeToFilter('brand', array('eq' => 5460))
    ->getSelect();
echo $sql;

returns this when called from within my module

SELECT 1 AS `status`, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`created_at`, `e`.`updated_at`, `e`.`sku` FROM `catalog_product_flat_1` AS `e` WHERE (e.entity_id IN((SELECT `cat`.`product_id` FROM `catalog_category_product` AS `cat` WHERE (cat.category_id IN('11')))))

but

use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';

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

$objectManager = $bootstrap->getObjectManager();
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
$collection = $productCollection->create();
$sql = $collection->setStore(1)
   ->addCategoriesFilter(['in' => 11])
   ->addAttributeToFilter('brand', array('eq' => 5460))
   ->getSelect();
echo $sql.',';

returns this from a standalone script

SELECT `e`.*, `at_brand`.`value` AS `brand` FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_entity_int` AS `at_brand` ON (`at_brand`.`entity_id` = `e`.`entity_id`) AND (`at_brand`.`attribute_id` = '173') AND (`at_brand`.`store_id` = 0) WHERE (e.entity_id IN((SELECT `cat`.`product_id` FROM `catalog_category_product` AS `cat` WHERE (cat.category_id IN(11))))) AND (at_brand.value = 5460)

as you can see, when run standalone it applies the additional filters, but when ran in the module it doesn't.

It's probably some simple fundamental of magento that i haven't grasped yet but that's why i'm asking :)

thanks


texts:
Hi can any one help me to fix this error I am not able to upload any product I am gating this error (Line No 1 Skipping import row, required field "sku" is not defined.)  I am uploading the Sku like this sku
NAY101-Maroon and image like this nay101-maroon-_1__1.jpg I am fade up while uploading this file can any one help me into that. my email is info@shoppingara.com


texts:
As per my requirement i want to logout the customer using PHP curl.

for that I used the following code in my custom controller action(execute)

$lastCustomerId = $this->_customerSession->getId();
$this->_customerSession->logout()->setBeforeAuthUrl($this->_redirect->getRefererUrl())
            ->setLastCustomerId($lastCustomerId);
$value = $this->getCookieManager()->getCookie('mage-cache-sessid');

if ($this->getCookieManager()->getCookie('mage-cache-sessid')) {
   $metadata = $this->getCookieMetadataFactory()->createCookieMetadata();
   $metadata->setPath('/');
   $this->getCookieManager()->deleteCookie('mage-cache-sessid', $metadata);
}

Then in my localhost i created curl.php with the following code

$logoutUrl = 'http://127.0.0.1/Magento2/frontendname/controllername/actionname';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $logoutUrl);
curl_setopt($ch, CURLOPT_HEADER, 0);
$result = curl_exec($ch);
$curl_errno = curl_errno($ch);
if($curl_errno){
    echo $curl_errno.'--in error'; exit;
}
print_r($result);
curl_close($ch);

When i run the curl file, it has hit the above logout page but the customer is not logout, but if i run the url directly on the browser the customer has logout.

Also tried this in controller

$pin = 'hitesh_12345678';
$customerData = $this->_customer->getCollection()->addAttributeToFilter('pin', array('eq' => $pin))->getFirstItem();
$customerId = $customerData->getData('entity_id');
if($this->_customerSession->getId() == $customerId)
{
    $this->_customerSession->logout();
    echo 'Customer logout successfully!'; exit;
} else {
    echo "Customer is not login"; exit;
}

But none of the logout functionality is not working.

share your thoughts and ideas for logout using CURL functionality.

Thanks in advance for your better idea and support


texts: Magento 2 : How to create custom Contact form

texts:
I am using Magento 2.3
As per my requirement. I have to create multiple form in my website

So can anyone provide me appropriate instruction for how can i create custom form like contact form

Thanks


texts: Magento soap api delete product using sku

texts: I have a bridge built between two applications, where products are getting dumped into magento. I am using Magento SOAP API to add/update/delete products, but i need to do delete product using SKU and not product id..Any Suggestions?


texts:
Where and how to set titles in custom module?

I got a custom (but close to standard) news module with router,controller,etc ... and want to set title for single news view dynamically.

Please let me know if you need any files.


texts: Set folder/file permissions for an user to install extentions on Magento 2

texts:
I found a Magento developer that has some extensions which I need for my online store.
I created on Ubuntu 20.04 server, a new user "webdev01", for the Magento developer to use it to install and customize the extensions by using SSH.
1- How can I set the minimum of the folder/file permissions to the
    project folder and subfolders "Magneto"?  so the "webdev01" user can
    install, customize and support extensions.

2- Does "webdev01" need to be a member of the www-data group?

3- Does "webdev01" need access to the MySQL database?
    If yes, How can i set minimum permissions?

4- Should I edit something in the SELinux for "webdev01" users?

Please help me to do that by sending me the command line.
Thanks.


texts: If it is possible to debug PHP of the admin side in Magento2?

texts:
General question

Just interesting, if it is possible to debug the admin side in Manento2. If it is, wold be glad to saw some hints.

Debug process now

For now I'm using PhpStorm with XDebug. If I want to debug some module, I'm just setting breakpoints and run in debug mode "Php Web Application" preset with link to this module. I suppose this approach can't be used to debug the admin side because of some "key" dynamically generating all the time.


texts: How to migrate customer data from magento 2.3.5 to magento 2.4.2

texts:
I have a magento store live with magento version 2.3.5 and I have a fresh magento installation for magento 2.4.2. Now my requirement is to move my current customer data to 2.4.2 instance. So how can I migrate those from m2.3.5 to m2.4.2 db?
Thanks In Advance!


texts: The billing and shipping address in Email template to be clear | Magento

texts:
We need the address of both billing & shipping to be clear in the email template of orders. We are using Magento.

city: billing city,

region: billing Region,

Street: Billing Street

I need to add the word city, region, street before each of them to make it clear in the order notification emails.

Please help us to do it..


texts: Magento 2 make guest customer at checkout page

texts:
At the checkout step the guest is providing all his details including his email, location & phone, what is missing to have an account on the store is just defining the password.

How to get the Guest be a customer within the checkout step?


texts: Call to a member function extend() issue

texts:
I tried to import my Magento project into my local machine (wamp server), But I was not able to access it, i got the following error:

Fatal error: Call to a member function extend() on a non-object in C:\wamp\www\*******\lib\Varien\Simplexml\Config.php on line 619


texts: Magento 2 - How to get minimal price of associated simple price of Grouped Product in phtml

texts:
I made the custom phtml and I have custom product collection. I just need to show the minimal price of associated simple product of grouped product.

Any help would be appreciated.


texts: Call to undefined function mcrypt_module_open() in lib/Varien/Crypt/Mcrypt.php on line 63

texts:
My checkout suddenly goes to a white page, it never used to do this!

The error I am getting is

  Call to undefined function mcrypt_module_open() in
  /var/www/vhosts/mywebsite.co.uk/httpdocs/lib/Varien/Crypt/Mcrypt.php
  on line 63

PLEASE HELP! Thank you very much


texts: How can I use ssh command using php script as root user?

texts:
I am working third party integration for which new files generating automatically when my code is running.

But it required permission after creating the file.

I want to give the permission as a root user?

I have tried like this shell_exec("chmod -R 777 /run/folderName/filename");

But this is not working


texts: Importing orders and order numbers magento 2.1

texts:
I am trying to migrate another shopping cart to magento 2.1

The other shopping cart has been in use for quite a while and has lots of orders.

I have managed to import products, categories  and now making the skin

I can sort of import orders - in that I can get the order content, the date the order was made, billing and shipping address etc. Payment method is of no consequence. And shipping method flat rate is fine for historical orders. But at the time of transition we might have to keep two systems alive for a couple of months.

BUT - my big problem is order numbers - historical order numbers.
All the imported orders start from 10M and it does not listen to the order number increment. My old orders start from 4XXX and go to 30XXX. If a customer calls and refers to their old order for warranty purposes, I do not have an easy way to find it.

Is there a way to add another attribute to an order - like old_order_number  and import the old order number into that variable?
Is it possible to make magento 2.1 just accept the old order number for historical orders, and keep that trend going for newer orders?

I know this is a uncommon case that people are moving to magento form another shopping cart - but it would increase footprint for magento if they made this easy, and it would also make the whole process easier.

Please offer suggestions and accept my thanks in advance for the same
Sam


texts:
I am trying to implement Magento 2 catalog rule condtions in a custom module Ui Component form. Below is the field set:

<htmlContent name="block_promo_catalog_edit_tab_conditions" sortOrder="20">
    <argument name="data" xsi:type="array">
        <item name="wrapper" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Conditions</item>
            <item name="collapsible" xsi:type="boolean">true</item>
            <item name="opened" xsi:type="boolean">false</item>
        </item>
    </argument>
    <settings>
        <wrapper>
            <canShow>true</canShow>
            <componentType>fieldset</componentType>
        </wrapper>
    </settings>
    <block class="Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Conditions" name="promo_catalog_edit_tab"/>
</htmlContent>

I am getting below error:

  Fatal error: Method
  Magento\Ui\TemplateEngine\Xhtml\Result::__toString() must not throw an
  exception, caught Error: Call to a member function
  getConditionsFieldSetId() on null in
  /vendor/magento/module-ui/Component/Wrapper/UiComponent.php on line 0

Any idea how to fix this one.?

If we implement the same field for Sales Rule it works fine with the following code without error:

<fieldset name="conditions">
<argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="label" xsi:type="string" translate="true">Conditions</item>
        <item name="collapsible" xsi:type="boolean">true</item>
        <item name="sortOrder" xsi:type="number">127</item>
    </item>
</argument>
<container name="conditions_apply_to" >
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="sortOrder" xsi:type="number">10</item>
        </item>
    </argument>
    <htmlContent name="html_content">
        <argument name="block" xsi:type="object">Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Conditions</argument>
    </htmlContent>

</container>


texts: Whys is there an exit() directive at the beginning of my pub/index.php

texts:
Here is the code of the pub/index.php:

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

use Magento\Framework\App\Bootstrap;
use Magento\Framework\App\Filesystem\DirectoryList;
exit();

try {
    require __DIR__ . '/../app/bootstrap.php';
} catch (\Exception $e) {
    echo <<getMessage()}

HTML;
    exit(1);
}

$params = $_SERVER;
$params[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS] = array_replace_recursive(
    $params[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS] ?? [],
    [
        DirectoryList::PUB => [DirectoryList::URL_PATH => ''],
        DirectoryList::MEDIA => [DirectoryList::URL_PATH => 'media'],
        DirectoryList::STATIC_VIEW => [DirectoryList::URL_PATH => 'static'],
        DirectoryList::UPLOAD => [DirectoryList::URL_PATH => 'media/upload'],
    ]
);

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
$bootstrap->run($app);

Interestingly just after the use directives I find an exit() directive.
If I serve the site with Apache, no problem, but if I switch to nginx, my only way to make it work is to comment this exit().

Why is it there and what is its use?


texts: Magento 2.0 After migration Exisiting Customers can't log in

texts:
I am facing a very awkward scenario. I have successfully migrated settings, data and delta from Magento 1.9.2.2 to Magento 2.0.2. Now all the products and the admin sales records, customers records are in there.

Now when i try to log in from the existing customer the page just refreshes and nothing happens. If i make a new account and login from that it will act normally.

Why it is happening?

Any help will be greatly appreciated.

Thanks


texts: Multiple web frontends, which folders need to be shared across frontends?

texts:
I'm deploying a Magento 2 site to AWS, the site will have a load balancer in front which serves via multiple instances (frontends). I've enabled redis for cache and session storage.
The media folder is a shared NFS directory across the instances.

Should I also make the 'var' directory a shared NFS folder?
I'm unsure about when and why Magento writes to the var folder during operation and what problems this could cause if a user is moved from one server to another during their time on the site.

One annoyance of not using NFS for the 'var' directory would be trying to check logs and reports of any problems that Magento writes to 'var'.


texts: Magento2 : Add custom column in sales order grid

texts:
I have added a custom column in sales order grid, and it is also coming in export CSV file but at the first position.

But I want to add it after id column (any place after id column) in CSV export file, id should be always first column in CSV file.

Below is the code to add column in custom module sales_order_grid.xml

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top"/>
<columns name="sales_order_columns">
    <column name="billing_telephone">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Telephone</item>
            </item>
        </argument>
    </column>
</columns>
</listing>

What should I add in above code so that Telephone column will come after id column in export file?


texts: Magento shipping option based on customer group

texts: Does anyone know how i might be able to modify Magento Shipping module that is in Magento 2.3.2 to allow shipping method based on customer group?


texts: Need to update product price through Csv through Sku code

texts:
So i need to update price of multiple product the record of which i have got in excel . I have sku code of the product and their updated prices .

I know i can update the prices by finding each product from the backend and updating them one by one , but that takes a lot of time and seems kind of impractical if i have hundreds of product to update .

Does anyone have a script or way , so that i can update the prices at once using the products sku code to find them and update the price with the price provided in the excel sheet.


texts: Magento 2: Change Order Changes for Paypal Authorization on Magento Side

texts:
I'm able to achieve for some products it with be Authorization method instead of Sale for Paypal Express Checkout.

magento\app\code\Custom\Module\Model\Api\Nvp.php By overriding getPaymentAction method

It's Done on Paypal Side in SandBox it works fine.

Now it's not updating values on Magento Side. Still it's taking values from Config.

sales_order_payment
sales_payment_transaction

Above table has still value for Capture.

So for already Capture Order I need to Authorize in Magento. or How can we create order with Authorize Method for Paypal?

I have to get the order which is done Authorized & Apply Changes to it on Magento side.


texts:
I have an issue with display image from admin UI component in magento 2.3.1.Who is solution  help me !
Here is my source:
<?php
    namespace Booking\Hotel\Ui\Component\Listing\Column;
    use Magento\Framework\View\Element\UiComponentFactory;
    use Magento\Framework\View\Element\UiComponent\ContextInterface;
    use Magento\Store\Model\StoreManagerInterface;
    use Magento\Ui\Component\Listing\Columns\Column;
    class Logo extends Column
    {
        const ALT_FIELD = 'title';
        /**
         * @var \Magento\Store\Model\StoreManagerInterface
         */
        protected $storeManager;
        /**
         * @var \Magento\Catalog\Helper\Image
         */
        protected $imageHelper;
        /**
         * @param ContextInterface              $context
         * @param UiComponentFactory            $uiComponentFactory
         * @param StoreManagerInterface         $storeManager
         * @param \Magento\Catalog\Helper\Image $imageHelper
         * @param array                         $components
         * @param array                         $data
         */
        public function __construct(
            ContextInterface $context,
            UiComponentFactory $uiComponentFactory,
            StoreManagerInterface $storeManager,
            \Magento\Catalog\Helper\Image $imageHelper,
            array $components = [],
            array $data = []
        ) {
            $this->storeManager = $storeManager;
            $this->imageHelper = $imageHelper;
            parent::__construct($context, $uiComponentFactory, $components, $data);
        }
        /**
         * Prepare Data Source
         *
         * @param array $dataSource
         * @return array
         */
        public function prepareDataSource(array $dataSource)
        {
            if (isset($dataSource['data']['items'])) {
                $fieldName = $this->getData('name');
                foreach ($dataSource['data']['items'] as &$item) {
                    $url = '';
                    if (isset($item[$fieldName])) {
                        if ($item[$fieldName] != '') {
                            $url = $this->storeManager->getStore()->getBaseUrl(
                                    \Magento\Framework\UrlInterface::URL_TYPE_MEDIA
                                ) . "catalog/tmp/category" . $item[$fieldName];
                        } else {
                            $url = $this->imageHelper->getDefaultPlaceholderUrl('small_image');
                        }
                    } else {
                        $url = $this->imageHelper->getDefaultPlaceholderUrl('small_image');
                    }
                    $item[$fieldName . '_src'] = $url;
                    $item[$fieldName . '_alt'] = $this->getAlt($item) ?: '';
                    $item[$fieldName . '_orig_src'] = $url;
                }
            }
            return $dataSource;
        }
        protected function getAlt($row)
        {
            $altField = $this->getData('config/altField') ?: self::ALT_FIELD;
            return isset($row[$altField]) ? $row[$altField] : null;
        }
    }

This is the image column I added in the AAA file
<column name="hotel_image" class="Booking\Hotel\Ui\Component\Listing\Column\Logo">
<argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/thumbnail</item>
        <item name="label" xsi:type="string" translate="true">Image</item>
        <item name="altField" xsi:type="string">title</item>
        <item name="has_preview" xsi:type="string">1</item>
        <item name="sortOrder" xsi:type="number">30</item>
    </item>
</argument>
</column>

But it not show


texts: Adding new tab in between Account Information and Address Book in account dashboard

texts:
I want to display some information in account dashboard. How to override default one with new one

I want a tab similar to the one highlighted in yellow box(with custom content like User Name, Dob, etc) to be displayed between the 'Account Information' block and 'Address Block'(where the red arrow is pointing).


texts: How to use dynamic row ui-component for frontend magento2?

texts: How to use dynamic row ui-component for frontend magento2 ?


texts: When adding item to cart minicart doesnt show the subtotal

texts: When I'm adding an item to the cart from product page it doesn't show the subtotal in minicart but when I reload the page it does. How to fix that? Here is the link.


texts: add simple radio button in Checkout page in PAYMENT METHOD

texts:
I want to add new radio button after CASH ON DELIVERT in one page Checkout page in PAYMENT METHOD.
If click on radio button then show email id.


texts: Frontend not working permission issue Magento 2

texts:
I get the following error report when attempting to go to the frontend of my Magento 2 website.

{"0":"Warning: SessionHandler::read(): open(\/var\/lib\/php\/sessions\/sess_9am6mqijeelnptduc1lku9qhi3, O_RDWR) failed: Permission denied (13)

The admin panel is working OK.

This started when I created a duplicate of this site and went through the various set up commands on that new site.

I have temporarily updated the session folder to 777 to test - to no avail.

Can anyone please suggest a fix?


texts: Show shop by and browse by left navigation

texts:
I have seen a few sites that have one block in the left sidebar that is browse by and shows subcategories in it and then a second separate block which is shop by with the rest of the attributes like color/brand in it, below.

Now as far as i know if the categories set anchor is set to "no", youll receive the browse by block  and if the anchor is set then youll receive the shop by bloc.

My question is, how would i get both the browse by and shop by blocks showing on the top level navigation category pages?

I tried manually inserting the shop by XML in my localhost and bointing it towards the correct layout but no luck

thanks


texts: Magento 2 - Get orders that were completed x days ago

texts:
I'm trying to get all orders that were completed a certain number of days ago using the below code:

protected $searchCriteria;

public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Sales\Api\OrderRepositoryInterface $orderRepository,
    \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteria,
    \Magento\Framework\Api\SortOrderBuilder $sortBuilder
)
{
    $this->orderRepository = $orderRepository;
    $this->searchCriteriaBuilder = $searchCriteria;
    $this->sortBuilder = $sortBuilder;
    return parent::__construct($context);
}

public function execute()
{
    $today = date("Y-m-d 0:0:0");
    $from = strtotime('-3 day', strtotime($today));
    $to = strtotime('-2 day', strtotime($today));
    $from = date('Y-m-d h:i:s', $from);
    $to = date('Y-m-d h:i:s', $to);

    $searchCriteria = $this->searchCriteriaBuilder
      ->addFilter('status','complete','eq')
      ->addSortOrder($this->sortBuilder->setField('entity_id')
      ->setDescendingDirection()->create())
      ->setPageSize(500)->setCurrentPage(1)->create();

    $ordersList = $this->orderRepository->getList($searchCriteria);
    $ordersList->addFieldToFilter('updated_at', array('from'=>$from, 'to'=>$to));

    foreach ($ordersList as $order) {
        echo $order->getCustomerEmail();
        exit;
    }

}

This returns a collection of orders however restricting the date just does not seem to be working at all. What is going wrong here?


texts:
I am having puchased item id and I need to grab order details in magento 1
Can anybody please help?


texts: Magento 2 - How to add custom attribute to sales/order/view?

texts:
How can I add a custom field to sales/order/view in adminhtml?
I want to save a tracking number related to the order.
Thanks.


texts: 'Unable to save stock item' error when trying to save creating or editing a product

texts:
I am running Magento 2.2.2 and recently migrated servers. When I am trying to edit or create a new product now, I have the error 'Unable to save stock item'
This is the first time I am facing this issue. I have tried reindexing, clearing cache but the error is still there.
If anyone can assist.
Thanks.


texts: Total price changes to zero after selecting option

texts:
I recently updated from Magento 1.6.1 to Magento 1.9.2.1 and I noticed that the total price of a product changes to 0,00 when I select an option (https://sportinngerritsen.nl/professional-supreme-elite-200-mtr-amber). When I continue to my shopping cart, the price is correct. I've tried a few things I found on the internet like changing a peace of code in the file optionapp/design/frontend/default/sportinn/template/catalog/product/options/view/options.phtml:

price += parseFloat(this.config[optionId][selectOption.value].priceValue);

Unfortunately this doesn't make a difference. Who can help me with this?


texts: Magento 2 configurable product showing 0 price if we change locale to persian

texts:
We are facing issue of product price in configurable product. At the time of loading product price is showing correct, once product is properly load then it is change to 0.00 for configurable product.

This issue happens with Magento 2 when we switch language. Also we have found this glitch with Magento 2.0.4 version by adding different language pack instead of Persian, still the same issue arise. And this issue arise in product detail page and not in product listing page.

Please find below image for more detailed clarification.


texts: Get store view attribute value from collection

texts:
I'm using the following call to get a product collection:

        $collection = Mage::getModel('catalog/product')
        ->getCollection()
        ->setStoreId($storeId)
        ->addStoreFilter($storeId)
        ->addAttributeToSelect(array('attribute_name1','attribute_name2'))
        ->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED));

The product "attribute_name1" has never been set on the default view of the product in Magento admin, but it has been set on the store view level.

If I call the attribute in my code with $product->getAttributeName1() it returns null - even if a value has been set on the store view level in admin.

If I set the default value of the attribute to "foo" and the store view value af the attribute to "bar" the call $product->getAttributeName1() returns "bar" as expected.

My questions is: How can I structure my collection call to ensure that my $product->getAttributeName1() call returns the store view level value, even if a default value hasn't been set?


texts: magento2 controller concept of rendering layouts

texts: I just started working with magento 2 and I am little confuse how does the controller know that which layout has to be rendered.


texts: How to display category and price filter on layered navigation in Magento 2?

texts:
I want to display category and price filter on layered navigation. I don't know how to implement this task.

Can you please help me?.

Please check my required output screenshot.

https://prnt.sc/jhjhhd


texts: Getting error Invalid state change requested in Magento2.2

texts: When I am placing order by my payment gateway I am getting error Invalid state change requested. I debug the core code and found that is error is coming from plugin used by core classes. i.e Magento\Quote\Model\QuoteRepository\Plugin\AccessChangeQuoteControl which is not exist in previous version of magento2 (i.e before Magento2.2) . Have anyone idea what is purpose of this plugin.


texts: ubuntu : restore folders in var directory

texts: I accidentally deleted all folders in var directory using rm -rf var/* through terminal, Is any way to restore that folders.Please help me.


texts: magento 2 override pricing for configurable product

texts: I need to override magento 2 pricing for configurable product. Can you please let me know which is the best way to do this.


texts: Disable catalog search module - Magento 2.2.2 EE

texts:
we are trying to disable the modules "Magento_Search & Magento_CatalogSearch" because we are using algolia search not default magento search. But, we can't disable the module, it has dependency module(Staging), we have run the below command to disable the all the dependency modules as well.

bin/magento mo:dis Magento_Search Magento_CatalogSearch Magento_CatalogImportExportStaging Magento_CatalogStaging Magento_AdvancedSearch Magento_CatalogStaging Magento_ConfigurableProductStaging Magento_Elasticsearch Magento_Solr Magento_BundleStaging Magento_DownloadableStaging

After that setup upgrade throws the below error
https://nimb.ws/zOwryM

please any help?

The purpose of disabling Magento catalog search is it creates so many hits of search_tmp_* table, it slow down the Mysql server.


texts: Product SKU requirements. What characters are restricted from a product SKU and can there be spaces in the middle of the SKU?

texts:
For product SKU's can there be spaces in the middle of the SKU?

Are there any character restrictions that can not be used for a SKU ?


texts: Adding Top Link via a custom module - Magento 1.9

texts:
I have some custom module, on activating this module I want to show a "Custom Module Link" as a top link. Please refer the snapshot below.

How can I achieve this? This link should redirect to one of the Customer account navigation link.


texts: How to create dynamic rows field in custom Ui component form

texts:
I want to create field in custom ui form to add dynamic row and delete that row..

I know how to add dynamic row field in STORE > Configuration but I don't know how to add in UI component form.

Then I want to store this custom field data in custom table.

Anyone knows then please help...


texts: configure magento database connection to connect to other PC on same LAN (team members work in one database)

texts:
how to

  configure magento  database connection

to connect to other PC on same LAN (team members work in one database which on PC in our LAN )

i'm new to magento and i searched for that but nothing lead me


texts:
I am preparing magento homepage and i want to change the font-family as

  opensans

but that font family is not available in magento. how to import that opensans.

help me out here,


texts: how can I restrict admin user permissions per field in Magento 2?

texts:
Is it possible to restrict an admin user on a attribute field basis? For example I would like some users/user role to edit stock of a product and the short description however I don't want them to be able to change fields like the product name and sku.
Do you have any idea ?


texts:
I am very new to magento.

I had just install magento 2.1 and follow user guide but I am not understanding the workflow and folder structure.

I am also trying to understand luma theme (debug mode on). but unable to find structure.

Is there any documentation to understand the workflow and folder structure of magento 2?

Thanks.


texts: Magento 2 What is the Best way to add the Sales Order view products table to a new tab?

texts:
What is the easiest way to add the Sales Order view products table to a new tab? I have the new tab functioning. But can't figure out how to add the Order View Items table to the tab.

Here is the pic of the table for reference:-

Here is my sales_order_view.xml layout file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="left">

            <referenceBlock name="sales_order_tabs">

                <block class="TeamDane\WdOrder\Block\Adminhtml\Order\View\Tab\EkeyOrder" name="wdorder_ekeyorder"/>

                <action method="addTabAfter">
                    <argument name="name" xsi:type="string">wdorder_ekeyorder_tab</argument>
                    <argument name="block" xsi:type="string">wdorder_ekeyorder</argument>
                    <argument name="after" xsi:type="string">order_invoices</argument>
                </action>

            </referenceBlock>

        </referenceContainer>
    </body>
</page>

Thanks.


texts: Load Simple Products Collection (both, in stock and out of stock)

texts:
I got a problem loading ALL "child" products of a Configurable Product into a collection, even those that are out of stock.

Like loading the products like this:

$simpleCollection = $configurable->getUsedProductCollection()
    ->addAttributeToSelect('*')
    ->addFilterByRequiredOptions();

foreach ($simpleCollection as $simple) {
   //$simple->getName();
}

will ignore child products that are out of stock, probably because they're not listed in the price tables, that are joined.

Is there another option without loading all child id's by getChildrenIds and then load each simple product with load?


texts: Performance of EE v CE for a 5,000 sku store with 1m pageviews a month

texts:
We have a store with 5,000 skus (and growing, hope to have 10,000 within 3 years) and currently in the region of 1m page views and 10,000 orders per month. We currently work from a bespoke platform but are considering a move to Magento.

As regards hosting we have been researching it for a while now and Nexcess are our front runner at the moment. The main question we have is, from a purely performance perspective, is the Enterprise Edition worth the money over the Community Edition?

We are considering either a UK SIP 500 Dedicated Server or a UK MCE-SIP 100 2 node cluster. We also see that Nexcess offer Varnish support via their turpentine extension. If the community edition is deployed correctly and tuned, can it perform as well as EE?


texts:
Can I enable both opcache and memcache?
Will it help?
I have one dedicated server hosting magento 32gb ran 12 cores