texts:
I can't seem to find anything at all on the internet related to my problem which makes me think I've done something wrong along the way which has eluded me for days now.

I have a theme I downloaded called 'Ultimo' and I want to make changes to the header.phtml file without changing the core file, so obviously I would make a sub-theme/child-theme.

Inside the Ultimo 'package' it has a default theme called 'default'

To make a sub-theme I need to make a folder alongside 'default' called 'custom_theme' and then enable it within the admin panel, See below.

I delete the cache after any changes I make.
There is nothing in system > design that could override anything.

If I rename the folder 'default' to something else ONLY THEN will magento load in the desired sub-theme.

So obviously magento is skipping the sub-theme I created and going straight to default.

Please can anybody help me as I'm not sure what is making Magento behave like this.

(I made a test copy of my site from before I added the new theme and was able to add the theme, create a sub-theme and enable it no problem)


texts: Magento 2 order stop generating after data migration

texts:
We used the Magento migration tool to migrate data from Magento 1 to Magento 2. Data migrated successfully but now order stop working. We checked the log and found that it stops working because of the below error.

Fatal Error: 'Uncaught TypeError: Argument 1 passed to Magento\Email\Model\Template::setVars() must be of the type array, null given

Any suggestions to solve this issue will be highly appreciated.

Edited:
We checked and found that this error is only coming when set "Separate Email" to "Send Order Email Copy Method" option under Admin > STORES > Configuration > SALES > Sales Email


texts: In Magento: Where do you actually store the information of the shelf location code of a product

texts:
I am currently reading about Magento2 and considering to use it to setup an online store for products I have on stock.

One thing I couldn't find yet in the documentation is the handling of the physical bin location of a product. Where in Magento do you map a simple product with an actual physical location?

I mean not only which warehouse but where in the warehouse, so that the picker sees the order and knows instantly where to look for the items to be picked up.

And how do you handle the fact that an item might lie around in different locations within a warehouse e.g. when you are working with a Chaotic Storage approach.


texts: Magento 'Add to Cart' button displaying 'code' on click

texts:
I am new to Magento. I have added a new controller to display "Hello world" and the theme used is 'base/default'. I have added a new category and a new product inside it, which are both showing up. However, when I add that product to cart by clicking Add to Cart, I get redirected to a new page which simply displays a lot of code, like this:-

{"product_name":"Rolex","message":"Rolex was added into cart.","update_blocks":[{"key":".block.block-cart","value":"
\n
....
....
Proceed to Checkout<\/span><\/span><\/button>\n<\/li>\n
Checkout with Multiple Addresses<\/a>\n<\/li>\n                                        <\/ul>\n                    <\/div>\n    <\/div>\n<\/div>\n"}],"r":"success"}

This is the url I've been redirected to:-

http://localhost/magento/index.php/checkout/cart/add/uenc/aHR0cDovL2xvY2FsaG9zdC9tYWdlbnRvL2luZGV4LnBocC9jYXRhbG9nL2NhdGVnb3J5L3ZpZXcvcy93YXRjaGVzL2lkLzgv/product/1/form_key/ocE8xrUJjGT9qIbu/

Although this is happening, when I return to my homepage, it is seen that the product has been added to cart. What is happening and how can I fix it?


texts:
I'm trying to get the product Id's/SKU's after a customer has hit the purchase button with no success.

 $om = \Magento\Framework\App\ObjectManager::getInstance();
$checkout = $om->get('Magento\Checkout\Model\Cart');
    $itemsIds = $checkout->getItems();
// Create connection
    $db = $om->get('Magento\Checkout\Block\Database');
    foreach ($itemsIds as $item)
    {
        $sku [] = $db->getSkuQuery($item);
    }
    echo $sku;
}

getItems brings me nothing. Could it be that my method was place after the cart was checked out? If so where would be the best place to invoke it?
If there is a quicker and easier way to get the SKU's that would be awesome to know. Thanks.


texts:
So this is the only error i get, when im trying to log in. I get a post forbidden

has anyone dealt with this problem before?


texts: When Compilation and Deployment is required in Magento 2

texts:
Its my first project in magento.
I am confuse about deployment and compilation.
When i do compilation every time after changes i got some error.
Also deployment have many more time memory failed and execution error.

I m using these steps after every changes.

    sudo rm -rf var/di var/generation/ var/cache and var/page_cache   pub/static/frontend pub/static/_requirejs/ pub/static/adminhtml
    sudo chmod -R 777 var pub lib app/etc
    php   -dmemory_limit=2G  -dmaximum_execution_time=1800 bin/magento setup:upgrade
    php   -dmemory_limit=2G   bin/magento indexer:reindex
    php   -dmemory_limit=2G  -dmaximum_execution_time=1800 bin/magento deploy:mode:set production -s
    php   -dmemory_limit=2G  -dmaximum_execution_time=1800 bin/magento setup:di:compile
    #php -d allowedmax_execution_time=3000  bin/magento setup:static-content:deploy
    php -f  bin/magento setup:static-content:deploy

But in deployment and comilation its failed every time due to memeory and execution error.

My question is when compilation and deployment required in magento 2 .


texts: Product Export - Dataflow Profiles takes to 500 error page

texts:
I'm trying to export products from Magento 1.8.1.0 but when I go to the following location, it just comes with a 500 page error straight away.

  System > Import / Export > Dataflow - Profiles

I checked the logs and it has been narrowed down to this:

  PHP Fatal error:  Class 'Unserialize_Reader_ArrKey' not found in
  magento/lib/Unserialize/Reader/Arr.php on line 88

How can I fix this? It looks like a patch might not of been applied properly or something.

Thanks


texts: how to disable cache for particular Static Block in magento 1.9

texts:
I have a static block i reuse on different pages and when I call this block I'm 'feeding' it 4 product SKU's, different SKU's for different pages, its like a specials/promotion block.  However, when I browse between the pages the products remain the same.  If I disable BLOCK_HTML cache it all works well but I dont want to keep it disabled.  I'm using 1.9.2.4 which I thought had the block cache issue fixed?

In my CMS pages, I'm using this to call the block...

{{block type="venedor/product_list_featured" is_wide="1" sku1="abc123" sku2="abc456" sku3="abc789" sku4="abc321" url="/products/ropes-twines-chains.html" template="catalog/product/brandrepeater.phtml"}}

From a CMS page, how can I ensure this block is excluded from cache?


texts: Create an Order automatically when a new product is added to wishlist of customer

texts:
When a new product is added in Magento catalog, it should get added to the wishlist of the customer and an order should be automatically created for it. I am using the following code. Can anyone help me with this?

<?php

namespace Wishorder\Asorder\Block;

use Magento\Catalog\Model\ProductFactory;
use Magento\Framework\View\Element\Template\Context;
use \Wishorder\Asorder\Helper\Data;
class Cwish extends \Magento\Framework\View\Element\Template
{
    protected $_productFactory;
    protected $_wishlistRepository;
    protected $_customerFactory;
    protected $_helper;

    public function __construct(
        Context $context,
        \Magento\Wishlist\Model\WishlistFactory $WishlistFactory,
        \Magento\Catalog\Model\ProductFactory $productFactory,
        \Magento\Customer\Model\CustomerFactory $customerFactory,
        \Custom\Wlist\Helper\Data $helper,
        array $data = []
    ) {
        $this->_wishlistFactory= $WishlistFactory;
        $this->_productFactory = $productFactory;
        $this->_customerFactory = $customerFactory;
        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    public function getHelloWorldTxt(){
        return 'Hello world!';
    }

    public function getProductCollection()
    {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $collection = $this->_customerFactory->create()->getCollection();
        foreach ($collection as $cust)
        {
            $Email=$cust->getEmail();
            echo "Email : ".$Email.'
';

            $Fname=$cust->getFirstname();
            $Lname=$cust->getLastname();
            echo "First Name : ".$Fname.'
';
            echo "Last Name : ".$Lname.'
';

            $CustomerModel->loadByEmail($Email);
            $userId = $CustomerModel->getId();
            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $wishlist = $objectManager->get('\Magento\Wishlist\Model\Wishlist');
            $wishlist_collection = $wishlist->loadByCustomerId($userId, true)->getItemCollection();
            echo "Last Name : ".$userId.'
';
            print_r($wishlist_collection); die;

            foreach ($wishlist_collection as $wlist)
            {
                $orderData=[
                    'currency_id'  => 'USD',
                    'email'        => $Email, //buyer email id
                    'shipping_address' =>[
                    'firstname'    => $Fname, //address Details
                    'lastname'     => $Lname,
                    'street' => 'xxxxx',
                    'city' => 'xxxxx',
                    'country_id' => 'IN',
                    'region' => 'xxx',
                    'postcode' => '43244',
                    'telephone' => '52332',
                    'fax' => '32423',
                    'save_in_address_book' => 1],
                    'items'=> ['product_id'=>$wlist->getProductId(),'qty'=>1]
                ];

                return $this->_helper->createOrder($orderData);
            }
        }
    }
}


texts: The life time sales total is not changing on updating the status of the order

texts:
I want to update the status of quite a few orders in bulk from pending to complete, and hence I am trying to do it in a programmatic way as there is no option in magento backend, for updating the status in bulk by using the method below.

require_once('app/Mage.php');
Mage::app();
Mage::init();
$order = Mage::getModel('sales/order')->loadByIncrementId('100010175');
        //$order->setState(Mage_Sales_Model_Order::STATE_COMPLETE, true);
        $order->setData('state', "complete");
        $order->setStatus("complete");
        $history = $order->addStatusHistoryComment('Order was set to Complete by our automation tool.', false);
        $history->setIsCustomerNotified(false);
        $order->save();

But when I update the status using the above method, only the status is getting updated to complete. But the order amount is not getting added up to the lifetime sales, that shows up on the dashboard main page.

Can anyone let me know, how the order amount also can be updated to the lifetime sales total, with the updating of the status of the order too?


texts: How to export datatable data in excel file in magento 2

texts:
I have tried the below method but not displaying the excel button in Magento 2 and I have tried to demo in HTML and it is working fine but not displaying the excel button in Magento 2.
I have used below link datatable example.
https://datatables.net/extensions/buttons/examples/initialisation/export.html
Create require-config.js
var config = {
    map: {
        '*': {

            'datatables.net-buttons': 'MageSage_Afkomst/js/dataTables.buttons.min',
            'datatables.net': 'MageSage_Afkomst/js/jquery.dataTables.min',
             jszip: 'MageSage_Afkomst/js/jszip.min',
             dataTableBtnHtml5: 'MageSage_Afkomst/js/buttons.html5.min'
        }
    }
};

            Name
            Position
            Office
            Age
            Start date
            Salary

            Tiger Nixon
            System Architect
            Edinburgh
            61
            2011/04/25
            $320,800

            Garrett Winters
            Accountant
            Tokyo
            63
            2011/07/25
            $170,750

            Name
            Position
            Office
            Age
            Start date
            Salary


texts: Magento 2 Products with Categories not showing under Category Products

texts:
I have 10,000 SKUs that are assigned various categories.  I can edit the product and see that it is in a category, however, when I go to that category, and look at the category products, nothing is showing up.  I have tried clearing all the indexes and reindexing.  I am at a loss.  Can someone please point me in the right direction for this one?

-Dan


texts: Magento 2: What is the proper way to apply patch inside m2-hotfixes directory?

texts:
I searched on google and found a patch. I created the patch dilw and placed it into m2-hotfixes directory.
Can Anyone help on it?.
Which Command I should use to apply the patch file inside that directory?


texts: How to override order of custom tabs in Magento 2.4.2

texts:
With the code below, I am trying to reorder the product tabs to make FEATURES tab appear first. This doesn't take any effect even after running content deploy command.
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="content">
        <block class="Magento\Framework\View\Element\Template"
               name="product-custom.js" as="product-custom.js" template="Magento_Catalog::product/js.phtml"/>
    </referenceContainer>
    <body>
        <!-- Create container for main product tabs -->
        <referenceContainer name="page.wrapper">
            <container name="custom-before-footer-container" before="before-footer-container" label="Luxury Custom - container for main tabs" htmlTag="div" htmlClass="page-before-footer">
                <container name="custom-before-footer-content" label="Luxury Custom - main tabs content" htmlTag="div" htmlClass="content">
                </container>
            </container>
        </referenceContainer>
        <!-- Hide additional tabs -->
        <referenceBlock name="additional-tabs" display="false" />
        <!-- Move product tabs into new place -->
        <move element="product.info.tabs" destination="custom-before-footer-content" before="-"/>
        <referenceBlock name="product.info.features">
            <arguments>
                <argument name="title" translate="true" xsi:type="string">Features</argument>
                <argument name="sort_order" xsi:type="string">20</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

The picture below shows how the tabs currently appear on the product page.


texts: Show a custom message if the total price for a product goes over a certain value

texts: I am new to Magento and now trying to find a way to show a message on a product page (preferably instead of the "Add to Cart" button), if the total price (based on several custom options) for a product goes over a certain limit, but I can't figure out a way to do so. I have tried searching for the variable responsible for the total price, to create a php "if" expression, but so far I have no luck. Is there a way to make this message appear? Or maybe someone could give me a hint where to look for the total price variable?


texts: How can one create an attribute with administrative tabular content entry like the Tier Price attribute has?

texts:
I would like to create an attribute that has tabular content much like the Tier Price. Where can I find examples of how to define an admin frontend client-side controller like Tier Price has? I am new to Magento so terminology of what these things are called would be helpful.

In the case of Tier Price, I have come to understand that the in-browser frontend tabular data entry control actually just serializes its content and stores a parsable string to a 'text' field (re: Why is Magento's "Tier Price" attribute of the type "text"?).

It seems like most of the heavy lifting would be done in a .phtml template. Is any processing done within a server-side controller or is it all HTML/JavaScript that makes such attributes work?

I am currently on Magento 1.9.x


texts: Add item(s) to cart programmatically with different line

texts:
I tried to add a product to cart programmatically, but it should be in different line with other product in the cart.

I already tried the code below but it only adds a product to cart and adds the qty if there's same product in the cart. How can I make it to a new line rather than add the qty?

Add product code :

$cartObj = $objectManager->create('Magento\Checkout\Model\Cart');
$cartObj->addProduct($_product,$params);
$cartObj->save();


texts: Set Coupen for specific Products. Magento 2

texts:
I create the coupon function in Helper which is

public function setCoupon()
    {
        // $this->_state->setAreaCode('adminhtml');
        // $this->_state->setAreaCode('frontend');

   $coupon['name'] = 'Offer';
    $coupon['desc'] = 'Discount for vip signup coupon.';
    $coupon['start'] = date('Y-m-d');
    $coupon['end'] = '';
    $coupon['max_redemptions'] = 1;
    $coupon['discount_type'] ='by_fixed';
    $coupon['discount_amount'] = 15;
    $coupon['flag_is_free_shipping'] = 'no';
    $coupon['redemptions'] = 1;
    $coupon['code'] ='NL02-1234'; //this code will normally be autogenetated but i am hard coding for testing purposes

    $this->_rule->setName($coupon['name'])
            ->setDescription($coupon['desc'])
            ->setFromDate($coupon['start'])
            ->setToDate($coupon['end'])
            ->setUsesPerCustomer($coupon['max_redemptions'])
            ->setCustomerGroupIds(array('0','1','2','3',))
            ->setIsActive(1)
            ->setSimpleAction($coupon['discount_type'])
            ->setDiscountAmount($coupon['discount_amount'])
            ->setDiscountQty(1)
            ->setApplyToShipping($coupon['flag_is_free_shipping'])
            ->setTimesUsed($coupon['redemptions'])
            ->setWebsiteIds(array('1'))
            ->setCouponType(2)
            // ->setProductIds(array(1,2,3));
            // ->setProductIds(array('1','2','3'))
            ->setProductIds(1)
            ->setCouponCode($coupon['code'])
            ->setUsesPerCoupon(NULL);
    $this->_rule->save();
}

where $this->_rule is object of Magento\SalesRule\Model\Rule class it works perfectly but you guys can see that I tried setProductIds to set it for specific products but when it was in array it show me an error Array to String and when I tried  setProductIds only for one product Id then it not gives me any error but the coupon works on the every product. How can I set this???


texts:
I am trying to upload this CSV file for the configurable products.

  https://docs.google.com/spreadsheets/d/1yJBI_rS7miln6yATN6TYgoh3H4RSyty4WKJI9zNz1aw/edit?usp=sharing

Unfortunately, the error I'm facing is

  1. Column configurable_variations: Attribute with code "sizechanged" does not exist or is missing from product attribute set in a row(s): 2

However, when I checked my additional_attributes and configurable_variations attributes, it seems like I got all of the definition of the attribute there already.

I hope someone please have a look into the file and helps me with the answer.
Much appreciate it.


texts: Calling topMenu for mobiles/tablets in 1.9 when moved from header block

texts:
I'm inserted the main navigation into the sidebar on a Magento 1.9 theme in catalog.xml using:-

<block type="catalog/navigation" name="catalog.topnav" before="cart_sidebar" template="catalog/navigation/top.phtml"/>

I've then commented out topMenu in the header block in page.xml as to not show in the header like so:-

But on mobile/tablet devices in 1.9, the menu dropdown calls topMenu in header.phtml like so:-

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

Because topMenu does not exist in the header block any longer, the menu does not show.

Is it possible to call from the header.phtml instead the navigation I am using in the sidebar via the above code in catalog.xml.
Is it possible to still call topMenu if it doesn't exist in the header block or is there a workaround that would allow me to do so? Or am I restricted to just uncommenting page.xml topMenu in the header block and just display: none in CSS on screens from 771px wide?


texts:
Magento 2 how to implement catalog search programmatically.

I need categories and product details.

Please provide reference links if any.

Please find the screenshot :


texts:
My permissions blocks, permissions variables and index management pages are blank after a 1.7.0.2 to 1.9.2.3 upgrade.

I've been a Magento dev for years now but this one has me stymied:

compilation is disabled
caches cleared
reindex via CLI completed, no problems to speak of
no issues in system or exception logs
apache logs are also clean
I've checked local and community for admin overrides and not spotted any (although I do plan to run through this one again tomorrow with non-red eyes)

I have also been tempted to drop a fresh 1.9.2.3 on top of the install.

Has anyone experienced this particular issue in the context I'm describing?


texts: Magento 2.3.1 Sales Order Grit Filter "Not Null" value

texts:
In Magento 1.9 I had:

protected function getOptionArray()
{
    return array(
        'Has Ticket' => Mage::helper('Sales')->__('Si'),
        'Has No Ticket' => Mage::helper('Sales')->__('No')
    );
}

protected function _callbackHasTicket($collection, $column){
    if (!$value = $column->getFilter()->getValue()) {
        return $this;
    }
    if ($value == 'Has No Ticket') {
        $this->getCollection()->getSelect()->where(
             "bileamara_order_tickets.nr_tickets IS NULL");
    }
    else {
        $this->getCollection()->getSelect()->where(
             "bileamara_order_tickets.nr_tickets IS NOT NULL");
    }

    return $this;
}

I need to do the same on Magento 2 but I can't find anything similar to filter_condition_callback.

Any Help?


texts: Display custom attribute data in sales order grid view

texts:
I have created a module with the following observer that should pull the 'orderstatus_status_code' custom attribute value from the sales_flat_order table through to the Sales Order Grid View;

<?php
    class OrderSync_Model_Observer {
        /**
         * Adds column to admin sales order grid
         *
         * @param Varien_Event_Observer $observer
         * @return OrderSync_Model_Observer
         */
        public function appendOrderSync($observer)
        {
            $block = $observer->getBlock();
            if (!isset($block)) {
                return $this;
            }

            if ($block->getType() == 'adminhtml/sales_order_grid') {
                /* @var $block Mage_Adminhtml_Block_Sales_Order_Grid */
                $block->addColumnAfter('ordersync_status_code', array(
                    'header'    => 'Order Sync Status',
                    'type'      => 'varchar',
                    'index'     => 'ordersync_status_code',
                    'filter_index'     => 'ordersync_status_code',
                ), 'status');
            }
        }
    }

This has correctly added the 'Order Sync Status' column but no value is displaying where I know there is data in the table and I wondered if anyone can help to show me how to get the data there?


texts: Magento 2 How to do gzip compression magento 2

texts:
I want to speed up my website i followed those steps how to increase the speed of my website but still i have this :

Also i did not find the .htaccess to add a code to enable the gzip so how to do that and how to make my website faster ?! I need your help pleaase


texts: Special taxes in cart has to be shown separately

texts:
I have a problem with the german tax law.
In german are two standard tax classes.
The normal tax class of 19% for all and the special tax class of 7% for food....

And there is a very special tax class for "forest work" with 10.7% (Sorry. Don´t know the right translation)

My Customer sells small trees and special plants.
I have to build his shop and my first big problem is this "tree tax".

In the cart, the checkout and the bill this tax has to be shown separately.
The normal magento system only shows the total tax of all.

It should looks like this.

1x Produkt 1: 10.00€ (19%)
1x Produkt 2: 10.00€ (10.7%)
+++
Subtotal: 20.00€
Tax(19%): 1.90€
Tax(10.7%): 1.07€
Shipping: 6.90€
Shipping-Tax(19%): 1.31€

Total(incl. tax): 26.90€
Total(excl. tax): 22,62€
Tax total: 4.28€

I have no problems with subtotal,shipping,totals and tax totals, but i can´t find a solution for Tax(19%) and Tax(10.7%).

Where can ich find this values?


texts:
I have Block extend controller Product_view.
this block show

Name

Age

Sex

I have selected option Sort By name, age, sex.

I sort by with jquery ajax. When change select option will post to MyBlock. but it not run myBlock. when I refress cache after change select option then it run MyBlock. So how does it work not need refresh cache it works? I think the same sort of the product list, but I don't understand method Sorter in the product.


texts: invalid Document Element 'field': Character content other than whitespace is not allowed because the content type is 'element-only'

texts:
I am getting below Exception on Stores->Configuration Page. Is anyone know about how to fix this in magento2?

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid Document
Element 'field': Character content other than whitespace is not allowed because the content type is 'element-only'.
Line: 11

I found element-only on path

  vendor\magento\module-catalog\Test\Unit\Model\ProductTypes\Config_files\invalidProductTypesXmlArray.php:
  99 "Element 'type': The attribute 'name' is required but
  missing.\nLine: 1\n", 100 "Element 'type': Character content other
  than whitespace is not allowed because the content " . 101: "type is
  'element-only'.\nLine: 1\n" 102 ], 103 ] –


texts: Magento : Invalid Form Key After Migration

texts:
I know question has been asked alot, but none of suggestions work for me.

I migrated files and database to my localhost (Windows/Xampp)

The front-end of the site is working fine, but I cant log in to admin part due to this invalid form key.

I tried all the options, I could find in other posts which are:

deleting web/cookie/cookie_domain and web/cookie/cookie_path records in db
clear Magento cache files
clear browser cache
try other browsers
editing session_set_cookie_params()
adding php_value max_input_vars 75000 to php.ini

What else can I try to get into the admin panel?


texts: I am getting error on save() method of a model

texts:
I am getting this error on save method of a model.

  Fatal error: Call to a member function beginTransaction() on a
  non-object in
  /home/public_html/app/code/core/Mage/Core/Model/Abstract.php on line
  313

$warranty = Mage::getModel('warrany/warrantydata');
$warranty->setOrderId($order_id);
$warranty->setSignifydScore($signifyd_score);
$warranty->setSignifydData(utf8_encode(serialize($data)));
$warranty->save();

I have this added xml for model

    <models>
    <warranty>
      <class>Website_Warranty_Model</class>
      <resourceModel>warranty_mysql4</resourceModel>
        </warranty>
       <warranty_mysql4>
              <class>Website_Warranty_Model_Mysql4</class>
          <entities>
            <warrantydata>

warrantydata

        </warrantydata>
          </entities>
          </warranty_mysql4>
   </models>

i also have the collection and model file

class Website_Warranty_Model_Warrantydata extends Mage_Core_Model_Abstract{}

class Website_Warranty_Model_Mysql4_Warrantydata extends Mage_Core_Model_Mysql4_Abstract {}


texts:
I am currently having an issue with the position of the availability message that appears on the product page. The message swaps from the desired position "In Stock" across from the Price, to before the price when out of stock.

Image1: http://i.stack.imgur.com/1AxSp.png
  Image 2: http://i.stack.imgur.com/5EoeS.png

Here is the code used for the current situation:

<div <?php if ($useRichSnippets) echo $helperSnippets->getOfferItemscope(); ?>>
            <div class="product-type-data<?php echo $productTypeClasses; ?>"><?php echo $this->getChildHtml('product_type_data'); ?>

            <?php echo $priceProperties; ?>

 <?php //end: offers ?>

        <?php echo $this->getTierPriceHtml(); ?>

Any help would be appreciated, thanks!


texts: Change scope for "Maximum Qty Allowed in Shopping Cart" in product

texts:
Currently, for every product the attribute "Inventory" > "Maximum Qty Allowed in Shopping Cart" is defined in global scope for one article.

How can I change this scope to have the maximum quantity in the product defined for each webpage?

Everything I find is about changing the system configuration but does not affect the article: product[stock_data][max_sale_qty]


texts: How to improve Google Pagespeed score for Mobile

texts:
We have built a site using Magento 2.2.x version. While we check the Pagespeed of our site in Google Pagespeed insight, we have noticed that the page-speed in mobile showing low score but the page-speed of the desktop showing a higher score compared to the mobile.

Please see the below screenshot:

Why is that the page speed score is too low in mobile even-though the page speed of desktop is higher?

Please share your thoughts and help me to get a better speed score in mobile.


texts: Sell Product - Customer get Coupon Code that will expire after 6 months of sell date

texts:
I read document/google/tested on my Magento 1.8.1+1.9.2CE but I can't get it to work:

I have a product like sku123.
The customer buys it and gets a coupon code for free (10€ discount for the next 6 months).
But the coupon code should have a expire date: 6 months after sale date.

I found no way to do this. Modules bring x-features, but not this one: expire-date that is 6 months after the sale date.

Can anybody give me a hint how this can be done?

Thanks in advance!


texts: Where is the special_price/special_to_date/special_from_date held at?

texts:
I have a query for the catalog/product model and that has an associated properties of special price field, I can access them normally by using the model, however when using getSelect() it will only get me the table catalog_product_entity, which does not contain what I need.

Here is what I am using:

$products = Mage::getResourceModel('catalog/product_collection')
        ->getSelect()
        ->where(
            " ( special_from_date > '$todayDate' OR  special_to_date < '$todayDate' )
             OR  ( special_from_date IS NULL AND special_to_date IS NULL ) ");
        ->query();

As you might expect this will return the column not found error.

Oh and if you are wondering, why don't I just use filters? The issue is that Its very ugly to create a filter with the combination (V OR V) OR (V AND V)


texts:
I applied Security patch 9652 to my local.Its coming

    sh PATCH_SUPEE-9652_v2-2017-02-07-01-18-38.sh
    PATCH_SUPEE-9652_v2-2017-02-07-01-18-38.sh: 14:PATCH_SUPEE9652_v2-2017-02-07-01-18-38.sh: 127: not found
    PATCH_SUPEE-9652_v2-2017-02-07-01-18-38.sh: 14:PATCH_SUPEE9652_v2-2017-02-07-01-18-38.sh: 127: not found
    PATCH_SUPEE-9652_v2-2017-02-07-01-18-38.sh: 25: PATCH_SUPEE9652_v2-2017-02-07-01-18-38.sh: 0: not found
   Checking if patch can be applied/reverted successfully...
  -e ERROR: Patch can't be applied/reverted successfully.

Is this patch applied or not?


texts: Validation last name error in checkout cart

texts:
I have a problem with the checkout cart page in magento. In the checkout form I have included a last name input field to enable the Lastname validation.

    Nachname: *
    <input type="text" class="input-text" required name="user[lastname]" value="<?php echo $this->htmlEscape($this->getLastname()) ?>"  />

The validation works and I see the error messages if I try to pass an empty field, however when I type some text e.g. "test" in the field I always get the same error messages

This is the validation code from Page.php

public function validateAddress(Mage_Sales_Model_Quote_Address $address)
{
    $errors = array();
    $helper = Mage::helper('customer');
    $address->implodeStreetAddress();
    if (!Zend_Validate::is($address->getFirstname(), 'NotEmpty')) {
        $errors[] = $helper->__('Please enter the first name.');
    }

    if (!Zend_Validate::is($address->getLastname(), 'NotEmpty')) {
        $errors[] = $helper->__('Please enter the last name.');
    }

...

  "Please enter the last name."
  I also tried with id="billing:lastname" name="billing[lastname]", but no luck.


texts: How to display order summary sidebar in shipping step of checkout page in magento 2?

texts:
I have referred the link

  Magento2 : Show summery total on checkout page

and made changes in abstract-total.js and shipping.js. Now order summary is displayed and shipping amount updates correctly on changing shipping method but it is not getting updated in grand total. Any solution ?


texts: Is it safe to modify database table column datatype directly?

texts:
I am able to change Catalog Price Rules' from_date and to_date from "date" datatype into "datetime", by overriding the classes:

Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main
Mage_Adminhtml_Promo_CatalogController
Mage_CatalogRule_Model_Rule

and changing the datatype of the table columns catalogrule.from_date and catalogrule.to_date into "datetime".

Is doing the latter safe? Or should I somehow create or modify some files, maybe in an sql folder somewhere, e.g. my module's? Or could anyone point me to some resources I can peruse to achieve such? I just want to do this properly.


texts: SSL Issue Non secure links still reachable by HTTPS

texts:
Currently we only require our checkout to be SSL secure. However if we manually type any URL from product page, catalog pages and home page with https:// infront of the domain secure pages are loading. Should magento be redirecting this to http:// as these aren't checkout pages.

Our config is below


texts: How to filter with custom field on customer grid Magento 2

texts:
I have created a custom field in the filter on the customer grid using customer_listing.xml.

Now, the issue is

How can I filter with the custom field? Where do I need to do the operation?

Please share the code with details so I can do them perfectly.

Thanks in advance.


texts:
Import group price from CSV files for Magento ,
Hi Please help me to import Group price in magento


texts: Getting current admin username into  class or id

texts:
In the admin backend I would like to add a class to the body tag of all admin pages which prints out the name of the admin users currently logged in.

In app/design/adminhtml/default/default/template/page.phtml

I've found this (on line 46 - CE 1.6.2.0):

<body id="html-body"<?php echo $this->getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>>

and I think that I need to use this to get the admin username:

Mage::getSingleton('admin/session')->getUser();

However, no matter what I do, I cannot seem to output the username in either the  id or class.

Any ideas would be most welcome.

Thanks.


texts: Address issue at payment and review step

texts:
Post-upgrade to 2.4.1 from 2.3.5-P1. Old Customers who placed orders before upgrade, After upgrade if they use their already added address to checkout at payment-review step Address coming with some internal JS to frontend.

Anyone faced this issue ?


texts: Magento 2.1 issue product attributes not loading saved data

texts:
I created an issue for this in github, because i assumed this was a bug in the newest version of magento.
https://github.com/magento/magento2/issues/5445

The selected value is saved the first time in the db table catalog_product_entity_varchar, and the attribute is added to the eav_attribute table, but when i load the edit product view the data does not load, i.e. the selected options are not highlighted against the attribute.

Attribute installation is as follows
$this->addMultiSelectFieldWithSource($eavSetup, 'special_requirements', 'Special requirements', false, 4,

'Amrita\Catalog\Model\Product\Attribute\Source\SpecialRequirements');

 private function addMultiSelectFieldWithSource($eavSetup, $fieldName, $fieldTitle, $required, $position, $source) {
    $eavSetup->addAttribute(
        Product::ENTITY,
        $fieldName,
        [
            'type' => 'varchar',
            'label' => $fieldTitle,
            'input' => 'multiselect',
            'required' => $required,
            'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
            'source' => $source,
            'global' => Attribute::SCOPE_GLOBAL,
            'visible' => true,
            'user_defined' => true,
            'system' => 0,
            'searchable' => true,
            'visible_in_advanced_search' => true,
            'filterable' => true,
            'filterable_in_search' => true,
            'position' => $position,
            'comparable' => false,
            'visible_on_front' => false,
            'unique' => false,
            'group' => 'General',
            'is_used_in_grid' => true,
            'is_visible_in_grid' => false,
            'is_filterable_in_grid' => true,
        ]
    );

And the source for the attribute is as follows

    <?php

namespace Amrita\Catalog\Model\Product\Attribute\Source;
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;

class SpecialRequirements extends AbstractSource
{
    /**
     * @return array
     */
    public function getAllOptions()
    {
        return [
            ['value' => 1,               'label' => 'Suitable for Vegetarians'],
            ['value' => 2,  'label' => 'Suitable for Pregnancy or Breastfeeding'],
            ['value' => 3,                    'label' => 'Suitable for Vegans'],
            ['value' => 4,                 'label' => 'Suitable for Children']
        ];
    }
}

Is this to do with the upgrade? Or is this an issue with the installation of the attribute?

Thanks


texts: Remove /index.php from the Magento URL gives 404 error

texts:
I am using Magento ver. 1.7.0.2.

Here it is the link to my website: http://dev.blokeundees.com.au/

I have to remove the /index.php folder from URLs so I edited the .htaccess file and backend too (secure, web server rewrites) and /index.php has been properly removed.

But when accessing the frontend, it returns a 404 error (Page not found) for every page except the index page.

I don't know why this is happening.


texts:
When you go to my site https://www.uitverkoop.tips, it will take 10 seconds before you are on the site. How can this be?

When you are on the site, and you go to different page, it loads normal.

So where is the fault? How can I fix this? It is made in magento 2.


texts:
I'm trying to override some javascript that is from a 3rd party extension. The js is found at skin/frontend/base/default/js/mageworx/searchsuite/searchsuite.js I tried creating a new js file at skin/frontend/my-theme/default/js/mageworx/searchsuite/searchsuite.js

I thought maybe the js would override in the same way templates do... But unfortunately it's still pulling the js from base.

How can I override this extensions js file?

Update

I searched for searchsuite.js in app and it look like it's getting pulled in from code/community/MageWorx/SearchSuite/Model/Observer.php with a line that looks like this:

Mage::helper('mageworx_searchsuite')->addFooterJs('mageworx/searchsuite/searchsuite.js');


texts:
My questions is pretty simple and straight forward.

Somewhere in the code di.xml files are read and merged.

Where is this happening?


texts: Is it possible to set default settings for configurable products on the store view in Magento 2?

texts:
I have a configurable product which allows buyers to select both dimensions and number of drawers for storage boxes.

I would like the drop downs on the store view to set each value to the default value for their related attribute. The default values for each attribute has been set in the Admin area, but the product options still show the "please select" value on page load.


texts: How to get Customer Id in Cron job function?

texts:
namespace Cron\Test\Cron;
class Example {
      protected $customerSession;

        /**
         * Construct
         *
         * @param \Magento\Framework\View\Element\Template\Context $context
         * @param \Magento\Customer\Model\Session $customerSession
         * @param array $data
         */
        public function __construct(
            \Magento\Framework\View\Element\Template\Context $context,
            \Magento\Customer\Model\Session $customerSession,
            array $data = []
        ) {
            parent::__construct($context, $data);

            $this->customerSession = $customerSession;
        }

        public function customer()
        {

           return $this->customerSession->getCustomer()->getId();

        }

       public function execute()
       {

            $suser_id= $this>customer();
           $this->_resources = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Framework\App\ResourceConnection');
        $connection= $this->_resources->getConnection();
        $sql = "UPDATE `total_cashback` SET is_active= 150 WHERE user_id = '$suser_id' ";
         //$sql = "UPDATE `wallet_discounts` SET is_active = 1 WHERE customer_id = '$customerId' ";
        $connection->query($sql);
       }


texts: What is the proper Settings for Session Validation - Magento 2.1.0-rc3

texts:
ON the backend Store>Configurations>General>Web we have the "Session Validation Settings" which shows these options:

Validate REMOTE_ADDR: NO

Validate HTTP_VIA: NO

Validate HTTP_X_FORWARDED_FOR: NO

Validate HTTP_USER_AGENT: NO

Use SID on Storefront: YES

Everything came for default as it is, what is the recommended options to choose?

Thank you so much!


texts: Custom Module Controller overwriting default layout

texts:
I made a custom controller and declared a layout here.
When I go to mysite/custom the controller and the layout works fine.
But when I access the indexsite (mysite/index) the layout which I used for the Custom_IndexController is also loaded.

I just want this layout to be loaded on the specific view.
Please let me know what I'm doing wrong here.

This is what my config.xml looks like

<?xml version="1.0"?>
<config>
    <modules>
        <Unreal_Custom>
            <version>0.1.0</version>
        </Unreal_Custom>
    </modules>
    <frontend>
        <routers>
            <custom>
                <use>standard</use>
                <args>
                    <module>Unreal_Custom</module>
                    <frontName>custom</frontName>
                </args>
            </custom>
        </routers>

        <layout>
          <updates>
            <custom>
              <file>uecustom.xml</file>
            </custom>
          </updates>
        </layout>
    </frontend>
</config>

My Controller:

<?php
class Unreal_Custom_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        echo "foo";
        $this->loadLayout();
        $this->renderLayout();
    }
}

The corresponding layout

<layout version="0.1.0">
    <default module="Unreal">

        <block type="page/html" name="root" output="toHtml" template="unreal/custom/main.phtml" >
            <block type="page/html_head" name="header" as="header" template="unreal/custom/header.phtml"></block>
            <block type="page/html" name="content" as="content" template="unreal/custom/content.phtml"></block>
            <block type="page/html_footer" name="footer" as="footer" template="unreal/custom/footer.phtml"></block>
        </block>

    </default>
</layout>


texts:
I´m creating a new store and I need to charge in 3 different currencies with different payment gateways, so I created 1 website, 3 store names and 3 store views (1 for each store name).

How do I make these 3 store names appear in a menu, same thing as change currency/ language menu type?

Thank you in advance!


texts: Is there a way to use VueJs Framework under Magento 2 ?


texts: How to not use attribute default value over rest API in magento2

texts:
Im working on api integration between one store of magento2 multi store installation and product db of a client. Our current problem is that part of the items for in our store are duplicated (same sku) with different shops. Which by itself is fine and expected. But we would like to be sure that parent products (eg form default view) are never overwriting our values. Right now this works fine for all values that are set for the product.

Problem starts when for example we create product A for shop TEST_SHOP which is new for the shop and installation, with no description, then 3rd  party also adds product A for default view with description. Then our product automatically gets description form new update.

As far as I understand this is caused by use default value check box (it is checked by default for empty values). Can this check box be unchecked from API ?

Thanks


texts: Combining price and add to cart button in one element

texts:
How can I combine price and "Add to cart" button in one interactive element at

  Magento 2.1?

Now it looks like: [ $120 ] [ Add to Cart ]
How to make it look like: [ $120 Add to Cart ] ?

Thank you so much

.


texts:
My cron file code as follows.crontab.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job instance="My\Catalog\Cron\CheckCatalogMrp" method="execute" name="My_catalog_cron">
            <schedule>* * * * *</schedule>
        </job>
    </group>
</config>

Cron is not running and when i run the command php bin/magento cron:run It is giving output as "Ran Jobs by Schedule"

But my magento.cron.log file have this error. How can i resolve this error?

sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected

My execute method as follows.

public function execute()
    {
       /* $state = $this->_objectManager->get('Magento\Framework\App\State');
        $state->setAreaCode('adminhtml');*/
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
       /* $directory = 'PosMrp';
        if(!is_dir(BP.'var/log/'.$directory)) {
            mkdir(BP.'var/log/'.$directory,0777,true);
        } */

        $log_file = 'return_'.date('Y-m-d').'.log';
        $writer = new \Zend\Log\Writer\Stream(BP.'/var/log/'.$log_file);
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $today1 = date("m/d/Y H:i:s");
          $logger->info($today1.' - today');

         //$cenvertedTime = date('Y-m-d H:i:s',strtotime('+5 hour +30 minutes',strtotime($today1)));
        $barcodes = array();
        $collection = $this->_productCollectionFactory->create();
        $collection->addAttributeToFilter('sku',array('neq' => 'wallet_product'));
        $collection->setPageSize(10);
        foreach ($collection as $product) {
            $barcodes[] = "".$product->getSku()."";
        }
        $store_id = 14567;
        $call_url = 'http://myesydata.com';
        $request_url = $call_url.'/online/getMrp';

        $data = array(
            'store_id' => $store_id,
            'barcodes' =>  $barcodes
        );

        $post = curl_init();
        curl_setopt($post, CURLOPT_URL, $request_url);
        curl_setopt($post, CURLOPT_POST,TRUE);
        curl_setopt($post, CURLOPT_POSTFIELDS, json_encode($data));
        curl_setopt($post, CURLOPT_RETURNTRANSFER, TRUE);
        $response = curl_exec($post);
        curl_close($post);
        $result = json_decode($response, true);
        if($result['success'] == 1){
            if($result['data']){
                foreach ($result['data'] as $key => $value) {
                    $product_rep =  $objectManager->get('\Magento\Catalog\Model\ProductRepository')->get($key);
                    if($product_rep){
                        if($product_rep->getPrice()  != $value && $value != 0){
                            $product_rep->setPrice($value);
                            if($product_rep->save()){
                                 $logger->info($key.' - Price Updated');
                            }else{
                                $logger->info($key.' - Price Update Failed');
                            }
                        }else{
                            $logger->info($key.' - Product Not Found');

                        }
                    }else{
                        $logger->info($key.' - Product Price Same as Previous----ECOM PRICE----'.$product_rep->getPrice().'POS PRICE---'.$value);
                    }
                }
            }
        }
        $logger->info('Status'.json_encode($result));
        return $this;
    }


texts:
My back-end page is keep loading in sometimes like this.

I found out that is because a download of javascript file jdk.js from http://community.thegiantdata.com/jdk/ takes too long.
Sometimes, I even need to wait few minutes. Is there any way that I can make it quickly.


texts: magento usps shipping free method does not showing

texts: I am using magento version 1.9.3.2 and configured the usps shipping.All shipping methods are working fine but Now I want to show usps free method. I have enabled the free method and also setup with minimum amount or without minimum amount.But doesn't show any free method on front end.


texts: How to show submenu product list on menu product list?

texts:
This is my menu and submenu on backend. But in the front end view, I don't see my "Powerbank" product list on  "Aksesoris Handphone" product list.

How can I show my "Powerbank" product list on "Aksesoris Handphone" too ?


texts: Shipping is not showing in checkout page on magento 2?

texts: I forgot to put the weight on products, but using bulk action i gave them weight and make it compulsory ...still facing the same problem with old products. and because of this we are also not getting the address information from the customers.


texts: Magento 2 : How to get getTireprice ,getSpecialprice and getfinalprice?

texts:
I am working in Magento 2. I need to get  getTireprice ,getSpecialprice and getfinalprice?

Anyone please provide same code for this.


texts: how to add a block view more related to a specific attribute

texts:
I am setting up a new store for painting, where I need to add
view more from this painter.
I have added an attribute painter, where the painter is added in the admin for the painting.

I also want to add a link to product page like - "view more from this Painter" which will redirect to another page, where all the paintings of the related painter will be shown.


texts: Different currencies for different store views?

texts:
I'm creating a page that is multi-lingual in danish and english.
I've created two different store views because I want the shops to share categories, catalogs and of cause have different CMS pages.
I also want the two pages to show the prices in different currencies as well as you can check out in that currency.
How can this be done?


texts: Magento 2 - Delete/update all products attribute values by attribute_code

texts:
In Magento 2,
How to do a mass deletion of all products attribute values, by attribute_code.
For exemple I want to delete all values for attribute_code = "my_code".
EDIT
I also want to update products attribute values by attribute_code.
I found this :
$productActionObject = $objectManager->create('Magento\Catalog\Model\Product\Action');
$productActionObject->updateAttributes($idArray, array('weight' => 15), 0);

But my weight values are different between each product ids.
I want to update attribute according to an array with product_id as key and weight as value:
$array[1] = 14;
$array[2] = 152;
$array[3] = 58;
...

I can't load every products, because there is a lot of values.
Thansk for your help


texts: Custom Admin Login Form [Form_Key Error]

texts:
I have located the problem precisely but I don't know how to solve it.

When I'm on my custom cms page with my new admin login form, Magento gives me a different key_form than my default admin login page.

So when I try to login with my custom form, Magento redirects me to my default admin login page and warns me with the following message Invalid Form Key. Please refresh the page.

My Frontend Custom CMS Admin Login Page:

<input name="form_key" value="cbzRGF9ccU8Ac8Ib"/>

My Backend Default Admin Login Page:

<input name="form_key" value="B9O7srzwq7utjQ79"/>

  How to generate a form_key on my custom Login page that will be the
  same as my default admin login form (www.website.com/admin).


texts: Magento 2 website getting too much time to load

texts:
Server - Freebsd Server (Ngnix)

Install Memcached + Redis + 8 GB ram

Website name - http://mastersdirect.masters-sp.com/shop/customer/account/login/

But still, site taking too much time to load can you please guide what is the missing part?

env.php file.

Please check below env.php config files

 'session' =>
      array (
        'save' => 'memcached',
        'save_path' => '127.0.0.1:11211'
      ),
    'resource' => [
        'default_setup' => [
            'connection' => 'default'
        ]
    ],
    'x-frame-options' => 'SAMEORIGIN',
    'MAGE_MODE' => 'default',
    'cache_types' => [
        'config' => 1,
        'layout' => 1,
        'block_html' => 1,
        'collections' => 1,
        'reflection' => 1,
        'db_ddl' => 1,
        'eav' => 1,
        'customer_notification' => 1,
        'config_integration' => 1,
        'config_integration_api' => 1,
        'translate' => 1,
        'config_webservice' => 1,
        'compiled_config' => 1,
        'vertex' => 1
    ],
    'install' => [
        'date' => 'Mon, 12 Dec 2016 18:24:29 +0000'
    ],
    'cache' => [
        'frontend' => [
            'default' => [
                'backend' => 'Cm_Cache_Backend_Redis',
                'backend_options' => [
                    'server' => '127.0.0.1',
                    'database' => '0',
                    'port' => '6379',
                    'password' => ''
                ]
            ],
            'page_cache' => [
                'backend' => 'Cm_Cache_Backend_Redis',
                'backend_options' => [
                    'server' => '127.0.0.1',
                    'database' => '1',
                    'port' => '6379',
                    'compress_data' => '0',
                    'password' => ''
                ]
            ]
        ]
    ]
];


texts:
we are in the process of updating our humble little Magento 1.7 shop to the latest version 2.3

It is a multi-language store and we have succesfully migrated all customers and all categories and products. Within the categories and also in the account pages etc. the chosen template works and all seems well.

BUT one thing is driving us crazy now for days and that is the cms start page.

The content section on our home page is returning 404, "Whoops our bad..." all the time. We have tried nearly everything we could find in the net:

setting "Single Store Mod" to "No"
checking the url_rewrite table with an empty request_path value (noe is there)
setting for ofweb/default/cms_home_page is there and set ok and for scope_id = 0
adding the correct relationships in cms_page_store
setting the "Default Web URL" to cms
having the home page selected as "Homepage"

If we browse directly to the CMS page it works fine, but when we view it on our homepage we always get the 404 error.

As said, all store views and subcategories are working fine, only this cms main page is not :/

Does anyone maybe have a clue what is going wrong and how we could possibly get the start page running?

We would be super glad for any hint on this.

Best regards from Germany


texts: Image cache is not generated properly when importing new products - Magento 2.3.4

texts:
I have recently imported 200 products, the import went well and the images do show up on the back-end correctly, however there is no cached version available. If I look at the category page and image that supposed to show up is expected to be in the following location:

cache/9b5a790ce75ed6826aa4463bc16b3bc1/a/v/avant-d15-vision-of-love.jpg

When I do a search there are multiple images with the same name showing up in the cache directory but elsewhere:

find . -name avant-d15-vision-of-love.jpg
./cache/1677d012f6d3f9a624d33d91ea04b887/a/v/avant-d15-vision-of-love.jpg
./cache/8345bde2c7027c4e6418fcda55997597/a/v/avant-d15-vision-of-love.jpg
./cache/5db09c8cfd726a46996de64dc6365508/a/v/avant-d15-vision-of-love.jpg
./cache/b1799097c85e4d88dfbcc551a1d969fc/a/v/avant-d15-vision-of-love.jpg
./cache/cd831224a3bfc78b7eea938937e3e8e6/a/v/avant-d15-vision-of-love.jpg
./cache/76cf6d416a4967076c5ca34aaeae4b62/a/v/avant-d15-vision-of-love.jpg

My question is where are these image link stored in the database? Could it be that the images have been generated in the wrong directory?

Also please don't tell me to do a magento catalog:images:resize as I have 15K products and it runs for 3 days. I can't simply do this everytime I upload new products.


texts: Get products collection by store id in magento2

texts:
How get product collection by store id
I tried below code

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
 $proCollection = $productCollection->create()
                ->addAttributeToSelect('*')
                ->addStoreFilter(3)
                ->addAttributeToFilter('brand', $brand)
                ->addFieldToFilter('visibility', 4);

but I'm not getting the products


texts: Magento 1.9 Wrong customer created and last login dates

texts:
I am running Magento v.1.9.0.1 and I am facing a problem with the dates displayed when editing a customer via the admin area. For example,

Last Logged In: 11 Feb 7791 4:23:48 μ.μ.
Last Logged In (Europe/Istanbul):   09 Feb 2015 3:16:31 μ.μ.
Account Created on: 02 Sep 2015 4:16:11 μ.μ.

The client registered on the 9th of February 2015. I searched around and found topics about other Magento versions that said for some dates Magento is swapping the dates, hence the difference between actual created date (09/02/2015) and reported created date (02/09/2015).

I couldn't find anything about version 1.9 nor anything about the year reported for last logged in (7791!).

Is there a fix for this problem?

Thank you for your time.


texts: My installation of Magento 2.2.5 has no "theme" table present in the database

texts:
I have a few issues with making my own custom theme, and against the documentation, I deleted my custom theme directly from the files. There is a good explanation of how to fix this issue here.

Many answers for the "theme_dir" issue states to delete some entries from the theme table in the Magento database, however in my Magento 2.2.5 Installatron I installed it from C Panel's installation two days ago & it has no such table in it. Does anyone know the new tablename that might be its replacement?

Thanks a bunch.


texts: When i created an order, the server will send out a new order email, but the order time was wrong. The time created in the email template  {{var order.getCreatedAtFormated('long')}} is displayed at CST time (GMT - 8), i have to make the time GMT+8, how can i do that?


texts: How to remove the sidebar.main block from the search results page

texts:
I am trying to remove the sidebar.main block from my search results page as I do not require the layered navigation on this page.

I have copied the following XML:

  \vendor\magento\module-layered-navigation\view\frontend\layout\catalog_category_view_type_layered.xml

To:

  app\design\frontend\theme\theme\Magento_LayeredNavigation\ layout\catalog_category_view_type_layered.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <attribute name="class" value="page-with-filter"/>
        <referenceContainer name="sidebar.main" remove="true">
            <block class="Magento\LayeredNavigation\Block\Navigation\Category" name="catalog.leftnav" before="-" template="layer/view.phtml">
                <block class="Magento\LayeredNavigation\Block\Navigation\State" name="catalog.navigation.state" as="state" />
                <block class="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" name="catalog.navigation.renderer" as="renderer" template="layer/filter.phtml"/>
            </block>
        </referenceContainer>
        <referenceBlock name="sidebar.main" remove="true"/>
    </body>
</page>

How can I remove this as I am having no luck? Is there a different XML I need to edit in order to remove this?

Thanks


texts: Create a store for consumers and one for wholesale customers

texts:
I am pretty new to magento so bear with me.

What I want is to be able to make a wbshop that can service both consumer customers and wholesale customers.

Consumers customers

Every product has a retail price (the consumers cannot se the wholesale price)
Consumers do not have to login to buy
Anybody can order any quantity of products they want.

Wholesale customers

Every product has a wholesale price only approved, logged in wholesale customers can see.
Wholesale customer have to be logged in to see and order products at wholesale prices.
Wholesale customers can only order products in increments like e.g.5, 10, 15, 20 or 3, 6, 9, 12. That is because wholesale customers only can order products in larger quantities.
A shipping possibility only available to wholesale customers

Can you give me some pointers how to set that up?


texts: Create Configurable Products in Magento 2 Programmatically

texts:
How to Create Configurable Products Programmatically in Magento 2?
can anyone tell me about the solution to how to do this?

Thanks


texts: How to add before or after constraint in custom sql installer in Magento?

texts:
How can I add a column before or after a particular column in existing table.

Let suppose I want to add email id after a column named as telephone.

Is it possible with some parameter in following code?

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

        $installer->getConnection()
        ->addColumn($installer->getTable('contactus'),'emailid', array(
            'type'      => Varien_Db_Ddl_Table::TYPE_TEXT,
            'nullable'  => false,
            'length'    => 254,
            'comment'   => 'emailid'
            ));
        $installer->endSetup();


texts: How does magento 2 calculate price of configurable products?

texts:
I am a magento 2 starter with much experience in magento 1. I can't find the relevant scripts which are used to calculate the price for configurable products.

I need a basic guide on how the configuration works please so that I can modify it.

E.g. I need to add a customise-able option with title Length and the price should change based on it's value.

So if the price is $1000 and 1000 millimetres is set then the price should be $1000,

if 500 millimetres is set, then the price should be 500$.

If 2000 millimetres is set then the price should be 2000$ and so on...

price = (price * (length / 1000))

Where do I have to add this logic?


texts: Magento Subscription or Recurring payment

texts:
I am new to Magento and I want to know how can I sell "subscription products". Just like the one they have in Spotify. Users can avail of the premium account which can be renewed weekly, monthly, yearly , etc. And can be paid in different methods.

Is there an existing module in Magento 2 which can do that?
If there is none, how can I achieve this?
If I have to install an extension, what extension can you recommend me to use?

Thank you.


texts:
I have uploade my code on test1.test.net server with my custom theme

all pages working fine excepting home page

test1.test.net- default luma theme home page

see

and on test1.test.net/index.php my custome theme home page coming

i have debug in pub/index.php and it's come in luma's home page not in my home page

i am using nginx server.


texts:
I'm trying to add text formatting to a Title on my checkout page.

For example the shipping method Title is:

STANDARD SHIPPING RATE (free over $100)

I would like it to display with the '(free over $100)' to appear as smaller font size.

The checkout is a custom extension but the title gets called through this code:

<?php echo $this->escapeHtml($this->getCarrierName($code)) ?>

I've tried 'Standard Shipping Rate free over $100'
I'm not experienced at all with php but I'm assuming the escapeHtml function is removing all the html but is there a way to modify the code so that it does.

Cheers


texts: What will be the background process execute when click on reindexing in Magento 2?

texts:
I want to know more about indexing.
How in Magento2 re-indexing request processed in background.


texts: Transactional Emails not sending in Magento 2.1.0

texts:
I am having some issues where Magento 2 we are not getting any email confirmations of any sort. I have checked Magento configuration and everything is correct in terms of settings.

But when I have tail -f the mail log there is nothing being outputted to the log, its just blank.

I have also checked the exception log and there is nothing that appears in there to do with mail, not that I can see. I have also checked and the cron settings in the back-end are all correct.


texts: Magento 2 add to cart button not showing for any product

texts:
On my magento website, add to cart button is not showing on any product page. I have checked inventory, visibility settings everything is correct still its not showing.
can anyone please help regarding this in right direction.

Thanks


texts: Load a ui component with ajax within admin tab

texts:
Using the below method to attempt to load a uicomponent over ajax into a tab within custom admin page shows a loading spinner which never completely loads.

  XML for controller added buttons to the initial ui element

<referenceBlock name="ticketingo_ticket_form">
    <block class="Harrigo\Ticketingo\Block\Adminhtml\Ticket\Edit\Tab\Comments" name="ticketingo_ticket_form_comments" >
            <action method="setTabLabel">
            <argument name="label" xsi:type="string">Comments</argument>
        </action>
    </block>
</referenceBlock>

  Block code for tab button

...
public function getTabUrl()
{
    return $this->getUrl('tickets/comment/viewcommentstab', ['_current' => true]);
}

public function isAjaxLoaded()
{
    return true;
}
...

  Controller for uicomponent (Button points to this controller)

...
    public function execute()
    {
        $this->_view->loadLayout();
        $this->_view->renderLayout();
    }
...

  Layout declares the ui component (This layout is then pulled over ajax)

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <container name="content" label="Root">
        <uiComponent name="custommodule_ui_component"/>
    </container>
</layout>

This starts to load the uicomponent fine however spinner remains spinning indefinitely.

I've attempted running quick fixes like below:

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

Not sure what the scope name is have used the same as within data-bind="scope: 'ticketingo_ticket_comments.ticketingo_ticket_comments'" on the ui component markup however this does not seem to work for me and issue remains.

require(['jquery', 'uiRegistry'], function ($, reg) {
    reg.remove('ticketingo_ticket_comments.ticketingo_ticket_comments');
    $('#container').trigger('contentUpdated');
    $('#container').applyBindings();
});

The ui componenets load fine if added into the main xml for the controller however I have not modified these for tabs and they remain the same, I've just moved into the tabs.

Within the core customer edit page <insertListing> seems to be being used where elements are loaded via ajax. Looks like i may need to use this method but not quite sure how it is used yet as cannot see much documentation on how to use this and cant quite work out what is required from the core. Similar question below however answer seems a little to vague on how to get insert listing to work.

Magento 2 form ui component ajax fieldset


texts: Magento 2: Is there a way to check what is current page

texts:
In my case. i visited to checkout page and logined. How to check current page is checkout and redirect back to it! Tried

   if($this->session->getCurrentPage() == 'checkout') {
        return $store->getUrl('checkout');
    }


texts: Magento 2 : Error when importing customers

texts:
When trying to import Customers from the backend, Data validation is OK
but when I click on import button, the page gets stuck on please wait for loader and I get the error :

See the logs below

  Apr 24 16:20:01 web9 ool www: PHP Fatal error:  Uncaught Error: Call
  to a member function getBackendModel() on null in
  /var/www/staging-vhosts/timberland.co.za/vendor/magento/module-customer-import-export/Model/Import/Customer.php:442#012Stack
  trace:#012#0
  /var/www/staging-vhosts/timberland.co.za/vendor/magento/module-customer-import-export/Model/Import/Customer.php(517):
  Magento\CustomerImportExport\Model\Import\Customer->_prepareDataForUpdate(Array)#012#1
  /var/www/staging-vhosts/timberland.co.za/vendor/magento/module-import-export/Model/Import/AbstractEntity.php(640):
  Magento\CustomerImportExport\Model\Import\Customer->_importData()#012#2
  /var/www/staging-vhosts/timberland.co.za/vendor/magento/module-import-export/Model/Import.php(441):
  Magento\ImportExport\Model\Import\AbstractEntity->importData()#012#3
  /var/www/staging-vhosts/timberland.co.za/vendor/magento/module-import-export/Model/Import.php(412):
  Magento\ImportExport\Model\Import->processImport()#012#4
  /var/www/staging-vhosts/timberland.co.za/vendor/magento/framework/Interception/Interceptor.php(58):
  Magento\ImportE in
  /var/www/staging-vhosts/timberland.co.za/vendor/magento/module-customer-import-export/Model/Import/Customer.php
  on line 442

Can you please advise as to what could be the cause of this issue, is there any way I can get all customer attribute, so I can see what attribute is causing this.

Thanks


texts: M1. Finding all parent (configurable) products that have not children (simple) products set

texts: How can I find all parent (configurable) products that have no children (simple) products linked. these products are not logical as they can never be sold.


texts:
I'm seeing the following error in my error.log file:

  2015-11-05T15:03:02+00:00 ERR (3): Warning: Missing argument 3 for Mage_Review_Block_Helper::getSummaryHtml(), called in
  /var/www/vhosts/domain.com/httpdocs/app/design/frontend/domain.com/default/template/lpackijskaponuda.phtml
  on line 43 and defined  in
  /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Review/Block/Helper.php
  on line 41

  2015-11-05T15:03:02+00:00 ERR (3): Notice: Undefined variable: displayIfNoReviews  in
  /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Review/Block/Helper.php
  on line 49

any ideas?

Updated

<?php echo $this->getLayout()->createBlock('review/helper')->getSummaryHtml($product, 'short'); ?>


texts: Magento Payment Methods Not Showing - Shows a CC Form Instead

texts:
I have noticed a strange issue recently on the Magento checkout. The same thing occurs whether I am using the default onpage Magento checkout, or if I am using the lotusbreath onepage checkout extension.

When I go to the checkout, there is a credit card form, in place of where you would usually have a list of payment methods (PayPal, Pay In Store, Sage Pay etc.). I can not see these other options now.

When I load the page, I do see them load, very briefly, but they are immediatley replaced by this form. I have disabled all payment methods, apart from pay in store, sag pay and paypal. Sage pay takes the user to their website to process payments, so the form does not belong to that.

Where could this come from?


texts: Magento 1.9 Filter by attribute in current category not working

texts:
I used layered navigation for all my catalog's categories. In front-end, when I click on a category and then I try to filter the products by attribute, it shows results from all categories.
I'd like to show products from the current category, not from all the categories. How to solve?


texts: How to restrict gust customer 3 line street address to 2 line street address in magento 2.3.5

texts: I didn't find any option to set address lines in admin panel


texts: Magento 2 : Illegal characters on import

texts:
I'm try to import my customers from magento1 to magento2 but got a few errors on import validation.

The import is aimed at a german shop so special chars like "ä, ö, ü" are pretty common, especially in names and addresses.

I have to change the charset but can't find any spot to do that. So here's the question:

• Where do I change the charset to make the import possible ?

• What do I wrong if it isn't the charset ?

Charset is: utf8_general_ci


texts: Magento Shipping returning “Sorry, no quotes are available for this order at this time.” After add the Third Store

texts:
My friend had Magento with two-multi store and he add the third store as the duplicate of one of his store.

Now, his third store's card keep returning following error
"Your order cannot be completed at this time as there is no shipping methods available for it"

This only occurs on his newly added third store's cart.

What he should do?


texts: Which one is the difference between Product and ProductRepository?

texts:
In Magento 2, which one is the difference between Magento\Catalog\Model\Product and Magento\Catalog\Model\ProductRepository?

Using both of them, seems they have the same methods, so I don't know when I should use one or the other.


texts: Magento Module DHL Error After Upgrade 2.3.0 to 2.3.1

texts:
Recently haved upgrade Magento 2.3.0 to 2.3.1
Before upgrade have create a Sample product with all data request for the methods shippings,
Weight - Price - Setting "Country inside Config" etc etc.
During this test, the APIs connection works correctly and DHL return the correct data and shipping method.

But after Upgrade, and re-create new product with all data, i received this message

This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.

Above message is the default message when DHL is angry for some reason.
Similar message was return me when during the first test i don't have put the weight.
I had noticed and I had solved it in the first tests.

But the new product have Weight / Height / Depth and Width and more, but in any case return me error.

Also, have check log and inside the log have fount this message:

        <Condition>
            <ConditionCode>410301</ConditionCode>
            <ConditionData>Products not available between this origin and destination (network segment)</ConditionData>
        </Condition>

What is the reason ?
Who can help me ?
Thank you so much to all.


texts: iwd opc proceed to checkout missing on cart [Magento 1.9]

texts:
I Was using native onepage checkout of magento 1.9 till now. Came across IWD OPC and thought of integrating it. Features, for a free extension, are great.
After installation, everything worked well with admin side. But the on the cart page, frontend, I could not see the "proceed to checkout" button.
I checked /template/checkout/cart.phtml and found nothing.
tried to google the issue but couldn't find exact issue. Is there anyone whoo has come across such issue? If yes, did you resolve it? If yes, what did you do to make it work?
[UPDATE][SOLVED]
For this particular issue, i tried a lot of things but finally one thing solved the issue.
Steps:

after adding an item to Cart, I tried the direct one page URL in the browser. i.e., https://domain.com/onepage

It showed issue while reading the GeoIP.dat  file.

went to console, did

 sudo chown -R www-data:www-data lib/MaxMind
 sudo chmod -R 777 lib/MaxMind

refreshed the page and IT WORKED.


texts: How to properly translate strings in JavaScript

texts:
Say I have a piece of custom JavaScript loaded in some pages of my store. This JavaScript serves the purpose of interactivity and can display some text. How would I make it multi-langual like I would with the __("string"); format in PHP?

Say i.e. I have this piece of JavaScript:

$('.readmorebutton').click(function() {
    if (! $('.readmore').hasClass('open') ) {
        $('.readmorebutton').text('Show less'); //How to translate?
    } else {
        $('.readmorebutton').text('Read More'); //How to translate?
    }
});

note: JS is taken out of context and stripped down; the working of it is not the issue, the translating of the text is.


texts: Magento 2 I Want To Show Both Including/Excluding Tax Price Only On Product Detail Page

texts:
I want to show Both including/excluding tax price only on Product Detail Page.
and other pages I want to show excluding tax price this done via admin tax configuration.
Now I want to show only Both including/excluding tax price only on Product Detail Page.


texts: In Stock/Out of Stock - can I add a blank so there is no availbitly response?

texts:
can I add a blank so availability has no answer next to it?
https://www.modwalls.com/real-penny-mosaics-mix.html

I need this for our preorder plug in :) -


texts: How to install node_modules in server for grunt configuation

texts:
As a designer I am totally new to magento 2 file structure and preprocessing.

As far as my understanding is correct, magento uses less files and uses gruntfile.js for preprocessing so that via livereload extension we can runtime compile our _extend.less file.

I had confgured gruntfile for this and after these commands what I get is four files in pub/static/frontend/vendorname/customthemename/en_us/css/ directory that were not before grunt configuration.

style-l.less
style-m.less
email.less
email-inline.less

Now inside app/design/frontend/vendorname/customthemename/css/web/css/source
directory I have my own _extend.less file for extending default magento library variables,mixins etc.

Currently there are two questions in my mind.

Now as grunt needs this root source files in pub directory for prepeocessing, what if I accidently run any developer command for magento.

Is it that I will lose this structure or that by putting any .less (imported via _extend.less) file in app folder will manage this?

grunt clean:theme command clean all content inside pub/static/frontend/vendorname/customthemename/en_us.
How to not lose those all after configuring grunt? Now I am little worried about losing any static content after configuring grunt.

Second question is that to install grunt, I have to install all node modules via command npm install. Now that I have done all process in my local pc, this is fine but how to do the same (i.e. install all node modules) for grunt in server?


texts: Magento 2 :Problem extending Model / ResourceModel

texts:
On a Magento 2 module, I try to extend

\Magento\Catalog\Model\Product\Option

My File : Mine/Toto/Model/Catalog/Product/Option :

namespace Mine\Toto\Model\Catalog\Product;

    class Option extends \Magento\Catalog\Model\Product\Option
    {

        const OPTION_GROUP_XFILE    = 'xfile';
        const OPTION_TYPE_XFILE     = 'xfile';

        public function __construct(
            \Magento\Framework\Model\Context $context,
            \Magento\Framework\Registry $registry,
            \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
            \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory,
            \Magento\Catalog\Model\Product\Option\Value $productOptionValue,
            \Magento\Catalog\Model\Product\Option\Type\Factory $optionFactory,
            \Magento\Framework\Stdlib\StringUtils $string,
            \Magento\Catalog\Model\Product\Option\Validator\Pool $validatorPool,
            \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
            \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
            array $data = []
        ) {
            parent::__construct(
                $context,
                $registry,
                $extensionFactory,
                $customAttributeFactory,
                $productOptionValue,
                $optionFactory,
                $string,
                $validatorPool,
                $resource,
                $resourceCollection,
                $data
            );
        }

        public function _construct()
        {
            $this->_init('Mine\Toto\Model\Catalog\ResourceModel\Product\Option');
            parent::_construct();
        }

        public function getGroupByType($type = null)
        {
        ...
        }

        public function groupFactory($type)
        {
        ...
        }

        public function beforeSave()
        {
        ...
        }
    }

and, as called in the _construct,

\Magento\Catalog\Model\ResourceModel\Product\Option

My File Mine/Toto/Model/Catalog/ResourceModel/Product/Option.php

namespace Mine\Toto\Model\Catalog\ResourceModel\Product;

    class Option extends \Magento\Catalog\Model\ResourceModel\Product\Option
    {

        public function _saveValuePrices(\Magento\Framework\Model\AbstractModel $object)
        {
        ...
        }
    }

The $this->_init('Mine\Toto\Model\Catalog\ResourceModel\Product\Option');
induces an error :

1 exception(s):
Exception #0 (Exception): Recoverable Error: Argument 1 passed to Magento\Catalog\Model\ResourceModel\Product\Option::__construct() must be an instance of Magento\Framework\Model\ResourceModel\Db\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /var/www/html/magento2/vendor/magento/module-catalog/Model/ResourceModel/Product/Option.php on line 54

Thank you for your help,


texts:
Getting below error

  Notice: Undefined index: column in
  /var/www/html/TTM/vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php
  on line 196


texts:
<?php
namespace Vendor\Module\Observer;

use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;
use \Magento\Checkout\Model\Session as CheckoutSession;

class SaveOrderObserver implements ObserverInterface
{
    protected $checkoutSession;

    public function __construct(CheckoutSession $checkoutSession) {
        $this->checkoutSession = $checkoutSession;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $order = $observer->getEvent()->getOrder();
         // $quote = $observer->getEvent()->getQuote();
         $quote = $this->checkoutSession->getEvent()->getQuote();

        $order->setData('shippingaccntno', $quote->getShippingCarrearAccountNo());
        $order->setData('dropdown', $quote->getDropDown());

        return $this;
    }
}

but its not working am getting error  Uncaught Error: Call to a member function getQuote()
update:-
<event name="sales_model_service_quote_submit_before">
        <observer name="extra_shipping_cost" instance="vendor\module\Observer\SaveOrderObserver" />
    </event>


texts: how to add new custom tab in magento product page

texts:
I want to know how to add new custom tab on the product view page. Like: Description, Tags, Reviews.
Please give me some suggestion how it will be possible .


texts: How to change the url of checkout in toplink

texts:
I need to change the url that the checkout link in top links is pointing to. At the moment it point to /checkout but i need it to point to /checkout/onepage.

normally the redirect it automatic but i have an extension with conflict with this auto redirect so i just want to change the top link so there is no re direct.

I found this

    <reference name="top.links">
        <block type="checkout/links" name="checkout_cart_link">
            <action method="addCartLink"></action>
        </block>
    </reference>

but i dont know how to change the url on the link


texts: Default Stock Missing after upgrade from 2.3.3 to 2.3.6 and enabling MSI

texts:
I recently upgraded from 2.3.3-p1 to 2.3.6 and enabled MSI. I wasn't using MSI before as a stock plugin I use wasn't compatible, it now is and has upgraded to their latest version.
After enabling all the MSI modules and refreshing cache and reindexing etc I don't have anything listed in the stock for MSI, not even the default that is meant to be created. This means that when running my stock import the salable qty is always 0 and the developers for that plugin are saying it's because there is no default.
How do I create the default stock? I do have the inventory_stock_1 view


texts: Event not fired when Full Page Cache is enabled in Magento 2

texts:
I am trying to run a piece of code on every page load. I have the following

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_predispatch">
        <observer name="csp" instance="MyVendor\MyModule\Observers\MyObserver" shared="false" disabled="false" />
    </event>
</config>

This works besides from when Full Page Cache is enabled. When it is enabled my observer does not run.

Is there a better event I should watch to enable me to run code on every page load regardless of if Full Page Cache is turned on or off?


texts:
I have created a form with some input fields in Magento. But when I click submit, Magento will not send the email.

How can I send a basic email in Magento?


texts: Magento 2 collect total quote after remove item

texts:
I have a module that removes cart items from Cron job every day.
After removing the item, the quote total quantity and quote subtotal amount does not update. By using the below function I want to update the quote data but it does not work.

    public function updateCart($quoteId,$customerId){

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();//instance of object manager

    /**
     * @var $itemModel \Magento\Quote\Api\CartRepositoryInterface
     */
    $itemModel = $objectManager->create('\Magento\Quote\Api\CartRepositoryInterface');//Quote item model to load quote item

    /**
     * @var $q \Magento\Quote\Model\Quote
     */
    $q=$objectManager->create('\Magento\Quote\Model\Quote');
    $q->loadByCustomer($customerId);

    $q->collectTotals();
    $q->setTotalsCollectedFlag(false);

    $itemModel->save($q);
    $q->save();

    $itemModel->get($quoteId);

    $itemModel->save($q);

}

Where am I making a mistake?


texts: Magento 2.2.0 How to attach multiple files using Rest api with large size of file?

texts:
Magento 2.2.0 How to attach multiple files using Rest API with large size of file?

  code is below for attach png file using webservices :

$data='data:application/pdf;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAAAFVBMVEUA/wCt/67q4eHo4t6p/6rc2dDc/93m3krJAAAAZElEQVRoge3bQQHAMAzEsDRJyx/yWOw+MgEhcN3pQHNr3p7f2zfVW4G2q08CPmAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAzOrWWxmS61D36npAXNP8b4QQAAAABJRU5ErkJggg==';//$singlefile['content'];
            //return $data."----".$singlefile['content'];
            $source = fopen($data, 'r');
            $destination = fopen('/var/www/html/xfactory-magento/pub/media/catalog/product/i/p/'.$singlefile['name'], 'w');
            stream_copy_to_stream($source, $destination);
            fclose($source);
            fclose($destination);


texts: How to apply tablerate shipping on discounted subtotal?

texts:
How to apply tablerate shipping on discounted subtotal ? In default magento it apply shipping on actual subtotal. If any coupon applied then shipping should be calculated on discounted amount.

For example,

These are shipping rates-

  Country | Region/State | Zip/Postal Code | Order Subtotal (and above)
  | Shipping Price

  USA | * | * | 0 | 4.5

  USA | * | * | 25.01 | 10

  USA | * | * | 50.01 | 11

Your subtotal is : $55, and coupon discount is: $15

By default magento will pick shipping as $11 on subtotal=$55

But after making all above changes it should pick shipping as $10 on discounted subtotal i.e. $55-$15 = $40


texts:
I want to display review form in pop-up window.

I copied Form.php file from vendor/module-review/Block/Form.php to app/Company/Review/Block/Form.php
Added below code in app/design/frontend/Company/developer/Magento_Review/templates/product/view/list.phtml

echo $this->getLayout()->createBlock("Bhs\Review\Block\Form")->setTemplate("Magento_Review::form.phtml")->toHtml(); ?>

This open a review form in pop-up but reviewing are not saving. What I should do so reviews save in database.


texts:
I noticed that Magento stores some images at the following path /media/catalog/product/A/C, however it is duplicating the images many times. For example:

AC41412_Black_1.jpg
AC41412_Black_2.jpg
AC41412_Black_3.jpg
AC41412_Black_4.jpg
AC41412_Black_5.jpg
AC41412_Black_6.jpg
AC41412_Black_7.jpg
AC41412_Black_8.jpg
AC41412_Black_9.jpg
AC41412_Black_10.jpg
AC41412_Black_11.jpg
AC41412_Black_12.jpg
AC41412_Black_13.jpg
AC41412_Black_14.jpg
AC41412_Black_15.jpg

Can anyone tell me the reason why Magento does this as it's taking up a lot of disk space.

Thanks in advance.


texts: Getting additional information (additional_data) form Magento 2 payment Object

texts:
I am working on a payment gateway for a mobile wallet. I have created an extra field on payment page on checkout

<input name="payment[my_number]" required class="text" placeholder= "Enter My Number", data-bind="input: getMyNumber(), textInput: 'value', value: myNumber"  >

which is displaying perfectly

My data assign observer looks like this

namespace Myvendor\Mypayment\Observer;
use Magento\Framework\Event\Observer;
use Magento\Payment\Observer\AbstractDataAssignObserver;
class DataAssignObserver extends AbstractDataAssignObserver
{
/**
 * @param Observer $observer
 * @return void
 */
public function execute(Observer $observer)
{
    $method = $this->readMethodArgument($observer);
    $data = $this->readDataArgument($observer);
    $paymentInfo = $method->getInfoInstance();
    if ($data->getDataByKey('my_number') !== null) {
        $paymentInfo->setAdditionalInformation(
            'my_number',
            $data->getDataByKey('my_number')
        );
    }
}
}

Renderer for the form looks like this

define(
[
    'Magento_Checkout/js/view/payment/default'
],
function (Component) {
    'use strict';
    return Component.extend({
        defaults: {
            template: 'Myvendor_Mypayment/payment/form',
            myNumber: ''
        },
        initObservable: function () {
            this._super()
                .observe([
                    'myNumber'
                ]);
            return this;
        },
        getCode: function() {
            return 'Mypayment';
        },
        getData: function() {
            return {
                'method': this.item.method,
                'additional_data': {
                    'my_number': this.myNumber()
                }
            };
        },
        getMyNumber: function() {
            return _.map(window.checkoutConfig.payment.mypayment.myNumber, function(value, key) {
                return {
                    'value': key,
                    'my_number': value
                }
            });
        }
    });
}
);

Finally I am accessing my number like this

/* @var  \Magento\Payment\Model\InfoInterface $paymentDO*/
    $paymentDO = $buildSubject['payment'];
    $payment = $paymentDO->getPayment();
    $myNumber = $payment->getAdditionalInformation('my_number');

Which is giving me an empty string instead of the dumber submitted,

I am not getting any error on the log so am not quite sure where am going wrong,

I will highly appreciate assistance.

Thanks.


texts: How can I (quickly) add one image to all products in my Magento (1.9) store? This Image needs to go at the end (in addition to existing images).


texts: How to auto fill the shipping address field in Checkout in Magento 2.2

texts:
I had referred this link How to auto fill the shipping address field but this is throw an error This is required Field.

I have to Auto fill Address in Magento 2 Checkout. I have to fill the State and Zip code.

Can anyone have idea to fill it?

di.xml file in `app/code/Vendor/Module/etc/frontend`

<type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
        <plugin name="vendor_assign_default_value" type="Vendor\Module\Plugin\Checkout\Model\Checkout\LayoutProcessor" sortOrder="100"/>
    </type>

LayoutProcessor file in  Vendor\Module\Plugin\Checkout\Model\Checkout

<?php

namespace Vendor\Module\Plugin\Checkout\Model\Checkout;

use Magento\Checkout\Block\Checkout\LayoutProcessor as MageLayoutProcessor;

class LayoutProcessor
{
    public function afterProcess(MageLayoutProcessor $subject, $jsLayout)
    {

        $jsLayout['components']['

checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']['postcode']['value'] = '10012';

         return $jsLayout;
    }
}


texts:
I have changed my website's domain. For eg. www.abc.com to www.xyz.com.
Now I want to set 301 redirect for www.abc.com to www.xyz.com.
I have checked Catalog > URL Rewrite Management.
Is that right way to do it? Or how can I do that redirect for the main URL from Magento backend.


texts: how to get selected categoryIds in magento 2?

texts:
I want to get selected categoryId to save it :

 $productObj->setCategoryIds(selectedCategoryId);
 $productObj->save();


texts: HELP NEEDED, I can NOT get order endpoints to work in Magento 2

texts:
I am using zapier to bring an order from one website to Magento 2 with a webhook. I can not find the endpoint for ordering. I believe this is the only information I need to finish this. I found a document with the needed information from Shopify but cant find a match for Magento 2, Here is the Shopify code:

{
 "order": {
   "line_items":[
      {
         "variant_id": xxxxxxxx,
         "quantity": 1,
         "fulfillment_status": "null"
      }
    ],

 "customer": {
   "first_name": "[Advocate's First Name]",
   "last_name": "[Advocate's Last Name]",
   "email": "[Advocate's Email]"
  },

"financial_status": "pending",

"shipping_address": {
   "first_name": “[Advocate’s First Name]",
    "last_name": “[Advocate’s Last Name]",
    "address1": “[Advocate’s Address]",
    "address2": “[Advocate’s Redemption ID]",
    "city": “[Advocate’s City]",
    "province": “[Advocate’s Province/State]",
    "country": “[Advocate’s Country]",
    "zip": “[Advocate’s ZIP]"
    }
  }
}


texts: Unable to search orders in admin order Grid by custom column(s) created

texts:
I had created 4 custom fields for the Order:

pgs_order_website_names
pgs_aramex_reference
pgs_aramex_shipped
pgs_aramex_shipped_date

I had copied Grid.php to local/Mage/

  class Mage_Adminhtml_Block_Sales_Order_Grid extends
  Mage_Adminhtml_Block_Widget_Grid

Constructor

public function __construct()
{
    parent::__construct();
    $this->setId('sales_order_grid');
    $this->setUseAjax(true);
    $this->setDefaultSort('created_at');
    $this->setDefaultDir('DESC');
    $this->setSaveParametersInSession(true);
}

The _prepareCollection() Method :

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel($this->_getCollectionClass());
    $select = $collection->getSelect();
    $select->joinLeft(array(
                        'order' => Mage::getModel('core/resource')->getTableName('sales/order')),
                        'order.entity_id=main_table.entity_id',
                        array(
                        'pgs_order_website_names' => 'pgs_order_website_names',
                        'pgs_aramex_reference'=>'pgs_aramex_reference',
                        'pgs_aramex_shipped'=>'pgs_aramex_shipped',
                        'pgs_aramex_shipped_date'=>'pgs_aramex_shipped_date'
                        )
                    );
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

The _prepareColumns() Method

protected function _prepareColumns()
{
    $this->addColumn('pgs_order_website_names', array(
        'header'=> Mage::helper('sales')->__('Ordered Websites'),
        'index' => 'pgs_order_website_names',
        'width' => '80px',
        'type'  => 'text',
        'filter' => false,

    ));
    $this->addColumn('pgs_aramex_reference', array(
        'header'=> Mage::helper('sales')->__('Aramex ref. No'),
        'index' => 'pgs_aramex_reference',
        'width' => '80px',
        'type'  => 'text',
        'filter' => false,

    ));
    $this->addColumn('pgs_aramex_shipped', array(
        'header'=> Mage::helper('sales')->__('Sent to Warehouse ?'),
        'index' => 'pgs_aramex_shipped',
        'width' => '80px',
        'type'  => 'text',
        'filter' => false,

    ));
    $this->addColumn('pgs_aramex_shipped_date', array(
        'header'=> Mage::helper('sales')->__('Sent to Warehouse ?'),
        'index' => 'pgs_aramex_shipped_date',
        'width' => '80px',
        'type'  => 'date',
        'filter' => false,
    ));
return parent::_prepareColumns();

}

Everythig is working fine if i make the 'filter' attribute to false in $this->addColumn() Method! But if i changed to true im getting an error :

  Fatal error: Call to a member function setColumn() on a non-object
  The column attributes are :

$dateAttribute  = array(
    'type'          => 'date',
    'backend_type'  => 'date',
    'frontend_input' => 'date',
    'is_user_defined' => true,
    'label'         => 'Shipped date',
    'visible'       => true,
    'required'      => false,
    'user_defined'  => false,
    'searchable'    => false,
    'filterable'    => true,
    'comparable'    => false,

);

Magento CE 1.9