texts: magento2 - How to render or use custom html element for attribute in edit admin form of product?

texts:
I want render one of attribute in edit admin form of product use my custom html, ex: name, display link to view product page and input edit together.
If anyone know, please advice.


texts: Add simple stock to configurable product collection

texts:
The  Mage::getResourceModel('catalog/product_collection')  didn't calculate stock for configurable products.

I think, with MySQL, there is a way, to calculate configurable product stock from simple products stock.

simple product = 1 cataloginventory_stock_item
configurable product = 2 or more cataloginventory_stock_item

Can someone help us to create a SQL query to do this?


texts: How to get Sidebar slider Feedback Form in Home Page?

texts:
I have created Feedback form with PHP,HTML,CSS,JS.

Form Lookalike,

my feedback form Code

https://www.dropbox.com/sh/32zqgejubfllz0h/AACkB_iIh-KJQxtEUikZ8i9Na?dl=0

how can i apply Sidebar Sliding into my home page and all other pages?


texts: How can I display tooltips in widget options?

texts:
It's easy to add comments and tooltips in system configuration options like this:

<parameters>
    <field_name>
        <comment>this is the comment</comment>
        <tooltip>this is the tooltip</tooltip>
    </field_name>
</parameters>

but these do not work for widget options.

I am able to display a comment in the widget options by using the <description> tag like:

<description>this is the description</description>

but, I have not found an easy way to add tooltips. Does such a thing exist?

UPDATE:

  I actually ended up simply using CSS to create the tooltips. Since widgets cannot use <comment> tags, I used <description> tags and CDATA to include the html with class like the following.

<description><![CDATA[Some informative text here. (info)]]></description>

The CSS looks like this:

.module-tooltip {
    display: inline;
    position: relative;
    cursor:pointer;
}

.module-tooltip:hover:after {
    background: #333;
    background: rgba(0,0,0,.8);
    border-radius: 5px;
    bottom: 26px;
    color: #fff;
    content: attr(module-title);
    left: 20%;
    padding: 5px 15px;
    position: absolute;
    z-index: 98;
    width: 220px;
}

.module-tooltip:hover:before {
    border: solid;
    border-color: #333 transparent;
    border-width: 6px 6px 0 6px;
    bottom: 20px;
    content: "";
    left: 50%;
    position: absolute;
    z-index: 99;
}


texts:
// Global Namespace
var test=
{
}

i am using this but not working

var config = {
    map: {
        '*': {
            'abc_def/js/view/payment/method-renderer/cryozonic_stripe':'my_module/js/view/payment/method-renderer/cryozonic_stripe'

        }

    }
};

but not woking


texts: I need to set rules for product prices. Rules will be applied to different customer groups.


texts: Products disappear from Magento admin area and front end

texts:
I'm working on Magento 1.9. Let the product Qty in the admin area is 1. And I ordered the product from frontend and now the qty became 0. Then the item completely disappears from the back end. On refreshing the product page in the admin area which I have already taken in my browser, will show the message "This product no longer exists". Product is not appearing in frontend too when I search the same. I can't access the item in the backend. Anyone has the solution for this?

The product can't be found in 'catalog_product_entity' table. But it's there in the 'sales_flat_order_item' table


texts: Css not loading after theme installation

texts:
I m unable to load style-l.css or any css file.I put fresh installation .htaccess but no luck. It show 404 Error.

http://reliancesolution.co.uk/pub/static/frontend/Sm/clickboom/en_US/css/styles-l.css


texts: Stock Availability status does not change to 'in stock' when order is canceled

texts:
A Product (simple product) having qty 1 or you can say all qty is ordered and If order would canceled

product qty automatically reset to original but Stock Availability remain out of stock.

How to automatically reset Stock Availability to in stock along with product qty?


texts: How to make Payment Gateway in Magento 2?

texts:
Please provide any official documents or any demo/tutorials mode for this (How to make Payment Gateway in Magento 2).

I was referring to http://inchoo.net/magento-2/implementing-payment-gateway-magento-2/ but no success yet.


texts: Magento 2 customer address book Call to a member function getFrontendLabel() issue

texts:
Customer is unable to update and add address in Magento 2.2.6 version.

Steps to reproduce

1.Login as customer and click to Address book section.
2.Fatal error will be generate customer is unable to update their address.

**** Solution ****
Magento 2.2.5 has solution only copy and past the edit.phtml file from Magento 2.2.5 version.
vendor/magento/module-customer/view/frontend/templates/address/edit.phtml


texts:
Hi Magento Experts,

I've some issue in my Magento Store. When i am creating or editing any attribute it is showing bunch of spanish title for attribute title but in store view there no such stores available. Please help me to remove all these spanish input boxes.

Any help will be appreciated. Thanks


texts: Magento 2: Display Custom attribute value under the product name on category page

texts:
I want to display custom attribute value  under the product name on category page.

Attribute type is dropdown and attribute name is Brand.

I want to display the brand name under the product name on category page in GRID and LIST mode.

How can i do that?  What's the standard way to display brand name under product name?

Do i need to create any module for that or custom function?

Any help would be appreciated.


texts:
I have a Featured products category whihc has some of our best selling products in (15 products) I have them displaying on my home page. This section on my home page shows 5 random products at a time from my featured products category The problem i seem to be having is that it only shows 5 products on my home page and every time i refresh the page it shows the same 5 products but in a different order. Where as i want it to show 5 different products each time. i have a loop that goes through my products 5 times so i am not sure why it picking random products and just picking the same ones every time.

<?php
Mage::getSingleton('catalog/layer')->setData("product_collection",NULL);
$this->_productCollection = null;
$_productCollection=$this->getLoadedProductCollection();

?>

    <?php echo $this->__("Recommended For You");?>

<?php $_productCollection=$this->getLoadedProductCollection() ?>
<?php if(!$_productCollection->count()): ?>

    <?php echo $this->__('There are no products matching the selection.') ?>

<?php else: ?>

<?php // Grid Mode ?>

<?php $_collectionSize = $_productCollection->count() ?>

    <?php $_items = $_productCollection->getItems();
           shuffle($_items); ?>

    <?php $i=0; foreach ($_items as $_product): ?>
    <?php if ($i++%4==0): ?>

    <?php endif ?>

                <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getShortName()) ?>">
                    <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image'); ?>" alt="<?php echo $this->htmlEscape($_product->getShortName()) ?>"/>

<a  href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getShortName()) ?>"><?php echo $this->htmlEscape($_product->getShortName()) ?>

            <?php if($_product->getRatingSummary()): ?>

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

            <?php echo $this->getPriceHtml($_product, true) ?>

    <?php if ($i%5==0 && $i!=$_collectionSize): ?>

    <?php endif ?>

    <?php if ($i==5) break;  // show 5 products max ?>

    <?php endforeach ?>
    <?php for($i;$i%5!=0;$i++): ?>
          &nbsp;
    <?php endfor ?>
    <?php if ($i%5==0): ?>

    <?php endif ?>

<?php endif; ?>

If you can help thank you, if you cant thank you for at least reading my post


texts: Magento-2 : How to add custom template just before add to cart button on product detail page

texts:
I want to display my custom template just before add to cart button on product detail page.

It should be display in all type of product like Bundle, Grouped, Configurable Product.

Thanks


texts: Not getting NULL value or empty value when the filter fails.Why?

texts:
I am using the code below to get the orders when filtering using email address of the logged in user.

$order = Mage::getResourceModel('sales/order_collection')
        ->addFieldToSelect('*')
        ->addFieldToFilter('customer_id', Mage::getSingleton('customer/session')->getCustomer()->getId())
        ->setOrder('created_at', 'desc');
return $order;

But if the user has not placed an order at all then $order should be NULL value or empty value right? but I am not getting an empty value which I found out after using print_r($order);.

I need empty or null value so that I can display a notification to the customer to tell him that he has not ordered anything. if there is a way to get NULL value then please explain.


texts: Magento2- Send custom transactional emails

texts:
As done in Magento 1.x.x, how can custom transactional emails be sent.

Additional

Add email in bcc
Send attachment along email


texts: how to solve a error "Unable to save shipping information. Please check input data." while saving a data in checkout page in magento 2

texts:
how to solve an error

  Unable to save shipping information. Please check input data.

while saving a data in checkout  page in Magento 2


texts:
I try to install CE-MAGETWO-67805.patch file for image resize issue but it is not installed it shows error I also tried another method,
1. create patch file and upload it magento root folder
2. run using browser like www.mysite.com/patch.php it shows "done" text only
Also checked patch file installed or not but it is not installed.
I solve image resize issue from update may magento site 2.1.6 to 2.1.7 but some css not file js file not loading properly as per my purchased theme and css not get changed when change in css file using ftp.i guessed it is solved by installing patch file. Please somebody help me to solve my issue..


texts: I want to add a js script near the </body> tag. But, in my project there are more than one layout files having <referenceBlock name="before.body.end">. So, is there a specific order in which these gets executed. I see several scripts added using this handle. I want to add a script at the end of the body tag i.e., near </body> tag.


texts: Magento Rest API - multiple product list in one call

texts:
I want to access specified multiple product list in one call. for example access all the products in  category id 14 and 15.
This provide the product list id 14:
/V1/products?searchCriteria[filter_groups][0][filters][0][field]=category_id&searchCriteria[filter_groups][0][filters][0][value]=14

This provide the product list id 15:
/V1/products?searchCriteria[filter_groups][0][filters][0][field]=category_id&searchCriteria[filter_groups][0][filters][0][value]=15

But if I want to get both in one call: is possible to make somenthing like this ?:
/V1/products?searchCriteria[filter_groups][0][filters][0][field]=category_id&searchCriteria[filter_groups][0][filters][0][value]=14,15

Any help?


texts: Static content generation: problems with grunt exec and grunt less

texts:
I'm working on a Magento 2.3.4 website that has a custom theme, developed by a different party. I need to modify some .less files and I noticed something strange. grunt exec, that should publish the symlinks to pub/static/frontend generates the same results as running bin/magento setup:static-content:deploy. By the same results I mean that the rendered page looks the same after a grunt exec as it does after the native Magento command.

However, if I run grunt less after the grunt exec, the page renders completely differently. Styles that were not applied before are suddenly applied. This lets me modify styles that I otherwise can't – because just running grunt exec does not pick up those changes –, but it also results in the site looking completely different than in production.

Does anyone have any idea what could be going on?


texts: how to save custom form fields data in admin in magento 2?

texts:
I have created three custom form fields in checkout payment section.

I have followed this link to create form fields (How to add additional field to checkout payment (Magento 2)).

Now want to know how to save these fields data in the database.

Thanks


texts:
I have been getting 404 error in Magento Admin Controller and i cant seem to figure out what i am doing wrong:

I have this in the config.xml

<!--Admin Controller-->
<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <example before="Mage_Adminhtml">MasteringMagento_Example_Adminhtml
                    </example>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

I have this inside my controllers/Adminhtml/ExampleController.php

class MasteringMagento_Example_Adminhtml_ExampleController extends Mage_Adminhtml_Controller_Action
{
public function indexAction(){
    $this->loadLayout();
    return $this->renderLayout();
}
}


texts: Two panels after creating new configurable product

texts:
I created a new configurable product for magento 2.4, but now two panels of attributes appear, one from my new product and the other from configurations.
The panel of the new product I would like to appear only to him and not duplicate for the other product.
Does anybody know how to solve this?


texts: Magento 2 DropDown Attribute - Get "Admin" label value, not the StoreView value

texts:
how can i get the "Admin" label value, not the StoreView value

with

    $_product = $this->getProduct();
    $state = $_product->getResource()->getAttribute('m4y_state')->getFrontend()->getValue($_product);

    return $state;

i get the StoreView value, but i need the Admin Value (red).

How can i do that?
Thanks for any help


texts: One step checkout automatically comes back to free shipping when I select payment method

texts:
I'm using a template delivered with One Step Checkout.

I set up 2 different shipping options:
- free shipping
- express shipping

By default Free shipping is always selected. I have no problem with that.

But when a customer clicks to select the payment method (paypal), then the cart reloads and the shipping becomes free shipping, even if express shipping was selected before.

How can I prevent such behavior?

You can have a look at www.tendance24.fr if you want to test the bug.

To reproduce on the order page select a paying shipping method, it reloads the cart calculation (Ajax update), then select the payment method, let it load, you'll see in the price description that the free shipping has overtaken the paying one we selected earlier.


texts:
I received a phone call from a customer who said a coupon code was not working. I then proceeded to Shopping Cart Price Rules in my Admin and the whole site crashed with an exception error. The report in log says the following

a:5:{i:0;s:23:"Unsupported data type N";i:1;s:1398:"#0 /home/and21159/public_html/lib/Unserialize/Reader/Arr.php(102): Unserialize_Reader_ArrValue->read('N', ';')
#1 /home/and21159/public_html/lib/Unserialize/Parser.php(53): Unserialize_Reader_Arr->read('N', ';')
#2 /home/and21159/public_html/app/code/core/Mage/Core/Helper/UnserializeArray.php(44): Unserialize_Parser->unserialize('a:7:{s:4:"type"...')
#3 /home/and21159/public_html/app/code/core/Mage/Rule/Model/Abstract.php(179): Mage_Core_Helper_UnserializeArray->unserialize('a:7:{s:4:"type"...')
#4 /home/and21159/public_html/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php(92): Mage_Rule_Model_Abstract->getConditions()
#5 /home/and21159/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Promo_QuoteController->editAction()
#6 /home/and21159/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit')
#7 /home/and21159/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /home/and21159/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#9 /home/and21159/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 /home/and21159/public_html/index.php(83): Mage::run('', 'store')
#11 {main}";s:3:"url";s:76:"/index.php/admin/promo_quote/edit/id/2/key/4943fbaea25dba236be939e69b17ad3c/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

How do I fix this?


texts: Magento 2: ACL Permission for Admin Module

texts:
I have multiple Admin User Roles with Users.

For my Custom Module it's not giving "Access denied" for non - authorized Admin.

I have followed

https://www.mageplaza.com/magento-2-module-development/magento-2-acl-access-control-lists.html

Able to hide menu from Admin, but can access from URL

magento\app\code\Custom\Module\etc\adminhtml\system.xml

<resource>Custom_Module::configuration</resource>

magento\app\code\Custom\Module\etc\acl.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Custom_Module::Module" title="Module" sortOrder="10" >
                    <resource id="Custom_Module::posts" title="Module Posts" sortOrder="10">
                        <resource id="Custom_Module::posts_save" title="Save Post" sortOrder="10" />
                        <resource id="Custom_Module::posts_delete" title="Delete Post" sortOrder="20" />
                    </resource>
                    <resource id="Custom_Module::messages" title="Module Messages" sortOrder="10" >
                        <resource id="Custom_Module::messages_save" title="Save Message" sortOrder="10" />
                        <resource id="Custom_Module::messages_delete" title="Delete Message" sortOrder="20" />
                    </resource>
                </resource>
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">
                            <resource id="Custom_Module::configuration" title="Configuration" />
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

magento\app\code\Custom\Module\etc\adminhtml\menu.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Custom_Module::Module" module="Custom_Module" resource="Custom_Module::Module" sortOrder="11" title="Module"/>
        <add action="custom_module/posts/index" id="Custom_Module::posts" module="Custom_Module" parent="Custom_Module::Module" resource="Custom_Module::posts" sortOrder="1" title="Posts"/>
        <add action="custom_module/messages/index" id="Custom_Module::messages" module="Custom_Module" parent="Custom_Module::Module" resource="Custom_Module::messages" sortOrder="2" title="Messages"/>
    </menu>
</config>

magento\app\code\Custom\Module\Controller\Adminhtml\Posts\Index.php

protected function _isAllowed() {
    return $this->_authorization->isAllowed('Custom_Module::posts');
}

While Edit Posts/Messages it's giving Access Denied. But for Both Listing it's not giving same kind of Error.


texts: Do we need to 'Manage stock' in order to put specific products 'Out of stock'?

texts:
Magento 1.9.4
We used to have Manage stock = NO in:
System - Configuration - Inventory.

We desperately need to put about 20 specific products to show as 'Out of Stock' so I changed Manage stock = YES. Now I'm just worried that the products that have Qty = 0 (we never used to specify quantity before) will not be available on the site?
Here is the big question then:
Can you set products to status 'Out of Stock' even if 'Manage Stock' = NO?


texts:
I want override Block Magento\Catalog\Block\Product\View\Gallery
this is code in file di.xml

Edited

 <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
        <preference for="Magento\Catalog\Block\Product\View\Gallery" type="Xyaddons\Productzoom\Block\Product\View\Gallery" />
    </config>

Code file Gallery.php

    namespace Xyaddons\Productzoom\Block\Product\View;
    use Magento\Framework\View\Element\Template;

    class Gallery extends \Magento\Catalog\Block\Product\View\Gallery
    {
        protected function _toHtml()
        {
            $this->setModuleName($this->extractModuleName('Magento\Catalog\Block\Product\View\Gallery'));
            return parent::_toHtml();
        }

       /**
       * @var \Magento\Framework\App\Config\ScopeConfigInterface
       */
       protected $_scopeConfig;

       /**
         * Template image only
         *
         * @var string
         */
        protected $_templateImage = 'Xyaddons_Productzoom::product/image.phtml';

      protected function _prepareLayout()
        {
        $this->getLayout()->createBlock('Xyaddons\Productzoom\Block\Product\View\Gallery', 'xyaddons.productzoom')->setTemplate('Xyaddons_Productzoom::produtc/image.phtml');}
}

when run code don't running  image.phtml and not override Block Magento\Catalog\Block\Product\View\Gallery. What wrong?


texts: Magento 2: Add New Custom Option as a Text Field

texts:
I would like to add a new custom option text field like 'CSS Class' in the magento 2.3.5 'Customizable Options' section.
Anyone can suggest me please and guide me how to add please refer my screenshot for more information;


texts:
Dear fellow Magento users,

While filling in my tax report i came to the following conclusion: My tax is inconsistent

My Dashboard shows different total tax then my reports.

Tax Report Image:

Dashboard image :

As you can see, that is roughly a € 10 difference.

Because of that difference i was going to check my taxes manually when i discovered another bug. My PDF invoice is adding random tax to my invoices see images:

Magento in browser invoice:  Magento PDF Invoice: (i have highlighted the random tax with a red box)

At this moment i am using Magento ver. 1.9.1.0 (recently upgraded)

Is there any way to regenerate the PDF files to check the correctness of my tax in my dashboard/report


texts: Magento2 Upgrade command extension issue

texts:
I am facing an issue while upgrade my custom module from command first time :

Error:
Installing schema... SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

For second time upgrade its working fine:

Can anyone help me how to solve this issue.

Thanks


texts: Can't log into Magento 1.9 Admin Panel on work network

texts:
Never encountered this problem before until this morning all of a sudden. On the work network, we enter our admin Login details and nothing happens. The page refreshes and that’s all. No error message.

Tried different browsers, deleted cookies and cache, resetted. I just keep receiving the same errorless refresh?

However can access on our phones and on other networks?

Any help would be much appreciated!


texts: Magento 2 : Instagram Graph API Integration

texts:
Instagram now updated its API and now it uses Facebook Graph API. I want to get all the images from my Instagram page in Magento 2.

How can I retrieve it in Magento 2?

It always return :

  The access_token provided is invalid.

Any help would be appreciated.

Thanks.


texts:
I have an Android and an iOS app that connect to Magento through SOAP and perform various actions.

I have to switch to REST, but the users of the apps must not notice this change. They do not know what's behind the apps. Because Magento uses oAuth for REST, the users would have to authorize the applications. This is not desired.

I see 3 ways to go around this:

Use some hardcoded access tokens in the apps - looks very unsafe and I don't know if it is possible.
Simulate the whole oAuth process in the background - I don't know if this is possible either
Use the Guest role to signup/login users and then implement some kind of security token (as it is in SOAP)

I am not that experienced with webservices and I have no idea which way to go. Any recommendation is very appreciated. Thanks!


texts: Error in Curl request with response in Controller

texts:
I'm trying to get curl response from js (cc-method.js) file. The curl call code is in controller file domain.com/frontname/section/index. Below is the code,

public function execute()
    {
 // create a new cURL resource
                $ch = curl_init();

                $data = '{"merchantIdentifier":"'.PRODUCTION_MERCHANTIDENTIFIER.'", "domainName":"'.PRODUCTION_DOMAINNAME.'", "displayName":"'.PRODUCTION_DISPLAYNAME.'"}';

                curl_setopt($ch, CURLOPT_URL, $validation_url);
                curl_setopt($ch, CURLOPT_SSLCERT, PRODUCTION_CERTIFICATE_PATH);
                curl_setopt($ch, CURLOPT_SSLKEY, PRODUCTION_CERTIFICATE_KEY);
                curl_setopt($ch, CURLOPT_SSLKEYPASSWD, PRODUCTION_CERTIFICATE_KEY_PASS);
                //curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
                //curl_setopt($ch, CURLOPT_SSLVERSION, 'CURL_SSLVERSION_TLSv1_2');
                //curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'rsa_aes_128_gcm_sha_256,ecdhe_rsa_aes_128_gcm_sha_256');
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
                $result = curl_exec($ch);
                curl_close($ch);

                // close cURL resource, and free up system resources

                return $result;
}

I'm getting the response but with error too. Below is the response,

{"epochTimestamp":1581515057355,"expiresAt":1581518657355,"merchantSe .........................

error:

Exception: Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/........Index.php

It is pointing the line of $result = curl_exec($ch);.

I have tried to disable the php error and warning but that time there is no response. The response always coming with error only. Any hint will be helpfull for me.


texts:
I'm not sure if anyone met the same error as me. When I'm trying to import product information into Magento via Magmi, I found the following error.

  Illegal offset type in
  /var/www/magmi/plugins/5b5/general/attributesetimport/multi_dim_array.php
  on line 58


texts: Magento 2 : How to move a block next to size attribute label on product page. [Size Chart]

texts:
I want to move a block next to size attribute label:

How can I do this?
Thank you very much!!


texts:
Every extension I install, regardless of what it is, says it installs fine but on my admin I either don't get access to my admin back-end with the following error or in various places I receive the following error:

  Fatal error: Class 'XXX' not found in /public_html/app/Mage.php on line 547.

Where XXX is, the name of the extension is there.


texts: Where is stored the content of a CMS page? How to create a whole new page?

texts:
I created a new page using the admin panel from Magento CMS->Pages and created all it's content (html).

Is there another way to do this? I imagine that is something like: Create a file, change local.xml, ... something like this? I tried to found the content in a file but I couldn't find it.


texts: How do I set Magento 1.7 to default of grid view? I have selected in administration to grid default but is not working


texts: Magento multistore missing settings for shipping

texts: I would like to setting shipping for multistore but settings are missing. For default configuration I have all settings but when I choose one store the settings are not there. I have only Title, Method Name and Displayed error Message. The problem is because I wish to set different shipping for different store. Foe example : for one store that possible free shipping and table rates for other store only table rates (without free shipping). Can you help me how I can add others fields for setting?


texts:
Hi hope all are doing well in this pandemic

I am running a Client site and they want to restrict pin code for shipping in red zone

I have an excel sheet of pin code which they want to allow shipping.

how can I achieve this I can't found any free extension

anyone kindly help magento 2 restrict pin code for shipping


texts: Magento2 : How I can add Date of Birth field to customer address

texts:
As per Magento default "Date of birthday" is display in customer registration form. I want to show it on customer address form in checkout step.

Any way to display it on customer address form. I don't show it on registration, It should display only on checkout customer address.

Will I need to create new customer address attribute** or use existing "Date of birthday" customer attribute ?

Thanks.


texts: HTTP ERROR 500 in checkout when compilation is on and user is logged

texts:
I recently updated my Magento to 1.9.3.8.

Now, I have a HTTP ERROR 500 in a specific case.

I got an error when the following three conditions are met:

URL : base_url/checkout/cart OR base_url/checkout/onepage
Compiler state is enabled
User is logged

I have nothing into Magento log (system.log or exception.log).
Nothing else into server logs (/var/log/httpd/error_log) or (mysite/logs/error_log).

My observations

After some deep research in the magento code, I think the error is in includes / src / __ checkout.php.

I can solve it with a bad trick. Update lib/Varien/autoload.php at line 105

static public function registerScope($code)
    {
        if($code != "checkout")
        {
            self::$_scope = $code;
            if (defined('COMPILER_INCLUDE_PATH')) {
                @include_once COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php';
            }
        }
        else
        {
            //DO NOTHING
        }
    }

Someone else has the same error ? Or a real solution ?

I found nothing about this error and I don't understand why I have it. I never modify Magento core checkout files.

If this question is reporting to an already open subject, my apologize, I didn't find it.


texts:
I want to add Instafeed.js on my Magento 2 theme. How to write correct JS?

<script type="text/javascript">
    var feed = new Instafeed({
        get: 'tagged',
        tagName: 'awesome',
        clientId: 'YOUR_CLIENT_ID'
    });
    feed.run();
</script>


texts:
I've just finished upgrading to CE 1.9.3.7, and I want to re-enable the cache.

I select all cache components, and on the right choose Enable from Actions, then Submit, and the page refreshes with all caches disabled still.

Help appreciated.


texts: How to add image overlay to Product image?

texts:
I am trying to add an overlay for products the have sold out but for some reason my implementation isn't working...

I have created an .png file and a CSS class for the overlay.

.products-overlay {
    position:absolute;
    left:0%;
    top:0%;
    filter:alpha(opacity=50);
    -moz-opacity:0.5;
    -khtml-opacity: 0.5;
    opacity: 0.5;
    border:none!important;
}

I've add an IF condition inside of the list.phtml file

        <?php // Product Image ?>
        <?php if($_product->isSaleable()): ?>
            <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
                <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(220); ?>" width="220" height="220" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
        <?php else: ?>

            <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
                <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(220); ?>" width="220" height="220" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
                <img src="<?php echo $this->getSkinUrl('images/image.png') ?>" style="border: none;">

        <?php endif; ?>
        <?php // Product description ?>

Not having any Joy as the .png wont show on top of the product image.

Has anyone done something like this before?


texts: Fatal error: Uncaught Error: Call to undefined method log()

texts: when i click on Add product, i get the above error in the pic. Can anyone please help me on this how to solve?


texts: Magento2.2.5 Luma child theme not using default_head_blocks.xml in child theme folder

texts:
I have a Magento 2.2.5 based multi-store view website. What we want to do is take the Luma theme and create a custom child theme from it. Each store view (we have 3) would use its own child theme of the Luma theme.

The main difference is each child theme needs to use its own CSS file and some js files. The issue is even though I did an upgrade, compiled, deploy and assigned my theme to the store views my default_head_blocks.xml file does not seem to be loading from the child theme folder.

My folder structure is below.
app/design/frontend/Kiss/
  Then in the "Kiss" folder, I have 4 child theme folders
     luma
     storea_luma
     storeb_luma
     storec_luma

there are some files in the "luma" folder that I will have all 3 store views reference while other files will be referenced from the individual child theme folders.

so, for example, the footer related files for all three store views would ideally be loaded from the luma folder because it should be the same for all 3 store views.

My default_head_blocks.xml located in app/design/frontend/Kiss/sotrec_luma/web/layout/default_head_blocks.xml

now when I go to storec_luma store view and view console I don't see any of the files that are called in via the XML file??

I have read conflicting posts about the Luma theme can not be inherited.
just wondering what the above issue might be that's preventing my XML from loading in the store view.


texts: How does Magento_payment/transparent work?

texts:
I'm trying to get a payment gateway up and running, and it appears that the majority of the built-in payment gateways use the following code for their credit card form:

<iframe width="0"
    height="0"
    data-bind="src: getSource(), attr: {id: getCode() + '-transparent-iframe', 'data-container': getCode() + '-transparent-iframe'}"
    allowtransparency="true"
    frameborder="0"
    name="iframeTransparent"
    class="payment-method-iframe">
</iframe>
<form class="form" id="co-transparent-form" method="post"  data-bind="mageInit: {
    'transparent':{
        'context': context(),
        'controller': getControllerName(),
        'gateway': getCode(),
        'orderSaveUrl':getPlaceOrderUrl(),
        'cgiUrl': getCgiUrl(),
        'dateDelim': getDateDelim(),
        'cardFieldsMap': getCardFieldsMap(),
        'nativeAction': getSaveOrderUrl()
    }, 'validation':[]}">

    <!-- ko template: 'Magento_Payment/payment/cc-form' --><!-- /ko -->
</form>

However, when I press the Submit button, no credit card data is being passed to the server (I know this because when I look at Chrome's dev tools, none of the requests contain CC info, encrypted or otherwise).  This is true for my custom payment gateway, but I've tested it on Magento's Authorize.NET plugin, and it doesn't pass any credit card information, but still somehow manages to work.

How do I get the credit card info so I can pass it to my payment gateway?


texts: How to get only in-stock configurable option values in Magento2?

texts:
I want to get only the configurable option values which are ONLY in-stock.
For instance, assume 'size' is the configurable option and it's options are XS,S,M.L,XL,XXL. Product 'test' has only S,M,L and XL products are available. XS is out of stock. But when I call the function
$product->getTypeInstance()->getConfigurableOptions($product); it returns all the available sizes including XS. But I want it to be excluded.

Can someone give an idea on achieving this in the easiest manner without loading the associated products and looping through them? (because I want this value in the category page)

Any suggestions would be appreciated.
I'm using Magento EE 2.0.17

Thanks.


texts: Item (Magento\Cms\Model\Block) with the same ID "353" already exists

texts: This error appears when I'm trying to access one of the blocks. Any solutions?


texts:
I'm looking for a specific report. We need a monthly report of orders that includes the customer's name/address and what they purchased. (Magento 2.3.6)  I don't see this in the standard reports. My google searches have only come up with rather expensive packages of reports. Can anyone point me either a way to code this report or an add-on that doesn't include 40 reports I don't need?
Thanks Jeff


texts: Hoping for a POST as opposed to GET on sort selection

texts:
So, in my Magento code I have the following in the product list toolbar:

        <?php echo $this->__('Sort By') ?>
        <select onchange="setLocation(this.value)">
            <?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
                <?php if($_order=='Price High to Low'): ?>
                    <option value="<?php echo $this->getOrderUrl('price', 'desc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>
                        <?php echo $this->__($_order) ?>
                    </option>
                <?php elseif($_order=='Price Low to High'): ?>
                    <option value="<?php echo $this->getOrderUrl('price', 'asc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>>
                        <?php echo $this->__($_order) ?>
                    </option>
                <?php elseif($_order=='Price'): ?>
                <?php else: ?>
                    <option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
                        <?php echo $this->__($_order) ?>
                    </option>
                <?php endif; ?>
            <?php endforeach; ?>
        </select>

It works fine, with one small exception. It adds ?dir=asc&order=price to the end of the query when selecting "Price Low to High". The problem here is that our SEO team says that Google will count this as a distinct page from the original, and therefore drop us down in rankings due to having differing pages with identical content.

Is there any way to SEND this information via $_POST as opposed to $_GET ?


texts:
For my project I need to empty current quote and add new products from quotation (custom module, and all programmatically).

But, when I add some products (5000 for my tests), I have an error because I don't have stock for this product.

For my test, I need to add product with custom price and custom quantity.
At this moment, I have this code :

$cart = Mage::getModel('checkout/cart');
    $quoteItems = Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection();
    foreach($quoteItems as $item)
        $cart->removeItem($item->getId());

    // Nouveau panier
    $devisItems = Mage::getModel('devis/detail')->getCollection()->addFieldToFilter('devis_id', (int)$quote_id);
    foreach($devisItems as $item)
    {
        $product = Mage::getModel('catalog/product')->load($item->getOfferId());
        $cart->addProduct($product, 1);
    }
    $cart->save();
    Mage::getSingleton('customer/session')->setCartWasUpdated(true);

Can you help me ? Thanks


texts: How can I point admin action method to other than `indexAction()`?

texts:
In my module, I am setting up my menu like this.

 <menu>
     <catalog>
        <children>
            <rkt_arattr translate="title" module="rkt_arattr">
                <title>Manage My Custom Attribute</title>
                <sort_order>100</sort_order>
                <children>
                    <install_attr translate="title" module="rkt_arattr">
                        <title>Install My Attribute</title>
                        <action>adminhtml/catalog_arattr_install</action>
                        <sort_order>10</sort_order>
                    </install_attr>
                </children>
            </rkt_arattr>
        </children>
     </catalog>
 </menu>

The code that you need to concentrate is action

 <action>adminhtml/catalog_arattr_install</action>

For this value, my url looks like this

  www.mydomain.com/admin/catalog_arattr_install/index/key/[key_value]

As per this ulr, Magento expects a controller setup like this.

File : app/code/local/Namespace/Modulename/controllers/Adminhtml/Catalog/Araattr/InstallController.php

<?php
class Namespace_Modulename_Adminhtml_Catalog_Arattr_InstallController extends Mage_Adminhtml_Contorller_Action
{
     public function indexAction()
     {

     }
}

However this is not what I want.. I need my url parse like this.

  www.mydomain.com/admin/catalog_arattr/install/key/[key_value]

Means I want the below method get called when click on the menu

File : app/code/local/Namespace/Modulename/controllers/Adminhtml/Catalog/ArattrController.php

<?php
class Namespace_Modulename_Adminhtml_Catalog_ArattrController extends Mage_Adminhtml_Contorller_Action
{
     public function installAction()
     {

     }
}

But it seems that, magento always looks for indexAction() when we setup a menu.

Is there any way to direct to my custom action when click on the menu ?


texts:
I have created a new javascript file to validate my customers emails while they are registering. I followed this link, however my js file is not loading.

my js is in public_html/js/newValidate.js with content:

Validation.add('validate-email', 'Please enter a valid Gmail address. For example johndoe@gmail.com.', function(v) {
return Validation.get('IsEmpty').test(v) || /^([a-zA-Z0-9]+[a-zA-Z0-9._%-]*@gmail\.com)$/i.test(v)
})

and I am including the js file editing the  public_html/app/design/frontend/base/default/layout/page.xml

<default translate="label" module="page">
    <label>All Pages</label>
    <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">

        <block type="page/html_head" name="head" as="head">
            <action method="addJs"><script>prototype/prototype.js</script></action>
            <action method="addJs"><script>lib/ccard.js</script></action>
            <action method="addJs"><script>prototype/validation.js</script></action>
            <action method="addJs"><script>scriptaculous/builder.js</script></action>
            <action method="addJs"><script>scriptaculous/effects.js</script></action>
            <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
            <action method="addJs"><script>scriptaculous/controls.js</script></action>
            <action method="addJs"><script>scriptaculous/slider.js</script></action>
            <action method="addJs"><script>varien/js.js</script></action>
            <action method="addJs"><script>varien/form.js</script></action>
            <action method="addJs"><script>varien/menu.js</script></action>
            <action method="addJs"><script>mage/translate.js</script></action>
            <action method="addJs"><script>mage/cookies.js</script></action>

            <!-- CUSTOM JS BELOW THIS POINT -->
            <action method="addJs"><script>newValidate.js</script></action>
            <!-- CUSTOM JS ABOVE THIS POINT -->

However I can't find the js file in the page why is that?


texts: Magento 1.9.x Removing the invoice link from Account Order info pages

texts:
The store I am working on handles wholesale orders only and the only functionality I want in the customer account order history area is for the customer to view their orders/status's and delivery, but not the invoice (which is part of a completely different system).
On the Order info/history page after an order has been completed and shipped, there are three links on the top of the page for "order information", "invoices" and "deliveries" by default.
I want to remove the "invoices" link.
I've found where this is coming from (sales.xml located in app/design/frontend/base/default/layout/) on the following line:

<action method="addLink" translate="label" module="sales"><name>invoice</name><path>*/*/invoice</path>Invoices</action>

There are 6 occurrences of the above line (for different views such as order detail, shipments, credit memo, invoice etc...) so by commenting them all out it works:

But I don't really like editing the base files. I tried moving "sales.xml" to my theme folder but then found that my custom order e-mails were missing the footer, having found they also rely on sales.xml and template files it refers to in the base template folder so I'd rather not go there.

Can this over-ridden using the local xml? Or is there a better method?


texts:
Hi How can I move color option another place in product cart file view.phtml. I found code

 <?php if ($_product->isSaleable() && $this->hasOptions()):?>
 <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
 <?php endif;?>

but this is generate option color together whit button add to cart I want split add to cart and color option.


texts: how to move this section in a grey area after add to cart

texts:
how can i move this section in a grey box after add to cart area

this is a product view page i am trying it n catalog.xml but it is not working

<reference name="product.info">
        <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" after="-" template="catalog/product/view/type/default.phtml">
            <block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
                <label>Product Extra Info</label>
            </block>
        </block>
    </reference>


texts: how to remain in same page when i click on compare button in magento 1.9

texts: When clicking on the add to compare button, I want to remain on the same page & perform the add function without redirecting to the homepage - is this possible?


texts: M2: The URL key for the selected store already exists

texts:
Sometimes during import products we receive issue:
The URL key for the selected store already exists.

We have found one website with solution:

https://www.human-element.com/url-key-specified-store-already-exists-magento-2/

but I see this path:
not be compatible with versions of Magento 2.1.8 and above

our version magento is 2.2.5

Can anyone check it for us if this solution will work on our version?

@update

We try install this path but during setup:di:compile issue:

 [Exception]
  Warning: Declaration of HE\UrlkeyRewrite\Model\ProductUrlRewriteGenerator::
  generateForGlobalScope($productCategories) should be compatible with Magent
  o\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator::generateForGlobalScop
  e($productCategories, $product = NULL, $rootCategoryId = NULL) in /home/user/domains/website.com/public_html/app/code/HE/UrlkeyRewrite/Model/ProductU
  rlRewriteGenerator.php on line 50

code producturlrewritegenertor.php

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace HE\UrlkeyRewrite\Model;

use Magento\Catalog\Model\Product;
use Magento\CatalogUrlRewrite\Model\Product\CanonicalUrlRewriteGenerator;
use Magento\CatalogUrlRewrite\Model\Product\CategoriesUrlRewriteGenerator;
use Magento\CatalogUrlRewrite\Model\Product\CurrentUrlRewritesRegenerator;
use Magento\CatalogUrlRewrite\Model\Product\AnchorUrlRewriteGenerator;
use Magento\CatalogUrlRewrite\Service\V1\StoreViewService;
use Magento\Store\Model\Store;
use Magento\Catalog\Model\Product\Visibility;

class ProductUrlRewriteGenerator extends \Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator
{

    /**
     * Generate list of urls for global scope
     *
     * Update adds in a clone of the collection and setting the storeId
     * Variation of this post:
     * https://magento.stackexchange.com/questions/169352/magento-2-url-key-for-specified-store-already-exists
     *
     * @param \Magento\Framework\Data\Collection $productCategories
     * @return \Magento\UrlRewrite\Service\V1\Data\UrlRewrite[]
     */
    protected function generateForGlobalScope($productCategories)
    {
        $urls = [];
        $productId = $this->product->getEntityId();
        foreach ($this->product->getStoreIds() as $id) {
            if (!$this->isGlobalScope($id)
                && !$this->storeViewService->doesEntityHaveOverriddenUrlKeyForStore($id, $productId, Product::ENTITY)
            ) {
                // Default: $urls = array_merge($urls, $this->generateForSpecificStoreView($id, $productCategories));
                // before loading the category collection by looping it, clone it and set the correct store id,
                // so we get the correct url_path & url_key for that specific store id
                $storeSpecificProductCategories = clone $productCategories;
                $storeSpecificProductCategories->setStoreId($id);

                $urls = array_merge($urls, $this->generateForSpecificStoreView($id, $storeSpecificProductCategories));
            }
        }
        return $urls;
    }

}


texts: Bulk delete tier price and tier price customer group

texts:
How do you bulk delete tier price and tier price customer group?

Is it possible to do it by Magento Import or Magmi?


texts: How to add simple product ID to swatch data on category page

texts: How can I add simple product ID of the swatch on category page?


texts: Magento2 performance load : Constructor initialize or use Object manager Directly?

texts:
It seems to be differnt ways to call the helper or model classes.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$objectManager->create('Magento\Framework\Pricing\Helper\Data');

Or

protected $helper;
public function __construct(
    Magento\Framework\Pricing\Helper\Data as  $helper,
) {
    $this->helper = $helper;
}

I think second option is better one.

But is there any server load , memory usage or performance difference between two ?


texts: magento 2 not reindexing two indexers - Catalog Product Rule and Product Categories

texts:
i try to Reindexing Using this command :bin/magento indexer:reindex

It says it's updated all the indexers but when i return to index management in the admin these two indexers (Catalog Product Rule and Product Categories)

I have to do these manually by resetting them.

Ideally i want them to reindex at the same time as the others using a cron job.

Can anyone help me in getting this fixed?

here is a screenshot of my index management


texts: How to get product by custom attribute in magento 2

texts:
I want get product by custom attribute

My code :

protected $product;

public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Catalog\Model\Product $product
)
{
    $this->product = $product;
    return parent::__construct($context);
}
$productId = $this->product->loadByAttribute('ean', 123456);

or

$productId = $this->product->loadByAttribute('price', 100);

Example : Get id product by price, ean, color ...

Please help me, thanks all


texts: Virtual Products that require processing

texts:
I have a store that sells downloadable products (that don't require further processing) and virtual products that DO require further processing.

Downloadable products bought correctly change their status to complete.
Once a virtual product is bought I want the order status to change to "processing" or "being processed" so that we can tell that more work is needed.

Can someone recommend a way to set Virtual products to go to a custom status once invoiced but downloadable products to keep doing what they are doing?


texts: Onepagecheckout -> Programmatically fill out shipping form with billing address (guest)

texts:
Onepagecheckout: If I jump back to shipping address (i.e. from step shipping method or payment method) then  I do see an empty shipping address form.

Since I "force" the customers to use billing address as shipping address I want to pre populate the shipping fields with billing address
(automatically fill out shipping address for guests by using billing address).

The concerning template is frontend/default/mytheme/template/checkout/onepage/shipping.phtml.

All shipping fields would get filled out automatically if a customer is logged in because all fields have values like

value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>

So actually my goal is to overwrite $this->getAddress() with the data from billing address. But I can't get it to work!

What I got so far in

frontend/default/mytheme/template/checkout/onepage/shipping.phtml

// Load billing address
$checkout = Mage::getSingleton('checkout/session')->getQuote();
$bilAddress = $checkout->getBillingAddress();

// Load customer model
$customAddress = Mage::getModel('customer/address');
$customAddress->setData($bilAddress);

// Now I want to set billing address as shipping address. But none of these 3 approaches work.
$checkout->setShippingAddress(Mage::getSingleton('sales/quote_address')->importCustomerAddress($customAddress));
$this->setShippingAddress(Mage::getSingleton('sales/quote_address')->importCustomerAddress($customAddress));
$checkout->getShippingAddress()->setSameAsBilling(true);

Can anyone point me in the right direction? I ran out of ideas.
Thank you very much for any help! I appreciate it!


texts: How do I use email variables in phtml in Magento 2.2.x

texts:
I need to get the value of an email variable in a phtml file so I can test the value.

In transactional emails I would use, as an exmaple

<td>"Delivery Date" : {{var deliveryDate}}</td>

to render the order specific value for the order delivery but that doesn't work in phtml if I try and do something like

<?php $originaldate = {{var deliveryDate}}; ?>
<?php $newDate =  date('Y-m-d', strtotime($originaldate. ' + 10 days')); ?>
<?php echo $newDate; ?>

When I do this it doesn't return a value and I don't know how to get order or transactional email variables in phtml.

Sorry if this a bit basic but I'm a bit new to some of this and would appreciate your help.


texts: Create Shipping Label not working in Magento 2.4.2

texts:
When viewing a shipment in Magento 2.4.2, the "Creating Shipping Label..." button opens the "Create Packages" dialog as expected.
However, the "Add Products to Package" button, which should display a grid that allows items from within the shipment to be added to the package, does nothing. There are no console or log errors, it simply fails silently.
Has anyone else encountered this issue, and is there a fix for it?


texts:
I have to create category in Magento backend, it display to front end, can it possible if category name is Ex. like Football, and when i click it football category, it redirect to another sites link?

Ex. Category 1 Is Football -> Site 1 Name Like Ex. www.football.com and when click Football category its Redirect It Site 2 Like Ex. www.hockey.com

Pls Help And Suggest Some Ideas.


texts: I want to reduce the number of requests to optimize a Magento website. Merged JS and CSS files but it didnt work for me.


texts: Magento 2 how to create shipment in order event?

texts:
I'm trying to create the shipment of the order just after the order is created. I'm using the event sales_order_place_after.

Here is my code
, I'm running this method in execute(), and getting the order with  $order = $observer->getEvent()->getOrder();

 public function createShipment($order){
        $this->logger->info("Inside Shipment function");
        $orderShipment = $this->_convertOrder->toShipment($order);

        foreach ($order->getAllItems() AS $orderItem) {

         $qty = $orderItem->getQtyToShip();
         $shipmentItem = $this->_convertOrder->itemToShipmentItem($orderItem)->setQty($qty);
         $orderShipment->addItem($shipmentItem);
        }

        $orderShipment->register();
        $orderShipment->getOrder()->setIsInProcess(true);

        try{
             // Save created Order Shipment
             $orderShipment->save();
             $orderShipment->getOrder()->save();

             // Send Shipment Email
             $this->_shipmentNotifier->notify($orderShipment);
             $orderShipment->save();
             $this->logger->info("SHIPMENT CREATED!!!!");

        } catch (\Exception $e) {
            throw new \Magento\Framework\Exception\LocalizedException(
            __($e->getMessage())
            );
        }

    }

When I try to place the order in frontend, I get the following error>

I don't know what I'm doing wrong.
Greetings!


texts:
I am writing an uncomplicated install script

$table->addColumn(
    'name',
    Varien_Db_Ddl_Table::TYPE_VARCHAR,
    255,
    array(
        'nullable' => false,
    )
);

i need this column to only have unique values (it is not the tables primary key), also is there a way to only allow lowercase and no special characters (only a-z)


texts: how to display category with image in magento 2 without using object manager?

texts:
i want to get categories with image at home page, for this i use below code, but i get only category name, its not display category image.
<?php
  $categoryHelper = $this->helper('Magento\Catalog\Helper\Category');
  foreach($categoryHelper->getStoreCategories() as $category):
?>

    <a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>">
        <img src="<?php echo $category->getImageUrl() ?>"><?php echo $category->getName() ?>

<?php endforeach; ?>

please help me on this, how to get category image in this code?


texts: Orders not being created with recurring profile products

texts:
I had a customer sign up for a reccurring profile product and they checked out using Paypal as a payment method.

Magento created a Recurring Payment Profile for her to be charged once a month, but it did not create an order.

For orders placed using our other payment methods a recurring payment profile is created as is an order.

Is there something I need to configure further with Paypal/Magento to have the order and profile created? Has anyone else had this issue?

Thanks


texts: Get just the SIMPLE products ordered from a quote when Configurable Products are purchased

texts:
I have an observer attached to sales_order_place_before and from that event I am getting the order items using

   $event = $observer->getEvent();
   $order = $event->getOrder();
   $items = $order->getQuote()->getAllItems();

When I log these items in a foreach like so I get double the amount of products. That is, I get the configurable AND the simple product

foreach($items as $item){
            $product = $item;
            $sku = $product->getSku();
            $name = $product->getName();
}

If I change the $items call to be $items = $order->getQuote()->getAllVisibleItems(); then I can get just the configurable products, but I want to get just the simple products.

My question is, how can I get just the simple products from the order.


texts:
To get all categories I'm using this:

$categories = $this->helper('catalog/category')->getStoreCategories(false, true);

How I can add description to this collection?


texts: Calling product description into custom module Magento 2

texts:
New to Magento 2 and hit a bit of a hurdle I can't seem to find the answer to.

I'm trying to add the product description into a custom module that's called inside of the product page.

I've tried copying the line inside of description.phtml

<?= /* @escapeNotVerified */ $this->helper('Magento\Catalog\Helper\Output')->productAttribute($block->getProduct(), $block->getProduct()->getDescription(), 'description') ?>

however I get a white page error with no error message when I try this.

I feel like I'm missing something pretty obvious.

Any help appreciated.


texts: Fatal error: Uncaught Error: Call to a member function getSize() on null - product\list\toolbar.phtml on line 18

texts:
In Magento 2 I just want to move toolbar before breadcrumbs so to do so I've placed following code in my custom theme catalog_category_view.xml

<move element="product_list_toolbar" destination="page.top" before="breadcrumbs" />

But in frontend I'm getting error.

( ! ) Fatal error: Uncaught Error: Call to a member function getSize() on null in \frontend\Vender\Theme\Magento_Catalog\templates\product\list\toolbar.phtml on line 18

What is this error?? How can I solve it??


texts: not able to install 2.3.0 : Invalid template file

texts:
Issue

  Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid
  template file:
  'C:/xampp/htdocs/magento/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml'
  in module: '' block's name: 'require.js'

 C:\xampp\htdocs\magento\vendor\magento\framework\View\Element\Template.php(301): Magento\Framework\View\Element\Template->fetchView('C:/xampp/htdocs...')
#1 C:\xampp\htdocs\magento\vendor\magento\framework\View\Element\AbstractBlock.php(668): Magento\Framework\View\Element\Template->_toHtml()
#2 C:\xampp\htdocs\magento\vendor\magento\framework\View\Result\Page.php(249): Magento\Framework\View\Element\AbstractBlock->toHtml()
#3 C:\xampp\htdocs\magento\vendor\magento\framework\View\Result\Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#4 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#5 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#6 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#7 C:\xampp\htdocs\magento\generated\code\Magento\Framework\View\Result\Page\Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#8 C:\xampp\htdocs\magento\vendor\magento\framework\App\Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#9 C:\xampp\htdocs\magento\generated\code\Magento\Framework\App\Http\Interceptor.php(24): Magento\Framework\App\Http->launch()
#10 C:\xampp\htdocs\magento\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
#11 C:\xampp\htdocs\magento\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#12 {main}


texts: Magento 2 - Join product collection to custom table

texts:
I have created a custom module, that allows commenting, well now I have created admin grid and there is a little problem. Hope you can help!
My custom module's table:

comment_id | product_id | created_at | email | name | comment | status_id

And my adming grid:

date | product_name (which displays product_id for now) | name | comment | status

So my first question is, how can I join product collection to my
custom table, so I could be able to display product name in the product name column?
And my second question is, I have table status_id in database table and values are 1 and 0, how can I display these ID'š in admin grid as "approved" and "not approved"?

I created my admin grid using UI component.

EDIT:
OK now I'm trying to do it like this. Collection class:

<?php

namespace Magebit\ProductComments\Model\ResourceModel\Comments;

use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Collection extends AbstractCollection
{
    /**
     * Define model & resource model
     */
    protected function _construct()
    {
        $this->_init(
            'Magebit\ProductComments\Model\Comments',
            'Magebit\ProductComments\Model\ResourceModel\Comments'
        );
    }

    protected function initSelect()
    {
        parent::_initSelect();
        $this->getSelect()->joinleft(
            ['catalog_product_entity_varchar' => $this->getTable('catalog_product_entity_varchar')],
            'main_table.product_id = catalog_product_entity_varchar.entity_id',
            ['product_name' => 'value']
        );

        return $this;
    }
}

And then in ui component listing.xml:

<column name="product_name">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">text</item>
            <item name="editor" xsi:type="array">
                <item name="editorType" xsi:type="string">text</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">true</item>
                </item>
            </item>
            <item name="label" xsi:type="string" translate="true">Product Name</item>
        </item>
    </argument>
</column>

But it's not working, is there something else I should do?


texts:
I'm getting this strange behavior in the backend, I'm getting log out much frequent.

Session Lifetime (seconds) is set to about 180 minute (configuration->advanced->admin->security)
Cookie Lifetime is set to 60 min ( configuration->web->Session Cookie management

What else could I check ?

What is the full list of server configuration parameters that could be involved here ( for ex. gc_maxlifetime )
Any hint how to debug this kind of issue ?

Update
On our staging server the issue is not present I have compared values for server configuration but everything looks same the main difference is that on live site we are using https in the backend ... could it be related ?

Update 2

Live server is using memcache for storing session ... I suspect this can be the issue


texts: How to set Zero Subtotal Checkout after applying coupon, which makes grand total to 0

texts:
In my project at admin panel I have set Store->Configuration->Sales->Payment Method->Ccavenuepay and Minimum Order Total to 1 or 0.1.

On checkout page when I apply the discount coupon, my grand total becomes zero. In that case, it should show message No Payment Information Required as per set in admin panel. but it shows No payment methods available message. And when I refresh the page then it shows No Payment Information Required and then after a second shows all payment method which I am using. Can somebody please help me with this issue?


texts: Magento 2 Dynamically Add file uploader in system config

texts:
How to add a file uploader render in a dynamically added rows?

something like:

But in dynamically added Like:

Let say before or after drop down and the input text field?

Best!


texts: I want to spilt the orders by product. If the customer place an order with the two products eg:- Product A and Product B in his orders then while checkout that specific order is split into two orders eg:- Product A in one order and Product B in second order.


texts: wampserver and magento 2 installed on local server

texts:
I get an error 404 when I run Magento on my local host

I have named my domain as rednsoft

Magento is running on wampserver


texts:
When I try to search something using Magento catalog search, it gives me back a blank page?

I am using these settings

minimum length: 3 characters before start search
maximum length 128
search engine: mysql fulltext
Enable Search Recommendations: yes
Search Recommendations Count: 5
Show Results Count for Each Recommendation: no
search type: combined

Fabio Codebue


texts: Profiler: every page load produces twice entries in aoe profiler runs grid. Is frontend "executed" twice?

texts:
I'm currently doing some bottleneck hunting on my M1.
I've installed AOE Profiler.
I do some test on category page.

In the backend (System > AOE Profiler) I noticed there is twice entries at every page run (with a delay of ~3 seconds)!

Is that normal (profiling related)?
If not, means my performance problems are probably caused by this...

Thank you for your feedback.


texts: How to store data on product import success in database using Magento2?

texts:
I want to store product data wieh
import start time,
import end time,
Product name,
Product Sku,
Status,
Error
fields in my custom table

once data imported successfully.


texts: Remove currency symbol of price type product attribute from admin product form

texts:
I've added price type product attribute for the product sorting, here is the screenshot:-

http://nimb.ws/Wqat3J

How can I remove currency symbol?

Waiting for the reply!


texts:
In Magento 2.3 how to programmatically increase product views count?.
I need it to increase the product views count when the product is viewed on an mobile app.


texts:
I want to fire select query which is as follows

SET @a = 0;
SELECT @a:=@a+1 as count FROM admin_user;

How I can add SET variable in SQL query in magento.


texts: Upgrading to Magento 2.0.5 gives Class 'cms/block' not found

texts:
I just upgraded to 2.0.5 and get the following error in apache log.

  PHP Fatal error:  Class 'cms/block' not found in
  /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on
  line 97


texts:
when I open up a magento2 module.xml file, I see the location of the default module.xsd schema, if there is not a schema already set, defined like this :

xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd

which resolves to the file :

vendor/magento/framework/Module/etc/module.xsd

My questions, although it may be stupid, is how does it know that

urn:magento: resolves to vendor/magento/

I am really interested about that.


texts: Magento 1.9 Include vat tax if in checkout and regisiter

texts: When the customer is doing checkout and register at the same time, the VAT ID specified in the billing address its not taken in consideration. This is normal because looks like magento registers the user after the order has been completed. How can I register the user before the order is completed or calculate the final amount depending on the VAT also before the oreder takes place?


texts: How does Magento 2 process ko statements and how to use them?

texts:
In Magento 2 templates I've found some ko statements such as

<form class="form form-shipping-address" id="co-shipping-form" data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">

        <input type="checkbox" class="checkbox" id="shipping-save-in-address-book" data-bind="checked: saveInAddressBook" />

I understood it has something to do with knockoutjs but I'm not used of this library at all.

how does Magento process such statements ?
how to use those statements in a custom module ?


texts: How to setup same GIT repository for development, build and production

texts:
As stated in Magento Docs for Development System and in Magento Docs for Build and Production System (Quote from Build Server explanation):

  All Magento code is under source control in the same repository as the
  development and production systems

Then there are two different .gitignore files (Docs), one for development, and for for build and production.

I am struggeling to keep up with that. How to keep everything in the same repo, but use different .gitignore files?

On Build Docs, they explain it this way:

  Retrieve the Magento code from source control.
  If you use Git, open .gitignore in a text editor.
  Start each of the following lines with a # character to comment them out:
  [...]
  Save your changes to .gitignore and exit the text editor.
  If you use Git, use the following commands to commit the change:

  git add .gitignore && git commit -m "Modify .gitignore for build and production"

So, wouldn't this effectively change the .gitignore file also for the development environment? There are using the same repo.


texts: Google certified shops "google_base_offer_id" not updating when navigating to another product page

texts:
I currently use the below code in the footer of my Magento store to display the Google Certified Shops badge...

<script type="text/javascript">
    var gts = gts || [];

    gts.push(["id", "12345"]);
    gts.push(["badge_position", "BOTTOM_RIGHT"]);
    gts.push(["locale", "en_GB"]);
    gts.push(["google_base_offer_id", "<?php if (Mage::registry('product')) { echo Mage::registry('current_product')->getId(); } ?>"]);
    gts.push(["google_base_subaccount_id", "123456"]);
    gts.push(["google_base_country", "GB"]);
    gts.push(["google_base_language", "en"]);

    (function() {
        var gts = document.createElement("script");
        gts.type = "text/javascript";
        gts.async = true;
        gts.src = "https://www.googlecommerce.com/trustedstores/api/js";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(gts, s);
    })();
</script>
<!-- END: Google Certified Shops -->

My probelem is with the code

gts.push(["google_base_offer_id", "<?php if (Mage::registry('product')) { echo Mage::registry('current_product')->getId(); } ?>"]);

This piece of code is meant to get the product ID IF the user is on a product page, and it does but only if I clear my sites cache and then load a product page.
If I then navigate to another product page the value stays the same and doesn't update.
I have tried wrapping the code into an on load function to force it to run again but I still doesn't update each time a new page is loaded.

Any ideas?


texts: Magento 2 admin dropdown multiselect no fields for options

texts:
I can not edit or add new attribute with dropdown or multiselect (I have no fields for options).
I try to clean cache, reindex, deploy files, but nothing
No errors on console
CSS and JS was Merged! I try and set to No and again is the same.

Magento version 2.2.2 - latest release
php 7.0
mysql mariadb


texts:
I'm using Magento 2.1 When I try to reset my password by using forgot password link, I get following error.

  Error : We're unable to send the password reset email.


texts:
I've installed a magento site locally with MAMP and the homepage works. However, when I go to any other page so products for example I'm getting an 404 error.
If I change the url to include index.php it works though.

So for example my homepage url is
http://localhost:8888/test-site/

If I got to
http://localhost:8888/test-site/accessories
I'm getting a 404 error

However, if I go to
http://localhost:8888/test-site/index.php/accessories
it works

I've changed the base_url etc. in the db to http://localhost:8888/test-site/ .  so that shouldn't be the issue.
Any ideas what the issue could be?


texts: After Tranfer to New Domain all Links redirect to Old Domain

texts:
I have magento store on penhouse.co.in and I transfer it to penhouse.in

Also Changed core_config_data with base_url and deleted cache from var/cache directory.

But still the penhouse.in redirected to penhouse.co.in.
Please Suggest any Solution.


texts: How can I change the width of main column in 2 column layout in Magento 2

texts: I want to have a 2 column layout and I want to add some margin on the left to the main column and reduce it's width. And I want this feature only on selected pages so I made a custom layout for that, please help me to achieve this goal.


texts: why magento2 is Showing multiple images on product detail page?

texts: why magento2 is showing multiple images on product detail page? I am importing just base image through CSV file. I just want that one image on product detail page. but on product detail page i am getting multiple images that belongs to other products. Here is the file Screenshot


texts:
Backorders are disabled in system > configuration > catalog > inventory but a customer bought a product with quantity 0, so after he purchased it, product's quantity became -1.
How is it possible?
I want that the customers can't buy a product with quantity 0.


texts: How to get product image with product url and attribute option id in order view page magento

texts:
My Account => Order => View Order page

  Example of Product url + att.

http://example.com/dress-prova-attributes.html?attr=59
and open product detail page then select the color attribute option.


texts: Product page custom container after image

texts:
I want to place a custom container inside the product wrapper on the category page. I have already tried

 <referenceContainer name="content">
            <container name="custom.description" htmlTag="div" htmlClass="custom-description" befor="-">
            </container>
        </referenceContainer>

But it does not work in my case.

I just need to add a container between image and description. Actually I want to add a description in my custom container but add to cart button remains at that position.

Any help would be appreciated..!

Thanks in advance..!


texts:
I want to create a restful controller action in my module. But so far all example I can see are in this format http://mywebsite.com/mycustommodule/controller/action but what I want to build is something like http://mywebsite.com/mycustommodule/controller/action/param1/param2 is this possible in Magento 2?
My folder structure is like this
app
 - code
    - Vendor
       - Module
           - Controller
               - MyController
                    - TheAction.php

So all parameter being pass after TheAction.php should be considered as parameter. It doesn't have to be dynamic as long as the parameter is part of the URL. How do we do that?


texts: Magento 2 Css and javascript not loading

texts:
i migrated magento 2 to a new server, but the problem is that, my css and javascript does not load, i tried:

removing the cache,
php bin/magento setup:static-content:deploy,
Opened up app/etc/di.xml find the path
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink
and replace to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy


texts:
I've developed a on demand product building shop where user can create product by selecting their desired type of glass.

Task is: I need to show the shipping charges via Fedex price and product dimensions are with me, Shipping calculated will also applied the checkout.

I'm exploring the : Fedex.php located at app\code\core\Mage\Usa\Model\Shipping\Carrier

Anybody has idea that could save time...very appreciated in advance.
Thanks


texts: SUPEE-10266 cannot be applied to 1.9.3.2

texts:
I am experiencing issues patching the new SUPEE 10266 on Magento 1.9.3.2

The files where the hunks start failing have not been modified by me. Anyone else experiencing the same issue or have managed to resolve this, please share.

$ sh PATCH_SUPEE-10266_CE_1.9.3.2_v1-2017-09-13-06-38-58.sh
PATCH_SUPEE-10266_CE_1.9.3.2_v1-2017-09-13-06-38-58.sh: 14: PATCH_SUPEE-10266_CE_1.9.3.2_v1-2017-09-13-06-38-58.sh: 127: not found
PATCH_SUPEE-10266_CE_1.9.3.2_v1-2017-09-13-06-38-58.sh: 14: PATCH_SUPEE-10266_CE_1.9.3.2_v1-2017-09-13-06-38-58.sh: 127: not found
PATCH_SUPEE-10266_CE_1.9.3.2_v1-2017-09-13-06-38-58.sh: 25: PATCH_SUPEE-10266_CE_1.9.3.2_v1-2017-09-13-06-38-58.sh: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

checking file app/code/core/Mage/Admin/Model/Session.php
checking file app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php
checking file app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php
checking file app/code/core/Mage/Adminhtml/Controller/Action.php
checking file app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
checking file app/code/core/Mage/Adminhtml/controllers/CustomerController.php
checking file app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php
checking file app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php
checking file app/code/core/Mage/Checkout/controllers/CartController.php
Hunk #1 succeeded at 267 (offset -17 lines).
Hunk #2 succeeded at 686 (offset -25 lines).
checking file app/code/core/Mage/Core/Model/Email/Template/Abstract.php
Hunk #1 succeeded at 251 (offset 16 lines).
checking file app/code/core/Mage/Core/Model/File/Validator/Image.php
Hunk #1 succeeded at 90 (offset -1 lines).
checking file app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
Hunk #1 succeeded at 135 (offset -1 lines).
Hunk #2 succeeded at 162 (offset -1 lines).
checking file app/code/core/Mage/Core/etc/config.xml
Hunk #1 succeeded at 459 (offset -8 lines).
checking file app/code/core/Mage/Rss/Helper/Data.php
checking file app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php
checking file app/code/core/Zend/Serializer/Adapter/PhpCode.php
checking file app/design/adminhtml/default/default/template/backup/dialogs.phtml
Hunk #1 FAILED at 120.
Hunk #2 FAILED at 151.
2 out of 2 hunks FAILED
checking file app/design/adminhtml/default/default/template/catalog/product/edit/options/type/file.phtml
checking file app/design/adminhtml/default/default/template/customer/tab/view.phtml
checking file app/design/adminhtml/default/default/template/login.phtml
Hunk #1 FAILED at 58.
1 out of 1 hunk FAILED
checking file app/design/adminhtml/default/default/template/notification/toolbar.phtml
checking file app/design/adminhtml/default/default/template/oauth/authorize/form/login-simple.phtml
Hunk #1 FAILED at 58.
1 out of 1 hunk FAILED
checking file app/design/adminhtml/default/default/template/oauth/authorize/form/login.phtml
Hunk #1 FAILED at 46.
1 out of 1 hunk FAILED
checking file app/design/adminhtml/default/default/template/resetforgottenpassword.phtml
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED
checking file app/design/adminhtml/default/default/template/sales/order/view/history.phtml
checking file app/design/adminhtml/default/default/template/sales/order/view/info.phtml
checking file app/design/install/default/default/template/install/create_admin.phtml
Hunk #1 FAILED at 66.
1 out of 1 hunk FAILED
checking file app/locale/en_US/Mage_Adminhtml.csv
checking file downloader/template/login.phtml
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED


texts: Order Confirmation Email ends up in the SPAM folder

texts:
Magento 1.9.1
Sendgrid free version

We use the Sendgrid free version to send out the Confirmation Emails to customers...it worked great but now it seems many people get the Confirmation Email in their SPAM folder. I checked with the hosting company and we are not blacklisted anywhere. What can we do to change this?

Shall we change the FROM Email address? (It comes from sales@.... now) or the Subject line? Would upgrading Sendgrid to the paid version help?


texts: Adding a subdirectory path in url to website url

texts:
I am trying to set up magento 2 in a subdirectory via nginx ? i want my url to be

http://mywebsite.com/shop/

If I run my website with base url : http://mywebsite.com/ .It works but when I add /shop/ it doesn't. I have tried a lot many things but still not able to figure out.

FYI : I am not trying to make a store here as other stack overflow solutions have suggested. I just want the subdirectory path in the url.
Also I am using the nginx.conf.sample

I kept mostly everything same in nginx.conf but with this addition :

location /shop {
    try_files /shop/pub /shop/pub /index.php$is_args$args;
}

and

location /shop/static/ {
    # Uncomment the following line in production mode
    # expires max;

    # Remove signature of the static files that is used to overcome the browser cache
    location ~ ^/shop/static/version {
        rewrite ^/shop/static/(version[^/]+/)?(.*)$ /static/$2 last;
    }

    location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2|json)$ {
        add_header Cache-Control "public";
        add_header X-Frame-Options "SAMEORIGIN";
        expires +1y;

        if (!-f $request_filename) {
            rewrite ^/shop/static/?(.*)$ /static.php?resource=$1 last;
        }
    }
    location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
        add_header Cache-Control "no-store";
        add_header X-Frame-Options "SAMEORIGIN";
        expires    off;

        if (!-f $request_filename) {
           rewrite ^/shop/static/?(.*)$ /static.php?resource=$1 last;
        }
    }
    if (!-f $request_filename) {
        rewrite ^/shop/static/?(.*)$ /static.php?resource=$1 last;
    }
    add_header X-Frame-Options "SAMEORIGIN";
}

The static resource loads fine but the page is giving me 404 error. Don't understand what might be the issue here ?


texts:
I have just installed the SEBIAN theme, and i set up the magento secure base url and unsecure base url with my domain url like "http://diran.co/" but when i want to click on home menu and logo it is redirecting or displaying "http://diran.co/fashion". I dont want it to be !

How can i fix it ?


texts: Is there any way to create new url route?

texts:
I wanna create a page with custom url route. Do you have some references for me? I really frustated because stuck in two days.

I wanna create page like this:

www.myWeb.id/custom-route/

Please help me.


texts: Magento 2 static file paths incorrect after migration

texts:
After manually moving Magento 2.2.4 site to a Windows IIS server, the pages are blank. Only a few lines of HTML is loaded, and I can see in the body tag there is an incorrect static file path:

mydomain.com/pub/static/frontend/_view/en_GB/images/loader-2.gif

I believe this should be:

mydomain.com/pub/static/frontend/<vendor>/<theme>/en_GB/images/loader-2.gif

Any idea where the _view is coming from and what might be causing it?

Cache has been flushed, static files have been generated. I can see static files on the server in correct directories.

I know Magento 2 doesn't officially support Windows, but a fresh install of Magento 2 works fine on this same environment with some small edits.


texts: FedEx shipping is not showing up when check out for specific country

texts:
I have added Puerto Rice to 'Ship to Specific Countries' on FedEx Shipping config.
US and Canada are also on that list.

When I check out with US or Canada, It works perfectly

  But with Puerto Rico, It is not showing up.

Anything else I should do to solve it?

Thank for your help.


texts: I have added 3 new custom attributes(code client, Social status, web site) and i want to add a customer prgrammatically and also set the id group when registrating. how to do so and how to recuperate the input name of first name, last name and tel and how to set the new attributes because when i tried to setCodeClient() he did not know this setter please help me it's very important to me to know how to proceed and really thanks  for all of you


texts:
I'm facing the terrible issue, I can't run any commands via terminal. It says the below error:

  Class Magento\Framework\App\ResourceConnection\Proxy does not exist

In frontend:

Can anyone please help me to solve this issue?


texts: I want to learn how to use react js in magento2.Is there Any one have any solution for it it?


texts: I've tried removing data-validation Tag from password input but it didn't work for Reset Password, New Password, and Change Password.


texts: SUPEE-11086 Patch for Magento CE 1.9.3.9

texts: as my question says, I need to know if there is the released of Magento Patch SUPEE-11086 for M1 versione 1.9.3.9.


texts: Get current receiver email in the transactional template

texts:
Here is my code:

$mailData = array(
   'data' => $data
);

$emailTemplate = Mage::getModel('core/email_template')->loadByCode('templateName');
$emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email'));
$emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name'));

$emailTemplate->send(aray('FIRST RECEIVER', 'SECOND RECEIVER'), array('FIRST@RECEIVER.com.br', 'SECOND@RECEIVER.com.br'), $mailData);

What I want is get the current receiver email, like:

{{var current_receiver_email}}

Notice that I have 2 receivers (FIRST@RECEIVER.com.br, SECOND@RECEIVER.com.br), that are been send to "same time".

How to print FIRST@RECEIVER.com.br when the email is send to FIRST@RECEIVER.com.br?

And SECOND@RECEIVER.com.br  when the email is send to SECOND@RECEIVER.com.br?


texts: How to add Page Action Custom Button on Magento 2 admin pages

texts:
I am developing one module in which I need to add a custom buttons on Magento 2 admin pages(Like: category Page, Product Grid Page, Orders Grid Page).

I need to add button on the below bar, which is available on every magento admin page.

Please let me know, if anyone can help me.


texts:
I am using following code to get the stock detail I am getting product stock of productId 149428

$proxy = new SoapClient('http://yourstore.com/api/?wsdl');
$sessionId = $proxy->login('apiuser', 'apiKey');
$result = $proxy->call($sessionId, 'product_stock.list','149428');
var_dump($result);

Result:

array(1) { [0]=> array(4) { ["product_id"]=> string(6) "149428" ["sku"]=> string(13) "n12345" ["qty"]=> string(6) "1.0000" ["is_in_stock"]=> string(1) "1" } }

But I want to retrieve all products stock list instead of getting single product stock details.

I tried using  the below method but I am not getting a result,

$result = $proxy->call($sessionId, 'product_stock.list');
var_dump($result);

Another:

$result = $client->call($session, 'cataloginventory_stock_item.list');
var_dump($result);

Thank you in advance.


texts:
When the user filters the products according to the size, say 34,5
the filter button creates a URL like this:

(URL 1) http://www.turquoise.me/tango-women-shoes#%21___SID=U&size=29

Which is actually 34,5 sized shoes filtered and displayed.

But while if you manually write

(URL 2) https://www.turquoise.me/tango-women-shoes/filter/size/34-5

You can get the same page as the shoes filtered as 34,5

Both do filter the products correctly, but the actual filter button when used, goes to URL 1 and I want the filter to go to URL 2. And I don't even want URL 1 to be created.


texts: Magento 2 How to bind knockout event on ajax html response

texts:
I have created custom functionality on item form on cart page like increment/decrement qty, remove product with a custom popup, custom move to wishlist by knockout js.

For knockout events, I created custom js and initialize it on form.phtml

<div data-bind="scope: 'remove-product'" id="cart-item-table">
    <form action="<?= /* @escapeNotVerified */ $block->getUrl('checkout/cart/updatePost') ?>"
              method="post"
              id="form-validate"
              data-mage-init='{"validation":{}}'
              class="form form-cart">

              ....
              ....
    </form>
</div>

<script type="text/x-magento-init">
    {
       "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "remove-product": {
                        "component": "Vendor_Module/js/removeproduct"
                    }
                }
            }
        }
    }
</script>

Now I have a third-party coupon code module which adds free gift product by applying the coupon code on cart page. For that, I just re-render item form layout on ajax response.

Everything is working fine except knockout events on item form. All knockout events stop working after re-render item form.

After some R&D, I found that we need to rebind knockout events after ajax response.

ko.applyBindings(removeproduct, $('#cart-item-table'));

It's showing error like parameter should ViewModel and element. I already defined it.

Any help would be appreciated...!


texts: Mageno 2 - How to set width of input where I use DateTime picker

texts:
How to set the width of input where I use DateTime picker?

There is a question, which I have reviewed, but it looks like there are no issues.

Magento 2 - How to add the DateTime UI Component

Magento 2 - Date input with time picker

In my case, I tried different ways to change width of input, where is inserted date and time from DateTime picker, but it is not good.

 <field name="start_date">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">string</item>
                <item name="label" xsi:type="string" translate="true">Start Date</item>
                <item name="formElement" xsi:type="string">date</item>
                <item name="source" xsi:type="string">page</item>
                <item name="sortOrder" xsi:type="number">50</item>
                <item name="dataScope" xsi:type="string">start_date</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">true</item>
                </item>
                <item name="options" xsi:type="array">
                    <item name="dateFormat" xsi:type="string">yyyy-MM-dd</item>
                    <item name="timeFormat" xsi:type="string">HH:mm:ss</item>
                    <item name="showsTime" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
    </field>


texts:
I've been using Magento 1 a while and wanted to see what Magento 2 was like.

I installed it via cpanel with the demo content.

The home page has a slider and other blocks of images / products.

I go to the home page in the content> pages section and see there is nothing on the page.

I check the static blocks and see there is a home page static block.. but I have to ask.

1) Why use a static block for this when you could have just put in on the page
2) How is the static block being called / pulled to the home page ?

When i use static blocks in Magento 1 I use code like

{{block id="block_name"}}

to call the content.


texts: I have created a custom module for backed to add menu and submenu but it shows me on phtml file in Magento 2

texts:
I have created a custom module for back end Menu and sub menu but it shows me an error for phtml file.
1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file:
'Admin_CreateMenuBackend::helloworld.phtml' in module: 'Magento_Backend' block's name:
'content_schedule_block1'

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

My createmenubackend_create_index.xml is
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

   <referenceContainer name="content">
           <block class="Magento\Backend\Block\Template" template="Admin_CreateMenuBackend::helloworld.phtml"/>
   </referenceContainer>

</page>

my phtml file code app/code/Admin/CreateMenuBackend/view/adminhtml/templates/helloworld.pthml

Hello World

my menu.xml file app/code/Admin/CreateMenuBackend/etc/adminhtml/menu.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
 <menu>
    <add id="Admin_CreateMenuBackend::menu"
       title="Commision Rule" module="Admin_CreateMenuBackend"
       sortOrder="10"
       resource="Magento_Backend::content"
       />
    <add id="Admin_CreateMenuBackend::menu_item"
       title="Commision Rule Generator" module="Admin_CreateMenuBackend"
       sortOrder="10" parent="Admin_CreateMenuBackend::menu"
       action="createmenubackend/create/index"
       resource="Admin_CreateMenuBackend::menu_item"
       />
  </menu>
</config>

My controller file path app/code/Admin/CreateMenuBackend/Controller/Adminhtml/Create/Index.php
<?php

namespace Admin\CreateMenuBackend\Controller\Adminhtml\Create;
class Index extends \Magento\Backend\App\Action
{
protected $resultPageFactory = false;
public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
    parent::__construct($context);
    $this->resultPageFactory = $resultPageFactory;
}
public function execute()
{
    $resultPage = $this->resultPageFactory->create();
    $resultPage->setActiveMenu('Admin_CreateMenuBackend::menu');
    $resultPage->getConfig()->getTitle()->prepend(__('Commision Rule Generator'));
    return $resultPage;
}
protected function _isAllowed()
{
    return $this->_authorization->isAllowed('Admin_CreateMenuBackend::menu');
}
}


texts: Change Product Custom Attribute Id in Magento

texts:
I have mistakenly deleted custom product attribute. Now This attribute has been used on many places with attribute id value.

I tried to create new attribute with same name but it is having auto increment value in eav_attribute table which is creating attribute with different id.

I have also query to set auto_increment before adding new attribute

alter table eav_attribute auto_increment = 961;

But it is not working in my case.  Please provide any suggestion that How can I create a new attribute with same attribute id.

Thanks


texts:
I have added my custom module block in header in layout like below

pinsearch.xml

 <default>
   <reference name="header">
        <block type="core/template" name="pinsearch" as="pinSearch" template="pinsearch/pinsearch.phtml" output="toHtml"/>
     </reference>
  <default>

pinsearch.phtml

<form action="<?php echo $this->getBaseUrl()."pinsearch/index/search"?>" method="get" id="search_pin_form">

    <?php echo $this->__('Search:') ?>
     <input id="pinsearch" type="search" name="<?php echo "pin" ?>" value="" class="input-text required-entry" maxlength="" placeholder="<?php echo $this->__('Enter here...') ?>" />
    <button type="submit" title="<?php echo $this->__('Search') ?>" class="button search-button"><?php echo $this->__('Search') ?></button>

In frontend, I got my custom search form but not in header. This form showing after wrapper div block

When i add this block in footer only, its showing on both footer and after wrapper div block too.

I'm totally confusing. Have any idea why its proceeding like this?