texts: Add multiple customer Group IDs in some code - Magento 1.9

texts:
How can I add additional customer group IDs in the code below? For example, add 8 and 9.

<?php if (Mage::getSingleton('customer/session')->isLoggedIn() && Mage::getSingleton('customer/session')->getCustomerGroupId() == "6") :?>
   <style>
      .wpu {display:none}
   </style>
<?php endif;?>

Thank you


texts: How to easily keep multiple Magento theme translations up-2-date?

texts:
Working with Magento Translations today I got very annoyed by the fact that I had to constantly repeat myself.

In our installation we currently have 4 languages:

en_US for English
nl_NL for Dutch
de_DE for German
es_ES for Spanish

For each of these languages I have to maintain separate app/design/frontend/theme/package/locale/xx_XX/translate.csv files, where the first column - the original language - is the same.

For instance, to translate / modify the original Magento word "Buy" into "Buy now" and the correct translation in these different languages I have to make the following edits in these four files:

locale/en_EN/translate.csv
"Buy", "Buy now"

locale/nl_NL/translate.csv
"Buy", "Nu kopen"

locale/de_DE/translate.csv
"Buy", "Jetzt Kaufen"

locale/es_ES/translate.csv
"Buy", "Comprar ahora"

Is there a smarter way to do this? Maybe working on just one theme_translate.csv that automatically splits into the correct locale/xx_XX/translate.csv's ??

Example theme_translate.csv file:
"Buy","Buy now","Nu Kopen","Jetzt Kaufen","Comprar ahora"


texts: Add a custom button in related products magento 2

texts: I am trying to add a custom button or href link in related products.


texts: CSV import and auto create manufacturers

texts:
I have created a script which generates CSV file. I have one problem.
The Manufacturers are coming from the data are not in Magento and practically cannot be created in advance.

Is there any way to set Magento to accept unknown manufacturer and add them automatically?


texts: How to fetch breadcrumbs data in custom phtml in magento 2

texts:
I want to manipulate breadcrumbs data in my custom template.
How do i get breadcrumbs data in my custom template? (include cms, homepage, product, category, search pages)


texts: Invoice mail not receiving after sending from back end without running cron job

texts:
Mail not getting triggered from back end in magento 2 after running cron job customer received the mail

Please help me to fix this. After send email from back end customer should receive the mail.


texts: override adminhtml block and review model

texts:
I am trying to override two class i.e

Mage_Adminhtml_Block_Review_Edit_Form and
Mage_Review_Model_Resource_Review

But they are not being override. please help..

The directory structure is:

local -->
       Efk -->
           Adminhtml -->
               Block -->
                    Review -->
                         Edit -->
                             Form.php
               etc -->
                    config.xml
           Review -->
               etc -->
                    config.xml
               Model -->
                    Resource -->
                         Review.php

Here are my overrided files:

etc/modules/Efk_all (working fine.. checked in admin panel)

<config>
    <modules>
        <EFk_Review>
            <active>true</active>
            <codePool>local</codePool>
        </EFk_Review>

        <Efk_Adminhtml>
            <active>true</active>
            <codePool>local</codePool>
        </Efk_Adminhtml>
    </modules>
</config>

local/Efk/Review/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Efk_Review>
            <version>1.0</version>
        </Efk_Review>
    </modules>
    <global>
        <models>
            <review_resource>
                <rewrite>
                    <review>Efk_Review_Model_Resource_Review</review>
                </rewrite>
            </review_resource>
        </models>
    </global>
</config>

local/Efk/Adminhtml/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Efk_Adminhtml>
            <version>1.0</version>
        </Efk_Adminhtml>
    </modules>
    <global>
        <blocks>
            <adminhtml>
                <rewrite>
                    <review_edit_form>Efk_Adminhtml_Block_Review_Edit_Form</review_edit_form>
                </rewrite>
            </adminhtml>
        </blocks>
    </global>
</config>


texts: I am trying to create order print link in my account page

texts:
I am trying to create print order in pdf form.
but after many searches, I am not getting any answer regarding this.


texts: How to restrict customer event while placing the order in magento

texts:
In my custom module customer_save_after and customer_address_save_after are there.

when placing the order customer_save_after and customer_address_save_after these two events firing.

What is the relation between sales_order_save_after and customer_save_after, customer_address_save_after?

how to restrict customer_save_after and customer_address_save_after events when place the order?

  I think customer & customer address events are firing because shipping
  address or billing addresses are Create/updating is happening.

How to restrict customer event from my custom module while placing the order?

Thanks.


texts: Magento 2 - 404 page with no styling after migrating from localhost to server

texts:
I am a beginner to Magento 2. I have built a webshop locally without any problems. Now I want to host my webshop on a live server. After following multiple guides on how to do this and after fixing a lot of problems, I can view my webshop. However it only loads a 404 page without any styling.
Also notice that the link seems to be "doubled". The paths seem to not be right. I have checked my .htaccess file and it seems to be fine.
There are no errors in my log which makes it hard for me to figure out where the problem is. So I hope somebody here can help me.
The page looks like this.

EDIT: Every link that is clicked seems to extend the URL instead of replacing it. So when I click home the link becomes "http://julienjamani.com/magento2/julienjamani.com/magento2/julienjamani.com/magento2/"


texts:
I want to add a  top link and I do this by the following in local.xml:

   <reference name="top.links">
       <action method="addLink" translate="label title">
             International
             <url>javascript:void(0);</url>
             <title>international</title>
             <prepare/>
             <urlParams/>
             <aParams>class="international"</aParams>
         </action>
   </reference>

unfortunately although I see the link in the top, it does not add the class to it here is the output I get:

International

I was wonndering why it does not show

International


texts: Magento 2.3 OpenSource - How to implement Stopwords in ElasticSearch 6.x

texts:
Having custom module dependency injection as follows:

di.xml in app/code/Custom/Stopwords/etc directory.

<type name="Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords">
 <arguments>
     <argument name="stopwordsDirectory" xsi:type="string">app/code/Custom/Stopwords/etc/stopwords</argument>
 </arguments>

stopwords_en_US.csv in app/code/Custom/Stopwords/etc/stopwords directory copied from vendor.

Dev docs guide which i'm referring

Edit

I would like to add few stopwords in the .csv file.
Have added the stop-words as follows:

more
less
some
few
other
misc
all

Issue - after adding the above stop-words it is not getting applied.


texts:
I have several configurable products and a few of them have a higher price than some.

For example, I have a shirt with 3 sizes S, M, L the Lis $3 extra dollars than the other two. I have the simple products created, but when it displays in my store, it says the products are " as low as (insert price)."

I don't have tier pricing set up for these products because I've double checked that. How do I remove them as low as if it's not due to tier pricing?


texts:
I'm trying to add a custom tab that only shows when the product is a grouped product.  Below is what I have so far in the local.xml file:

            <action method="addTab" translate="title" module="catalog"><alias>static_block_name</alias><title>Part Numbers</title><block>cms/block</block><template>null</template></action>
                            <!-- define the CMS block ID for the parts info tab -->
            <block type="cms/block" name="product.info.tabs.static_block_name" as="static_block_name">
                <action method="setBlockId"><block_id>parts</block_id></action>
            </block>

I tried to use this logic

<product_type_grouped>
<reference name="product.info">
    <!-- Static block -->

                <action method="addTab" translate="title" module="catalog"><alias>static_block_name</alias><title>Part Numbers</title><block>cms/block</block><template>null</template></action>
                                <!-- define the CMS block ID for the parts info tab -->
                <block type="cms/block" name="product.info.tabs.static_block_name" as="static_block_name">
                    <action method="setBlockId"><block_id>parts</block_id></action>
                </block>
</reference>

But that didn't work.  Any ideas?


texts: How to set 2 prices for a product and add to cart same both 2 prices magento 2

texts:
Actually am trying to show 2 or more prices for a simple product and
  once we add to cart and  it should sum the prices to cart and also
  display same prices in shopping cart.

  If anyone have any idea,please guide me.


texts: override Image.phtml or Image_with_border.phtml in magento 2?

texts: i 've had a requirement in whch i have to make module to show labels on the products images on listing page. i can do that by overriding list.phtml file in catalog_category_view.xml but i want to do that by overriding image.phtml so that wherever the getImage() method will be called set to show html it will show the labels? can anyone tell me that how can i do that? and please do tell me that is it a good practice or not?


texts:
I want to have a extra, member specific category or page, after a member signed in.
So I can show products to the member that are only meant for him personally.

So I have a complete shop with al my 'public' products and a 'restricted' category or page for specific members that will only show products after login to my store.

With no login every one will see only the "public" products. After login Member-A will see an extra "personal" category or page with products meant only for him.
The "personal" page has to be member specific so Member-B can have his own "personal" product page as well.

Can anyone help me with this?


texts: Header static block/widget with image switch on browser refresh

texts:
I have 4 season sets of images. winter-images, spring-images, summer-images and autumn-images. Every set has 5 images which has to switch on browser refresh. I want to have them in 4 separate static blocks. So the user can turn on/off the static block based on the season.

What is the best way to set this up? Wright now i have a static block with the following jQuery:

<script type="text/javascript">// <![CDATA[
//Add your images, we'll set the path in the next step
    var images = ['lente1.jpg', 'lente2.jpg', 'lente3.jpg', 'lente4.jpg', 'lente5.jpg'];

    jQuery('<img class="fade-in" src="{{media url="wysiwyg/lente/' + images[Math.floor(Math.random() * images.length)] + '"}}">').appendTo('.category-image');
// ]]></script>

I insert the static block with a widget. But is this a proper way to put the jQuery in the static block? And how will i do it with the other 3 static blocks? Or do i have to make 1 javascript file?

I have the feeling there is a better way..?

Thanks a lot!


texts:
I am following this Aaron Allen's solution for my problem.

  Magento 2.1.7 Change Shipping Method Title method.method_title USPS Pirority Mail Day 1

He says "You need to make a module, which is the basis of any modification to the Magento system. There's plenty of tutorials around on how to do that. Once you have a module, you should learn about plugins, which is what the above code pertains to".

So far I created my plugin in my vendor/magento/module_quote and its working fine but I don't know how to create a module for it and to do all these things there. Kindly guide me with some relevant example as I am a beginner to Magento 2.


texts: Magento to compiling issue | Requested class did not generate properly

texts:
Firstly please don't label it as duplicate as I have tried everything suggested in other answers.
Issue is that content of generated dir does not generate properly. Because generated dir is never empty when compiling. If I delete the content in generated manually it gets populated again because of cron. Like if I delete it get deleted but reappears after a few seconds. As to my understanding there are some files missing when content is populated/generated by cron.
below image shows what happens if I try to compile

I tried to remove cron but I am unable to remove it. Cron was created by root user.
When cron generates the dir "code", inside "generated" some of dir and files inside "code" are  owned by root. Rest of the web root is set to www-data:www-data.
Please let me know if these is something you guys can suggest to fix it.

#~ MAGENTO START 40d1b2d83998fabacb726e5bc3d22129

* * * * * /usr/bin/php7.1 /var/www/html/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log

* * * * * /usr/bin/php7.1 /var/www/html/update/cron.php >> /var/www/html/var/log/update.cron.log

* * * * * /usr/bin/php7.1 /var/www/html/bin/magento setup:cron:run >> /var/www/html/var/log/setup.cron.log

#~ MAGENTO END 40d1b2d83998fabacb726e5bc3d22129

Not sure how to remove it now, tried bin/magento cron:remove
Tried crontab -e and commenting it out


texts: How to add CMS directive {{block}} on custom module field in Magento 2

texts:
I have developed a custom slider for Magento 2. The fields for my slider in the backend are; Title, Image and Content. The Content is a Wysiwyg editor and I am trying to make it work like a CMS Page content where I can add codes like:

{{block class="Magento\Framework\View\Element\Template" name="new.template" template="mytemplate.phtml"}}

What classes do I need to call in my block constructor to output the same results as that of CMS pages?


texts: Magento migration Fail (live to localhost)

texts:
I tried to migrate/transfer my live site to localhost. I am using WAMP and I imported the database via phpmyadmin,
Problem comes up after i process the configuration process(after filling database information)

i got error SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table and error log as below:

a:5:{i:0;s:239:"Error in file: "C:\wamp\www\localsite\app\code\local\amam\Conf\sql\amconf_setup\mysql4-upgrade-3.2.2-3.3.0.php" - SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table 'amam_amconf_product_attribute'";i:1;s:940:"#0 C:\wamp\www\localsite\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 C:\wamp\www\localsite\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.0.0', '3.9.11')
#2 C:\wamp\www\localsite\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.0.0', '3.9.11')
#3 C:\wamp\www\localsite\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 C:\wamp\www\localsite\app\code\core\Mage\Core\Model\App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 C:\wamp\www\localsite\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#6 C:\wamp\www\localsite\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#7 C:\wamp\www\localsite\index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:11:"/localsite/";s:11:"script_name";s:20:"/localsite/index.php";s:4:"skin";s:7:"default";}

where "amam" is an extension folder name.
Thanks for anyone trying to help!


texts: How to pass a complete SQL query to the model?

texts:
This is v1.4.x to be clear.

I have recently found a limitation in the Magento-generated query for products, cited in this thread:

adding addFieldsToFilter() does INNER JOIN on eav tables, removing all products which don't have that attribute

On that subject, I started searching for a way to pass a complete SQL query to the model, but have not found any way listed.  Is this possible?  Again, this is a limited case and Magento unfortunately does an INNER JOIN with no remedy when I need a LEFT JOIN.


texts:
We are using Magento 2.1

we have a cheap baby product in 10 different colors.
And sometimes people order just one of it.
With the shipping costs included this is not profitable.

Now we would like that they can't order a single one of this specific product anymore. A minimum of 2 need to be ordered.
But it can be 1 yellow and 1 blue ... or just 2 blue ....

What is the best way to set this up?
I can't figure it out what the best option is ....


texts: Magento 2 Enterprise Schedule Update Programatically

texts:
M2 Enterprise uses a schedule method to update the price and special price. Would like to know how we can achieve the same functionality by coding programatically.
Found this Link but that does not have he solution.
We need to create a console command to update the scheduled price.


texts: In admin some urls "?SID=XXXXXXXXXXXXXXXXXXXXX" are coming and it move to login page of admin

texts: I am working in admin and some weird time in URL "?SID=XXXXXXXXXXXX" are coming and then Login page is open on that url. But admin is login. Here XXXXXXXXXXX are some alphanumeric characters.


texts: M2 - How to add a block in category page before products prices block

texts:
I'm trying to add a block (with template) in category page before products prices block (<?php /* @escapeNotVerified */ echo $block->getProductPrice($_product) ?> in list.phtml).

I've created catalog_category_view.xml layout:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.price.render.default">
            <block name="w1.block" as="w1.block" class="WaPoNe\HelloWorld\Block\Product\ListProductW1" template="WaPoNe_HelloWorld::product/price/discount.phtml" />
        </referenceBlock>
    </body>
</page>

my WaPoNe\HelloWorld\Block\Product\ListProductW1 block file:

<?php
namespace WaPoNe\HelloWorld\Block\Product;

class ListProductW1 extends \Magento\Framework\View\Element\Template
{
    public function getDiscountLabel()
    {
        return "Discount Label";
    }
}

and a simple template file (product/price/discount.phtml):

<?php
echo $block->getDiscountLabel();

This doesn't not work but if I change <referenceBlock name="product.price.render.default"> with <referenceContainer name="content">, for example, it works.

What is wrong?


texts: Ok so basically I have been given this one task to manage the admin side for a website that used Magento 2. But then, I have encountered some problem with the reindexing. I have been searching about it for days. The problem here is i dont even know where Magento 2 is being installed because i only have admin access. Is there any way to reindex on different computer? Im still new to this can any of you help me?


texts: SUPEE-8788 1.7.0.2 - Error Applying Patch

texts:
Background
Mage 1.7.0.2.
Fully-patched except USPS patches (see note below).
No manual edits have been made to install files failing patch.

Problem Summary
2 Installs: Fails with message ERROR: Patch can't be applied/reverted successfully.

Problem Detail
2 specific failures in the report:

Both installs: "patching file app/code/core/Mage/Adminhtml/controllers/DashboardController.php
Hunk #1 FAILED at 91."
One install: "patching file app/design/frontend/base/default/template/persistent/customer/form/login.phtml
Hunk #1 FAILED at 38."

Research Done

Searched through all 1.x patches for those two files. Error 1 (DashboardController.php) is changed in one other patch: SUPEE-1533, which is applied to both installs. Error 2 file (customer/form/login.phtml) isn't found in any patches)

Specifically looked at the un-applied USPS patches; neither of the files that won't patch are touched by those patches


texts: Magento Search not working, redirecting to same page

texts:
Magento search redirects to same page, how can I fix this issue

<?php
    $store = Mage::app()->getStore();
    $code  = $store->getCode();
?>
<form id="search_mini_form" action="<?php echo str_replace("https://","//",str_replace("http://","//",$this->helper('catalogsearch')->getResultUrl())) ?>" method="get">
    <div class="form-search <?php if(!Mage::getStoreConfig("catalogcategorysearch/general/enabled", $code)): ?>no-padding<?php endif; ?>">
        <?php echo $this->__('Search:') ?>
        <?php $categorySearchHelper = $this->helper('catalogcategorysearch'); ?>
        <input id="search" type="text" name="<?php echo $this->helper('catalogsearch')->getQueryParamName() ?>" class="input-text" />
        <?php if(Mage::getStoreConfig("catalogcategorysearch/general/enabled", $code)): ?>
        <select id="<?php echo $categorySearchHelper->getCategoryParamName() ?>" name="<?php echo $categorySearchHelper->getCategoryParamName() ?>">
            <option value=""><?php echo $this->__('All Categories') ?></option>
            <?php foreach ($this->getSearchableCategories() as $mainCategory): ?>
                <option value="<?php echo $mainCategory->getEntityId()?>"><?php echo $mainCategory->getName() ?></option>
                <?php if ($categorySearchHelper->showSubCategories()) : ?>
                    <?php foreach ($this->getSearchableSubCategories($mainCategory) as $category) : ?>
                        <option value="<?php echo $category->getEntityId()?>"><?php echo $categorySearchHelper->getIndentationText() . $category->getName()?></option>
                    <?php endforeach;?>
                <?php endif ?>
            <?php endforeach;?>
        </select>
        <?php endif; ?>
        <button type="submit" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Search'))  ?>" class="button"></button>

</form>


texts: How to add mobile number of admin in magento 1.9

texts:
By default when we create new admin user, it has the fields for Username, First Name, Last Name, Email id, Password, etc.

I want to create new field to save mobile number of all admin users and want to list all admin's with contact numbers while creating order shipment, but I'm not getting how to do it.

Please help me to sort out this issue.

Thanks in advance.


texts: How to create mock checkout without real credit card authorization?

texts:
I am new to Magento and working now on creating a demo application for a task I have to do.
As part of my demo, I have to create a full-flow checkout process, where a customer can add a product to the cart and proceed to the checkout page, there he/she can enter fake credit card information and complete the "transaction".
I'm wondering how can I create a "fake" checkout process, which contains a checkout form for credit card details, but does nothing more than sending the CC to the backend? (also, no authorization process is needed in the backend).
The demo application, of course, won't be published and will be used for internal and private usage only.


texts: I've set up a catalog price rule for all the products that have the attribute set tables. The discount is shown in the catalog, but not on the product view nor the cart. The products are configurable products and they just use the default price. How can I fix this?


texts:
On checkout page when customer try to login it is getting redirect to it's dashboard.

I have turned off this setting from Admin end i.e ( "Redirecting customer to dashboard after login : off " )

But still it is getting redirected to Dashboard

I think I need to make some updates in core.


texts: Magento 2 REST api for guest cart not display product in store's checkout page

texts:
I'm using guest cart api to add a product to cart. It works fine, but I'm not getting the cart items in the store's checkout page to proceed with the checkout process.
Not sure how to hook with the session here.
Here is my code
<?php
//API URL for authentication

$apiURL="https://example.com/index.php/rest/V1/integration/admin/token";

//parameters passing with URL
$data = array("username" => "User", "password" => "Password");
$data_string = json_encode($data);

$ch = curl_init($apiURL);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json","Content-Length: ".strlen($data_string)));
$token = curl_exec($ch);

//decoding generated token and saving it in a variable
$token=  json_decode($token);

$headers = array("Authorization: Bearer ".$token);

$ch = curl_init();
$quoteApiUrl = "https://example.com/index.php/rest/aus/V1/guest-carts/";
curl_setopt($ch, CURLOPT_URL, $quoteApiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = "Authorization: Bearer  ".$token;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$quoteId = curl_exec($ch);
$quoteId = json_decode($quoteId);
curl_close ($ch);

$ch = curl_init();
$dataPost = array(
        'cartItem'=>array(
            'sku' => 'productcustom',
            'qty' => 1,
            "price"=> 120,
            'quote_id' => $quoteId,
            "productOption" => array(
            "extensionAttributes"=>array(
            "customOptions" => array(
                    array("optionId"=>"Color", "optionValue"=>"Pink"),
                    array("optionId"=>"Size", "optionValue"=>"Small"),
                    array("optionId"=>"Usage", "optionValue"=>"Indoor")
            )
            )
            )
        )
    );

$addProductApiUrl = "https://example.com/index.php/rest/aus/V1/guest-carts/".$quoteId."/items";
curl_setopt($ch, CURLOPT_URL, $addProductApiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($dataPost));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = "Authorization: Bearer  ".$token;
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
$resultQuote = json_decode($result);
curl_close ($ch);

echo '<pre>';
print_r($resultQuote);
echo '</pre>';

?>

Any help please?


texts:
I am new in Magento and now I am trying to disable the price label on the product page. I tried to modify the price.phtml, but I can't find it out.

Chrome Inspect:

    MOQ:
    :41.00

How can I delete the label? Thx a lot...


texts: My website displays price before VAT only no matter what I change in the price display settings.  The VAT is not added until the checkout.  I want to show both before and after VAT prices on the website, whats going wrong?


texts:
All the Grid's from Sales menus are giving Not registered handle error.

Grid's from Catalog menus are working fine.

Some custom grids are working and some are not, even I have installed a new module and its grid is also not working giving the same error.

I am using Magento 2.2.3

Most of the answers to other questions mentioned to move "etc/adminhtml/di.xml" code to "etc/di.xml", but

Questions:

Newly installed custom module is having only a single di.xml which is inside "etc/" folder. There is no di.xml inside etc/adminhtml folder than what is the issue?
Sales module comes with magento, is it still requires to move code from "etc/adminhtml/di.xml" code to "etc/di.xml"
If its due to any other module, is there is a way to identify that module.


texts: what are processing options on magento, while checkout process

texts:
I have confronted this requirement of selecting Processing methods standard, quick and rush while checkout just before selecting shipping methods.

And i couldn't even figure out what this is called, how this functionality is achieved or what sort of modules are available for this if any.

I know it might be out of track question to ask for, but i couldn't even search for this as i am unknown and has just encountered this. So please don't mark this as negative question as there is no other place to find this information other than this forum.


texts: Magento: move customer account navigation from left to right

texts:
I am trying to configure the customer account page for a 3column layout and I want to move the customer account navigation from its default position in the left column to the right column. So far I have tried this in the local.xml file of my own theme:

<customer_account_index>
    <reference name="root">
        <action method="setTemplate"><template>page/3columns.phtml</template></action>
    </reference>
    <reference name="left">
        <remove name="customer_account_navigation"/>
    </reference>
    <reference name="right">
        <block type="customer/account_navigation" name="customer_account_navigation" template="customer/account/navigation.phtml">
            <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path>Account Dashboard</action>
            <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path>Account Information</action>
            <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path>Address Book</action>
        </block>
    </reference>
</customer_account_index>

As expected, the customer account page will then have a 3 column layout and the customer account navigation is removed from the left column.

However, the navigation does not appear in the right column (any other block that is displayed by default in the right column is displayed as expected, so there is no general problem with the layout), and I am not sure why.


texts: How to add multi select dropdown and comma seprated field from phtml in admin panel

texts: I  am new to magento, I have to add multi select drop down and a comma separated field to magento admin panel using phtml file, can any one guide me for this. thanks...


texts:
I have an install script for a module which Ive been working on that has previously run perfectly. Since I last used it I have deleted the database, in which it was installed and now want to reuse it.

I accessed the relevant module in my browser then checked my database, the table i am trying to install does not seem to install. I have looked in core_resource to see if there is a record of it in there, but there is no record.

It is my understanding that magento will look at the version number in the config file and compare that to the install file version number and if the version number of the config is greater than the version number of the install file it will look to see if there is a record of that install in the database and if there isn't it will go ahead and install a copy.

The config.xml version number is currently 0.1.0

The install script is currently

sql/namespace_modulename_setup/install-0.1.0.php

Have I misunderstood how Magento is installing tables or am I looking the wrong place or could it be a an error in the install script? if so how would I troubleshoot it?

===EDIT===

I thought I would add some of my code, as there must be an error in that, I am assuming that I have an error with my config due to the install file not even running so I have added that and an image of my files

<config>

<modules>
    <Mdg_Giftregistry>
        <version>0.1.0</version>
    </Mdg_Giftregistry>
</modules>

<global>
    <models>
        <mdg_giftregistry>
            <class>Mdg_Giftregistry_Model</class>
            <resourceModel>mdg_giftregistry_mysql4</resourceModel>
        </mdg_giftregistry>

        <mdg_giftregistry_mysql4>
            <class>Mdg_Giftregistry_Mysql4</class>
            <entities>
                <entity>

Mdg_Giftregistry_Entity

                </entity>
                <item>

Mdg_Giftregistry_Item

                </item>
                <type>

Mdg_Giftregistry_Type

                </type>
            </entities>
        </mdg_giftregistry_mysql4>

        <resources>
            <mdg_giftregistry_setup>
                <setup>
                    <module>Mdg_Giftregistry</module>
                    <class>Mdg_Giftregistry_Model_Resource_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </mdg_giftregistry_setup>

            <mdg_giftregistry_write>
                <use>core_write</use>
            </mdg_giftregistry_write>
            <mdg_giftregistry_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </mdg_giftregistry_read>
        </resources>
    </models>
.....
</config>


texts: Is anyone know about instart_disable_injection=true

texts: I have seen in some site when they sending ajax request all ajax request ending with instart_disable_injection=true is any one can explain what are the advantages of this query string and better way to use it.


texts: Problem with empty store page after downgrading MAgento 2.4 to 2.3.5

texts:
Due to a payment provider that shall remain nameless not yet updating their extension to be 2.4 compatible, we've had to downgrade a new store from 2.4 to 2.3.5
The process wasn't particularly painless, but we now have the site functioning in pretty much every capacity EXCEPT that:

accessing the store (catalog) page results in an empty page (NOT a literally blank page, HTML with head and body tags loads but no content so a white page

products can be searched for using search but attempting to click through to the product page results in a 404

(We also had to downgrade PHP to 7.3 too)
What's weird is that even with Debug mode on:

there is no error in console when accessing the store page
there is nothing in debug.log
there are no PHP errors in the PHP error log

We've switched from our custom theme to the regular blank one, and Luma, and the same thing happens
Caches have been cleared etc. basically the full 'deep refresh' via CLI:
php  bin/magento setup:upgrade
php  bin/magento setup:di:compile
php  bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

Has anyone experienced anything similar in the past, and can tell us where to go next?
Or at the very least, can anyone suggest how we can at least get some error messages telling us where to look?


texts: I would like to create a new role for my wholesale customers and that these customers can see the prices without taxes, and that they can see the total taxes at the end (checkout). But I can not find a way to do it. Any ideas to help me get this?


texts: Magento 2.4.1 While login using TwoFactorAuth always show message invalid code

texts:
I am using the latest 2.4.1 and I have configured google two facture auth for admin login. I am receiving email for login link etc then after I generate code from the mobile app and if I am entering the correct code still it gives an invalid code error I have tried with multiple user login and emails always the same issue.so I am not able to login to admin if the Magento_TwoFactorAuth module is enabled.

is there any solution for this issue or its any default issue of Magento can anyone help me to figure out this issue
thanks.


texts:
I have special offers section in my cart and it has a title of "August Special Offers" at this moment i have hard coded it, but i need a way of the month changing automatically so i do not have to change it myself in case i forget one month At the moment i have some up with this

<?php echo date('m'); ?> Exclusive offers

However this return "08 Exlusive offers" is there i way i can display the month in a word format instead of numerical??

Thanks if you can help


texts:
I have Added Custom page layout in my store.And set Test Category Page
But when I try to get my phtml file in category page

$request = $objectManager->get('Magento\Framework\App\Request\Http');
$layout = $request->getFullActionName();

It's catalog_category_view. I want there Test Category Page id which was I had set in Admin.


texts: Magento 2 : custom image role apply in multiple images

texts:
I created one custom image role from admin side. It's working perfect.

But, I want to set that custom image role in multlple images. I read this git issue but I didn't found any source to apply this functionality.

How can I apply this ?


texts: How to overwrite existing DB value with NULL value?

texts:
On an admin grid form I have a checkbox. If the checkbox is checked the form shows additional data fields. If it is not checked the additional fields are hidden. When the form is saved, the data from the fields are saved to the db.
Here is my previous question with this behavior as outcome:
Dynamic Fields in Admin Grid
First I check the checkbox, add data to the additional data fields and save the form.
At a later point I decide (however), that this entity does not need the additional data. I uncheck the checkbox and save the form. The problem now is, that the additional data is still in the db.
But the additional data should be removed from the db. So my goal is to overwrite the existing data with the NULL value when the checkbox is not checked.
How can I achieve that?


texts: How to remove or hide the left block with Shop By filters from the static block only view of a category in Magento2?

texts:
So we know how to remove the left block completely on all views. Or we can hide it with CSS. But we want it still to show on main categories with products. How do we remove it from showing at the bottom of the page for a category that has a static block only in it and no products?

So looking at the CSS for that area it's the .sidebar.sidebar-main area we want to remove/hide. But then we need to remove the space next to it as well that will be left, so that area is .page-products .columns for where the products would appear if you had any selected.


texts:
I have a problem for which I cannot find the right answer.
In Magento I want to add the DOB to the newsletter-subscribers.
I successfully did, by following this tutorial:

http://www.iamrookie.com/blog/159/add-custo-field-in-newsletter-module-magento.html

So now I see a DOB-row in my database and in my backend from Magento. And if I set a date in the database (I’m not testing with the sign-up form) I see the right value.

The only thing I want to do is to check of the customer has set an DOB in his profile. If so, I want to override the value in the database with his DOB.

This should be possible because you also see the first and last name of the customer in the backend.

I believe the file where I should change it is the subscriber.php. I tried different thing already, but nothing is working.

I think I should do something here......

 /**
 * Load subscriber info by customer
 *
 * @param Mage_Customer_Model_Customer $customer
 * @return Mage_Newsletter_Model_Subscriber
 */
public function loadByCustomer(Mage_Customer_Model_Customer $customer)
{
    $data = $this->getResource()->loadByCustomer($customer);
    $this->addData($data);
    if (!empty($data) && $customer->getId() && !$this->getCustomerId()) {
        $this->setCustomerId($customer->getId());

        $this->setSubscriberConfirmCode($this->randomSequence());
        if ($this->getStatus()==self::STATUS_NOT_ACTIVE) {
            $this->setStatus($customer->getIsSubscribed() ? self::STATUS_SUBSCRIBED : self::STATUS_UNSUBSCRIBED);
        }
        $this->save();
    }
    return $this;
}

or here:

 /**
 * Retrieve Subscribers Full Name if it was set
 *
 * @return string|null
 */
public function getSubscriberFullName()
{
    $name = null;
    if ($this->hasCustomerFirstname() || $this->hasCustomerLastname()) {
        $name = $this->getCustomerFirstname() . ' ' . $this->getCustomerLastname();
    }
    return $name;
}

But I really don’t know. If somebody has any idea how to get this done, I really would appreciate it!


texts: How to use checkout.onepage.billing.extra

texts:
I want to include some text in Billing Information section of the one page checkout. There's a call in base/default/template/checkout/onepage/billing.phtml like this:

<?php /* Extensions placeholder */ ?>
<?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>

Is the correct way to use this reference in an extension something like this:

<checkout_onepage_index>
        <reference name="checkout.onepage.billing">
            <block type="core/template" name="my.billing.bit" as="checkout.onepage.billing.extra" template="my/extension/checkout/onepage/billing.extra.phtml" />
        </reference>
 </checkout_onepage_index>

I can't seem to get it to work another way, but it seems wrong that I replace the whole block, what if another extensions wants to?


texts:
I have created a custom cron group and below is the code.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
    <group id="MyCronJob">
        <schedule_generate_every>1</schedule_generate_every>
        <schedule_ahead_for>4</schedule_ahead_for>
        <schedule_lifetime>2</schedule_lifetime>
        <history_cleanup_every>10</history_cleanup_every>
        <history_success_lifetime>60</history_success_lifetime>
        <history_failure_lifetime>600</history_failure_lifetime>
        <use_separate_process>1</use_separate_process>
    </group>
</config>

In the cron group, I'm having 6 job instances and I want to generate the CRON for every 4 hours. so, I have updated the job instance as below
<job name="test_cron" instance="vendor\module\Cron\test" method="execute">
            <schedule>0 */4 * * *</schedule>
</job>

Now my question is, in the CRON group, there is schedule_generate_every, so do I need to update the time in that portion as well and what is the difference which we are giving time in crontab and in crongroups.
Please guide and help.


texts: How to pre check I already agree Term and Conditions check box on checkout page

texts:
How to precheck I already agree term and conditions checkbox on
  checkout page? I want to precheck i already agree Term and conditions
  on checkpage in magento.


texts:
in my class shipping in the file app/code/community/Innnoexts/Core/Helper/shipping.phpp.

I want to call the method getMethods() in the file app/code/local/Collinsharper/Purolator/Model/Source/Method.php
I wrote this code

$test = Collinsharper::getModel(Purolator/Source/Method);
        var_dump($test->getMethods());
        echo '<br>'

;

but, I got this error PHP Fatal error:  Class 'Collinsharper' not found in /www/sites/mysite.com/files/html/app/code/community/Innoexts/Core/Helper/Shipping.php

could you help me to give me the right instruction to call this method?

thanks


texts: Magento2 Migrate Orders History and Product Catalog Including Media

texts:
I have installed magento 2.2.6 . i want to migrate to magento 2.3.0

for that i have fresh installed magento 2.3.0 on new link.

now is there any way i can migrate all orders histories and product catalog to my new fresh intalled magento.


texts: Magento 2.3 Custom Module Send Email Programmatically with image attachment

texts:
I want to send email with the image attachment into custom module Programmatically.

How to do this?

Thanks in Advance


texts: Custom QTY incrementor issue in wishlist

texts:
A product quantity update using custom qty incrementor (+/- buttons) doesn't saved when added to wishlist.
Scenario: when I add a product to wishlist and update the quantity using the input text the updated qty is carried over to wishlist but when I used my custom qty incrementor, the updated value doesn't get carried over the wishlist page.


texts: magento 2 Incompatible argument type: Required type: \Magento\Framework\Registry

texts:
i am getting this error while compiling,when i add dependency injection then getting other error like,filefactory if this solved then getting customerfactory.
Actually i want to do custom code in my controller when user click -

     <?php
 namespace Vendor\Module\Controller\Adminhtml\Sendcredentials;
        use Magento\Backend\App\Action\Context;

    class Index extends  \Magento\Customer\Controller\Adminhtml\Index
    {
        /**
         * Customer compare grid
         *
         * @return \Magento\Framework\View\Result\Layout
         */
       public function __construct(
            Context $context,
            array $data = []
        ) {
            parent::__construct($context, $data);

        }

        public function execute()
        {
            $resultLayout = $this->_resultLayoutFactory->create();
            $getBlock = $resultLayout->getLayout()->createBlock("Vendor\Module\Block\Adminhtml\Sendcredentials");
            echo $getBlock->getCustomCustomerId();

            die;

        }
    }

Actually i need customer id in my custom controller.


texts: Limit the size of data in ui component grid in admin panel in magento2

texts: Instead of loading full collection how to specify the size of records to be loaded in grid using ui component in admin magento2


texts:
My website name is www.shoppingara.com. I am facing a small problem on my website home page.

There are product images displayed. When we are clicking on the displayed image it is not redirecting to the product automatically. #sing is coming in the url. For example when I am clicking on Saree it is supposed to go to sarees category however it is not going anywhere and in url #sing is coming like shoppingara.com/#sing

Can someone please help me?


texts: Is it possible to show in the products grid the length of time that the product has been out of stock

texts:
I would like to be able to show in the product grid how long the item has been out of stock, is this possible?

I am presuming its only possible if there's a record of when the stock status was changed, which doesn't exist yet, but this sort of information can be recorded using an observer can't it?

What code can I use to achieve this?


texts: Placing orders in Magento without paying?

texts:
I was wondering whether it was possible to set the Magento backend up in a way that customers are able to place orders without paying for them?

So that orders are raised in the backend and I can then contact them regarding their order?

Any help would be greatly appreciated.


texts:
I am having trouble pulling the date out of a datetime in magento.

Currently the date gets called using:

$_formatDate = Mage::app()->getLocale()->getDateTimeFormat(
                Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM
            );
$create_time = Mage::app()->getLocale()
                ->date($_order->getData('created_at'), Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($_formatDate);

I need the date in the format d-m-Y but I can't seem to work it out. I need something like:

$create_date = $create_time->toString('d-m-Y')


texts: Disable URL redirection from catalog to product view in case of the error "The requested qty is not available" when adding too much products to cart

texts:
I can't figure where to find the code displaying "The requested qty is not available" and redirecting to the product URL when we add more product than the stock.

[I'm using Magento 2.3.3 and custom theme and module]

I want to do TWO things :

Remove the href redirecting from the catalog to the product page
Display "The requested qty is not available" in catalog view when we add more product than the stock

When i do this (i add 61 items and the stock left is 60) :

I am redirecting to product page (and i don't want to), and i would move the error message to catalog view :

Thanks in advance for your help !

Alex


texts: M2.3 - Adding custom category image removes default thumbnail

texts:
I've used this module to add an extra category image field to my categories. The field itself is working fine, but whenever I add an image to it, it removes the default Category Image. When I go to add that back in, it removes my custom image again. Why is that?

I've found that adding both images at the same time and then saving does work, but I don't want to rely on my clients to do this everytime..


texts: How to instantiate the helper class in my phtml in Magento2

texts:
In my Module, i just have a Block.

I am not using any Controller in my custom module.

In my phtml template i need to call helper class like below, We used to call in Magento1.

  $params =$this->getRequest()->getParams();
  $helper = Mage::helper("My Helper class");  //Here how to instantiate the helper in my phtml
  $filters = $helper->getmydata();
  $res = $helper->getSearchData();

How can i use helper in phtml in Magento2.


texts: Spam account registrations, limiting characters in database not working

texts:
We had a problem of spam account registrations the last year, and the answer to this question worked great

Spam customer registrations, CAPTCHA not stopping it, Max field rule being bypassed

We limited the character count to 42 and that stopped the spam accounts.

But last week they started again ( not as frequent). They are getting between 40-65 characters into the first name field the first name attribute is limited to 42 characters:

a:2:{s:15:"max_text_length";i:42;s:15:"min_text_length";i:1;}

Looking at the access logs I can see the same Russian IP hitting the captcha about the same time the account is being made, and when I ban that IP address the accounts stop.... until they get a new (Russian) IP address.

I don't understand how they are getting around the database validation rules for that field.

Thanks


texts:
In my Catalog Product I've made some changes in list.phtml to display custom element.
It does work perfect for Desktop but I can't see the element in mobile.
There is no mobile version (can't locate any).
Any idea why it does not display custom element in Mobile ?
Element is placed within  containing data of the product.
$odl_label = $_product->getResource()->getAttribute('my_attribute')->getFrontend()-  >getValue($_product); echo $odl_label;
I suppose to see a text in the product box related to this attribute.


texts: Magento 2 : To show category with in the top search bar results

texts:
How to show categories on the top search bar results?

Do not want to interact with ElasticSearch as using MySQL search engine.

Any sort of note would be much helpful.


texts:
I've recently installed Magento 2 on Vagrant with Scotch-box, Ubuntu. It takes about 30 to 60 seconds to load a page (front- and back-end). This is too much to work with as a developer.

As a solution I tried installing it local on XAMPP environment, it still takes 3 to 6 seconds to load a page which is too much to work with.

P.S I have XAMPP on Windows, 256SSD and i7.

Any help would be appreciated.


texts:
I'm working on syncing my customers with a third party application and have discovered that many of my created_at dates are way off.

Today is 2014-04-08 yet I have several records with a created_at date in the future - 2014-06-01, 2014-06-03, 2014-05-06...

I'm not exactly sure where to start troubleshooting.

This question touches on the issue, but it (and it's duplicate) are both more related to the multiple updates. I'm not seeing the created_at date changing on save/update, but I am having the date be off by days or months.

I poked around the /app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Time/Created.php and /app/code/core/Mage/Core/Model/Locale.php files but didn't see anything obviously wrong.

Does anyone have any advice about how to have accurate created_at dates? Should I comment out code similar to @alex's solution?

I'm using Magento 1.8.1.0

Timezone is CST - America/Chicago

Locale: English (United States)


texts: I want to new custom option as a image. while adding a product i need to add a custom image option filed.


texts: How do you get all the media info for the products?

texts:
I'm pretty new to magento so i'm not sure how to make the call to get all the media info for each product.

I currently have this call that gets all the products and the data on the product model, but I also need the media info.

Any help would be great.

$products_collection = Mage::getModel('catalog/product')
            ->getCollection()
            ->addAttributeToSelect('*')
            ->addStoreFilter(Mage::app()->getStore()->getId());


texts: Unique constraint violation found - Unable to save new cookie on bin/magento s:up

texts:
I just recently switched over to mac for work and am working on getting my local environment set up. Everything's been going much more smoothly than on my PC with Virtualbox, but when I go running bin/magento setup:upgrade for the first time I get the following error:
Installing data... Unable to save new cookie. Error: Unique constraint violation found

This is the result of going to magento2.docker/

I'm running the enterprise cloud 2.3.4 on docker. It seems that this might possibly be the result of duplicate tables. I'm using the exact same DB as I previously was on Ubuntu so unless something corrupted during the transfer I don't see why it would be an issue with the DB dump. I haven't run into this error before and unfortunately haven't found an exact example with the same context as mine, although I'm sure someone here must have an idea. Thanks!
UPDATE (08/03/20):
Running DELETE FROM amasty_gdprcookie_cookie WHERE 1; running bin/magento setup:db-upgrade -vvv to check for errors, then re-running bin/magento setup:upgrade did the trick. Thanks for everyone's help!


texts: Logos in transactional emails are different

texts:
In one email i have the logo like:
http://myshop.com/skin/frontend/mytemplate/default/images/logo_email.gif

In the other email I have the logo like:
http://myshop.com/skin/adminhtml/default/default/images/logo_email.gif

In both templates the same code is used to include the logo:

<img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/>

Where could it be defined that in one email it takes the right logo but in the other it take the logo out of skin/adminhtml ?


texts:
I have got a problem with a gtm script. This line always appears in all of my cms-blocks:

<script src="https://googletagmanager.eu/gtm.js"></script>

After removing this in the Database - the next day it was again included in all blcoks.

I've searched the entire files - didn't find anything near "googletagmanager" or "gtm.js"


texts:
How to add a products to cart through Ajax in magento 1.9.2.4

I want a solution for this?Please anyone can help.


texts: Login customer with phone number without using third party extension

texts:
I want to login the customer with mobile number instead of email. Can anyone help me?

My AccountController.php file is as follows:

<?php
require_once "Mage/Customer/controllers/AccountController.php";
class User_Tracker_AccountController extends Mage_Customer_AccountController{

public function loginPostAction()
{
    if (!$this->_validateFormKey()) {
        $this->_redirect('*/*/');
        return;
    }

    if ($this->_getSession()->isLoggedIn()) {
        $this->_redirect('*/*/');
        return;
    }
    $session = $this->_getSession();

    if ($this->getRequest()->isPost()) {
        $login = $this->getRequest()->getPost('login');

   //added code

         $phoneNumber = $login['username'];
    $customer = Mage::getResourceModel('customer/customer')
        ->addAttributeToSelect('phone_number')
        ->addAttributeToFilter('phone_number', $phoneNumber)
        ->getFirstItem()->getCustomer();
    if ($customer !== false) {
        $login['username'] = $customer->getEmail();
    }else{
        $login['username'] = $phoneNumber;
    }

    //end here

        if (!empty($login['username']) && !empty($login['password'])) {
            try {
                $session->login($login['username'], $login['password']);
                if ($session->getCustomer()->getIsJustConfirmed()) {
                    $this->_welcomeCustomer($session->getCustomer(), true);
                }
            } catch (Mage_Core_Exception $e) {
                switch ($e->getCode()) {
                    case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
                        $value = $this->_getHelper('customer')->getEmailConfirmationUrl($login['username']);
                        $message = $this->_getHelper('customer')->__('This account is not confirmed. Click here to resend confirmation email.', $value);
                        break;
                    case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
                        $message = $e->getMessage();
                        break;
                    default:
                        $message = $e->getMessage();
                }
                $session->addError($message);
                $session->setUsername($login['username']);
            } catch (Exception $e) {
                // Mage::logException($e); // PA DSS violation: this exception log can disclose customer password
            }
        } else {
            $session->addError($this->__('Login and password are required.'));
        }
    }

    $this->_loginPostRedirect();
}

}


texts: Magento Community 1.9.1 Home Page Widgets are not working

texts:
I'm trying to add widgets to my home page new product and recently viewed. I'm seeing allot of white space below the products price and decided look in to the css but there was no refrence, turns out the white space is added as in-line CSS (don't know from where its being generated) and upon editing the file (frontend/rwd/default/template/catalog/product/widget/new/content/new_grid.phtml) I noticed that "add to cart" (among other things) was supposed to be in that white space (one could presume). as a test I switched the home page's theme to "base" and I was able to see "add to cart" "add to wishlist" AND "add to compare" (in an ugly single list view). So apparently, Like 'lrkwzreported, Widgets (at least a few) don't work right on the home page. Please advise!

http://kaleidoscopiacoloringbooks.com/Store/


texts: Magento2.2.5 multisite customer dashboard white screen

texts:
Magento 2.2.5
I have a multi-site where I have 2 storesviews each one using there own domain name.

Now I have also in the admin panel in configuration customer configuration set share customer accounts = global I then cleared cache re-deployed etc. However when a customer tries to login on one website they get to there dashboard page no issues. however when I go in the other store view (domain) and login I am then just presented with a blank white screen.

When in the index.php file I enable errors I see the below

Allowed memory size of 792723456 bytes exhausted (tried to allocate 12288 bytes) in /vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php
on line 291

The server has plenty of ram and processor power. So IDK what the cause is?


texts: Image being saved as "Array" in database from backend form

texts:
I have an issue where the images I'm trying to save in a backend form aren't being populated in the database properly..

My Form.php

<?php

class FactoryX_Blog_Block_Manage_Blog_Edit_Form extends
Mage_Adminhtml_Block_Widget_Form
{
    protected function _prepareForm()
    {
        $form = new Varien_Data_Form(
            array(
                 'id'     => 'edit_form',
                 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
                 'method' => 'post',
                 'enctype'  => 'multipart/form-data'
            )
        );

        $form->setUseContainer(true);
        $this->setForm($form);
        return parent::_prepareForm();
    }
}

The field in /Edit/Form.php

$fieldset->addField('main_image', 'image', array(
      'label'     => Mage::helper('blog')->__('Upload a Main Image'),
      'required'  => true,
      'name'      => 'main_image',
    ));

Controller in save action:

if(isset($_FILES['main_image']['name']) and
(file_exists($_FILES['main_image']['tmp_name']))){
        try {
            $uploader = new Varien_File_Uploader('main_image');
            $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
            $uploader->setAllowRenameFiles(false);
            $uploader->setFilesDispersion(false);

            $path = Mage::getBaseDir('media') . DS . "/blog" ;

            $uploader->save($path, $_FILES['main_image']['name']);

            $data['main_image'] = $_FILES['main_image']['name'];
      }catch(Exception $e) {

      }
    }
    else {
        if(isset($data['main_image']['delete']) && $data['main_image']['delete'] == 1)
            $data['image_main'] = '';
        else
            unset($data['main_image']);
    }

The images are saving into the media folder how I'd like them to, but the main_image field in my database is showing up as "Array". The main image field is type Varchar(255).

I would like the path of the image to be saved to the database instead.


texts: Magento2: Item (Magento\Framework\DataObject) with the same ID "52713" already exists

texts:
Step: Edit product and click on save button then got the error message below:
Item (Magento\Framework\DataObject) with the same ID "52713" already exists.
When I search for the id item 52713, I don't find it ! Can you help me please ? Thank you
Magento ver. 2.0.17


texts: Magento 2: How to add custom filters in Orders Report?

texts:
I have added new checkbox called "Split by Country" as a filter in Orders Report section.

File:

  vendor/magento/module-reports/Block/Adminhtml/Filter/Form.php

$fieldset->addField(
        'split_by_country',
        'checkbox',
        [
            'label' => __('Split by Country'),
            'name' => 'split_by_country',
            'data-form-part' => $this->getData('target_form'),
            'onchange' => 'this.value = this.checked;'
        ]
    );

Then I added a new column in grid called "Country".

File:

  vendor/magento/module-reports/Block/Adminhtml/Sales/Sales/Grid.php

$this->addColumn(
        'country',
        [
            'header' => __('Country'),
            'type' => 'string',
            'index' => 'country',
            'sortable' => false
        ]
    );

What I want to achieve here is, when a "Split by Country" checkbox is checked then in a grid I want to display entries order by country.

Please suggest me a solution for this.

Thank you


texts:
Can you tell me how to do the same thing on Magento 2?

Mage::getSingleton('core/translate')->init('frontend', true);


texts: search_tmp processes slowing whole site and making it inaccessible

texts:
Magento 2.1.8 installation, left catalog search index running overnight. It appeared to be successful and all products were showing this morning in the store. However shortly after the site has become inaccessible with mySQL processes taking nearly all server resources. The processlist shows queries such as below which all seem to relate to a tmp table for the search index:

| 69 | 6106ce650fb5 | localhost | rhr-v2 | Query   | 1876 | Sending data | INSERT INTO `search_tmp_59be3c85852351_60612390` SELECT `main_select`.`entity_id`, MAX(score) AS `re |

Any idea what's going on here? Should these processes be running even though the index says it's complete? Can I/could I kill them some how?


texts: In how many tables, product custom attribute entries saved?

texts:
Suppose I have a product custom attribute 'brand', after choosing one of the brand options & saving the product in how many tables this product attribute will be saved?

attribute "brand" type is varchar so according to me it'll be saved in the "catalog_product_entity_varchar" table.

But when I'm inserting values directly into this table by using insert query.

e.g-

SET FOREIGN_KEY_CHECKS=0;

INSERT INTO `catalog_product_entity_varchar` (`value_id`, `attribute_id`, `store_id`, `entity_id`, `value`) VALUES
(NULL, 611, 0, 11, '560');

SET FOREIGN_KEY_CHECKS=1;

Then getting following problem:-

Error
SQL query:

INSERT INTO `catalog_product_entity_varchar` (`value_id`, `attribute_id`, `store_id`, `entity_id`, `value`) VALUES
(NULL, 611, 0, 11, '560')
MySQL said: Documentation

#1452 - Cannot add or update a child row: a foreign key constraint fails (`dev21_wp2`.`catalog_product_entity_varchar`, CONSTRAINT `CAT_PRD_ENTT_VCHR_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE )

Please clarify me & help me to resolve this issue.


texts: Magento2.2: How to change the default functionality of search in visibility

texts:
I want to change the default functionality of search in visibility. When product Visibility is set to Search or Not Visible Individually it should not appear in the search dropdown, search results, or category pages.

Does anyone know the path to change it?


texts: What performance gain will this code give?

texts:
Code sample # 1

$customer_obj = Mage::getModel('customer/customer');
foreach(){
$customer_data = $customer_obj->load(customer_id);
$customer_data->getFirstname();
$customer_data->getEmail();
........
}

Code sample # 2

$customer_obj = Mage::getModel('customer/customer');
foreach(){
$customer_obj->load(customer_id)->getFirstname();
$customer_obj->load(customer_id)->getEmail();
.........
}

The loop count will be something around 1800-2000 every day.It is one time cron job every day

I am assuming it in this way,
in sample # 1 $customer_data will have the entire customer details in memory and from there on wards it will fetch it from memory.but in sample # 2 it always hit db with every load call

Can someone please enlighten me?


texts: Not able to access graphql api for magento (with XAMPP) on localhost

texts:
Am new to Magento. Am using magento 2.3.1 with XAMPP v3.2.3.

Does the XAMPP exposes the graphql api by default on localhost or I need to setup separate server for it like Apollo? I'm trying to set endpoints with localhost (in chromiql as well as in postman) but has not been successful. The idea is to query the data using graphql and later on integrate with AEM.

I can see there are many graph-ql schema already present in Magento modules. I have set the mode to developer as well.


texts: Error processing request => Magento admin page => Illegal scheme supplied, only alphanumeric characters are permitted

texts:
I have problem when I want to open admin of magento website. It display this message and admin page not display.

There has been an error processing your request

Illegal scheme supplied, only alphanumeric characters are permitted
Trace:
#0 /home1/rajlosan/public_html/app/code/core/Mage/Core/Model/Store.php(777): Zend_Uri::factory('admin/')
#1 /home1/rajlosan/public_html/app/code/core/Mage/Core/Model/Store.php(611): Mage_Core_Model_Store->isCurrentlySecure()
#2 /home1/rajlosan/public_html/app/Mage.php(382): Mage_Core_Model_Store->getBaseUrl('skin', NULL)
#3 /home1/rajlosan/public_html/app/code/core/Mage/Core/Model/Design/Package.php(349): Mage::getBaseUrl('skin', NULL)
#4 /home1/rajlosan/public_html/app/code/core/Mage/Core/Model/Design/Package.php(503): Mage_Core_Model_Design_Package->getSkinBaseUrl(Array)
#5 /home1/rajlosan/public_html/app/code/core/Mage/Core/Block/Abstract.php(1035): Mage_Core_Model_Design_Package->getSkinUrl('reset.css', Array)
#6 /home1/rajlosan/public_html/app/design/adminhtml/default/default/template/login.phtml(32): Mage_Core_Block_Abstract->getSkinUrl('reset.css')
#7 /home1/rajlosan/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home1/rajlosan...')
#8 /home1/rajlosan/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#9 /home1/rajlosan/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#10 /home1/rajlosan/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#11 /home1/rajlosan/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#12 /home1/rajlosan/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#13 /home1/rajlosan/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#14 /home1/rajlosan/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#15 /home1/rajlosan/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#16 /home1/rajlosan/public_html/app/code/core/Mage/Adminhtml/controllers/IndexController.php(82): Mage_Core_Controller_Varien_Action->renderLayout()
#17 /home1/rajlosan/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_IndexController->loginAction()
#18 /home1/rajlosan/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('login')
#19 /home1/rajlosan/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) )
#20 /home1/rajlosan/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#21 /home1/rajlosan/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#22 /home1/rajlosan/public_html/index.php(87): Mage::run('', 'store')
#23 {main}

Error log record number: 944127562686

Please tell me what is problem how to slove it.


texts: I've been given a csv of customers that I need to import using the Magento 2 API, and i've never created an API before. Can anyone point me in the right direction a starting point, or an example of how the import API would look like?


texts: How to trigger a minicart update after adding to cart

texts:
I have the following class i am using to test adding to cart in a custom way;

use Magento\Framework\App\Action;
use Magento\Checkout\Model\Cart;

class Add extends Action\Action
{
    protected $cart;

    public function __construct(
        Action\Context $context,
        Cart $cart
    ){
        $this->cart = $cart;
        parent::__construct($context);
    }

    public function execute()
    {
        $this->cart->addProductsByIds([1])
            ->save();
    }
}

This works great. When you view the cart it shows my item, all looks cool in the database etc. However, the minicart still shows as if there are no items in the basket.

If i then add another product to the cart using the "add to cart" button on the product or listing pages it adds to the cart and updates the minicart to show both items.

Where does it trigger the minicart to update itself or how does the minicart know it needs to refresh?


texts:
On the front page of our site, some of the modules are not loading with a simple error message in place. "We're sorry, an error has occurred while generating this email"

On looking in the exception log a Critical error exception is being thrown. can anyone offer some advice as to how to resolve this issue or where I should start with trying to trace the fault. I am presently using Magento 2.1.3.

  [2017-01-12 10:51:26] main.CRITICAL: Exception: Warning:
  getimagesize(): Filename cannot be empty in
  /home/vaperit5/public_html/vendor/magento/framework/Image/Adapter/AbstractAdapter.php
  on line 304 in
  /home/vaperit5/public_html/vendor/magento/framework/App/ErrorHandler.php:61
  Stack trace: 0 [internal function]:
  Magento\Framework\App\ErrorHandler->handler(2, 'getimagesize():...',
  '/home/vaperit5/...', 304, Array) 1
  /home/vaperit5/public_html/vendor/magento/framework/Image/Adapter/AbstractAdapter.php(304): getimagesize('') 2
  /home/vaperit5/public_html/vendor/magento/framework/Image/Adapter/AbstractAdapter.php(289): Magento\Framework\Image\Adapter\AbstractAdapter->getImageType() 3
  /home/vaperit5/public_html/vendor/magento/framework/Image/Adapter/Gd2.php(59):
  Magento\Framework\Image\Adapter\AbstractAdapter->getMimeType()


texts: Custom changes does not apply on magento 2.2

texts:
I reinstalled magento on localhost with the old database.
Even though all extensions work as they should my changes on the custom theme under //Magento_Theme/layout/default.xml do not apply. All css changes work just fine.

Any hints?

I am new to magento, sorry for any missleadings if there are.


texts: Magento2 - What is the best way to remove and add an image in magento using rest API?

texts:
For an SKU, I have multiple images. Every time I change something related to the SKU, I do a PUT. But before that I also DELETE the images using in a loop
https://<magentoInstance>/rest/all/V1/products/<mySKU>/media/<imageIDs>

Only the first image is getting deleted in this way.
For others the API is giving me "Product cannot be saved... " and does not delete.
So what is the best way to DELETE (all the images) and then POST new images. I PUT the product and then POST the images. Is this correct? Will there be any caching issues?


texts: White bars on magento product images with keepFrame(false)

texts:
I'm having trouble getting the product images to behave on product view pages.

This screen shot is from the product view page. You can see the white bars down the side. All these images seem to be resized to 700x700 with white backgrounds (which are part of the image not css). Full screen and thumbnails are fine.

The config for these images is defined in view.xml under the tag
The data for the gallery comes from getGalleryImagesJson() and the urls defined in getGalleryImages() in Gallery.php. The image is loaded with keepFrame(false) and with the size from product_page_image_large which is set to 780x1000 in view.xml. My understanding is this shouldn't add bars. I've also added <frame>false</frame> but no help.

I'm using magento 2.1.6 and have tried running magento catalog:images:resize and flushing caches etc.

Edit:
I've noticed I was looking at out of date magento code and keepFrame, constrainOnly and keepAspectRatio aren't forced any more. Also product_page_image_medium should now be product_page_image_medium_no_frame.

From the docs I've added this to the appropriate  _no_frame blocks in view.xml:

<frame>false</frame>
<constrain>true</constrain>
<aspect_ratio>true</aspect_ratio>

As I understand it this should give me images without borders with fixed aspect ratios a maximum of the defined size. NOW I've got correct aspect ratio images at the right size but with white bars on all edges. I should be missing those bars (unless I just don't understand).


texts: Magento upgrade from 2.2.3 -> 2.3 error in module-configurable-product

texts:
Upgrading M2 from 2.2.3 to 2.3 gives me the following error during the magento setup:upgrade process:

PHP Fatal error:  Uncaught TypeError: explode() expects parameter 2 to be string, boolean given in /vendor/magento/module-configurable-product/Setup/Patch/Data/UpdateManufacturerAttribute.php:55

/vendor/magento/module-eav/Setup/EavSetup.php::getAttribute can return false - which it does in my case:

$eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'manufacturer', 'apply_to') returns bool(false)

See vendor/magento/module-eav/Setup/EavSetup.php line 1163:

        if ($field !== null) {
            return isset($row[$field]) ? $row[$field] : false;
        }

The update script vendor/magento/module-configurable-product/Setup/Patch/Data/UpdateManufacturerAttribute.php in Line 55 does not check for booleans.

        $relatedProductTypes = explode(
            ',',
            $eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'manufacturer', 'apply_to')
        );

How do I fix this error?

Simply skipping this by exiting if the value is false gives me another error:

PHP Fatal error:  Uncaught Exception: User Error: Some transactions have not been committed or rolled back in /vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3955 ...


texts: Getting Problem In Creating Tab on Catalog Product Edit page at Admin

texts:
I want to create tab in product edit area in magento, here is the code I and using but the tab is not added.
Can someone check and tell me whats the problem ?

Emizentech_Nutriprof

config.xml-

<?xml version="1.0"?>
<config>
  <modules>
    <Emizentech_Nutriprof>
      <version>0.0.1</version>
    </Emizentech_Nutriprof>
  </modules>

  <global>
      <blocks>
        <nutriprof>Emizentech_Nutriprof_Block</nutriprof>
      </blocks>
      <helpers>
        <nutriprof>
          <class>Emizentech_Nutriprof_Helper</class>
        </nutriprof>
    </helpers>
  </global>

  <adminhtml>
    <layout>
      <updates>
        <nutriprof>
          <file>nutriprof.xml</file>
        </nutriprof>
      </updates>
    </layout>
  </adminhtml>

    <admin>
      <routers>
        <adminhtml>
          <args>
            <modules>
              <nutriprof before="Mage_Adminhtml">Emizentech_Nutriprof_Adminhtml</nutriprof>
            </modules>
          </args>
        </adminhtml>
      </routers>
    </admin>

</config>

Emizentech/Nutriprof/Block/Adminhtml/Catalog/Product/Tab.php-

<?php

class Emizentech_Nutriprof_Block_Adminhtml_Catalog_Product_Tab extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs
implements Mage_Adminhtml_Block_Widget_Tab_Interface
{
    mage::log("hi",null,"bye.log");
    public function _construct(){
        parent::_construct();
        $this->setTemplate('nutriprof/catalog/product/tab.phtml')
    }
    public function getTabLabel(){
        return $this->('My Customt Tabs');
    }
    public function getTabTitle(){
        return $this->__('Click here to view your custom tab content');
    }
    public function canShowTab(){
        return true;
    }
}

?>

app/design/adminhtml/default/default/layout/nutriprof.xml-

<?xml version="1.0"?>
<layout>
    <adminhtml_catalog_product_edit>
        <reference name="paroduct_tabs">
            <action method="addTab">
                <name>nutriprof</name>
                <block>nutriprof/adminhtml_catalog_product_tab</block>
            </action>
        </reference>
    </adminhtml_catalog_product_edit>
</layout>

app/design/adminhtml/default/default/template/nutriprof/catalog/product/tab.phtml-

hello


texts: Override Magento 2 core JS file Without affecting core functionilties

texts:
I'm trying to override

  module-sales/view/adminhtml/web/order/create/scripts.js file.

Added the custom js file in my requirejs-config.js file. But the issue is, What all changes I made to in custom script.js file is reflecting in Magento core functionalities also, For example in order page. I need to reflect the changes in my custom module pages only. How to make it possible?

Please, can anyone help?


texts: Get child category name and image - Magento 2.3

texts:
I'm new to magento, i like to create own module for getting child category name and image in category page. Created Vendor name as "Sub" and modulename as "Categories"

app/code/Sub/Categories/View/frontend/templates/sub.phtml

<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');//get current category
$subcats = $category->getChildrenCategories();
$_helper = $this->helper('Magento\Catalog\Helper\Output');
?>

    <?php
    foreach ($subcats as $subcat) {
        if ($subcat->getIsActive()) {
            $_category = $objectManager->create('Magento\Catalog\Model\Category')->load($subcat->getId());
            $_outputhelper = $this->helper('Magento\Catalog\Helper\Output');
            $subcaturl = $subcat->getUrl();

            $_imgHtml = '';
            if ($_imgUrl = $_category->getImageUrl()) {

                $_imgHtml = '';
                $_imgHtml = $_outputhelper->categoryAttribute($_category, $_imgHtml, 'image');

                /* @escapeNotVerified */
                echo '
getName() . '">' . $_imgHtml . 'Place custom code here

Learn More
';
            }
        }
    } ?>

app/code/Sub/Categories/Block/sub.php

<?php
namespace Sub\Categories\Block;

class Sub extends \Magento\Framework\View\Element\Template
{
    protected $_categoryHelper;
    protected $categoryFlatConfig;
    protected $topMenu;

    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \Magento\Catalog\Helper\Category $categoryHelper
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Catalog\Helper\Category $categoryHelper,
        \Magento\Catalog\Model\Indexer\Category\Flat\State $categoryFlatState,
        \Magento\Theme\Block\Html\Topmenu $topMenu
    )
    {
        $this->_categoryHelper = $categoryHelper;
        $this->categoryFlatConfig = $categoryFlatState;
        $this->topMenu = $topMenu;
        parent::__construct($context);
    }

    /**
     * Return categories helper
     */
    public function getCategoryHelper()
    {
        return $this->_categoryHelper;
    }

    /**
     * Return categories helper
     * getHtml($outermostClass = '', $childrenWrapClass = '', $limit = 0)
     * example getHtml('level-top', 'submenu', 0)
     */
    public function getHtml()
    {
        return $this->topMenu->getHtml();
    }

    /**
     * Retrieve current store categories
     *
     * @param bool|string $sorted
     * @param bool $asCollection
     * @param bool $toLoad
     * @return \Magento\Framework\Data\Tree\Node\Collection|\Magento\Catalog\Model\Resource\Category\Collection|array
     */
    public function getStoreCategories($sorted = false, $asCollection = false, $toLoad = true)
    {
        return $this->_categoryHelper->getStoreCategories($sorted, $asCollection, $toLoad);
    }

    /**
     * Retrieve child store categories
     *
     */
    public function getChildCategories($category)
    {
        if ($this->categoryFlatConfig->isFlatEnabled() && $category->getUseFlatResource()) {
            $subcategories = (array)$category->getChildrenNodes();
        } else {
            $subcategories = $category->getChildren();
        }
        return $subcategories;
    }
}

finally i create new block

{{block class="Sub\Categories\Block\sub" template="Sub_Categories::sub.phtml"}}

and assigned in widget.

Please let me know is any thing wrong in it. It does not change any thing in front-end.


texts:
I have read as many questions as i could find but still could not resolve this issue.

When i setup the secure and non-secure base url with https, then no images are shown on the front end. If i change non-secure to http then the images show but the URL show's the (!) where it should say secure with a padlock.

In  a nutshell, i am trying to load images over https.

Does anyone have any ideas?


texts:
I am having a form, and a select type field which is rendering good and have correct options but when I am editing an existing record it won't point to the corresponding value.

CODE

$fieldset->addField(
                'segment',
                'select',
                [
                    'name' => 'segment',
                    'label' => __('Segment'),
                    'id' => 'segment',
                    'title' => __('Segment'),
                    'required' => true,
                    'value' => $model->getSegmentCode(),
                    'values' => $options
                ],
                'sender_email'
            );

What I always got is select with options.

I can't screenshot when its open :D.


texts: not able to read parameters in Magento 2.2.6

texts:
How to read 'aref' parameter while creating new Magento account using :

http://mydomain.in/customer/account/create/?aref=88987990

I have implemented as below:

use Magento\Framework\Event\Observer;

use Magento\Framework\App\RequestInterface;

    /**
     * This is the method that fires when 'customer_register_success' event runs.
     *
     * @param Observer $observer
     */
    public function execute( Observer $observer ) {
    // Write to default log file: var/log/system.log
        $this->_logger->info('printing inside RegisterSuccess execute');

    $postData = $this->_request->getPostValue();
    $this->_logger->info('reached 1');
    if($postData) {
        $this->_logger->info('got $postData!!!');
    }

    $allParams = $this->_request->getParams();
    $this->_logger->info('reached 2');
    if($allParams) {
        $this->_logger->info('got $allParams!!!');
        $this->_logger->log(100,print_r($allParams,true));
    }

    $aref = $this->_request->getParam('aref', false);
    $this->_logger->info('reached 3');
    if($aref) {
        $this->_logger->info('got referrer!!!');
    }
    $this->_logger->info('reached 4');
}

Now when I am creating the new account with
http://mydomain.in/customer/account/create/?aref=88987990

it's giving logs below:

  [2018-11-26 05:02:27] main.INFO: printing inside RegisterSuccess
  execute [] []

  [2018-11-26 05:02:27] main.INFO: reached 1 [] []

  [2018-11-26 05:02:27] main.INFO: got $postData!!! [] []

  [2018-11-26 05:02:27] main.INFO: reached 2 [] []

  [2018-11-26 05:02:27] main.INFO: got $allParams!!! [] []

  [2018-11-26 05:02:27] main.INFO: reached 3 [] []

  [2018-11-26 05:02:27] main.INFO: reached 4 [] []

but it's not giving 'aref' value. What am I doing wrong?


texts: How to get product collection form brand_id in Magento 2?

texts: Basically i want to get product collection form brand_id.is there anyway to get collection.


texts: Create Magento payment method module with custom form

texts:
I'm relatively new to Magento, and I'm having a little difficulty with creating a payment method module with a custom form (based on my needs). I've already followed two or three tutorials (one of them on the official Magento website), but none of them covered the front-end part of the module. This tutorial for example, shows how to create a payment method module which derives from the paygate module, and it has its own form. OK, I understand that perhaps that is not the intention of those tutorials, but as I'm new to Magento development I'll need that kind of guide I guess.
By my understanding, it has to do with blocks and templates, but that's as far as I've gone. Any help is greatly appreciated.


texts: Is that possible to add order comment in to order email

texts: Is that possible to add some code into email template so that custom/guest can see order comment in new order email?


texts: Add Visibility Filter to product collection in category page in M2

texts:
I have to add a visibility filter on category page on the selection of particular Filter i.e Size from Layered navigation.

I have to show the products whose visibility is set as Catalog only.


texts: Magento2: Update additional options in cart page

texts:
I added the custom option to the shopping cart like this tutorial Cloudways .

My question is how can I update this option in Cart page like "Qty"?


texts:
I am having a Magento 2.2.6 site. I want to install PRODSECBUG-2198 patch.

Little bit confusing with the flow. Can anyone guide me?

Magento Decribed the Patch like this:

  This patch provides protection against the SQL injection vulnerability
  described under PRODSECBUG-2198 here. To quickly protect your
  store from this vulnerability only, install this patch. However, to
  apply protection against this vulnerability and others, you must apply
  the 2.3.1, 2.2.8, or 2.1.17 patch code. We strongly suggest that you
  install these full patches as soon as you can

Here what they are supposed to mean for

  you must apply the 2.3.1, 2.2.8, or 2.1.17 patch code. We strongly
  suggest that you install these full patches as soon as you can


texts:
When a invoice is created out of an order the status of the invoice is always set on paid.
Ofcourse, when an online payment is made the order should be set on paid but with a check money or bank transfer it should be an other status. Any ideas how to configure this?


texts: Magento 1.9.4 - I can add simple and configurable items to the cart, but in the cart configurable items are showing but simple items not showing, any suggestion?


texts: How to change my old url to the new one?

texts:
How can I change my old Url into new one for SEO betterment?

Under I have given the screen shot of my old product url.

Now How can I change this product url to- "http://example.com/fastrack-watch-3110sm03-in-bangladesh"

I am looking for the answer. Thanks in advance!


texts:
I am testing the sign up page using an email that is already registered and getting no error messages.

This is happening for the login page when using the wrong password, there is no error messages.

The page just refreshes and give no indication to an issue.

I have a Magento 2.1.6 site, does anybody have a solution to get the error messages to display.


texts: Magento 2: How to manage Floodlight Tags for Pages?

texts:
Would like to set different Floodlight Tags for (Homepage, Different Category Page, Product Page).

How to achieve this?

https://support.google.com/ds/answer/6029713?hl=en

How it will be useful?


texts: How to edit gallery images more view slider in product page?

texts:
My custom theme extend form magento-black. I had try edit gallery images slider in product page. but I can't change number items to show and slider working not correct with items carousel is normal.

I had found code in file

  vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml

I saw code js

<script type="text/x-magento-init">
{
    "[data-gallery-role=gallery-placeholder]": {
        "mage/gallery/gallery": {
            "mixins":["magnifier/magnify"],
            "magnifierOpts": <?php /* @escapeNotVerified */ echo $block->getMagnifier(); ?>,
            "data": <?php /* @escapeNotVerified */ echo $block->getGalleryImagesJson(); ?>,
            "options": {
                "nav": "<?php /* @escapeNotVerified */ echo $block->getVar("gallery/nav"); ?>",
                "loop": <?php /* @escapeNotVerified */ echo $block->getVar("gallery/loop"); ?>,
                "keyboard": <?php /* @escapeNotVerified */ echo $block->getVar("gallery/keyboard"); ?>,
                "arrows": <?php /* @escapeNotVerified */ echo $block->getVar("gallery/arrows"); ?>,
                "allowfullscreen": <?php /* @escapeNotVerified */ echo $block->getVar("gallery/allowfullscreen"); ?>,
                "showCaption": <?php /* @escapeNotVerified */ echo $block->getVar("gallery/caption"); ?>,
                "width": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_medium', 'width'); ?>,
                "thumbwidth": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'width'); ?>,
                "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height')
                    ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>,
                "height": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_medium', 'height')
                    ?: $block->getImageAttribute('product_page_image_medium', 'width'); ?>,
                "transitionduration": <?php /* @escapeNotVerified */  echo $block->getVar("gallery/transition/duration"); ?>,
                "transition": "<?php /* @escapeNotVerified */  echo $block->getVar("gallery/transition/effect"); ?>",
                "navarrows": <?php /* @escapeNotVerified */  echo $block->getVar("gallery/navarrows"); ?>,
                "navtype": "<?php /* @escapeNotVerified */  echo $block->getVar("gallery/navtype"); ?>",
                "navdir": "<?php /* @escapeNotVerified */  echo $block->getVar("gallery/navdir"); ?>"
            },
            "fullscreen": {
                "nav": "<?php /* @escapeNotVerified */  echo $block->getVar("gallery/fullscreen/nav"); ?>",
                "loop": <?php /* @escapeNotVerified */  echo $block->getVar("gallery/fullscreen/loop"); ?>,
                "navdir": "<?php /* @escapeNotVerified */  echo $block->getVar("gallery/fullscreen/navdir"); ?>",
                "arrows": <?php /* @escapeNotVerified */  echo $block->getVar("gallery/fullscreen/arrows"); ?>,
                "showCaption": <?php /* @escapeNotVerified */  echo $block->getVar("gallery/fullscreen/caption"); ?>,
                "transitionduration": <?php /* @escapeNotVerified */  echo $block->getVar("gallery/fullscreen/transition/duration"); ?>,
                "transition": "<?php /* @escapeNotVerified */  echo $block->getVar("gallery/fullscreen/transition/effect"); ?>"
            },
            "breakpoints": <?php /* @escapeNotVerified */ echo $block->getBreakpoints(); ?>
        }
    }
}

But I can't edit with our requirments
Below is design. Please help me change to correct design.
Thanks a lot.


texts: Magento category view drop down pagination?

texts:
For example, a drop down on the category page which shows a full numeric list of all of the pages within that category. When one of those numbers are selected, it would then go to that page. Not to be confused with, show X per page. This is separate and is not part of the theme I am using?

How can I go about doing this?


texts: looking for 'Search & Download' extension for Magento 2

texts:
Is there any extension available for Magento 2 that offers the ability to search for a SKU/ProductName and return result download links for related files ( such as driver firmware, user manual,etc)... something like this https://downloadcenter.intel.com/
I could only find product attachments extensions, which add a tab to the product page.

Thanks!


texts:
I have a payment module for Magento 2.2 for one Croatian online payment provider, i tried it to install on Magento 2.3.1 and everything is fine but when i want to go on Checkout it says
https://www.example.com/rest/default/V1/guest-carts/auIzs7o1NSN0KyEoq6jHv5MJkbcnUbC7/estimate-shipping-methods  - Failed to load resource: the server responded with a status of 500 () and i have no shipping methods?

Any help??ž

Thanks!


texts:
I constantly get into a personal dilemma about how to use group names in my models/helpers etc

Should I be camel casing my block, helper, model group names in config xml?

Say i have a namespace/module like so:

Me_MyModule

should my config xml look like this for the models section:

<models>
    <me_myModule>
        <class>Me_MyModule_Model</class>
    </me_myModule>
</models>

which would mean creating models like so:

Mage::getModel('me_myModule/the_model_name');

or should i stick to all lower case? i.e.:

<models>
    <me_mymodule>
        <class>Me_MyModule_Model</class>
    </me_mymodule>
</models>

or even omit the namespace (again with the camel case / no camel case dilemma:

<models>
    <myModule>
        <class>Me_MyModule_Model</class>
    </myModule>
</models>


texts: How to duplicate the shipments grid in another custom url from the admin panel?

texts:
my goal is duplicate the default shipments grid in another page from the admin panel.

So far I've created my layout xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <update handle="styles"/>

        <referenceContainer name="content">
            <uiComponent name="vendor_modulename_shipments_grid"/>
        </referenceContainer>

</page>

and in the ui_component/vendor_modulename_shipments_grid.xml, I've added this:

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">vendor_modulename_shipments_grid.vendor_modulename_listing_data_source</item>
        </item>
    </argument>
    <settings>
        <buttons>
            <button name="add">
                <url path="*/*/new"/>
                <class>primary</class>
                My new button
            </button>
        </buttons>
        <spinner>shipments_columns</spinner>
        <deps>
            <dep>vendor_modulename_shipments_grid.vendor_modulename_listing_data_source</dep>
        </deps>
    </settings>
    <dataSource name="vendor_modulename_listing_data_source" component="Magento_Ui/js/grid/provider">
        <settings>
            <updateUrl path="mui/index/render"/>
        </settings>
        <dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="vendor_modulename_listing_data_source">
            <settings>
                <requestFieldName>id</requestFieldName>
                <primaryFieldName>entity_id</primaryFieldName>
            </settings>
        </dataProvider>
    </dataSource>
    <columns name="my_column_name">
        <column name="order_increment_id">
            <settings>
                <filter>text</filter>
                 Order #
            </settings>
        </column>
    </columns>
</listing>

I've didn't want to copy all of the columns from the core file: vendor/magento/module-sales/view/adminhtml/ui_component/sales_order_shipment_grid.xml , so I've added only one : order_increment_id.

So far I am getting this message : Not registered handle vendor_modulename_listing_data_source. Please advice :)


texts: Is there any way to get recipient email in all email templates in Magento 2?

texts:
I want to access recipient email in all email templates,

PS : I tried adding customer.email variable in footer but it doesn't work for all email templates like newsletter, etc.


texts: Magento 2.2.5, Is possible to restrict place order based on the customer group?

texts: In Magento 2.2.5, I need to restrict place order for some customers who assigned to certain group. Is any possibility to restrict place order based on the customer group?


texts: Magento User Name and Password are visible in browser network

texts: I don't know it's normal or what but recently I found that we can see the entered admin username and password in the browser network


texts:
I have implemented an extension for my desktop theme, and I want to disable this extension on mobile theme (added as exception).

I know I can do this by creating separate store view for both themes but I don't want to define 2 store views.

Is there any way to implement this in the themes local.xml file or any other place?


texts: Magento - Paypal Express Checkout's return url

texts:
does anyone knows the Return URL for Paypal Express Checkout of magento 1.6.0?

I know that for standard its
https://www.yoursite.com/paypal/standard/success/

Thanks..