texts: How to boost Magento speed on localhost/xampp?

texts:
I have checked that Magento is running such slowly on localhost although my php.ini has the requirements to run Magento. However, its low performance and speed lack make my work so much slow and I would like to hear from you how I can speed up Magento locally, maybe installing some cache extension or something else like Memcached, Xcache or APC.

I'm on Windows 10 and xampp.


texts: Product Sort By Price: Low to High and High to Low Magento2.3

texts: Can you suggest me how to change the sorting option on my site? I am using Magento 2.3.1.


texts: Magento 2: how to change simple product's status when stock is 0?

texts:
I just added 1 configurable product (tshirt) with 3 sizes available.

I did a test buy and noticed that when a size is out of stock, still appears as an available size on the product page. Then if user selects that size, magento shows the "This item is out of stock" message.

This can be solved by setting manually the simple product size to "Disabled".

Is it possible that the status changes from "enabled" to "disabled" automatically when a size is out of stock?


texts: Magento Admin: Display 404 page on login to admin in content section

texts:
What is working: All admin and its functionality is working and 404 error page display in content section only once though top menu always display.

Error Produce: When i login to admin, it display 404 page in central content section Only. Version : 1.9.0.1

I have no problem to access and working in admin but this error is awkward so would be great if fixed.


texts: How to add or remove header.links in magento2?

texts: I am searching header.links block to remove one link and add some links but I am not getting where to make changes. Suggest me some solution


texts: Error on overriding magento 2 block with the Plugin(Intercepter)

texts:
I am trying to override a Magento 2 block with the help of di.xml and Plugin(Interceptor). But I am getting an error message

[2017-09-27 05:17:33] main.CRITICAL: Packagename\Modulename\Plugin\Block\Export doesn'n extend \Magento\Framework\Data\Form\Element\AbstractElement [] []

My di.ml is as below

 <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\OfflineShipping\Block\Adminhtml\Form\Field\Export">
        <plugin name="zipcodeExport" type="Packagename\Modulename\Plugin\Block\Export" />
    </type>
</config>

and my plugin file code is as below

namespace Packagename\Modulename\Plugin\Block;
class Export
    {
      public function beforeGetElementHtml(\Magento\OfflineShipping\Block\Adminhtml\Form\Field\Export $subject)
      {
           $logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
           $logger->debug(__METHOD__ . ' -111- ' . __LINE__);

      }
    }


texts: Magento1.9 - get product with specific set of categoryIds (filter by category arrays)

texts:
In my website there are N categories, let's say 1,2,3,4,5,6.

Given $categoryIds = array(1,2,3) I need to get all the products that belong to ALL and EXACTLY the categories listed in $categoryIds (which is a subset of N).

e.g,

$productA->getResource()->getCategoryIds($productA) == (1,2,3)
$productB->getResource()->getCategoryIds($productB) == (2,4,5,6)
$productC->getResource()->getCategoryIds($productC) == (1,2,3,4)
$productD->getResource()->getCategoryIds($productD) == (1,2)
$productE->getResource()->getCategoryIds($productE) == (4,5,6)

Only $productA must be selected by my script.

How can I customize following code to get it?

$collection = Mage::getResourceModel('catalog/product_collection')
            ->joinField('category_id','catalog/category_product','category_id','product_id=entity_id',null,'left')
            ->addAttributeToFilter('category_id', array('in' => $categoryIds))
            ->addAttributeToSelect('*');

$collection->addFinalPrice();
$collection->getSelect()
        ->where("price_index.price <= $maxLimit AND price_index.price >= $minLimit")
        ->group('e.entity_id')
        ->limit(10)
        ->order(new Zend_Db_Expr('RAND()'));


texts: Upsell and related product hide when recently active product display

texts:
I have a strange problem in magento Enterprise 1.14.1 ,there are three block in product page,upsell,related and recently viewed product.When open Product page first time, then display two blocks
upsell and related product and when click and open a product in another tab for display recent viewed product and refresh page first one then two block (upsell and related product) hide and recent viewed product display.When refresh cache again displays all blocks(upsell,related and recent viewed product)
Can anybody tell me please what's problem here?


texts: changing position of quantity block in product page

texts:
I am trying to change the position of quantity block in product page. I was trying to create a new quantity module named qty.phtml in /product/view folder and linked it in view.phtml using the following code

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

The code for quantity module (qty.phtml)

    <?php $_product = $this->getProduct(); ?>
    <?php $buttonTitle = $this->__('Add to Cart'); ?>
    <?php if ($_product->isSaleable()): ?>

    <?php if(!$_product->isGrouped()): ?>

    <strongx> <?php echo $this->__('Qty:') ?> </strongx>

    <input type="text" name="qty" id="qty" maxlength="12"
    value="<?php echo $this->getProductDefaultQty() * 1 ?>"
    title="<?php echo Mage::helper('core')->quoteEscape($this->__('Qty')) ?>"
    class="input-text qty" />

    <?php endif; ?>

<?php endif; ?>

I have also edited catalog.xml file in

app/design/frontend/base/default/layout

i put this code in my catalog.xml file

<block type="catalog/product_view" name="product.info.qty" as="qty" template="catalog/product/view/qty.phtml">

<block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
                    Bottom Block Options Wrapper

                </block>

But after putting this code. It is breaking my product view page.

I do not have catalog.xml file in my theme directory. I only have local.xml file in it.

I am giving the image of current view of my product page and also what modification i am looking for.

  Note: I am using custom theme called Ultimo

Thanks

What it look like now

What i want is


texts: I created for a few products some custom options. Is it possible to translate these labels of the custom options? I have a translation .csv file, but adding it there didn't seem to work.


texts: InvalidArgumentException - Magento functional Testing

texts:
I am executing the functional test for custom module.
I am getting below error.

  Namespace\Module\Test\TestCase\CreatePincodeEntityTest::test with data set "CreatePincodeEntityTestVariation1" (CreatePincodeEntityTestVariation1)
  InvalidArgumentException: Cannot generate class "Namespace\Module\Test\Block\Adminhtml\Pincode\Edit\PincodeForm". Unknown type block
  in /dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Code/Generator.php:62

How to solve the above error.

If i run generate.php, getting same error.


texts: Getting Fatal Error from Cron php script but runs 100% in browser

texts:
I have a custom dataflow export script that when i run via the browser it works 100% no issue.
But soon as i add it to a cron i get a fatal error in my email report

"Fatal error: Class 'Mage' not found in /home/#######/public_html/custom_scripts/dataflow_scheduled_export.php on line 87"

Struggling to work out why it runs fine from browser but not via cron job???

Help needed please


texts: How to get frontools styles (less) command to work

texts:
I am trying to use frontools to compile my Magento theme. Before I used the standard grunt workflow but it is very slow as you might know.

I installed https://github.com/SnowdogApps/magento2-frontools as described and executed gulp setup

I also customied the tools/helper/less.js by adding gulp-debug

[ ... Around line 37 ]

var debug = require('gulp-debug');
return gulp.src(lessFiles)
  .pipe(debug({title: 'unicorn:'}))
  .pipe(plugins.plumber({ errorHandler: plugins.notify.onError('Error: <%= error.message %>') }))

[...]

Output is

$ gulp styles --theme example
[18:07:09] Using gulpfile ~/my/workspace/example.de/vendor/snowdog/frontools/gulpfile.js
[18:07:09] Starting 'styles'...
[18:07:09] Starting 'less:example:en_US'...
[18:07:10] Starting 'less:example:de_DE'...
[18:07:10] Finished 'styles' after 1.24 s
[18:07:10] unicorn: 0 items
[18:07:10] unicorn: 0 items
[18:07:10] Finished 'less:example:en_US' after 1.25 s
[18:07:10] Finished 'less:example:de_DE' after 92 ms

my theme.json

{
    "backend": {
      "src": "app/design/adminhtml/Magento/backend",
      "dest": "pub/static/adminhtml/Magento/backend",
      "locale": [
        "en_US"
      ],
      "lang": "less",
      "default": true,
      "area": "adminhtml",
      "vendor": "Magento",
      "name": "backend",
      "files": [
        "css/styles-old",
        "css/styles"
      ]
    },
    "blank": {
      "src": "vendor/magento/theme-frontend-blank",    <---- i have change this, with app/design also it was not working
      "dest": "pub/static/frontend/Magento/blank",
      "locale": [
        "en_US"
      ],
      "lang": "less",
      "default": true,
      "area": "frontend",
      "vendor": "Magento",
      "name": "blank",
      "files": [
        "css/styles-m",
        "css/styles-l",
        "css/email",
        "css/email-inline"
      ]
    },
    "luma": {
      "src": "app/design/frontend/Magento/luma",
      "dest": "pub/static/frontend/Magento/luma",
      "locale": [
        "en_US"
      ],
      "lang": "less",
      "default": true,
      "area": "frontend",
      "vendor": "Magento",
      "name": "luma",
      "files": [
        "css/styles-m",
        "css/styles-l"
      ]
    },
    "example": {
      "src": "app/design/frontend/Example/default",
      "dest": "pub/static/frontend/Example/default",
      "locale": [
        "en_US",
        "de_DE"
      ],
      "parent": "blank",
      "lang": "less",
      "area": "frontend",
      "vendor": "Example",
      "name": "default",
      "files": [
        "css/styles-m",
        "css/styles-l"
      ]
    },
    "sass-blank": {
      "src": "vendor/snowdog/theme-blank-sass",
      "dest": "pub/static/frontend/Snowdog/blank",
      "locale": [
        "en_US",
        "pl_PL"
      ],
      "lang": "scss",
      "postcss": [
        "plugins.autoprefixer()"
      ]
    },
    "sass-custom": {
      "src": "vendor/snowdog/theme-custom",
      "dest": "pub/static/frontend/Snowdog/custom",
      "parent": "sass-blank",
      "locale": [
        "en_US",
        "pl_PL"
      ],
      "lang": "scss",
      "postcss": [
        "plugins.autoprefixer()"
      ]
    }
}


texts: Reindex Magento Error On MAMP ( Mac os x )

texts:
I am new to magento and i have just installed Magento locally on my mac.
When i login into the Magento admin panel i get this error :

"One or more indexers are invalid. Make sure your Magento cron job is running."

After a bit of research i found that i need to run the following command from the root directory of my Magento installation.

bin/magento indexer:reindex

However i keep getting this message after running the command "Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html%   "

My PHP version is 7.0.8 so i'm not sure why i am getting this error.

Thanks !


texts: File Upload field on checkout page with shipping address Magento 2

texts:
I have create a file upload field on check out page with shipping address.But file is not going to upload.

I want to upload a file in specific folder and save the file path in data base.Please see the below code and where am i doing wrong?.

$customAttributeCode = 'custom_field';
    $customField = [
    'component' => 'Magento_Ui/js/form/element/abstract',
    'config' => [
        // customScope is used to group elements within a single form (e.g. they can be validated separately)
        'customScope' => 'shippingAddress.custom_attributes',
        'customEntry' => null,
        'template' => 'ui/form/field',
        'elementTmpl' => 'ui/form/element/media',
        'tooltip' => [
            'description' => 'this is what the field is for',
        ],
    ],
    'dataScope' => 'shippingAddress.custom_attributes' . '.' . $customAttributeCode,
    'label' => "Client's ID",
    'provider' => 'checkoutProvider',
    'sortOrder' => 255,
    /* 'validation' => [
       'required-entry' => true
    ], */
    'options' => [],
    'filterBy' => null,
    'customEntry' => null,
    'visible' => true,
    'formId'=>'client',
];
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['shipping-address-fieldset']['children'][$customAttributeCode] = $customField;

       return $jsLayout;

Can any one help me on this problem ? Any references or suggestions are highly appreciated.


texts: Admin url and themes not working in Magento 2

texts:
I have installed Magento2 from git repository. Currently I'm not able to access admin URL and also theme is not applying.

I'm also referred http://devdocs.magento.com/guides/v2.0/install-gde/trouble/tshoot_no-styles.html and in /pub/static/ folder frontend and adminhtml directories are missing, only _requirejs folder exist.

Looks like I missed some commands to run. Any suggestions will be helpful.


texts: Additional Attributes of current product

texts:
how to get all additional attributes name and value for current product

i wrote below code but its not working

    <?php
    $_helper = $this->helper('catalog/output');
    $_product = $this->getProduct()
?>
<?php if($_additional = $this->getAdditionalData()): ?>
<?php foreach ($_additional as $_data): ?>
<?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>
<?php endforeach;?>
<?php endif; echo "ssss";?>


texts:
(I know this is not a programming question but don't know where else to put it )

I come from been a magento 1 junior developer for maybe a couple of months, then M2 hit and we are focusing more on M2, I have learned magento(and also you might have) by having a specific situation and google about it but I want to go even a bit deeper.

Can anyone advice me how to become a better magento 2 developer ? for now I want to focus on backend situation, any books , sites will be good.

Thanks in advance


texts:
I'm new to Magento and I have an  architecture question.
My company is looking to create a B2B website. But I might have to stick with Magento2 CE Edition.

Requirements:

2 brands, with different products, different categories on the same website
quickly change from one brand "space" to another
home page displaying two different "spaces" where the business customer can select where he wants to shop
Different prices for each business customers
shared cart between the two spaces

We also have a B2C website on Magento 1 already online, with same requirements except for the price. It is configured with only one store and two different store views for each brand. Is this the right way to meet to requirements ?
Because from what I've read, I should create two different stores.

Thank you in advance for your assistance with this.
Vincent


texts: Blocks HTML output cache issue, static blocks not displayed when enable this in magento 1.9.2.4?

texts:
I have an issue, When I enable Blocks HTML output cache My static blocks were not displayed in product description page, when I disable this everything is working fine.
Please suggest what can I do to fix this.


texts:
How to add custom JS to just the checkout page?

I found this tutorial, but as far as I can tell it will add JS to the entire site.


texts: Magento 1.9 add attribute to Credit memo item

texts:
I am trying to add a quantity to return to stock data to the credit memo item.

I have made 2 install scripts. One adds a column to the database

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

$installer->run("
  ALTER TABLE sales_flat_creditmemo_item ADD returned_to_stock INT(10);
");

$installer->endSetup();

?>

The second one has to add an attribute to the item so that I can use methods like setReturnToStock(value)

<?php
$installer = Mage::getResourceModel('sales/setup', 'sales_setup');

$installer->startSetup();

$installer->addAttribute('creditmemo_item', 'returned_to_stock', array('type' => 'int', 'grid' => true));

$installer->endSetup();

?>

The SQL runs just fine, the second script also runs without errors, but when I log a memo item the new field is not there. So I am guessing it doesn't work.

How do I check:

1)The correct syntax for the addAttribute('creditmemo_item'

2)If the attribute has been added or if it didn't work to be 100% sure


texts: "What's hot" / "best selling" showing deleted products

texts:
I have a widget on the homepage of www.crystelleclothing.com which displays the best welling products... Problem is, it shows blank products where the best selling ones have been deleted...

Any thoughts would be great.


texts: I want to create a restriction on a shipping method that it can only be used 1 hour after the most recent use by a customer.


texts: Cookie displaying popup again and again Magento-2

texts:
As no one helped me before. That's why I am asking again for help in creating a cookie that help to display popup only one time.
What should I change in this script so that it displays popup only one time?
I am using the following code ;

 <script>
                require([
                    "jquery",
                    'Magento_Ui/js/modal/modal',

                    "jquery/jquery.cookie"
                ], function(  $, modal  ) {
                    //<![CDATA[
                    $(function () {
                        function setCookie(cname, cvalue, exdays) {
                            var d = new Date();
                            d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
                            var expires = "expires="+d.toUTCString();
                            document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
                        }
                        function getCookie(cname) {
                            var name = cname + "=";
                            var ca = document.cookie.split(';');
                            for(var i = 0; i < ca.length; i++) {
                                var c = ca[i];
                                while (c.charAt(0) == ' ') {
                                    c = c.substring(1);
                                }
                                if (c.indexOf(name) == 0) {
                                    return c.substring(name.length, c.length);
                                }
                            }
                            return null;
                        }

                        var subscribeFlag = getCookie('cleverNewsletterSubscribeFlag');

                        $('#zoo_newsletter .subcriper_label input').on('click', function () {
                            if ($(this).parent().find('input:checked').length > 0) {
                                setCookie('cleverNewsletterSubscribe','true',2147483647);
                            } else {
                                setCookie('cleverNewsletterSubscribe',null,1);
                            }
                        });

                        $('#zoo_newsletter button.btn-novetty').on('click', function () {
                            var button = $(this);
                            setTimeout(function () {
                                if (!button.parent().find('input#zoo-newsletter').hasClass('validation-failed')) {
                                    setCookie('cleverNewsletterSubscribeFlag','true',2147483647);
                                }
                            }, 500);
                        });

                        if (!(subscribeFlag) && !getCookie('cleverNewsletterSubscribe')) {
                            var options = {
                                type: 'popup',
                                modalClass: 'zoo-newsletter-popup',
                                responsive: true
                            };
                            var popup = modal(options, $('#zoo_newsletter'));
                            setTimeout(function(){
                                $('#zoo_newsletter').modal('openModal');
                            },<?php echo $delay; ?>);

                        }
                    });
                    //]]>
                })

Any help and consideration is appreciated


texts: magento 2 : how to display product name in cart according to store view(English/Arabic)

texts:
In the current scenario when the user adds a product from the English view on the cart page it displays product English name and when I switch the store from English to Arabic product name still coming in English even on the backend I have saved Arabic for that product name for Arabic store view.

Now I want to display product name in cart according to store view if store view is English product name should be in English and if the store view is Arabic product name should be in Arabic.


texts: Need assistance with removing or updating tiered pricing

texts:
I am looking to update the tiered pricing on our website, but cannot find any tiers in the "Product Information/Pricing" section of our products.

Is it possible that this was hardcoded in the past by a previous employee?


texts: Magento 2: Can't run magento setup:upgrade on mamp

texts:
Newbie here:

I have downloaded the latest copy of Magento 2.2.5

I have manually added the Molly theme

I get to this part of the installation where I need to enable some modules but I can't run setup:upgrade: Molly 2 Documentation

This is the screenshot from enabling a module

This is the screenshot from trying to run setup:upgrade

Also after enabling the modules, I can't get to the website and looking at /var/report/ it says I have to run the setup:upgrade but am unable to. Please help!

system.log shows:

  [2018-08-24 18:33:10] main.WARNING: Memory size allocated for the
  temporary table is more than 20% of innodb_buffer_pool_size. Please
  update innodb_buffer_pool_size or decrease batch size value (which
  decreases memory usages for the temporary table). Current batch size:
  100000; Allocated memory size: 50000000 bytes; InnoDB buffer pool
  size: 134217728 bytes. [] [] [2018-08-24 18:33:10] main.WARNING:
  Memory size allocated for the temporary table is more than 20% of
  innodb_buffer_pool_size. Please update innodb_buffer_pool_size or
  decrease batch size value (which decreases memory usages for the
  temporary table). Current batch size: 100000; Allocated memory size:
  50000000 bytes; InnoDB buffer pool size: 134217728 bytes. [] []
  [2018-08-24 18:33:10] main.WARNING: Memory size allocated for the
  temporary table is more than 20% of innodb_buffer_pool_size. Please
  update innodb_buffer_pool_size or decrease batch size value (which
  decreases memory usages for the temporary table). Current batch size:
  100000; Allocated memory size: 50000000 bytes; InnoDB buffer pool
  size: 134217728 bytes. [] [] [2018-08-24 18:33:10] main.WARNING:
  Memory size allocated for the temporary table is more than 20% of
  innodb_buffer_pool_size. Please update innodb_buffer_pool_size or
  decrease batch size value (which decreases memory usages for the
  temporary table). Current batch size: 100000; Allocated memory size:
  50000000 bytes; InnoDB buffer pool size: 134217728 bytes. [] []
  [2018-08-24 18:33:11] main.WARNING: Memory size allocated for the
  temporary table is more than 20% of innodb_buffer_pool_size. Please
  update innodb_buffer_pool_size or decrease batch size value (which
  decreases memory usages for the temporary table). Current batch size:
  100000; Allocated memory size: 50000000 bytes; InnoDB buffer pool
  size: 134217728 bytes. [] [] [2018-08-24 18:33:11] main.WARNING:
  Memory size allocated for the temporary table is more than 20% of
  innodb_buffer_pool_size. Please update innodb_buffer_pool_size or
  decrease batch size value (which decreases memory usages for the
  temporary table). Current batch size: 100000; Allocated memory size:
  50000000 bytes; InnoDB buffer pool size: 134217728 bytes. [] []

Running php -v
PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies


texts: How to display color and size in magento 2

texts:
I am using magento 2.2. I've both color and size attribute and I want to display  on frontend

I tried and colors are showing in left side:


texts: Magento 2.2.2 : set different design for multi website?

texts:
Is it possible to set design according to a website? I have two websites have a single store and single store view and want to apply color scheme combination differently according to a website.

As we did in M1 we just need to set skin path according to a website. How can I do in Magento 2.2.2?


texts: Magento 2: Custom product collection with layered navigation

texts: How can we load custom product collection with layered navigation? Same like search result page but with custom product collection. I have checked here Magento 2 - Layered Navigation for Custom Product Collection but still there is no any accepted answer.


texts: Magento 1.9 - Multi-Website Sales Order View Restrict based Admin-User

texts:
I am running Multi-website.

I have two stores for my two vendors both of my vendors are my admin users, [system->permission->users]. If vendor-1 login to admin panel they also able to view vendor-2 store and vice versa.

  How can I restrict Admin-User by website?


texts: SQLSTATE[42000]: Syntax error or access violation Magento 2

texts:
I face the error when run command: upgrade, reindex, I have try all solution on many reports but not solved this
  SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'created_in' used in key specification without a key length, query was: CREATE TABLE IF NOT EXISTS `customer_grid_flat` (
      `entity_id` int UNSIGNED NOT NULL COMMENT 'Entity ID' ,
      `name` text NULL COMMENT 'Name' ,
      `email` varchar(255) NULL COMMENT 'Email' ,
      `group_id` int NULL COMMENT 'Group_id' ,
      `created_at` timestamp NULL default NULL COMMENT 'Created_at' ,
      `website_id` int NULL COMMENT 'Website_id' ,
      `confirmation` varchar(255) NULL COMMENT 'Confirmation' ,
      `created_in` text NULL COMMENT 'Created_in' ,
      `dob` date NULL COMMENT 'Dob' ,
      `gender` int NULL COMMENT 'Gender' ,
      `taxvat` varchar(255) NULL COMMENT 'Taxvat' ,
      `lock_expires` timestamp NULL default NULL COMMENT 'Lock_expires' ,
      `shipping_full` text NULL COMMENT 'Shipping_full' ,
      `billing_full` text NULL COMMENT 'Billing_full' ,
      `billing_firstname` varchar(255) NULL COMMENT 'Billing_firstname' ,
      `billing_lastname` varchar(255) NULL COMMENT 'Billing_lastname' ,
      `billing_telephone` varchar(255) NULL COMMENT 'Billing_telephone' ,
      `billing_postcode` varchar(255) NULL COMMENT 'Billing_postcode' ,
      `billing_country_id` varchar(255) NULL COMMENT 'Billing_country_id' ,
      `billing_region` varchar(255) NULL COMMENT 'Billing_region' ,
      `billing_street` varchar(255) NULL COMMENT 'Billing_street' ,
      `billing_city` varchar(255) NULL COMMENT 'Billing_city' ,
      `billing_fax` varchar(255) NULL COMMENT 'Billing_fax' ,
      `billing_vat_id` varchar(255) NULL COMMENT 'Billing_vat_id' ,
      `billing_company` varchar(255) NULL COMMENT 'Billing_company' ,
      PRIMARY KEY (`entity_id`),
      INDEX `CUSTOMER_GRID_FLAT_GROUP_ID` (`group_id`),
      INDEX `CUSTOMER_GRID_FLAT_CREATED_AT` (`created_at`),
      INDEX `CUSTOMER_GRID_FLAT_WEBSITE_ID` (`website_id`),
      INDEX `CUSTOMER_GRID_FLAT_CONFIRMATION` (`confirmation`),
      INDEX `CUSTOMER_GRID_FLAT_CREATED_IN` (`created_in`),
      INDEX `CUSTOMER_GRID_FLAT_DOB` (`dob`),
      INDEX `CUSTOMER_GRID_FLAT_GENDER` (`gender`),
      INDEX `CUSTOMER_GRID_FLAT_LOCK_EXPIRES` (`lock_expires`),
      INDEX `CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID` (`billing_country_id`),
      FULLTEXT `FTI_AC9FBFAE9FBD3A0B02DBA986349612A6` (`name`, `email`, `taxvat`, `shipping_full`, `billing_full`, `billing_firstname`, `billing_lastname`, `billing_telephone`, `billing_postcode`, `billing_region`, `billing_street`, `billing_city`, `billing_fax`, `billing_vat_id`, `billing_company`)
    ) COMMENT='customer_grid_flat' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci

Any help? Thank in advance.


texts: Migration from external db of Magento 1.X to Magento 2.X

texts: can we use M1 db different it was earlier means suppose we migration m1_db.sql of a site in m2 but now we have another external db m1_db_1.sql different site's db and import this also into M2 will be any issue during migration only products,customers and orders entities.


texts: Create discount if products from two specific categories are in cart

texts:
I need to create a $100 discount on the cart total if products from two specific categories are added to the cart. I can only get the cart to apply the rule always -- despite the rules saying otherwise -- or not at all.

Attempt number 1, yields no discount

Attempt number 2, gives discount regardless of cart contents


texts:
I'm new to PHP and magento.  I'm trying to echo out a Custom Global Var called "my_code" in a .php file in the root to debug.  None of the samples seem to work.  Is there some reference I need to include?

<?php
require_once 'app/Mage.php';
//echo "1"; //This code works when uncomment

$value = Mage::getModel('core/variable')->setStoreId(Mage::app()->getStore()->getId())->loadByCode('my_code')->getValue('text');

echo $value; //This doesn't


texts:
We are going to build a magento2 website which is already in magento1, and having 300+ CMS Pages and some of CMS Blogs.

For that i'm looking for the theme which supports the page builder extension.

Any help will be appreciated. Thanks in advance


texts:
I tried  to write a script to crawl my web store and generate fpc (lesti fpc) caching. Does anyone recommend any good scripts for doing that?

My script looks like this now, but I don't think its very efficient.

ALIAS='@ddc.production'
URL='http://mywebsite.com'
wget $URL/sitemap.xml --no-cache --output-document - | egrep -o "http://$URL[^<]+" | while read line; do time curl -A 'Cache Warmer' -s -L $line > /dev/null 2>&1 echo $line
done

Is there any other good way to generate cache periodically every night?


texts: Error on my Logs System Undefined index : HTTPS

texts:
I've a problem with a webservice on my magento.
After an update HTTP to HTTPS of my website (with Let's Encrypt), i've lot of problems.

It writes :

ERR (3): Notice: Undefined index: HTTPS  in /var/www/usapboutique.fr/public_html/app/code/core/Mage/Core/Model/Url.php on line 1025

On my Url.php that corresponds to

if($_SERVER['HTTPS'] == 'on'){
    $url = str_replace('http://', '//', $url);
}

Someone has an idea of this type of error ?
Thx


texts: Cart shows default customer group instead of logged in group

texts:
I have a strange one.

I took a new install of magento, and a new theme and connected them to an existing magento website db.

When I log to my account as 'dealer' I can go to the homepages and interior pages and I am a dealer and can see my pricing.

As soon as I enter the cart my customer group is shown as the default group and not 'dealer', if I go back into the product pages I can see I am a dealer again.

Any clue to what in the world is going on?

I am using this to show my group:

<?
if(Mage::getSingleton('customer/session')->isLoggedIn()){
      // Get group Id
      $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
      //Get customer Group name
      $group = Mage::getModel('customer/group')->load($groupId);
      echo $group->getCode();
}
?>

If you want to test you can create an account here and it will set you as 'Dealer'.

http://tinyurl.com/mqufujc

You can see it show the customer group on the top left if you are logged in.

I tried adding this at the top of the head.phtml and although it echoed the correct customer_group it did not solve the issue with the prices rendering incorrectly.

if(Mage::getSingleton('customer/session')->isLoggedIn()){
      // Get group Id
    $customerz = Mage::getSingleton('customer/session')->getCustomer();
    $email = $customerz->getEmail();
    $customerz->loadByEmail($email); //load customer by email id
    $newGroupId = $customerz->getGroupId();
    $customerz->setGroupId($newGroupId)->save();
}

I have uploaded all of the files from a fresh magento install app/code/core.

I have tried with the default theme and without and no change.

SOLVED

Thank you for your help, it was the Automatic Group Assignment issue.

This is a great module that I am using for the advanced login with automatic customer group assignment and custom fields.
http://www.magentocommerce.com/magento-connect/registration-form-advanced.html


texts: How to get selected shipping rate for logged in and guest customer

texts:
I am trying to get selected shipping rate for logged in and guest customer, for this I am using :

$this->_checkoutSession->getShippingAddress()->getShippingAmount();

but it is not working.


texts: How to sperate the attribute values using comma?

texts:
To display the configurable attribute in cart popup i have given the below coding:

    <p class="attri-value">
        <?php $options = $_item->getProduct()->getTypeInstance(true)->getOrderOptions($_item->getProduct()); ?>
        <?php $product = $_item->getProduct(); ?>
     <?php
            foreach($options['attributes_info'] as $key => $value){
            echo ' '.$value['value'];
            }
    ?>
   </p>

Now when the attribute values are getting displayed, the values arw displyed like ,pink,M I want it to get displayed like pink,M . I just want to diplay the comma only in between them.


texts: Get products price with tax and discounts in cart/order (Criteo tags)

texts:
For the implementation of Criteo tags, I'm trying to get the price (among other things) of all products in the cart (and success page) with tax and discounts.
I'm currently doing something like this, but it only displays price with discount and without tax :

$cartAllItems = Mage::getModel('checkout/cart')->getItems();
foreach ($cartAllItems as $item){
    $price = Mage::helper('tax')->getPrice($item->getProduct(), $item->getProduct()->getFinalPrice());
}

I've been testing around a lot of things and can't make it work.
Thx for the help


texts: Magento 2: different way get field of a collection

texts:
I have this helper class in Magento 2:

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    protected $_countryFactory;

    public function __construct(
         \Magento\Directory\Model\CountryFactory $countryFactory
    )
    {
         $this->_countryFactory = $countryFactory;
    }

    public function getCountryIsoCode($country = 'US')
    {
          $country = $this->_countryFactory->create()->getCollection();
          $country->addFieldToFilter('country_id', array('eq' => country));

          $countryCode = $country->getFirstItem()->getIso3Code());
          $countryCode2 = $country->getFirstItem()->getData('iso3_code'));

          // $countryCode => null
          // $countryCode2 => 'USA'

          return $countryCode;
     }
}

The function getCountryIsoCode() has an example as parameter ('US').
I don't why the getIso3Code() doesn't work.
Instead the getData() works perfectly.

In Magento2 there aren't "php magic function to get database table field" anymore?
Is there something wrong in my code?


texts: Create Custom product type with Associated products tab

texts:
I want to create a new Custom product type similar to the Grouped Product esp. which have associated products tab on product page in backend.  I have tried with following tags in my module config.xml file.

  <catalog>
        <product>
            <type>
                <bookable translate="label" module="bookable">
                    <label>Bookable Product</label>
                    <model>bookable/product_type_packet</model>
                    <is_qty>1</is_qty>
                    <composite>0</composite>
                     <allowed_selection_types>
                          <simple/>
                          <grouped/>
                     </allowed_selection_types>
                </bookable>
            </type>
        </product>
    </catalog>

Please advise me how I can achieve this job.

thanks.


texts: i want magento cart to have 0 items default when you visit the website

texts:
On my website header I have a shopping cart icon with a badge that display the number of the items in the cart. When you enter in the website, it should display 0, as you have no item in the cart. However the badge is empty until you add a item in the cart. But if you later remove all items than it does display 0.

i want the cart to have 0 items when you visit the website


texts: Magento Automatic Shopping Cart Promotions not working

texts:
I have installed a "Giftcard" module in Magento 1.9. and due to this Magento's Automatic shipping promotions are not being applied. but when I remove this code from this module's

  config.xml

        <sales>
        <quote>
            <totals>
                <gift_card_total>
                    <class>giftcard/sales_quote_total_giftcard</class>
                    <after>discount,tax</after>
                    <before>grand_total</before>
                </gift_card_total>
            </totals>
        </quote>

Shopping cart's Automatic promotions start working, but this module stops working. how to make these two work together.


texts: How to override "vendor\magento\module-catalog\view\base\web\js\price-utils.js" in our custom module Magento 2?

texts:
I have created the module, now I want to override the vendor\magento\module-catalog\view\base\web\js\price-utils.js file in my custom module to change in one function.

I tried with below code:

created requrejs-config.js file in the module as below:

var config = {
    map: {
        '*': {
            'Magento_Catalog/js/price-utils': 'Name_Module/js/price-utils-override'
        }
    }
};

then copy the file into my module Name\Module\view\frontend\web\js\view\price-utils-override.js.

after content deploy command. it is giving error as below "http://127.0.0.1/test/pub/static/version1545992807/frontend/theme/name/en_GB/Name_Module/js/price-utils.js net::ERR_ABORTED 404 (Not Found)".

What is wrong here, please let me know if anyone has any idea about it.

Thanks.


texts: var .htaccess not activating - cacheleak vulnerability

texts:
I recently ran a magereport.com scan on one of our magento sites and it reported a cacheleak vulnerability.

In my var folder, there is an .htaccess file but it is not activating and the vulnerability is still reported.

I am running the following:

Magento 1.8.1.0
CentOS release 6.3 (Final)
PHP 5.3.3
FCGI
Apache 2.2.15

Contents of my var/.htaccess folder is:

Order Deny,Allow
Deny from all

Can someone shed some light why I am still able to access folders in my var folder?


texts: Finding possible methods for objects in Magento

texts:
Lots of confusion on this point, hopefully you will understand my areas of lacking understanding by the trend of my questioning:

How does one find available methods for objects in Magento and the general object architecture?
Is there a way to get NetBeans code completion to help with Magento methods?  Any helpful software for this?
Where to look for methods first?  Models, helpers, blocks?

I realize that I can go one by one through the files in the inheritance tree, but even then I never seem to find the right methods, or the order in which to call them.

Examples of calls I wouldn't have known were possible:

Generating a product list:
{{block type="catalog/product_list" category_id="YOUR_CATEGORY_ID" template="catalog/product/list_tabs.phtml"}}

--I understand after reading the _getProductCollection() method (Mage/Catalog/Block/Product/List.php, line 78 for relevant part) that simply providing list_tabs.phtml with a category_id would generate a list of products in a category, but how do I find stuff like this out without reading so much code!

And how would I have known that "category_id" would be found by load($this->getCategoryId()) .  What's this "load"?

Something that I'd like to do:
Put a single product on the home page using Mage_Catalog_Block_Product_Widget_Link, but title it with the name of the category.

I.e., how would I find the method for getting the product category from$this->_entityResource = Mage::getResourceSingleton('catalog/product'); (in Mage/Catalog/Block/Product/Widget/Link.php)

Thanks!!!!


texts: Adding Values in Custom Product Attribute From the Database

texts:
I am creating one module for the custom product attribute and i want to add values in dropdown from the database.

I am using this code for adding vaules in dropdown:

public function getOptionText($value) {
    $value = Mage::getSingleton('core/resource')->getConnection('core_write');
    $result = $value->query("select * from upload_image_upload");
    while ($row = $result->fetch() ) {
        $ids[]=$row['image'];
    }
    $options = $this->getAllOptions(false);
    foreach ($options as $item) {
        if ($item['value'] == $value) {
            return $item['label'];
        }
    }
    return false;
}


texts: How to Check If given address is Default Shipping or Billing address using Address id Magento

texts: I want to check whether the Given address is Default Shipping or Billing for the Customer address, i have the address id. Can anyone please help me on this.


texts: Magento 2.1.7 - Categories wont work - Appends "cat" tag to end of `URL`

texts:
I'm having an issue categorizing past one level.
An example would be if I clicked

  category1 (100 products) --> subcategory2 (50 products) --> subcategory 3 (25 products),

it will only categorize and show the 50 products of subcategory2.

I've found the issue is that Magento is adding the "cat=###" tag at the end of the URL rather than replacing the existing cat tag.

So when I try to narrow a category down past one sublevel, instead of setting the URL like this: https://example.shop/en/products.html?cat=125(how it should)

Magento does this: https://example.shop/en/products.html?cat=146%2C125 (this does not work).

How would I change the way Magento 2.1.7 narrows down categories?

Thanks in advance!


texts: Allow customers to print and order immediately after checkout

texts:
I would like to give my customers the ability to print their order after a successful check out in Magento 1.8.

How can I achieve this?


texts: How to get product collection of given main category id?

texts:
In my website I have several stores available. One particular store contains both the simple and configurable products. This is a huge collection of products. What is the fastest way to get all enabled products (including child products of configurable products) collection of this store by store id?

Note: I tried this lot of different ways. But it takes loo much time. Sometimes cause to crash the server even.

Note : I'm using Magento CE 1.3

Any suggestions will be appreciated.


texts: Update the summary section in checkout cart page

texts:
I am stuck on the one problem,I have added one product with custom price in cart using custom-module controller.Product is adding with the custom price but the summary section subtotal and grandtotal is not updating.

Please suggest how can i refresh the summary section in the cart page.

$params = array(
            'product' => $productId,
            'super_attribute' => $options,
            'qty' => $qty,
        );

        $_product = $this->_productRepository->getById($productId);
        $_product->setPrice($price);
        $_product->setBasePrice($price);
        $_product->setRowTotal($price);
        $_product->setBaseRowTotal($price);
        $_product->setOriginalCustomPrice($price);
        $_product->setPriceInclTax($price);
        $_product->setBasePriceInclTax($price);
        $_product->setRowTotalInclTax($price);
        $_product->setBaseRowTotalInclTax($price);
        $this->_cart->addProduct($_product,$params);
        $this->_cart->save();
        $this->_cart->getQuote()->setTotalsCollectedFlag(false);
        $this->_cart->getQuote()->collectTotals();
        $this->_cart->getQuote()->save();
        $this->_checkoutquote->setTotalsCollectedFlag(false)->collectTotals()->save();
        $this->_session->getQuote()->collectTotals()->save();
        $this->quoteRepository->get($this->_session->getQuoteId());
        $quote = $this->_session->getQuote();
        $this->quoteRepository->save($quote->collectTotals());


texts:
Source: Magento Enterprise Edition User Guide, Version 1.14.2.1
Page: 660
I've researched quite a bit on the tag function but have not seen any real world examples of its usage. At first glance it seemed to be a cleaner method of unsetting and inserting a child block by updating the parent but because the doc has been sparse on the tag description its actual behavior is beyond me.


texts: Call a pagination block in Category page

texts:
In the product display page(i.e., category page in catalog/product/list.phtml of grid view), before and after the product items Toolbar block is being displayed(with this <?php echo $this->getToolbarHtml() ?> ), my requirement is to display only Pagination block(i hope it is a separate block) after the product items.

so i replaced <?php echo $this->getToolbarHtml() ?> with <?php echo Mage::app()->getLayout()->createBlock('catalog/product_list_toolbar')->getPagerHtml() ?>.

Can some one help me how can i display only pagination block after the products list?

Many thanks in advance.


texts: How to get wordpress post tags using fishpig in magento

texts:
I am using fishpig magento extension and everything is working perfectly.

I am fetching posts using the code

  $posts = $this->getPosts();

and I need tags associated with each post.


texts: Best practice to add method to core block

texts:
Which is teh best way to extend a block with a custom method?
Should I use a preference to override the whole class or is enough to declare the extended class with the new method inside the XML layout that contains the block?


texts: How to show sort Product on category section by its Postion in Magento Admin

texts:
I have a magento site in which many products are associated with one category.
they are being shown in order in which they were created under category prodcuts tab in manage category section in magento admin. as shown in below image-

here as you can see in image products are listed with their positions. but I want to listed them according to Position in Ascending order like 1,2,3,4,5,6..

How can I do this.? Do I need to create seperate plugin for this.? if yes then what will be  the first point to start.?


texts: Magento | Configurable Swatches Tab doesn't appear in The Admin page

texts:
I am trying to add a product with color swatches. when I searched I found a lot of articles like this:
http://docs.magento.com/m1/ce/user_guide/catalog/product-configurable-swatch.html

but I can't find Configurable swatches Tab in My admin below the catalog as it was explained in Magento official documentation!

Our Magento version: 1.9.0.1

Can you please help us in this point?

Thanks,


texts:
When trying to load customer records in Magento we get a 500 error.  This is what's in the logs.  Running Magento ver. 1.9.3.9, any help appreciated.

  2018-08-29T12:48:50+00:00 ERR (3): Warning:
  include(Mage/Sales/Block/Adminhtml/Billing/Agreement/Grid.php): failed
  to open stream: No such file or directory  in
  /home/sitename/public_html/lib/Varien/Autoload.php on line 94
  2018-08-29T12:48:50+00:00 ERR (3): Warning:
  include(Mage/Sales/Block/Adminhtml/Billing/Agreement/Grid.php): failed
  to open stream: No such file or directory  in
  /home/sitename/public_html/lib/Varien/Autoload.php on line 94
  2018-08-29T12:48:50+00:00 ERR (3): Warning: include(): Failed opening
  'Mage/Sales/Block/Adminhtml/Billing/Agreement/Grid.php' for inclusion
  (include_path='/home/sitename/public_html/app/code/local:/home/sitename/public_html/app/code/community:/home/sitename/public_html/app/code/core:/home/sitename/public_html/lib:.:/opt/cpanel/ea-php56/root/usr/share/pear')
  in /home/sitename/public_html/lib/Varien/Autoload.php on line 94


texts: assigning acl to a group in configuration

texts: how do i assign permissions to a magento 2 configuration group


texts: If order contains virtual product add PDF

texts:
I am adding a PDF to all my sales emails at the moment, but I only want these PDFs to be added if the order contains at least one virtual product.
How can I implent this in the following if statement?

    if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {

        //Create Pdf and attach to email - play nicely with PdfCustomiser

        $pdf = Mage::getModel('emailattachments/order_pdf_order')->getPdf(array($order));
        Mage::helper('emailattachments')->addAttachment(
            $pdf, $mailTemplate, $this->getOrderAttachmentName($order)
        );
    }


texts: Is Quote Necessary when creating order Programatically

texts:
I have integrated a third party API in which I have to create order to maintain sync from both the stores.

My question is do I have to create quote first and then order? Is it necessary to create quote? As I don't see any reason for creating it?

Can I create an order directly?


texts: Mailchimp Custom fields not syncing when using Amazon Web Services CDN in Magento 2.2.5

texts:
I'm using Magento 2.2.5 and I've added the custom fields in the Customer Registration page and when a new Customer register and select subscribe to Newsletter then the Customer Name, Email, Custom fields data is synced successfully with the MailChimp account and I can see them in MailChimp account.

Issue

When I use the AWS CDN for the Static Files and Change the Static File URL from the back-end then on New Customer Registration only email Id is Synced to the MailChimp Account the Customer First-name, Last-name and Custom field options do not sync.

Can someone help me in resolving this Issue?


texts:
I'm updated stock details  programmatically.And then performed to reindex .I can get indexerCollection.But I want to get only stock.How  to do this?

This is my reindex code........

protected function changeIndexMode($mode)
{

    $indexerCollection = $this->_indexerCollectionFactory->create();
    foreach ($indexerCollection as $indexer) {
        if ($mode == 'UPDATE_BY_SCHEDULE') {
            $indexer->setScheduled(true);
        } else if ($mode == 'UPDATE_ON_SAVE') {
            $indexer->setScheduled(false);
        } else if ($mode == 'REINDEX') {
            $reindex = $this->_indexerFactory->create()->load('cataloginventory_stock');
            $reindex->reindexAll($indexer);
        }
    }
}


texts: Get a coupon code to send in welcome email

texts: Sales team created a shopping cart price rule with about 100 coupons. When a new customer signs up, I need to send one coupon code from this list in email. Each coupon is 1 time use only so need to send different code for each sign up. I dont want to look for the coupon codes by the rule name as it might change in the future. How can I grab unique coupon code for each sign up?


texts: How to call block in phtml magento 1.9.*

texts:
I need to make shipping -> "Pickup in store". But in shipping model we can't add

how can we do it in payment?
I have Block/Stores.php and template shipment/stores.phtml, I want to add this template to available.phtml in this place

I succesfuly overrided the onepage\shipping_method\available.phtml

and added  in my overrided available.phtml. But my stores.phtml doesn't joined.


texts: How to pick data from a form into the backend?

texts: I've created a new menu on the backend, which has a form. I need to pick the form's data and show them in the same .phtml or another, I don't mind. But the fact is that I can't do a <form action="" method="POST"> because when I click on the button and the page is refreshed, it returns me to the main control pannel, so I can't pick the data. And when I try to send the data to another .phtml, it happens to me the same, maybe it's because I'm putting the second .phtml (the phtml with de $_POST vars) in the wrong directory, but I'm not sure. Both .phtmls are in the same folder: /app/design/adminhtml/default/default/template


texts: Magento 2: Fetch coupon details from coupon name without applying it to the cart

texts: How can I fetch coupon details ie discount amount or percentage from coupon name without applying it to the cart?


texts: Product Area not showing after CSV Product Upload Issue

texts:
I have ran into a very strange issue with Magento, which I am hoping someone here can help with.

Yesterday, we could add products & everything worked fine on the backend. The client ran a product CSV import yesterday, which has resulted in the add products area to not show on the backend.

I have attached a screenshot of the issue. Is it possible a product CSV import could break an area of the database which could cause this issue?

Any feedback would be greatly appreciated.

Console errors below:

Uncaught ReferenceError: product_info_tabsJsTabs is not defined
    at (index):1062
(index):969 Uncaught ReferenceError: product_info_tabsJsTabs is not defined
    at (index):969
    at responder (prototype.js:5598)

Adam


texts: How to get different discount rules and discount amount for a particular product?

texts:
I need to get different catalog price rules applied for a particular product along with individual discount price splitup.

Product A - $50 after discount Now $35
New year sale - $10
Winter sale - $5.


texts: Magento 2 how to get all cancel order collection

texts: how to get cancel order collection in custom module ? like My Orders collection in customers dashboard (frontend). this collection how to get?


texts:
I have a "simple" question. I've tried to google it but without success. I've recently downladed a custom theme from the magento site. Now, I have changed my CMS pages to this new theme, but where can I change the skin for my wihlist, my account, my cart? when I enter in it it automaticaly changes back to the default magento theme. Please help..

TNX


texts: Magento 2 Product editing error: Form\Gallery doesn't extend Element\AbstractElement

texts:
Today we've updated from version 2.0.6 to 2.1.2, it was everything but flawless. But I've managed to fix all te problems except one:

When editing a product I receive this error:

Exception #0 (InvalidArgumentException): Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery doesn'n extend \Magento\Framework\Data\Form\Element\AbstractElement

Does anyone know how to fix this problem?


texts: Declare extension_attribute.xml for EAV?

texts:
I created some attribute for the customer entity, so I used a data Patch to declare the new attribute (it's then an EAV attribute) and assign the attribute group and attribute set.
Everything works fine (I can access this EAV attribute from the backend and from the frontend).
I was wondering: do I have to create an extension_attribute.xml and declare my new attribute?
I don't understand the need for that, cause I can access the attribute value from customer API interface too (without the extension_attribute.xml).
So, I can access my attribute from custom_attribute, is there an interest to declare it as an extension_attribute too?
More generally, what is the purpose to declare an extension_attribute for an EAV entity (like customer or product)? Because as an extension attribute, we have to create the plugin for get and save method of the repository whereas it s not necessary for the EAV attribute (custom attribute).
For instance, the is_disabled attribute is an extension attribute for the customer
Thanks for your help
Seb


texts: Disable the wysiwyg "Switch to HTML editing mode" button for specific module only

texts:
I am trying to find a "clean" way to disable/remove this button from the TinyMCE content editor in my module.

Is there any way to override this file in a specific module only
/js/mage/adminhtml/wysiwyg/tiny_mce/setup.js ?

I tried to put this in the design part of my module, but looks like it is not working.

Any idea?
Thanks.


texts: Magento 2 How to add Tab Component in admin module

texts:
How can I add UI Tab Component in custom admin module with the help of below user guide ?

http://devdocs.magento.com/guides/v2.1/ui_comp_guide/components/ui-tab.html

There are not enough information and options for adding Tab Component.

When I am using tab component in custom phtml for one of my module, it's working but when I am using the same component in modal popup with php form modifier, it is not working and giving me the error

  "TypeError: require is not a function"


texts: Ifuturz UploadPdf causes huge system.log with Notice: Undefined offset

texts:
In the system.log I have thousands of entries saying:
ERR (3): Notice: Undefined offset: 0 in /home//public_html/app/design/frontend/base/default/template/uploadpdf/uploadpdf.phtml on line 10

So the code is:

<?php
$current_product = Mage::registry('current_product');
$productid = $current_product->getEntityId();

$write = Mage::getSingleton('core/resource')->getConnection('core_write');
            //echo "SELECT * from ifuturz_uploadpdf WHERE product_id='$pid'     ";
            $readresult=$write->query("SELECT * from ifuturz_uploadpdf WHERE product_id='$productid' ");
            $entityid = $readresult->fetchAll();
            //echo "
";print_r($entityid);
            $eid =  $entityid[0]['pdf_file'];   <======= LINE:10
            if($eid!='')
            {
            ?>

<?php echo $this->__('PDF Downloads') ?>

                <?php

                for($i=0; $i<count($entityid) ;$i++)
                {
                    //echo     Mage::getBaseUrl('media')."pdffiles/uploadedfiles/".$entityid[$i]['pdf_path'];
                    $front = $entityid[$i]['pdf_file'];
                $pdfnm = $entityid[$i]['pdfname'];
                //$pdfnew = explode('/',$pdf);
                //$pdfexp = $pdfnew[8];
                //$pdffinal = str_replace('.pdf','',$pdfexp);

                if($pdfnm == "")
                {
                    $ext = explode(".", $front);
                    echo '
'.$ext[0].'

';
                }
                else
                {
                    echo '
'.$pdfnm.'

';
                }
            }
        }
        //echo "
"; print_r($entityid);
        ?>

I guess there should be an extra if statement that catches the 0 exception right ? But how to do this properly in php ?


texts: How to Bulk import Product Reviews in Magento 1.9?

texts: I have a list of reviews with email id, how can I bulk import Product Reviews into Magento?


texts:
I tried to install the Locale_Mage_community_de_DE extension but it failed with:

CONNECT ERROR: Package 'Locale_Mage_community_de_DE' is invalid
'./app/locale/de_DE/Mage_AdminNotification.csv' already exists

What can I do?


texts: How to call the Search bar from homepage to all other pages in Magento 1.9?

texts:
My Search bar is currently on my Homepage

Code is:

<reference name="header">
    <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
</reference>

I want to make the search bar appear on my New products Page


texts: Magento 2 require to create SQL query for the custom report

texts:
I would like to generate Magento native report as follows:

Can anybody provide the SQL query for above table ?

Column Name CustomerGender  = customer attribute
Column Name Group  = Customer Group native feature
Grand Total = Grand total from Sales order table

Went through plenty of the links but got regular simple joins.

Create Magento Custom Report Module

https://github.com/mageplaza/magento-2-reports


texts: Magento2.3 - Add Quantity Increment/Decrement on Category Page

texts:
I want to add Quantity Increment/Decrement buttons on Category Page.

I am using a theme that already provides this feature on product page. Now I want to add same feature in category pages.

Anyone who has done similar work? Please guide.


texts: Magento 2.4 error when try to install sample data

texts:
I've installed Magento 2.4 (fresh) with the Composer.
Installation work fine (frontend and admin)
But when try to install demo data using manual get an error.
$ magento deploy:mode:show
Current application mode: developer. (Note: Environment variables may override this value.)

$ magento sampledata:deploy
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 20 installs, 0 updates, 0 removals
  - Installing magento/module-catalog-sample-data (100.4.0): Loading from cache
  - Installing magento/module-bundle-sample-data (100.4.0): Loading from cache
...
- Installing magento/sample-data-media (100.4.0): Loading from cache
<warning>Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.</warning>
<warning>Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.</warning>
<warning>Package sebastian/finder-facade is abandoned, you should avoid using it. No replacement was suggested.</warning>
Writing lock file
Generating autoload files
PHP CodeSniffer Config installed_paths set to ../../phpcompatibility/php-compatibility,../../magento/magento-coding-standard

$ magento setup:upgrade
Cache cleared successfully
File system cleanup:
/home/aesa/demo/magento/generated/code/Composer
/home/aesa/demo/magento/generated/code/Dotdigitalgroup
/home/aesa/demo/magento/generated/code/Magento
...
The directory '/home/aesa/demo/magento/generated/metadata/' doesn't exist - skipping cleanup
Updating modules:
Schema creation/updates:
Module 'Magento_AdminAnalytics':
Module 'Magento_Store':
...

Module 'Magento_GroupedCatalogInventory':
Module 'Magento_GroupedImportExport':
Module 'Magento_CatalogSampleData':
Unable to apply data patch Magento\CatalogSampleData\Setup\Patch\Data\InstallCatalogSampleData for module Magento_CatalogSampleData. Original exception message: Rolled back transaction has not been completed correctly.

Any ideas?


texts:
I am going to add front-end validation for customer attribute by adding CSS classes 'validate-length' and 'maximum-length-xx' in the input tag.

I need to find how I can retrieve, for example, the Maximum Text Length value of customer attribute 'First Name'.


texts: Cheaper flat rate shipping if subtotal is under certain amount

texts: I have flat rate shipping set up but I'd like to have a lower flat rate shipping if the subtotal of the order is less than $20. Is there a way to achieve this?


texts: Product Final Price returns 0 instead a real value

texts:
When Magento\ProductAlert checks products for price changing, Product Model unexpected (for me) returns 0.

https://github.com/magento/magento2/blob/e592fca85d1ee26e5c51df056d844a1c09a2d7fc/app/code/Magento/ProductAlert/Model/Observer.php#L235

In line 235, $product->getFinalPrice() must returns calculated product price, but returns 0.

I tried to expand the code to get the price as follows

$product = $this->productRepository->getById(
                    $alert->getProductId(),
                    false,
                    $website->getDefaultStore()->getId()
                );

$product->setCustomerGroupId($customer->getGroupId());

$priceModel = $product->getPriceModel();
$productPrice = $priceModel->getFinalPrice(1, $product);

But $productPrice still returns as 0.

When i same code into test script - all prices returns with no problem:

/pub/test.php: (Init magento core, ObjectManager, etc. skipped)

$productId = '27811'; // test product id

$productRepository = $objectManager->get(\Magento\Catalog\Api\ProductRepositoryInterface::class);

$product = $productRepository->getById(
    $productId,
    false,
    1
);
$priceModel = $product->getPriceModel();

echo $priceModel->getFinalPrice(1,$product); // will output normal price

Why zero price returns in first case?
I would appreciate any advice on the topic.


texts: Products incorrectly shown as out of stock - Magento 2.2.1

texts:
I have made a configurable product, with 4 associated configurations.

My issue is that the product configurations are set with the right quantities, by the size of the product. But the product is displayed as out of stock in the front end.

The product in question is the bottom one in the image below.

The General settings of this product is configured as in the image below.

And the different product configurations are shown below.

Now, I've noticed the obvious - that quantity is set to 0 in the general section of the product. But this is expected with Configurable products, right? Because I do need to set quantities per size, not for the product in general.

So I've been sort of banging my head against the wall for a few days trying to sort this out and I'm hoping there might be some assistance here.

I've restarted the server, reindexed the site and flushed the cache with no luck.


texts: cart page & checkout is not working (500 http error)

texts: I am using magento 1.9.4.My cart & checkout is working fine for guest users & logged out customers but when user is logged in then whenever he view cart or try to checkout , gets an error of Http 500. Any body know how to fix it ? thanks


texts: can't get rid of fancybox.gif "Add expires headers" via htaccess?

texts:
I was able to improve my gtmetrix rating a lot by adjusting the according widgets expirations, but I can't get rid of the last few, among them fancybox.gif (and the ones below)

https://verify.authorize.net/anetseal/seal.js
...ssl.google-analytics.com/ga.js
...static.hotjar.com/c/hotjar-163991.js?sv=5
...s3.amazonaws.com/downloads.mailchimp.com/js/goal.min.js
.../www.yafsparkle.com/skin/frontend/blacknwhite/default/images/fancybox/fancybox_loading.gif
...verify.authorize.net/anetseal/images/secure90x72.gif*

my htaccess looks like this, so the gif is included. Any ideas how I get rid of the remaining ones?

-- EXPIRES CACHING --
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType text/javascript "access 1 week"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 week"
ExpiresByType application/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access plus 1 month"
</IfModule>
## EXPIRES CACHING ##

# 1 Month for most static assets
<filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>


texts: how can I add my custom validation logic to product edit/create form?

texts:
I would like to add some custom logic when a product is saved to validate the data in the form before it is saved in the database. In order to achieve this I decided to create an after Plugin to hook in the \Magento\Catalog\Model\Product\Validator::validate function.
Much to my surprise, even though my function is executed correctly and it outputs the results in the logs (I can also add an error message using the MessageManagerInterface and it will show up), the result of the validation is not taken into account and the product saves normally.
I've tried returning an array like this
['attribute_code' => 'my custom message']
returning
false
How can I make the validation that I need so that the product is not saved and an error message appears?


texts: Using Magento as a CMS for a Fanfiction Archive

texts:
I was doing research on CMSs and talking to a few people about using Magento for use as a fanfiction archive similar to Fanfiction.net or Archiveofourown.org

the folks I talked so were unsure about a definitive yes or no because I had to explain what a fanfiction archive was and what it does.

A fanfiction archive is a website where users register accounts so they can post their writings/stories for others to read, IE other registered users or even non registered visitors to the site.  Though registration is often needed to use site features like the ratings system, to write reviews, Private message the author or other users, etc.

fanfiction, which is defined as fiction written by a fan of, and featuring characters from, a particular TV series, movie, etc. is stored in the archive and usually in vast amounts, often searchable through keyword search, user name search, title search and/or the use of a tagging system to find the content you want. IE. (You want to find romance stories you would search under the 'romance' tag, you want to search for a particular character you would search the character's name tag 'John Doe' etc.)

Now in my research people have suggested using wordpress as a fanfiction archive, however that's only because it's been done before to varying levels of success. My question could Magento be used for this purpose? Could it do it well? and if so, I feel that this could be a novel use for it because as far as I can see, no one has tried yet. (I like being a trail blazer.)

-Charles


texts: How to fix this "state/country" dropdown issue in Magento 1?

texts:
I have a problem with the state / country dropdown in

  "Customer Information > Addresses > Edit Customer's Address".

1/ When USA is selected by default there was a state dropdown :

2/ Next I select UK : the dropdown disappears

3/ I re-select USA but the state dropdown is still hidden :

Do you know how to fix this error ?


texts:
A block filter is output only for a specific category page.
I do not know the cause.

Is there something wrong with the following templates?

app/design/frontend/vendor/theme/Magento_LayeredNavigation/templates/layer/ view.phtml

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Category layered navigation
 *
 * @var $block \Magento\LayeredNavigation\Block\Navigation
 */
?>

<?php if ($block->canShowBlock()): ?>

            <?= /* @escapeNotVerified */ __('Shop By') ?>

            <?= $block->getChildHtml('state') ?>

            <?php if ($block->getLayer()->getState()->getFilters()): ?>

                    <a href="<?= /* @escapeNotVerified */ $block->getClearUrl() ?>" class="action clear filter-clear"><?= /* @escapeNotVerified */ __('Clear All') ?>

            <?php endif; ?>
            <?php $wrapOptions = false; ?>
            <?php foreach ($block->getFilters() as $filter): ?>
                <?php if (!$wrapOptions): ?>
                    <?= /* @escapeNotVerified */ __('Shopping Options') ?>

                <?php $wrapOptions = true; endif; ?>
                    <?php if ($filter->getItemsCount()): ?>

<?= $block->escapeHtml(__($filter->getName())) ?>

<?= /* @escapeNotVerified */ $block->getChildBlock('renderer')->render($filter) ?>

                    <?php endif; ?>
            <?php endforeach; ?>
            <?php if ($wrapOptions): ?>

            <?php endif; ?>

<?php endif; ?>

My environment is Magento 2.2.6.


texts: Need to Redirect on custom page After Click on Add to Cart - Magento

texts:
We need to display one custom page after customer click on add to cart from product page. if customer can click on skip than its redirect to cart page other wise stay on custom page.

We can display some static products on custom page where customer can bought product from there.

Please let me know if any one know this..


texts:
Anybody do a successful install of magento 2 only via composer ?
I found a nice article here : http://magenticians.com/installing-magento-2-composer
but sadly it's outdated. I tried it and I get errors :

The requested package magento/community-edition could not be found in any version, there may be a typo in the package name.

Tried to change package to project-community-edition and got

Installation request for magento/project-community-edition *@dev -> satisfiable by magento/project-community-edition[dev-master].

magento/project-community-edition dev-master requires zendframework/zend-stdlib 2.0.3 -> no matching package found."


texts: add image to magento admin menu title tag?

texts:
How to show image beside admin menu item?
 below is the code where i need to add image inside <title>

`

<config>
    <menu>
    <custommodule module="module" translate="title">
    <title> <img src="src"/> custom menu</title>
    </custommodule>
    </menu>
    </config>


texts: What is the reason for Item Status = "canceled" and not able to create Invoice

texts:
The ordered placed by online payment, and the ordered page item status canceled,

  may i know what is the reason for my item status canceled

How create Invoice for this order?


texts: Reference container "left" not showing in Magento 2

texts:
I've written "Edit" page referencing this tutorial.

https://github.com/mageplaza/magento-2-sample-module

The top buttons are showing, but none of the "left" tabs are. I've gotten it to work with a UI component, but I need some dynamic content, so I changed to a block.

Here's my profile_edit.xml file. I've written some print statements in the Tabs class as well as my profile class, but they aren't printing out. Magento just seems not to honor the entire "left" container.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <title>
            Create New Profile
        </title>
    </head>
    <update handle="styles"/>
    <body>
        <referenceContainer name="content">
            <block class="MyCompany\MyModule\Block\Adminhtml\Profile\Edit" name="mycompany_mymodule_profile_edit"/>
        </referenceContainer>
        <referenceContainer name="left">
            <block class="MyCompany\MyModule\Block\Adminhtml\Profile\Edit\Tabs" name="mycompany_mymodule_profile_tabs">
                <block class="MyCompany\MyModule\Block\Adminhtml\Profile\Edit\Tab\Profile" name="mycompany_mymodule_profile_edit_tab_profile"/>
                <action method="addTab">
                    <argument name="name" xsi:type="string">profile</argument>
                    <argument name="block" xsi:type="string">mycompany_mymodule_profile_edit_tab_profile</argument>
                </action>
            </block>
        </referenceContainer>
    </body>
</page>


texts: Magento 2: How to assign a category to CMS page?

texts: How to redirect a category page to CMS page in Magento 2? I have tried several methods by using URL-rewrite but these methods work only on Magento 1.


texts: Magento2: Convert DataObject/Array into magento2 Collection?

texts:
How to convert the Data object into Magento2 Collection ?

In Mage1 we could do as below..

Mage1:

$collection = new Varien_Data_Collection();
foreach ($items as $item) {
    $varienObject = new Varien_Object();
    $varienObject->setData($item);
    $collection->addItem($varienObject);
}
return $collection;

but how do in Mage2 ??

I know How set the DataObject But problem with Making the collection..


texts:
Recently I've went through the "Fundamentals of Magento 2 development" course and there was such statement that we SHOULD NOT use functions from other modules that are not defined in the API interfaces for example we should not rely on \Magento\Framework\Model\AbstractModel save() method, because it can be removed in feature releases.

Ok, fine by me, but going this way we should not use, for instance, the load() function from \Magento\Framework\Model\ResourceModel\Db\AbstractDb right? Yet, it's recommended to use it in the same course. Can anyone point me in right direction?


texts: Order of Values/Labels of Configurable attribute options and custom options on cart page

texts:
How can I change the order in which Magento lists the Values and Labels of configurable products and the custom options of their associate products.

Example:

Configurable T-shirt has Size and Color attributes, and the simple products ha custom options for Logo placement. When users order a large, red t-shirt with the logo on the front, Magento lists the options in the cart as:

T-Shirt
  size-large (attribute)
  color-red  (attribute)
  logo-front (custom option)

I just want the logo-front above size-large, but can't figure out where the list order is created.

(Note: this is a simplistic example. There is a good reason why the "logo position" can't be just another attribute to the config product).

Thanks.


texts:
I have a table which store certain data in database.
First i am checking if the content is already there in the database if yes then update it else insert a new data.

$sync = $this->inventoryCollection->create()
        ->addFieldToSelect("*")->addFieldToFilter("product_id", ["eq"=>$productId])
        ->addFieldToFilter("type", ["eq"=>$type])->getFirstItem();
    $totQty = $qty;
    $id = 0;
    if($sync->hasData()){
        $invent = $this->inventorySync->create()->load($sync->getData("inventory_track_id"),"inventory_track_id");
        if($invent->getData("sync")){
            $invent->setData("qty", $qty);
        }
        else {
            $totQty = $invent->getData("qty") + $qty;
            $invent->setData("inventory_track_id", $sync->getData("inventory_track_id"));
            $invent->setData("qty", $totQty);
            $invent->setData("product_id", $productId);
            $invent->setData("sync", true);
        }
        $invent->save();
        $id = $invent->getId();
    }
    else {
        $invent = $this->inventorySync->create();
        $invent->setData([
            "product_id" => $productId,
            "qty" => $qty,
            "type" => $type,
            "sync" => true
        ])->save();
        $id = $invent->getId();
    }

The strange thing is i am getting an error saying "Unique constraint violation found"

How can i update the data?


texts: How to use PWA Studio in magento 2.1.X or 2.2 versions?

texts:
I'm supposed to develop Magento as PWA but unfortunately, I couldn't use 2.3 versions in my server. I'm impressed by this pwa studio theme https://magento-venia.now.sh\
I couldn't get any guidance.


texts: Magento 2 - For custom table collection object, getIdFieldName() is returning null

texts: Custom table created with name 'picklist_item' with 'item_id' column as primary key, in one of the admin controller action, collection object for 'picklist' table has been created and called getIdFieldName() but it is returning NULL, I am expecting it should return the primary key table column name.


texts:
Hosting - Amazon
Mangeto 2.3.2
Apache

In developer mode, Magento creates symlinks in pub static directory, but when Magento try include static files on a page it responds with 403 error.
I have tried change permissions to all files to 777, change owner but it doesn't work .htaccess files is the default.
Now I generate static files with php bin/magento s:s:d but I should have a possibility to use symlinks.
I will be appreciated for any advice.


texts: How can I add customer specific price for configurable

texts:
I have configured product X with configure attribute size.

**Size** 8
**Price**
Group1 = 10
Group2 = 20
Group3 = 30

**Size** 9
**Price**
Group1 = 10.5
Group2 = 25
Group3 = 32

I have 2 simple products which are assigned as associated products to a configurable product. Each simple product has a different price for different customer groups, so I want same logic when I convert it to configure product.
How can i do this in Magento 1.9.


texts: How to get custom attributes in cart Magento 2

texts: I have asked a question and thanks for you I can get the custom attributes of simple product but if I added a product from configurable product I can't recuperate the value so what's the problem? Please any help


texts: Adding order from backend for client associated to admin scope

texts:
Here is my problem:

I've created customer in backend, associated it to admin website. I don't want this customer to be able to login on frontend.
I want to add order for this customer from backend. When it's done, Magento automatically creates same client for Default Store View. Is this default behaviour? Why there is an option to create customer only for Admin scope, when it automatically duplicates this customer when you make an order?
When I add another order for my admin scope customer i get an error "This customer email already exists" - that's because Magento tries to add another frontend customer with same address.

Is there a way to change this behaviour? I don't think that frontend users should be created automatically when you make an order from backend for admin scope customers. All I found about this feature is this: https://magento.stackexchange.com/a/19508 - and this is how i need this to work, but without auto creating deafult store view customers when order is being created from backend.


texts: Magento 2, Why filter of all customer grid in backend is not show?

texts:
I have a problem about backend.
When i click all customer menu for search customer. Filter is not show on header page.

It don't have any error in console or error log.


texts:
I've created a media attribute, and now i'm triyng to display this attribute to my product view page.

I've tried this code below:

$hdr_img = $cur_product->getResource()->getAttribute('header_img');
if ($hdr_img)
{
    $ban_img = $this->helper('catalog/image')->init($cur_product, 'header_img')->resize(1600, 312);
    echo $ban_img;
}

But all I got is a :

  Fatal error: Uncaught Error: Call to a member function getResource()
  on unknown in
  /var/www/virtual/unikamakeup.com/htdocs/app/design/frontend/sns_simo/default/template/catalog/product/view.phtml:132
  Stack trace: #0
  /var/www/virtual/unikamakeup.com/htdocs/app/code/core/Mage/Core/Block/Template.php(241):
  include() #1
  /var/www/virtual/unikamakeup.com/htdocs/app/code/core/Mage/Core/Block/Template.php(272):
  Mage_Core_Block_Template->fetchView('frontend/sns_si...') #2
  /var/www/virtual/unikamakeup.com/htdocs/app/code/core/Mage/Core/Block/Template.php(286):
  Mage_Core_Block_Template->renderView() #3
  /var/www/virtual/unikamakeup.com/htdocs/app/code/core/Mage/Core/Block/Abstract.php(919):
  Mage_Core_Block_Template->_toHtml() #4
  /var/www/virtual/unikamakeup.com/htdocs/app/code/core/Mage/Core/Block/Text/List.php(43):
  Mage_Core_Block_Abstract->toHtml() #5
  /var/www/virtual/unikamakeup.com/htdocs/app/code/core/Mage/Core/Block/Abstract.php(919):
  Mage_Core_Block_Text_List->_toHtml() #6
  /var/www/virtual/unikamakeup.com/htdocs/app/code/core/ in
  /var/www/virtual/unikamakeup.com/htdocs/app/design/frontend/sns_simo/default/template/catalog/product/view.phtml
  on line 132


texts: Category URL won't update without command line reindex

texts:
Using Magento EE 1.14.0.1 with all patches installed.  If I make a change to a category URL, the change will never manifest itself on the front end.  Cron is running, all indexes are set to "Run When Scheduled".  But even if we wait an entire day, it will never update until we run the command line:

php indexer.php --reindex catalog_url_category

Am I misunderstanding how Magento EE indexes work?  I thought that would update every five minutes once the cron runs, right?  I've checked and the cron is running the function below every five minutes.  It just doesn't do anything for the category URL.

enterprise_index/observer::refreshIndex


texts: Security Patch SUPEE-10570 - Possible issues?

texts:
Magento has released a new security patch for M1, and updates for M1 and M2.

What issues should I look out for when upgrading or applying this patch?

SUPEE-10570

  SUPEE-10570, Magento Commerce 1.14.3.8 and Open Source 1.9.3.8 contain multiple security enhancements that help close remote code execution (RCE), cross-site scripting (XSS, and other issues. These releases also include small functional fixes listed in the release notes.

MAGENTO 2.2.3, 2.1.12 AND 2.0.18 SECURITY UPDATE

  Magento Commerce and Open Source 2.2.3, 2.1.12 and 2.0.18 contain multiple security enhancements that help close Cross-Site Scripting (XSS), authenticated Admin user remote code execution (RCE) and other vulnerabilities. The releases include additional functional fixes. To find out more about the functional fixes please check Release Notes for Magento Commerce 2.0.18, 2.1.12, 2.2.3 and Magento Open Source 2.0.18, 2.1.12, 2.2.3.


texts: Magento 2: How to check the current page is home in phtml?

texts:
Magento version: 2.0.0

How to check the current page is home page in the template file?
There has a global function to do it?


texts: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

texts:
Running on Magento 1.8

We are experiencing this error while creating product in our backend. It hinders the process of creating products and we have to keep trying in order to have the one product created.


texts: Can someone please tell me why I cannot clear these fields?

texts: Don't know what this info is and when I delete it and go to save configuration it just reappears. No online orders are being processed.  Keep getting message 'Gateway Error: credit card number is required'  Could this be the cause?


texts: Magento 2 How can I restrict abc.com/newsletter/manage/?

texts:
In Magento 2 we have newsletter functionality and we can hide the link from the customer account and hide from customer account create a form as well. That all working fine.

I want to hide the page or restrict the page URL "newsletter/manage", How can I disable this URL or restrict this URL?

Is anyone have an idea about it?


texts:
I have been searching for a long time now and can't find it by myself. I may be searching for the wrong words.

What I want is a Magento extension (or another way) to make image maps just like you can see on the H&M website. Check here the example:

http://www.hm.com/se/summer-soul --> Roll your mouse over the model and click on a random product.

I want exact that on my Magento website. How can I do it?

I have found this plug in which is what I do not want! I don't want image maps on products but on static images.


texts: Command line user does not have read and write permissions on var/generation directory

texts:
Command line user does not have read and write permissions on
  generated directory. Please address this issue before using Magento
  command line.

I getting above error while run below comands:-

php bin/magento indexer:reindex
php bin/magento cache:flush

php bin/magento cache:clean

Please help me how can I resolve this issue. Please help me.


texts: Shopping cart empties abruptly - cookies not persisting

texts:
I upgraded from 1.8 to 1.9.1.

Add to cart goes to an 'empty cart'.

I ensured var (cache, session, session logs appear) was writable, refreshed cache and session (then same thing happens), cookie lifetime set to 86400, I tried cookie path '/' and cookie domain (various configs of mydomain.com, .mydomain.com). When I change these last cookie configs, I can add to cart and get to the onepage checkout, but on the billing information step it redirects back to an empty cart.

All settings in system->web->session validation settings set to no except Use SID on Frontend.

Also tried using db session storage instead of files.

When I enter date on the server it shows the correct BST time.

The cart page is http, the checkout https. All good when I run

n98-magerun.phar sys:check

What could be the problem?

Update

So after it went well again last night I have the same problem. I had just cloned the site and created a test environment, changed core_config_data, repointed app/etc/local.xml, flushed the cache and reindexed, and the site looks the same. I notice that before, when I could add to cart, there was the extra cookies in the console (PHPSESSID, BX, cfduid) but they're not there now. Also the frontend cookie changes between before the add to cart and after the add to cart. Now both sites show an empty cart after add to cart.


texts: Module disabled in app/etc/modules is still showing in admin in Disable Modules Output

texts:
I have changed the active parameter from true to false in a module's app/etc/modules/Namespace_Module.xml file, and flushed the cache. I've also logged out and then in again.

However, the module is still showing under "Disable Modules Output in System / Configuration / Advanced / Advanced. I don't understand why.

I thought changing the file in app/etc/modules would 'hard disable' the module - so why is it still showing in that section of the admin panel?

Even if I rename the file to app/etc/modules/disabled_Namespace_Module.xml, the module is still listed. Where does the Disable Modules Output section get its list from?!

My aim is to completely disable this module's functionality, and the listing of it there is making me doubt it is fully disabled.

NB. In all other areas of the site (frontend and backend), the module doesn't appear any more.


texts: How to format the page title of a product view page?

texts:
Currently I'm doing some work on a Magento shop (1.8) and one of the problems the site has is that the SEO and page titles are very poor. So far I've managed to change all of the page titles and meta descriptions for the categories and now I have to sort out the page titles for the product pages.

At the moment, the page title is written like this:

  Product NameCategoryCategoryCategory

For a real world example:

  Reversible GiletWaistcoats & Gilets For MenClothingMen

Basically there is no space between the product title and the hierarchical category names, which is obviously not desirable.

What I want to do is to just display the product name and the category name that the product is under. So in this example the page title would be:

  Reversible Gilet - Waistcoats & Gilets For Men

How can I achieve this?


texts: Should new modules be developed in app/code or vendor/org/module?

texts:
I prefer creating a new module repo in git, adding that via composer, and letting composer check it out to vendor so that I can develop in <magento-root>/vendor/[org]/[module] from start to finish and my local environment matches production as much as possible.

However, the Magento docs suggest starting a new module in <magento-root>/app/code/. I'm trying to understand different workflows, so are any benefits to doing it that way that I'm missing?


texts: Customer was allowed to checkout with invalid zipcode

texts:
A customer put in an invalid zipcode.  They put in SS059  instead of 33059. Like the letter S.  Somehow it still allowed them to complete the checkout process. I tried to duplicate this by going through checkout myself and using invalid zip codes but it stopped me from checking out with a error message saying no shipping method was available for me.

However it has allowed this customer to do it.

The other issue is that it failed to charge her any shipping. The shipping doesn't even show up on the order. It's blank.

Any ideas or thoughts on what I should check first? This is the third order that has made it through the cart that failed to charge any shipping, but this is the first one that had an invalid zipcode.


texts: How to add drop down for cities at checkout page?

texts:
I am working on Depoto

At checkout page, I want to add city as dropdown.


texts:
Does anyone have any experience with Magento 2 QuickSearch widget so perhaps they can provide a code sample (how to use it in module)? I have managed to include it to my js file, but i can not figure out how to provide the data what the widget should use for autocomplete?

As much as i have understood it is something similar to jQuery-ui autocomplete? I am trying to write a module that adds custom block to checkout with autocomplete field.

Additional question: (Also from documentation I can see that it is possible set minSearchLength(minLength in jQuery), but what about jQuery delay?)


texts: Remove tax info from cart page in magento

texts:
I have added tax rules for California state in my magento store. If the shipping is in california then the tax will be applied on total cart amount, for all other states the tax will not be applied on cart.
My problem is when I add a product in cart, It displays the tax details by default. When I select State other than California and click on Get a Quote in Estimate Shipping & Tax section, only then it removes the tax details from cart.
I want that, by default, there will be no tax details in cart page. When a customer selects State as California and Click on Get a Quote, only then it will display the tax details on cart total.
I have gone through this link where they say that its a Bug in Magento.
Any idea how to solve this?


texts: Issue in sending attachment in Emails Magento2.3

texts:
I am trying to send attachments in the email.

The following code is working fine but multiple attachments are sending even if send single attachment also.

I have used below code.

 $attribute = $this->eavConfig->getAttribute('catalog_product', $attributeCode);//it is a brand attrbute with drop down
    $options = $attribute->getSource()->getAllOptions();
    foreach($options as $option) {
            $supplierCode = trim($option['label']);
            if(isset($supplierCode) && $supplierCode != ''){
                $supplierEmail = $this->supplierEmail($supplierCode); // this will give the email id
                if(isset($supplierEmail) && $supplierEmail != ''){
                    $this->sendEmailtoSuppliers($supplierCode,$supplierEmail,$fileDate);
                }
            }
    }

  public function sendEmailtoSuppliers($supplierCode,$supplierEmail,$fileDate){
    try
    {
        $fileInfo = $this->getFileInfo($supplierCode,$fileDate);
        $fileSize = filesize($fileInfo);
        $this->_logger->info(strlen(file_get_contents($fileInfo));
        if($fileSize > 164 ){
            $file_contents = '';
            $fileName = $supplierCode.$fileDate.'.csv';
            $file_contents = file_get_contents($fileInfo);
                // Send Mail
            $this->_inlineTranslation->suspend();
    $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
    $senderEmail = $this->_scopeConfig->getValue('trans_email/ident_support/email',$storeScope);
    $senderName = $this->_scopeConfig->getValue('trans_email/ident_support/name',$storeScope);
    $sender = [
        'name' => $senderName,
        'email' => $senderEmail
    ];
    $sentToEmail = $supplierEmail;
    $sentToName = $supplierCode;

    $transport = $this->_transportBuilder
    ->setTemplateIdentifier('suppliers_email_template')
    ->setTemplateOptions(
    [
        'area' => 'frontend',
        'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID,
    ]
    )
    ->setTemplateVars([
        'name'  => $sentToName,
        'email'  => $sentToEmail
    ])
    ->setFrom($sender)
    ->addTo($sentToEmail,$sentToName)
    ->addAttachment($file_contents, $fileName, 'text/csv')
    ->getTransport();

    $transport->sendMessage();
    $this->_inlineTranslation->resume();

        }
        unlink($fileInfo);

    } catch(\Exception $e){
        $this->_logger->info('--supplier email exception'.$e->getMessage());
    }
}

 public function getFileInfo($supplierCode,$fileDate){
    $directory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); //here files stored with attribute option names
    $varPath =  $this->_dir->getPath('var');
    $filePath = $varPath.'/export/'.$supplierCode.$fileDate.'.csv';
    return $filePath;
 }

The above code is working well, the problem here is for the subsequent options it is sending other option files also, may be a for loop issue,

I am sending here single attachment but multiple files are going to the email. that means old attachment also going for new email.

The email should send appropriate file for the each option. Can anyone look into it and update me what mistake i am doing here. Thanks


texts: magento 2 system configuration with a custom .phtml template?

texts:
in system.xml:

<field id="custom_field" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
      Custom Field
      <source_model>Vendor\Module\Block\Adminhtml\System\Config\Custom</source_model>
</field>

Custom.php:

 namespace Vendor\Module\Block\Adminhtml\System\Config;
 use Magento\Framework\App\Config\ScopeConfigInterface;

class Custom extends \Magento\Config\Block\System\Config\Form\Field
{
protected $_template = 'Vendor_Module::system/config/custom.phtml';

const TEMPLATE = 'Vendor_Module::system/config/custom.phtml';

protected $_moduleManager;

/**
 *
 * @param \Magento\Backend\Block\Template\Context $context
 * @param ScopeConfigInterface $scopeConfig
 * @param \Magento\Framework\Module\Manager $moduleManager
 * @param \Magento\Framework\ObjectManagerInterface $objectmanager
 * @param array $data
 */
public function __construct(
    \Magento\Backend\Block\Template\Context $context,
    \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
    \Magento\Framework\Module\Manager $moduleManager,
    array $data = []
)
{
    $this->_scopeConfig     = $scopeConfig;
    $this->_moduleManager   = $moduleManager;
    parent::__construct($context, $data);
}

/**
 *
 * @return $this
 */
protected function _prepareLayout()
{
    parent::_prepareLayout();
    if (!$this->getTemplate()) {
        $this->setTemplate(static::TEMPLATE);
    }
    return $this;
}
/**
 * Retrieve element HTML markup.
 *
 * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
 *
 * @return string
 */
protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
    $this->setNamePrefix($element->getName())
        ->setHtmlId($element->getHtmlId());

    return $this->_toHtml();
}

}

custom.phtml: As an example but more then that basically any html element

        Click here

<select name="custom" class="select admin__control-select"
        data-ui-id="select-groups-third-fields-custom-value">
    <option value="no">No</option>
    <option value="yes">Yes</option>
</select>
<input type="checkbox" name="test" />

END