texts:
I'm moving my site from cloudways to local. I used git to push everything to github, cloned it locally, brought the files into xampp, ran composer install, changed the urls in core_config_data to use localhost, and tried to open the site.
I change the line in validator.php to make the slashes work on Windows.

When I look at the site, a huge mess comes up. When I look at my css urls, they all have a version thrown in

for example:
http://localhost/pub/static/version1573762626/frontend/Smartwave/porto_child/en_US/icon-fonts/css/porto-icons-codes.css

How can I make this work?

I'm including my .gitignore file to see if I'm not pushing enough

# Metadata
/.buildpath
/.cache
/.metadata
/.project
/.settings
atlassian*
/nbproject
/sitemap
/.idea
/.gitattributes

# Magento specific configuration
/app/.htaccess
/app/bootstrap.php
/app/autoload.php
/app/functions.php
/app/etc/di.xml
/app/etc/vendor_path.php
/app/etc/NonComposerComponentRegistration.php

# Files re-generated through composer
/CHANGELOG.md
/CONTRIBUTING.md
/COPYING.txt
/ISSUE_TEMPLATE.md
/LICENSE_AFL.txt
/LICENSE.txt
/Gruntfile.js.sample
/nginx.conf.sample
/package.json.sample
/php.ini.sample
/vendor/*
/bin/*
/dev/*
/lib/*
/pub/*
/setup/*
/var/*

# Excludes (or a better alternative might be to symlink this to shared folders
!/pub/media/catalog
!/pub/media/porto
!/pub/media/downloadable
!/var/composer_home

Thanks


texts: How to override addtocart.phtml files to change "Add to cart" button name.


texts:
I have a situation where i have a slider and need to be able to filter the loaded products by min and max price. But the only products in use are group products that don't have direct prices.

Any suggestions on filtering Group Products by price.

Using the minPrice and maxPrice price generation functions.


texts: PayPal Express appears in checkout even PayPal Plus is active in Magento 2.3.2

texts:
how can I deactivate PayPal Express in the checkout ONLY? (Magento 2.3.2)

Normally activating Paypal Plus deactivated PP Express automatically in Magento 1.9.3 checkout but it seems that it is different in Magento 2.

Can someone tell me how I can do this manually?
I still want PP Express works in mini cart, cart & product page.

Many thanks in advance.


texts:
I try to change  the price from minicart with a custom product attribute, but in C:\xampp\htdocs\myproject\vendor\magento\module-checkout\view\frontend\web\template\minicart\item\default.html the price is render like this:

                    <input data-bind="attr: {
                           id: 'cart-item-'+item_id+'-qty',
                           'data-cart-item': item_id,
                           'data-item-qty': qty,
                           'data-cart-item-id': product_sku
                           }, value: qty"
                           type="number"
                           size="4"
                           class="item-qty cart-item-qty"
                           maxlength="12"/>
                    <button data-bind="attr: {
                           id: 'update-cart-item-'+item_id,
                           'data-cart-item': item_id,
                           title: $t('Update')
                           }"
                            class="update-cart-item"
                            style="display: none">

                    </button>

and then in C:\xampp2\htdocs\myproject\vendor\magento\module-checkout\view\frontend\web\template\minicart\item\price.html

Does anyone have any idea how to change the default price with a custom attribute?
Thank you!


texts: Product Page view.phtml throwing Parsing errors on live site but not on localhost. Help!

texts:
I have just moved my site onto a live server and everything is working, all except the view.phtml for the product page. (catalog/product/view.phtml) This is an edited file but even the default theme file throws me the same problem. Any help would be seriously appreciated. My main focus is the first broken section. I can deal without the rest or recreate them but the first one I don't really understand how I made it work I just know I took a guess and it works.

The file shows no errors at all on my localhost but on the live server it gives me the error
HP Parse error:  syntax error, unexpected end of file in /catalog/product/view.phtml on line 556, referer: URL the error happens on (what ever product page I load.

Checking the file the Line just shows the very last line in the code which is just a DIV however I found the 3 pieces of code that cause the issue. I just cannot understand why they are causing a parsing error or how to fix it.

The 3 blocks of code are as follows. (see full page here)
Block 1:

                            <?php $custom = $_product->getcustom(); ?>
                                <?php if (trim($custom == 28)); ?>

                                        <?php echo "Design your own Label by clicking the thumbnail below or if you want to add a more personal touch, enter your message below and we will hand write the message!"; ?>

                                <?php elseif (trim($custom == 29)); ?>

                                        <?php echo "Click on the thumbnail below and start designing your own personalised message!";?>

                                <?php endif; ?>

Block 2:

    <?php $iftasting = $_product->gettastingnotes(); ?>
            <?php if (trim($iftasting !== false)): ?>

<?php echo "Tasting Notes" ; ?>

                                           <?php echo $_helper->productAttribute($_product, nl2br($_product->getTastingnotes()), 'tastingnotes') ;?>

            <?php endif; ?>

Block 3:

getAttributeText('manufacturer'); ?>

<?php $ifmanufactuer = $_product->getmanufacturer(); ?>
        <?php if (trim($ifmanufacturer !== false)): ?>

<?php echo "Distillery" ; ?>

                                <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'manufacturer/' . $manufacturer . ".png"; ?>" data-srcX2="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'manufacturer/' . $manufacturer . '@x2' . ".png"; ?>" alt="" >

                                        <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId($manu)->toHtml() ?>

        <?php endif; ?>

I have tried a few changes to see what happens but the only thing that I managed to get to work was the top if I changed : to ; and removed the elseif and endif (making it useless)


texts: Paypal Error PayPal gateway has rejected request. %1 in Magento2.2.8

texts:
I just setup paypal checkout system but after paypal payment window it redirects me to store page to place an order to store the order in backend orders panel.

but when i press the button to place an order system gives me the following error

PayPal gateway has rejected request. %1


texts: Magento 2: How to set disable for "Enable Product" by default in new product page

texts:
I ask another similar question before ask this question.

Magento 2: How to set default value of quantity in new product page

However, I cannot set "disable" to "Enable Product" field by default. I try to find the xml file to add

<item name="value" xsi:type="string">1</item>

However, I cannot find where it can put.
Also, I try to change the meta for this field.

$meta["product-details"]["children"]["container_status"]["children"]["status"]["arguments"]["data"]["config"]["default"] = "2";

After add this to my modifer. It still show "Enable" by default.

Is I do something wrong about set it to disable?


texts: Payment Method show according Customer Group in Magento 2

texts: How to show payment method on checkout page according to customer group in magento2. Please help me if any one have this solution.


texts:
I'm using Magento 2.3.3 and I'm not able to install mailchimp. The documentation doesn't seem to be very clear...
I'm not entierly sure about my folder path since I cannot find any documentation about it.
I've set up:
/var/www/html/root/app/code/mailchimp/mc-magento2

and
/var/www/html/root/app/code/ebizmarts/mailchimp-lib

With all their specific files downloaded from Magento marketplace.
I've tried the commands:
composer require ebizmarts/mailchimp-lib
composer require mailchimp/mc-magento2:102.3.42

But I always get the error
[InvalidArgumentException]
  Could not find a matching version of package ebizmarts/mailchimp-lib. Check the package spelling, your version constraint and t
  hat the package is available in a stability which matches your minimum-stability (alpha).

So im guessing that It's something about my folder path but I cannot find any information about it. Anyone got any clue? Thanks
What I have checked:

Magento 2.2.8: cannot install MailChimp
Mailchimp on Magento 2
How to install Mailchimp in magento 2.1.5 from composer
http://wiki.ebizmarts.com/installation-guide-m4m2
https://github.com/mailchimp/mc-magento2/releases
List item


texts: Magento 1.9.1 Upgraded to 1.9.2 via Magento Connect

texts:
I want to upgraded Magento 1.9.1 to 1.9.2 via Magento Connect.

I Updatet the Packet "Mage_All_Latest", which works without any error or warning.

After going back to the Admin Panel, my Admin Footer shows following Version

But when i open Magento Connect, it shows following Versions:

So my question is: Did the update work, or is my Magento still 1.9.1.1?
And how can i check if my Magento includes the new Security Patch?

I already cleared Caches.


texts: Magento 2: Ajax validation in checkout page

texts:
So I need to add an AJAX validation for the field VAT number of shipping and billing address in checkout page, which is basically like this:

define([], function () {
    return {
        validate:function (value){
            $.ajax({
                url: 'path/to/the/validation/controller',
                type: 'get',
                dataType: 'json',
                cache: false
            }).done(function (response) {
                return response;
            }).fail(function () {
                return false;
            });

            return false;
        }
    };
});

But as you can see, this validation won't work because AJAX async is involved, so it will always return false regardless the validation result.

I want to avoid async: false because it causes bad user experience as it freeze the page while validating, so I come up with these work around, but none works:

  1. I create a custom error message span below the VAT field, and set the message myself in AJAX callback:

define([], function () {
    return {
        validate:function (value){
            $.ajax({
                url: 'path/to/the/validation/controller',
                type: 'get',
                dataType: 'json',
                cache: false
            }).done(function (response) {
                if (response) {
                    $('.vat-error-message span').html('');
                    window.vatValidation = true; // When submit form, I check this value to accept or rejecting the form submit.
                } else {
                    $('.vat-error-message span').html($t('Invalid VAT Number'));
                    window.vatValidation = false;
                }
            }).fail(function () {
                $('.vat-error-message span').html($t('Invalid VAT Number'));
                window.vatValidation = false;
            });

            return true;
        }
    };
});

Problem: many other events that validating the form such as saving new shipping or billing address still expecting return result from the validator, which is always true regardless the validation result.

  2. I found a validation method named remote where you basically add it into data-validate which is pretty good: (more information here: Magento 2 - jQuery validation remote method)

<input name="vat_id" data-validate="{'remote':'path/to/the/validation/controller'}"/>

Problem: It only works outside checkout page, e.g edit address in account page. Seem like in checkout page, they use a whole different set of validation rule which isn't included remote.

My only hope now is trying to get remote works in checkout page by calling it in my custom validation rule like this:

$.validation.methods['remote'].call();

However, it's just an idea and I haven't found a way to get it works.


texts:
I have 2 attributes in my product 1 is model and 2 is manufacturer.
I want to search on behalf of these 2 attributes with 2 drop down.
User will select and the results will show accordingly.
How can I achieve this in Magento 2?


texts: Magento2.3 - Fatal error: allowed memory size of 536870912 bytes

texts:
Migrate from one server to another server.
I have a big problem with this because I cannot understand the logic on it.
Magento 2.3.2 and php 7.2
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /public_html/vendor/magento/module-store/Model/Config/Placeholder.php on line 146


texts: Moving Magento installation from localhost to sub-directory in server root?

texts:
The title says it all .. however I'm having a problem.

I transferred my installation from localhost to a sub-directory in the server root name test.

I edited app/etc/local.xml to include the correct credentials as well as updating base URL within the core_config_data table.

When going to the url http://mydomain/test all I get is a blank page. Of course the admin doesn't work either. When I put the Magento installation in the server root it works fine but not in a sub-directory.

Does anyone have a clue as to why this happens?

If you need any more info please let me know. I'm using Magento CE 1.9.0.1


texts: When I change the base url in the Magento admin panel it doesn't work. I think it's hard coded somewhere but can't find this file.


texts:
Currently the zipcode inside Magento is displayed as 1234AB in the backend (orders).

I want to change this to 1234 AB, with a space between the numbers and letters.

I already checked the template options, but it is loaded as {{var postcode}}.

How can I change that?


texts: Magento 1.9 ufter update adminhtml cache grid bug

texts:
After update magento 1.9.2.2 to 1.9.3.8 I have bug. There no cache_grid. And when I use F12 in Chrome I see empty div tags instead of cache_grid.

UPDATE 1

Found module which broke cache_grid that was bl_customGrid module 0.8.9 version. Trying fix this module, if you have some idea, please let me know!


texts: Images not showing in admin or front-end

texts:
All my images are not showing anymore on both the admin and the front-end. They are all replaced by the Magento placeholder.

When I check in Catalog -> Manage Products, select a product and click Images, the images are there (I have to hover over them to see them). Base, Small and Thumbnail are set an image in the Default Store View and all other Store Views are set "Use Default".

I see no errors in the backend, frontend or my HTTP logs.

I do see this message though:

  Image type and information need to be specified for each store view.

but there is nothing extra I can do in that screen other than supply a label. I tried Googling that error message, but found nothing I could use.

I tried flushing the cache, to no avail.

I am using version 1.9.3.10.


texts: Generate one click test buy for develoment

texts:
For development I need to buy products, again and again, but one page checkout is a very long process and I don't like to do this every time.

Is there a one (click) solution to generate a test buy?


texts: Almost 1 hour finished, still not complete.


texts: Magento 2 - Show custom maintenance page instead of "Unable to proceed: the maintenance mode is enabled"

texts:
If I switch my store to maintenance mode, then I get so see this page:
1 exception(s):
Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled.

Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled.
<pre>#1 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000001f0deaee00000000184ccfc2#) called at [pub/index.php:45]
</pre>

How can I show a custom CMS Site or HTML Site instead?


texts:
I am trying to observe the event cms_page_prepare_save but it is now working.

Code in config.xml

<config>
<modules>
    <Custom_Test>
        <version>0.1.0</version>
    </Custom_Test>
</modules>
<global>
    <helpers>
        <test>
            <rewrite>
                <processor_requestid>Custom_Test_Helper_Processor_Requestid</processor_requestid>
            </rewrite>
        </test>
    </helpers>
    <models>
        <test>
            <rewrite>
                <processor>Custom_Test_Model_Processor</processor>
            </rewrite>
            <rewrite>
                <observer>Custom_Test_Model_Observer</observer>
            </rewrite>
        </test>
    </models>
</global>
<frontend>
    <events>
        <controller_action_predispatch>
            <observers>
                <custom_test>
                    <type>singleton</type>
                    <class>test/processor</class>
                    <method>serveResponse</method>
                </custom_test>
            </observers>
        </controller_action_predispatch>
        <cms_page_render>
            <observers>
                <custom_test_observer>
                    <type>singleton</type>
                    <class>Custom_Test_Model_Observer</class>
                    <method>addCustomData</method>
                </custom_test_observer>
            </observers>
        </cms_page_render>
    </events>
</frontend>

Above two event and observers are working fine, but below is not working at all.

<events>
   <cms_page_prepare_save>
    <observers>
       <Custom_Test_Model_Observer>
           <type>singleton</type>
           <class>test/observer</class>
           <method>saveCmsPageObserve</method>
           </Custom_Test_Model_Observer>
       </observers>
  </cms_page_prepare_save>
</events>

Tried in <admin>, <adminhtml> and <global> tags.

class Mage_Adminhtml_Cms_PageController is over written, does this have something to do with the issue.
Or is there any other issue?


texts:
When I switch from Developer Mode to Production my all of my css doesnt load.

It looks as if its only loading mobile menus.


texts:
I need to have 2 submenus in one menu in System menu.

It shows for me 2 submenus, but clicking on it just redirects a browser to the front page.

This is my config.xml part:

<admin>
    <routers>
        <sphinxsearch>
            <use>admin</use>
            <args>
                <module>AD_SphinxSearch_Adminhtml</module>
                <frontName>sphinxsearch</frontName>
            </args>
        </sphinxsearch>
    </routers>
</admin>

This is my adminhtml.xml part:

<menu>
    <system>
        <children>
            <sphinxsearch module="sphinxsearch">
                <title>Sphinx Search</title>
                <sort_order>9999</sort_order>
                <depends>
                    <module>AD_SphinxSearch</module>
                </depends>
                <children>
                    <wordforms module="sphinxsearch">
                        <title>Word Forms</title>
                        <sort_order>1</sort_order>
                        <action>sphinxsearch/wordforms</action>
                    </wordforms>
                    <stopwords module="sphinxsearch">
                        <title>Stop Words</title>
                        <sort_order>2</sort_order>
                        <action>sphinxsearch/stopwords</action>
                    </stopwords>
                </children>
            </sphinxsearch>
        </children>
    </system>
</menu>

And this is a structure of controllers:

AD

SphinxSearch

controllers

Adminhtml

StopwordsController.php

WordformsController.php

Each class (AD_SphinxSearch_Adminhtml_StopwordsController, AD_SphinxSearch_Adminhtml_WordformsController) extends Mage_Adminhtml_Controller_Action and has indexAction methods.

What am I doing wrong?


texts: Magento Abandoned cart email is not a default feature?

texts:
I want to confirm that the Magento 2 Abandoned cart email is not a default feature? MagePlaza extension inside the Magento seems need to get paid for this function.

Thanks


texts: Is there an easy way to create a table in the DB which contains both sku and qty fields?  Can I do this via SQL?


texts:
How can I change the name of the file being upload (will be changed to something random)? I can't find any docs for this and similar questions either focus on the wrong bit or are for Magento 1.

This script does work without attempting to change the name - the file is uploaded to $desintationPath (which is in the /pub directory).

try {
    $uploader = $this->uploaderFactory->create(['fileId' => 'file'])
        ->setAllowCreateFolders(true)
        ->setAllowedExtensions($this->allowedExtensions)
        ->addValidateCallback('validate', $this, 'validateFile');
    if (!$uploader->save($destinationPath)) {
        throw new LocalizedException(
            __('File cannot be saved to path: $1', $destinationPath)
        );
    }
} catch (\Exception $e) {
    $this->messageManager->addError(
        __("Sorry we encountered a problem. Please try again or get in touch.")
    );
}


texts:
I have added one product with 12% Tax as 1250

But when I check in cart it is showing Tax as 133.93 but it should show 150

Please check the below screenshot for more information.

Can you please help me with this issue?

Your help will be appreciated.

Tax Setting Please find the attached image


texts: access to XMLHttpRequest has been blocked

texts:
access to XMLHttpRequest 'api link' from origin 'http://localhost:8100' has
been blocked by cors policy: response to perflight doesn't pass access to
contrsol check: it doesn't have http ok status

I've built magento apis and my partner call those apis through ionic and get that error
I have added following lines to .htaccess file in magento root directory:

<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=edge"
<FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
    Header unset X-UA-Compatible
    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Allow-Methods "GET, POST, PUT, DELETE"
    Header always set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type"
</FilesMatch>

and added those lines to httpd.conf in apache:

<Directory />
AllowOverride none
Require all denied
Header set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, PUT, DELETE"
Header set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type"
</Directory>


texts: Enable or disable maintenance mode store view 2

texts: Is there any option to enable maintenance mode for a specific store view.


texts: How to get order id in Magento/Sales/View/Adminhtml/templates/totals.phtml?

texts: I've tried a lot but can't get current order id from totals.phtml under my adminhtml directory.


texts: Events for admin user login/logut in magento?

texts:
Is there any events for admin user login and logout in magento?

I found some events for customer login but not for Admin user login

<events>
         <customer_login>
           <observers>
              <scommerce_customer_login><!--User Defined Unique Name-->
                 <class>scommerce_login/observer</class>
                 <method>checkLoginStatus</method>
              </scommerce_customer_login>
           </observers>
         </customer_login>
      </events>

For how to get the admin users login events?


texts: Uncaught TypeError: $.widget is not a function

texts:
My code :
define([
    'Magento_Customer/js/model/authentication-popup',
    'Magento_Ui/js/modal/alert',
    'Magento_Ui/js/modal/confirm',
    'underscore',
    'jquery/ui',
    'jquery-ui-modules/core',
    'jquery-ui-modules/widget',
    'mage/decorate',
    'mage/collapsible',
    'mage/cookies',
    'loader'
], function ($, authenticationPopup, customerData, alert, confirm, _) {
    'use strict';

    return function (widget) {

        $.widget('mage.sidebar', widget, {

            _updateItemQty: function (elem) {

                var itemId = elem.data('cart-item');

                var btnplus = elem.data('btn-plus');
                var btnminus = elem.data('btn-minus');

                $('#cart-item-' + itemId + '-qty').trigger('processStart');
                this._ajax(this.options.url.update, {
                    'item_id': itemId,
                    'item_qty': $('#cart-item-' + itemId + '-qty').val(),
                    'item_btn_plus': btnplus,
                    'item_btn_minus': btnminus,

                }, elem, this._updateItemQtyAfter);
                $('#cart-item-' + itemId + '-qty').trigger('processStop');

                this._customerData();

            },

            /**
             * Update content after update qty
             *
             * @param {HTMLElement} elem
             */
            _updateItemQtyAfter: function (elem) {
                var productData = this._getProductById(Number(elem.data('cart-item')));

                if (!_.isUndefined(productData)) {
                    $(document).trigger('ajax:updateCartItemQty');

                    if (window.location.href === this.shoppingCartUrl) {
                        window.location.reload(false);
                    }
                }
                this._hideItemButton(elem);
            },

            _customerData : function ()  {
                var sections = ['cart'];
                customerData.invalidate(sections);
                customerData.reload(sections, true);
            }
        }
        );
        return $.mage.sidebar;
    }
});

Console Error 1 : https://snipboard.io/4NK3b5.jpg
Console Error 2 : https://snipboard.io/iqX8yF.jpg
Module : https://github.com/kirtinariya1/MinicartAjaxQtyIncrementDecrement


texts: How to disable the infinite scrolling and revert back to normal page?

texts:
currently using strategery infinite scrolling and my magento is CE 1.8

would like to revert back to normal page scrolling like PAGE 1 of 2


texts: Sort Manufacturer's attribute by their "position"

texts:
I'm trying to sort manufacturer's attribute option values by their "position" as entered in the backend, in attributes' panel. I need to get, for example all the manufacturers with position 2, or all the manufacturers with position 1 etc., by specifying it in the code below.

I've tried ->addFieldToFilter('attribute_position', array('eq'=> 200)); in the code below, but it isn't working. (btw this is the only of the 3 codes that actually is working.)

<?php
  $product = Mage::getModel('catalog/product');
  $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
  ->setEntityTypeFilter($product->getResource()->getTypeId())
  ->addFieldToFilter('attribute_code', 'manufacturer');
  $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
  $manufacturers = $attribute->getSource()->getAllOptions(false);
?>

<?php
$rows = array_chunk($manufacturers, 6);
foreach ($rows as $row) {
?>

<?php foreach ($row as $manufacturer) { ?>

<?php echo $manufacturer['label'] ?>

<?php } ?>

<?php } ?>

I've also tried this:

<?php
$attribute = Mage::getModel('eav/entity_attribute')->load( $code, 'attribute_code');
$option_col = Mage::getResourceModel( 'eav/entity_attribute_option_collection')
 ->setAttributeFilter( $attribute->getId() )
 ->setStoreFilter()
 ->setPositionOrder( 'ASC' );
$option_col->getSelect()->order('main_table.sort_order '.$orderby);
?>

but it isn't working, also, for me.

I was also suggested to do it this way (but it still won't work)

<?php
    $attribute = Mage::getModel('eav/entity_attribute')->load('manufacturer', 'attribute_code');

    $manufacturers = Mage::getResourceModel( 'eav/entity_attribute_option_collection')
     ->setAttributeFilter($attribute->getId())
     ->addFieldToFilter('sort_order', 1)
     ->unshiftOrder('sort_order', 'ASC')
     ->setStoreFilter();
?>

<?php
    $rows = array_chunk($manufacturers, 6);
    foreach ($rows as $row) {
?>

<?php foreach ($row as $manufacturer) { ?>

<?php echo $manufacturer['label'] ?>

<?php } ?>
<?php } ?>

Do you have any ideas how could it be done?


texts: What is use of direct_document_copy in data migration config.xml

texts:
I have recently migrate M1 DB to M2 DB there is option in config.xml called direct_document_copy

 <!--
    Set direct_document_copy = 1 for better performance.
    NOTE: 'source' and 'destination' databases MUST be placed on the same MySQL instance
    and 'destination' user MUST be granted with 'SELECT' permissions on 'source' database
     -->
    <direct_document_copy>0</direct_document_copy>

There is comment that set it to 1 for better performance.But the question is why isn't set default 1. Is there any special requirement to enable this?

  2) Mysql server has gone away

in the same file <bulk_size>0</bulk_size> this was set to 0 and a was getting Mysql server has gone away in migration process.

But when i changed it to <bulk_size>500</bulk_size> it was completed successfully.


texts: Magento 2: How to Add Custom CSS And Js and also Images in which Folder. Please Share also a folder structure.


texts: How to get payment methods to load when shipping step has been removed

texts:
I have removed the shipping step from the Magento 2 one page checkout by editing the shipping.js file in this location - vendor/magento/module-checkout/view/frontend/web/js/view

I set the visibility to false:
visible: ko.observable(false)

And then I comment out the step registration:

stepNavigator.registerStep(
    'shipping',
    '',
    $t('Shipping'),
    this.visible, _.bind(this.navigate, this),
    10
);

The shipping step goes away just like a want it to but then no payment methods are being loaded. I have tried to find the reason but so far no luck. Help me please :)


texts: In Magento2 For Ui component Form select Field,Dependency with another Field

texts:
On Magento2 For UI Component Form select Field should be having dependency on another value on the selection on ex: IF there is Field name: Field1 dropdown on selecting option then it should display a field below A Field2 related to This collection As show in the below screenshot

Screenshot:

Thanks in advance Please Help me.


texts: Add Product then error show in magento 2

texts:
I have click add to cart product then get the error:

Cannot read contents from file :

  "C:/Users/Admin/AppData/Local/Temp/D:/xampp/tmp/phpC9A.tmp" Warning !file_get_contents(C:/Users/Admin/AppData/Local/Temp/D:/xampp/tmp/phpC9A.tmp): failed to open stream: Invalid argument


texts: Making diffrent customer groups for not logged in

texts: Is there any way I can differentiate customer's from different locations using groups for customers that are not logged in ?


texts: URL Rewrites in 1.14 (EE) Don't Seem to be Created or Acted Upon for All Products

texts:
On my site, during the development process, products were created and imported using a variety of processes. Now I find that the URL rewrites are not uniform and don't seem to work in all cases.

Some products rewrite/redirect correctly, and some do not rewrite/redirect at all. In these cases, even though there are url_keys stored in the products, the rewrite part doesn't seem to be happening.

Since the site is still in developmnet, I don't need to preserve any old rewrites or any custom ones. I'd really like to clear them all out and regenerate them all based on the current product names.

In CE, I would truncate the core_url_rewrite table and reindex, and that would take care of things. I am not sure if this is possible in the Enterprise edition. Is there a similar process/procedure that I can use to recreate the rewrites and make the products use the rewrites? I have seen similar problems involving 1.13 and write-ups about fixing similar behaviors, but I'm not comfortable working with instructions that are 2-3 years old and for versions of Magento that are 2-3 back.

UPDATE:

I ran this MySQL query to remove all URL Rewrites:

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `enterprise_url_rewrite_redirect_rewrite`;
TRUNCATE TABLE `enterprise_url_rewrite_redirect_cl`;
TRUNCATE TABLE `enterprise_url_rewrite_redirect`;
TRUNCATE TABLE `enterprise_url_rewrite_product_cl`;
TRUNCATE TABLE `enterprise_url_rewrite_category_cl`;
TRUNCATE TABLE `enterprise_url_rewrite`;
TRUNCATE TABLE `enterprise_catalog_product_rewrite`;
TRUNCATE TABLE `enterprise_catalog_category_rewrite`;
TRUNCATE TABLE `core_url_rewrite`;
SET FOREIGN_KEY_CHECKS = 1;

Then reindex all from command line...

That helped a lot, but I still see some products that have a url_key assigned, but don't seem to have an associated rewrite in the database.

In the frontend, I see:
http://dev.xxxx.com/catalog/product/view/id/8573/

instead of: http://dev.xxxx.com/my-really-cool-product/

where the value "my-really-cool-product" is the value of the product "url_key".


texts: Magento 2 product video won't start because of vimeo http instead of https

texts: I'm using magento 2.0.7, and I'm trying to put a video for my products. So I put the vimeo link, in https, in the url field , I save it, but when I go on the product page, it wont start because of the http, even if I've put the link in https. Anyone can help me with that?


texts:
We recently have signed up with PayPal PayFlow Pro to accept recurring payments. When we were connected to PayPal (just plain simple) , things were working fine. Since we have migrated to Payflow Pro, we are unable to connect to it. Error is "The PayPal gateway rejected the request. User authentication failed". I can see correct API username and password being passed to PayPal. In the log files I see
'response' =>
array (
'RESULT' => '1',
'RESPMSG' => 'User authentication failed',
),
and
main.CRITICAL: PayPal gateway errors: User authentication failed. {"exception":"[object] (Exception(code: 0): PayPal gateway errors: User authentication failed. at /home/amibook/public_html/vendor/magento/module-paypal/Model/Api/PayflowNvp.php:650)"} []
and
Trace: #1 Magento\Paypal\Model\Api\Nvp->call('SetExpressChecko...', array('TENDER' => 'P', ............ 'BUTTONSOURCE' => 'Magento_Cart_Com...')) called at [vendor/magento/module-paypal/Model/Api/Nvp.php:833]
We are using Magento CE 2.3.4. Any help will be really appreciated.


texts: How can I edit menu Label (Description) in Magento-2?

texts:
How can I edit menu Label(Description) in magento-2?

(i.e) I attached one screenshot. Here menu label was SALE .I want to change it SALES.
How to do this?


texts: Magento 2: jQuery Datatables Button Extentions Not Working

texts:
============================UPDATED 1.1============================

I'm new to Magento 2.3, I'm trying to apply jQuery DataTable(DONE), after than, I want to add it's Button Extension, for that i need to add two more js, i did, now my Js file in included but can't see print button, Here is my code:

/EC/Downloads/view/adminhtml/requirejs-config.js

 var config = {
    map: {
   '*': {
       dataTables: 'EC_Downloads/js/datatables.min'
     }
   }
 };

/EC/Downloads/view/adminhtml/templates/test.phtml

<script>
require(['jquery', 'jquery/ui','dataTables'], function($){
    $(document).ready(function($){
        $('#example').DataTable({
            dom: 'Bfrtip',
            buttons: [
            'print'
        ]
        });
    });
});
</script>

Initializing other two js button.js, button_print.js like this:

<script type="text/x-magento-init">
    {
        "*": {
            "EC_Downloads/js/buttons":{},
            "EC_Downloads/js/buttons_print":{}
        }
    }
</script>

Getting This Error:


texts:
please let me know

how attribute associate with layered navigation?

And if an attribute is assigned to only associated product, while that product has visibility is not visible individually.
it's parent configurable product is showing in listing, as well as product count is correct for that attribute options why?

How those options are being related to configurable product? I can't find any documentation for this.

I am just curious to know its internal working.


texts: Magento billing and shipping fields in register page

texts: Is it possible to show billing and shipping fields in register page?


texts:
I having an issue. For some reason the attributes filter are not showed. I enable some logs and I saw this:

If I set the is anchor to YES this is the executed query:

SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `at_stock_status`.`stock_status` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=25 AND cat_index.visibility IN(2, 4) AND cat_index.category_id='86' AND cat_index.is_parent=1
 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
 INNER JOIN `cataloginventory_stock_status` AS `at_stock_status` ON (at_stock_status.`product_id`=e.entity_id) AND (at_stock_status.stock_status = '1') AND (at_stock_status.website_id = '1') ORDER BY `price_index`.`min_price` asc, `price_index`.`min_price` asc LIMIT 8

if i set to NO this is the executed query:

SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `at_stock_status`.`stock_status` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=25 AND cat_index.visibility IN(2, 4) AND cat_index.category_id='474' AND cat_index.is_parent=1
 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
 INNER JOIN `cataloginventory_stock_status` AS `at_stock_status` ON (at_stock_status.`product_id`=e.entity_id) AND (at_stock_status.stock_status = '1') AND (at_stock_status.website_id = '1') ORDER BY `price_index`.`min_price` asc, `price_index`.`min_price` asc, `price_index`.`min_price` asc LIMIT 8

This is the weird part.
for NO  the cat_index.category_id='86'

for YES the cat_index.category_id='474'

My category ID is 474, NOT 86 . I have no any category with the value 86. All of the settings from admin panel is well done. I have products with attributes a,b,c and I have product which belongs to category 474. So it is not an administration settings. Can someone help me with this ? thx


texts: Magento 2: Get Order Information Outside Magento Issue for Date

texts:
I have below script, trying to get all Orders. I have issue with Date. That i have solved using https://github.com/magento/magento2/issues/7560

//place this before any script you want to calculate time
date_default_timezone_set('Asia/Singapore');
echo date_default_timezone_get();

// MAGENTO START
include('app/bootstrap.php');

use Magento\Framework\App\Bootstrap;
use Magento\Customer\Api\AccountManagementInterface;
use Magento\Customer\Model\AccountManagement;

$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();

$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

//$orders = $objectManager->create('Magento\Sales\Model\ResourceModel\Order\Collection');
$orders = $objectManager->create('Magento\Sales\Model\Order')->getCollection();

$magentoTimeZoneObject = $objectManager->create('Magento\Framework\Stdlib\DateTime\TimezoneInterface');

foreach ($orders as $order) {

    echo "<pre>";
    echo $order->getData('entity_id').' - '.$order->getData('created_at');

    echo $magentoTimeZoneObject->date(new \DateTime($order->getCreatedAt()))->format('Y-m-d H:i:s');
}

In Database i have 2 Orders for different dates. But when i fetch from Database it's showing wrong Created Date for Orders. It's not showing Database Dates.


texts:
we are planning to get help building a Magento Community Edition store. It's quite a big investment for our company.

Should we wait until 2.0 is released or will we do fine with the 1.9.1.1-version? Is it hard do upgrade from 1.9.1.1 to 2.0 and is it worth it?


texts:
Looking at slow requests in newrelic for a product listing page the top function called was Mage_Catalog_Model_Product_Image::_checkMemory() which does a bunch of stuff like checking the ini settings for memory_limit (ini_get('memory_limit'), checks the image size and calculates the memory needed for that and so on...

I've just added a return true (skip the checks, Magento has enough memory for those processes) in that function and the graph below shows the impact.

Anyone else did anything about this? Ideas, risks?


texts:
I'm trying to implement a new import entity to be made available through the ImportExport module (which is actually extended by Firegento_FastSimpleImport2, but that's not relevant for this question) for importing a collection of attributes (just the labels not the values) which will be used for product attributes, but might be needed to be extended in the future for customers or categories. I manged to do a new import entity and make it available through the import interface.

My question now is if there's a recommended way to use Magento's API for attributes (maybe from the EAV module) or I just make a pseudo entity and import directly in the attributes tables?

The module install / update scripts are a no-go for this because it needs to be further integrated and withing a larger system and work seamlessly via API or CLI commands, repeatedly.

I've seen only one example of programmatically adding attributes without install/upgrade scripts here but I don't know how I can reuse it in implementing the ImportExport module's AbstractEntity. Any pointers would be helpful.


texts: Magento 2.2.9 - Removed class use still throws errors

texts:
In system.log, I keep receiving the error

  main.CRITICAL: Class Magento\Framework\EscapeHelper does not exist.

I've removed/changed all references to this class, and when I grep the website the only result returned is the system.log file itself. What could be causing this?

I've blown caches, generated code, and static content to bits with no success.

Running Magento 2.2.9


texts:
I have Try to solve bellow js issue but not succeed.

i have checked in new magento this file is magento inbuilt merge.

Can any one have solution how to solve this issue ?


texts: Add new field in report->sales->orders grid

texts:
I'm new in magento i want to add new field email in magento
Reports -> Sales ->Orders inside there is grid i want to add email field
how to achieve this?


texts: How to choose right caching technique for Magento2 and how to configure them properly

texts:
We are working on a new store and want the site to have cached. I think there are a lot of caching techniques but I would like to which are to be chosen.
Ex: Varnish, OPcache, Memcache, Redis.

Appreciate if you have a suggestion on how to configure them as well, as earlier I have configured OP cache and spent a lot of time to disable it due to more caching.


texts: How to load all values of particular attributes in magento 2?

texts:
In Magento 1.9. We can use below code to load all values of particular attributes
$attribute = Mage::getSingleton('eav/config')->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'brand');

    if ($attribute->usesSource()) {
        return $options = $attribute->getSource()->getAllOptions(false);
    }

How to do the same in Magento 2.4 version?


texts: Magento Manage categories page not displaying properly

texts: I have attached the screenshot of the error in the manage categories page. Anyone can help for this error


texts:
I am working on one custom module where i need to show customers.After getting the customer fields i am little confused that for customer activation which field is to be set.Is Active or Customer Activated ? I am trying to update customer info and it updates customer activated but not is active.
My code is follow :

$id = $this->getRequest()->getParam('id');
            $model  = Mage::getModel("customer/customer")->load($id);
             $model   ->setWebsiteId($websiteId)
            ->setStore($store)
            ->setFirstname($data['firstname'])
            ->setLastname($data['lastname'])
            ->setEmail($data['email'])
            ->setCustomerActivated($data['is_active'])
            ->setIsActive($data['is_active'])
            ->setGroupId($data['group_id']);
             $model->save();

I want to set customer status either active or not on basis of either is active or Customer Activated.


texts:
I want to create a custom extension which will be able to add new Attribute Property in (Catalog->Attiributes->Manage Attributes->Add new attribute-> in field 'Attribute Properties'). It will be drop down with two options and file upload button.

If you know some information where can I read about this please help me.


texts: Detect if a product is a child of a configurable product?

texts:
I'm using catalogsearch/query to search the products in our database, but this is also giving back child products of configurable products. Because those products don't get returned by catalog/product I get inconsistencies between the total product count (which comes from catalogsearch/query) and the actual products (which come from catalog/product because I need additional attributes for the products). I have been looking in the database but I can't seem to find a property which indicates that a product is a child product of a configurable product.
I did find the option to check if a product has a parent product, I could use that to filter out those products, but this is not a solution because the total product count would still be inaccurate. We need this total product count to precalulate the size of a view.

This is my current search code:

// apply search
if (!empty($search)) {
    $catalogSearchModel = Mage::getModel('catalogsearch/query')->setQueryText($search);
    $catalogSearchModelCollection = $catalogSearchModel->getResultCollection();

    $category = Mage::getModel('catalog/category')->load($categoryId);
    $catalogSearchModelCollection->addCategoryFilter($category);

    if (!empty($range)) {
        $catalogSearchModelCollection->getSelect()->limit(($range[1] + $range[0]), $range[0]);
    } else {
        $catalogSearchModelCollection->getSelect()->limit(100);
    }
    $data = $catalogSearchModelCollection->getData();

    $productCount = $catalogSearchModelCollection->getSize();

    if (empty($data)) {
        // No products found to filter from, set some imposible `where` to make sure it doesn't return products
        $collection->addAttributeToFilter(array(array("attribute" => "entity_id", "eq" => 0)));
    } else {
        $filters = array();
        foreach ($data as $key => $value) {
            $filters[] = array("attribute" => "entity_id", "eq" => $value["entity_id"]);
        }

        $productCollection->addAttributeToFilter($filters);
    }
}

So in short, how can I add a filter to the search collection which excludes child products?


texts: Magento2 stop data from getting saved in database

texts:
Magento2 How can I stop data from getting saved in custom table 'amasty_acart_rule_quote' as soon as quote data is restored?
I am using following function to restore Quote items
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $customerSession = $objectManager->create('Magento\Customer\Model\Session');
        $customerSession->setMyOrder($corder);
     $this->_checkoutSession->restoreQuote();


texts: how to get thumbnail of subcategory in a loop?

texts:
$category = Mage::getModel('catalog/category')->load('2')->getChildrenCategories();
foreach ($category as $cat){

    $entity_id = $cat->getId();
    $name = $cat->getName();
    $url_key = $cat->getUrlKey();
    $url_path = $cat->getUrlPath();
    $skin_url = $cat->getImageUrl();

 <img src="<?php echo $skin_url; ?>" />

above mentioned code is not working for me, if any one have to the point solution, then please help.


texts: Sample data for Magento 2 - PHP memory problem while installing from Composer

texts:
Recently I tried to install Magento 2 with sample data and failed. I added the proper package to the composer.json file and when I run composer update it always fails just before finishing downloading:

  - Installing magento/sample-data-media (0.42.0-beta1)
    Downloading: 90%
Fatal error: Out of memory (allocated 652738560) (tried to allocate 556269568 by
tes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/
RemoteFilesystem.php on line 175

I set memory_limit in my php.ini file to 2048MB but it didn't help. I checked in command line that it is set correctly:

c:\WT-NMP\WWW\magento_2>php -r "echo ini_get('memory_limit');"
2048M
c:\WT-NMP\WWW\magento_2>php -r "$a = []; while(true) { $a[] = 'a'; }"

Fatal error: Out of memory (allocated 2019033088) (tried to allocate 24 bytes) i
n Command line code on line 1

Does anyone know what the problem might be? Or maybe you know some hacky way to install sample data without Composer?


texts: Render sales email items table into variable

texts:
I need to pass the content of the order items table from the new order email to an external service. In Magento 1 I used this approach and it worked fine:
      $appEmulation = Mage::getSingleton('core/app_emulation');
      $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($order->getStoreId());
      $layout = Mage::getModel('core/layout');
      $layoutUpdate = $layout->getUpdate();
      $layoutUpdate->load('sales_email_order_items');
      $layout->generateXml();
      $layout->generateBlocks();
      $items = $layout->getBlock('items');
      $items->setOrder($order);
      $orderItemsHtml = $items->toHtml();
      $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);

      return $orderItemsHtml;

I use this approach instead of rendering the block directly because various extensions extend the layout that is used to create that table.
I'm trying to port this to M2 and struggle to get access the order block.
I tried various versions but the layout never seems to be loaded. I.e.
public function __construct(
    \Magento\Framework\View\Result\PageFactory $pageFactory
)
{
    $this->pageFactory = $pageFactory;
}

...

protected function getOrderItemsHtml($order)
    $emulation->startEnvironmentEmulation($order->getStoreId(), \Magento\Framework\App\Area::AREA_FRONTEND, true);

    /** @var \Magento\Framework\View\Result\Page */
    $page = $this->pageFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_PAGE);
    $page->addHandle('sales_email_order_items');
    $blocks = $page->getLayout()->getAllBlocks();
    var_dump(array_keys($blocks)); die;
}

This will output:
array (size=1)
  0 => string 'messages' (length=8)

If anyone has any idea what I'm missing or if anyone can point me to an alternative approach for this I would be very grateful. Thanks!


texts:
I ınstalled Nexcess Turpentine Varnish Cache extension and installed varnish 3. to my server. Configured files to listen port 8080.
This is my Tcp check:

tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      5223/varnishd
tcp        0      0 :::80                       :::*                        LISTEN      5223/varnishd

No httpd appears as you see.

I changed default port of apache to 8080 via Cpanel>Tweak Settings.

My problem is when i try to type my address bar "solempet.com" and click enter it appears as "Default Website Page"

But when i try to type my address bar "www.solempet.com" or https://solempet.com my site loads perfectly.

It's a fresh magento installation and i setted "use secure urls" beginning at the magento installation.
Here is some screenshots about my configuration of varnish and httpd.conf;


texts: Add Product Description on Simple Product Page Magento 2

texts: I'm having difficulty figuring out how to add a description to a Simple Product that will subsequently be displayed on the Simple Product Details Page. Everywhere I have looked discusses using code to handle this but like i said in my last post im new to magento and cannot figure out how to solve this issue with code solutions provided as they seem to gear towards more advanced developers.


texts: New customer registration event on onepage - checkout page

texts:
When an unregistered customer goes to the checkout page and registers for an account there, on the final stage when the customer presses "Place order" Magento adds the new customer to the database.

I want to catch that event and get the new customer's details.

Problems

The event customer_register_success doesn't work on the onepage checkout page
The event checkout_type_onepage_save_order_after works every time a customer presses "Place order", and I want to catch only the first time

I want to catch the exact event that adds the new customer after they've registered in the onepage checkout page, and get the details of that new customer (after the event).


texts: Selected value is not display in admin edit form

texts:
I have created below option in admin edit form. It is showing selected value in grid but in edit, it is displaying default value like only first option.

For ex. Smartphone is "Device Type" in grid, But when I go to edit form it display Tablet not Smartphone.

Code used in Grid.php

static public function getOptionArray4()
{
    $data_array=array();
    $data_array[0]='';
    $data_array[1]='Tablet';
    $data_array[2]='Smartphone';
    return($data_array);
}

static public function getValueArray4()
{
    $data_array=array();
    foreach(Allin_Devices_Block_Adminhtml_Devices_Grid::getOptionArray4() as $k=>$v){
       $data_array[]=array('value'=>$k,'label'=>$v);
    }
    return($data_array);

}

and below code used in form.php

$fieldset->addField('mobile_tablet', 'select', array(
    'name'  => 'mobile_tablet',
    'label' => Mage::helper('devices')->__('Select Device Type'),
    'values'   => Allin_Devices_Block_Adminhtml_Devices_Grid::getValueArray4()
));


texts: Page not found while trying access controller with parameter in url

texts:
i created a simple controller like this:

namespace Namespace\Module\Controller\Confirm;

class Index extends \Magento\Framework\App\Action\Action
{

    protected $resultPageFactory;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    public function execute()
    {
        $params = $this->getRequest()->getParams();
        print_r($params);
        exit;
    }
}

when i access my module controller with parameter like this, i'll get Page not found:

  http://baseurl.com/mymodule/confirm/token/1231dasda

when i access my module contoller without parameter in url like this, it will run the controller function:

  http://baseurl.com/mymodule/confirm


texts: API requests for customers/ other info always returns with error 404

texts:
I have established and confirmed the roles/attributes on the admin side and have been successful in getting the permanent tokens for the site, but have been unable to make any calls to the Magento API as it always returns with error 404.

Here are a few of the links I have used on POSTMAN:
https://webstore1.tcacoustic.com.sg/api/rest/customers
https://webstore1.tcacoustic.com.sg/api/rest/products

Version: Magento CE 1.9.3.3 on IIS

Hope someone can help me on this thanks!


texts: Changes in root .htaccess file not reflecting in Magento 2

texts:
I am using Magento 2.1.

I am trying to add a rewrite rule in .htaccess file for url's starting with index.php?route=. to be replaced with the query string.

  RewriteCond %{QUERY_STRING} ^index.php?route=.+$ [NC]
  RewriteRule ^(.*)$ /%{QUERY_STRING}\? [R=301,L]

But this url rewrite rule is not getting reflected in my site.

Am I editing the right file(root/.htaccess).?

Please suggest a solution to my problem.


texts: How to have an Amazon like selecting system?

texts:
I want to have the same kind of selection system as Amazon in Magento. This system features; choosing different products and choosing different variants of that product. The most important thing is they are linked to each other so maybe that variant of that product isn't available so it's not viable for choosing. The description and image of the product changes as well when another variant of the product has been chosen. I'm not exactly sure how do this in Magento so I would love to have some help.

Thanks in advance.


texts:
PHP 7 is reaching beta status and lots of testing is going on at the moment. Given that Magento caught up within the last year from "runs only on PHP 5.3" to "fully compatible with PHP 5.6", I would like to know how much they are considering PHP 7 compatibility for Magento 1.x as well as Magento 2.

I found this post by Anna Filina where she found one issue in Magento 1.9.1 (still unchanged in 1.9.2), but given that Magento 1 does not have unit tests, I don't trust that this was the only issue.

So the question is: will PHP 7 compatibility for Magento 1 be ensured? And as Magento 2 probably has already been tested on PHP 7 (Thank automated tests!), are there any known issues?


texts: Setting media/skin urls to another domain breaks image uploader in wysiwyg editor

texts:
If I set the "Base skin URL" and " Base media URL" to a domain other than the one used for the "Base URL" the image uploader in the WYSIWYG editor breaks.

The "Media storage" popup appears and I can select an image using the "Browse files..." button but any file I select isn't shown in the list and the " Upload files" button does nothing what so ever.

I already checked the JavaScript console and the access/error logs of my server but nothing seems to happen at all.

How can I fix this? Or is this a 'feature' and do I have to disable my custom/cdn URL settings just to be able to upload a new image?


texts: Newsletter is not going to subscriber in magento2

texts:
well there is an issue with newsletter in magento 2.is i have created newsletter template for subscriber but when i set a date and time to it.it was still not going to my subscribers.apart from this Transnational Emails are going perfectly only newsletter email are not going.also time is scheduling 4 hours latter while setting newsletter queue timings
.


texts: If i delete the product its associated related product should also be deleted in checkout/cart page magento2. 1. 7?

texts:
If i delete the product its associated related product should also be deleted in checkout/cart page magento2.1.7?

How can i achieve this ?


texts: How is it possible to add our company's VAT number to our customer's receipt emails?

texts:
I've done a bit of research into this, and checked various suggestions, but can't locate a simple way of inserting our company's VAT number into receipts for our customer's. We have our VAT number entered in System > Configuration > General > Store Information

And we have Enable Automatic Assignment to Customer Group in System > Customer > Customer Configuration set to Yes. But still we can't get it to appear anywhere.

We've also experimented with adding a new transactional email in with some code included at the end to try to manually add the VAT number in, we've tried:

{{var order.getData(’customer_taxvat’)}}

For example, and a few other slight variations, but NOTHING get's pulled in at all :(

Any ideas on how to solve this one?


texts: static content deploy not working for custom theme

texts:
I created custom theme based on luma theme.

And  my theme contain only 2 files theme.xml registration.php file.

And i configured this theme in the back end.

if i run  store front  css,js not loading.
even if i run static content deploy also my theme not listed in deploying process.


texts:
I'm in the need to export from Magento 1 customers and products.
To import them back on a new Magento 2 shop.

I'm following this guide:
https://www.mag-manager.com/product-information/magento-product-management/how-to-transfer-products-from-magento-1-to-magento-2/

But when I launch export for products, after 30-40" processing, page stops
printing out the error:

Fatal error: Unsupported operand types in /opt/lampp/htdocs/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line 948

Any idea on how to overcome this error, or any other approach suggestion is welcome.


texts:
I'm trying to set a new cookie the same way the store cookie is set.
I use the following plugin:

<type name="Magento\Framework\App\FrontController">
        <plugin name="homepage_plugin" type="My\Module\Model\Plugin\Hompage" sortOrder="100"/>
</type>

I have the following code that should set the cookie:

public function beforeDispatch(
        \Magento\Framework\App\FrontController $subject,
        \Magento\Framework\App\RequestInterface $request
    ) {
        $param = $request->getParam('___cookie');
        $cookie = $this->cookieManager->getCookie('cookie');
        $toSet = $param ? $param : $cookie;

        if (isset($param) && $param !== $cookie) {
            $metadata = $this->cookieMetadata
                ->createPublicCookieMetadata()
                ->setDurationOneYear()
                ->setPath($this->sessionManager->getCookiePath())
                ->setDomain($this->sessionManager->getCookieDomain());

            $this->cookieManager->setPublicCookie('cookie', $toSet, $metadata);
        }
    }

Everything works fine on any other page except homepage. On homepage it seems that beforeDispatch() is called twice and the second time it's missing it's parameter on getParam().

With full_page disabled the cookie is set correctly on homepage as well.


texts: Adding value to the additional attribute of product via SOAP V1

texts:
I have created one additional attribute with dropdown field. When i add values via SOAP v1, i could not be able to add.

following is my code

$result = $client->call($session, 'catalog_product.create', array('simple', $attributeSet['set_id'], 'testSKU',array(
    'categories' => array(0,1),
    'name' => 'Test Product',
    'description' => 'Description',
    'short_description' => 'Product short description',
    'weight' => '10',
    'status' => '1',
    'visibility' => '4',
    'price' => '100',
    'tax_class_id' => 2,
    'meta_title' => 'MetaTitle',
    'meta_keyword' => 'MetaKeyword',
    'meta_description' => 'MetaDesc',
    'brand' => 'brand')));

is there any way to solve this?


texts:
How can I load all addresses and address form on cart page ?

I tried the bellow code but it doesn't work !

<referenceContainer name="content">
    <block class="Magento\Checkout\Block\Cart\Shipping" name="checkout.cart.shipping" as="shipping" template="Magento_Checkout::cart/shipping.phtml" >

    </block>
</referenceContainer>


texts: Magento 2 : print_r or var_dump is not working

texts: Why print_r and var_dump is not working in magento 2 ? I have check with category object in my custom module block and .phtml files. This does not show anything.


texts: Magento 2 - how to get models, config(s), and order info similar to Magento 1 style (Mage::getBaseUrl, Mage::getModel, etc...))

texts:
I am a complete Magento 2 noob. I know a lot of things changed, one of which is how to get the Singleton Mage:: instance and its methods. I know it is moved to vendor/ directory from Mage/Code/Core, but I still don't know how to call Mage:: and invoke the methods for getting the model and other things, like order total amount, and order items. I need this in order to implement a module, but also independently of the module, in a pure PHP page. How can I access Magento methods in Magento 2? I tried:

namespace Vendor\Module_Name\Block\Product;
$objectManager = Magento\Core\Model\ObjectManager::getInstance();

but it didn't work, I got the error message:

Class 'Vendor\Module_Name\Block\Product\Magento\Core\Model\ObjectManager' not found in /Applications/MAMP/htdocs/magento2/retrieveTotalOrders.php on line 8


texts: Custom Entity Models - Using EAV vs Flat

texts:
I am working on a module that is essentially replacing a number of Magento features with custom logic. This is mainly due to the fact that I require pricing to 5 decimals of precision, but that is beside the point.

My module, for lack of a better term, is modelling "materials" and is a representation of the store owner's existing SKU/Catalog system.

I have several entities in my module, each representing a different segment of the catalog taxonomy. For example, a typical SKU will look like "AA-TTTT-SSSS-CCCC-ZZZZ", each of those segments ("AA", "TTTT", etc) are modeled as a different entity.

Up until now, I have been using a flat structure for each entity. As I start getting deeper into the build and finding more and more attributes I need to include, I am thinking it might be beneficial to move some of these entities to EAV, as there are no shortage of saved entities that have mostly empty fields.

At this point, my question is simple:

What are some concrete examples of real-world use cases for using custom EAV models in Magento? If you've chosen EAV for modelling a specific custom entity, what aspect of the business logic helped you to choose?

Of course, I am perfectly aware that there are plenty of articles describing the EAV system, it's pros, cons, etc; however, none of these articles really explain why you would opt for EAV specifically as it relates to Magento.


texts: can't call function setTemplate in controller admin magento2?

texts:
in my Controller i call

 public function execute()
    {

        $this->_view->loadLayout();
        echo $this->_view->getLayout()->getBlock('productquestion_edit_tab_answerquestion')->setTemplate('Mageaddons_Productquestion::answers/edit.phtml'); die('xxx');
        ..}

Get Fatal error: Call to a member function setTemplate() on boolean


texts: hello guys please help me out how to get product quantity option on product listing page

texts:
this is my list.phtml code and look

instead I want to display like

my code

<div class="products wrapper <?= /* @noEscape */ $viewMode ?> products-<?= /* @noEscape */ $viewMode ?>">

        <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
        <?php foreach ($_productCollection as $_product) :?>

                    <?php
                    $productImage = $block->getImage($_product, $imageDisplayArea);
                    if ($pos != null) {
                        $position = ' style="left:' . $productImage->getWidth() . 'px;'
                            . 'top:' . $productImage->getHeight() . 'px;"';
                    }
                    ?>
                    <?php
                    $_productNameStripped = $block->stripTags($_product->getName(), null, true);
                    ?>

                        <a class="product-item-link"
                           href="<?= $block->escapeUrl($_product->getProductUrl()) ?>">
                            <?= /* @noEscape */ $_helper->productAttribute($_product, $_product->getName(), 'name') ?>

                            <?php // Product Image?>
                            <a href="<?= $block->escapeUrl($_product->getProductUrl()) ?>"
                               class="product photo product-item-photo"
                               tabindex="-1">
                                <?= $productImage->toHtml() ?>

Some text..

Some text..

Some text..

Some text..

        <?php endforeach; ?>


texts: Save Uploaded images to current order table

texts:
I am Creating an image attachment for each order in admin panel. I have used the image up loader and saved that images to a custom directory as follows:

 public function uploadAction() {
    if (isset($_FILES['docname']['name']) && $_FILES['docname']['name'] != '') {

        try {
            $uploader = new Varien_File_Uploader('docname');
            $uploader->setAllowedExtensions(array('doc','pdf','txt','docx','png'));
            $uploader->setAllowCreateFolders(true);
            $uploader->setAllowRenameFiles(false);
            $uploader->setFilesDispersion(false);
            $newDir = "customer_documents";

            $newdirPath = Mage::getBaseDir('media') . DS . "customer_documents";

            if (!file_exists($newdirPath)) {
                mkdir($newdirPath, 0777);
            }

            $path = Mage::getBaseDir('media') . DS . $newDir . DS;
            $resizedPath = Mage::getBaseDir('media') . DS . $newDir;
            $uploader->save($path, $_FILES['docname']['name']);
            echo $filename = $uploader->getUploadedFileName(); // Uploaded File name
            Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('core')->__('File uploaded successfully.'));
        } catch (Exception $e) {
            Mage::getSingleton('adminhtml/session')->addError(Mage::helper('core')->__('Unable to find item to save'));
        }
    }

But Now I want to save this image to the current order table in database and then i will show it on the account page each user who's order it will be.

This is my tab in order view page admin panel:

class MageSf_OrderCustom_Block_Adminhtml_Order_View_Tab_OrderCustom
extends Mage_Adminhtml_Block_Template
implements Mage_Adminhtml_Block_Widget_Tab_Interface
{
//change _constuct to _construct()
public function _construct()
{
    parent::_construct();
    $this->setTemplate('magsf/ordercustom/order/view/tab/ordercustom.phtml');

}

public function getTabLabel() {
    return $this->__('Order Attachment');
}

public function getTabTitle() {
    return $this->__('Order Attachment');
}

public function canShowTab() {
    return true;
}

public function isHidden() {
    return false;
}

public function getOrder(){
    return Mage::registry('current_order');
}
}

And here is my form that for uploading the image:

<form id="doc-form" name="doc-form" method="post" action="<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/sfupload/upload',array('form_key' => Mage::getSingleton('core/session')->getFormKey())); ?>" enctype="multipart/form-data">
Upload Document
<input type="file" title="File" name="docname">
<button type="submit" title="Save">Upload</button>
</form>


texts:
In my default.xml I have

<referenceContainer name="header.container">
        <block name="tonysamperi_developertools.all"
               class="TonySamperi\DeveloperTools\Block\All"
               before="-"
               template="TonySamperi_DeveloperTools::html/all.phtml" />
</referenceContainer>

In Magento 2.1 I have my extension on the very top of the page, before the panel header. (Correct behaviour)

In Magento 2.0 My extension and the panel header are swapped!

Anyone who may know why??


texts:
Im trying to make the Homepage invisible since im doing an integration between 2 sites and the non Magento site handles the Homepage already. So far I achieved this temporally with a JS redirect but this is a bad idea.

Is there any way to do a 301 redirect from the Homepage to another URL? For the record, the destination URL it's outside Magento.


texts:
I am new to Magento 2 and also new to StackExchange.

I observed that there are so many images generated in the cache directory.
Why do I need this?

How can I stop creating these images?

What would happen if I delete all images in this directory?


texts: Magento 2 : How to replace dropdown as switch?

texts:
I've created a custom module in  which I've a drop down field having "Yes/No" value, here is the screenshot:

  https://nimb.ws/bMZCUB

I just want to replace this drop down into switch ,just like below screenshot:

  https://nimb.ws/OCldgW

How can I achieve the same?

I've created module from "Silksoftware" and to creating the form fields it's using block just like:

   $fieldset->addField(
            'available_every_week',
            'select',
            [
                'label' => __('Available Every Week'),
                'title' => __('Available Every Week'),
                'name' => 'available_every_week',

                'options' => \Namespace\Test\Block\Adminhtml\Gametype\Grid::getOptionArray5(),
                'disabled' => $isElementDisabled
            ]
        );

Where

  Namespace\Test\Block\Adminhtml\Gametype\Grid::getOptionArray5

is returning values(Yes/No) for the dropdown.

Waiting for the update.


texts: Price want to show including and excluding tax in catalogue and also in shopping cart

texts:
I tried many things to display the price of a product including and excluding tax but no result as i wish.
I made a rule for 21 percent. Also tried different things in configuration but no result.
Is this a bug?
Regards


texts: Magento 2 - can't enable production mode. Shows Command returned non-zero exit code

texts:
I am trying to set Magento 2 website in production mode. However unable to set. It gives me below error.

  Command returned non-zero exit code:
  /opt/plesk/php/7.0/bin/php -f /var/www/vhosts/sitename/httpdocs/bin/magento setup:static-content:deploy en_GB en_US

server's memory_limit is set to 2G. Magento version is 2.1.

Anybody could say what's wrong here while setting store in production mode?


texts: Quantity Increment button is not working with Ajax pagination on Listing page

texts:
I am working on Magento 2.4 , Quantity increment/decrement button. and not any error shown in console or Log file.
Please Give me any idea about this issue.
Thanks


texts: Magento: Disable module for any particular store

texts:
Please let me know if you have any solution to disable module and its file for particular store.

I have tried with inchoo (http://inchoo.net/magento/how-to-activatedeactivate-magento-module-per-a-website-level/) solution but it is not working while cache is enabled.


texts: I want to know, which file responsible for sending an email to customer when a shipment is created by admin (IF CHECKED Email Copy of Shipment)


texts: How to add/subtract month to/from date in Magento2?

texts:
I am getting date by injecting this class in constructor \Magento\Framework\Stdlib\DateTime\DateTime as:

protected $date;
public function __construct(
....
\Magento\Framework\Stdlib\DateTime\DateTime $date,
....
) {
....
$this->date = $date;
....
}

and then, in class this:

$date = $this->date->gmtDate();

But how can I add or subtract month to this date for Expiration feature ?


texts: Exclude parent category from child category URL if parent category is empty

texts:
My category/subcategory relationships are structured from a cosmetic point of view for the menu:

Root->Parent (no products)->Cosmetic Category (no products)-> actual subcategory (products)

I want my URL for the actual subcategories to exclude the Cosmetic Category. The cosmetic category will always exist at level 2 (if root is level 0). I am trying to implement a check that if the parent category has 0 products and is level 2 then to exclude it from the URL. I have been unsuccessful so far. Any recommendations? Thanks.


texts: Magento CVV What is this help link not works

texts:
In the magento (ver 1.9) Checkout Payment Information tab, Clicking on CVV "What is this" help link not working.

Help image is exist there. a tag has# link. No errors are displayed.

How to fix this?


texts: Magento 1 After enable formkey on checkout page not go next from payment method

texts:
I have checked formkey is available on all checkout pages but on frontend checkout page payment step continue button not working.

Is there any solution for this?


texts: Magento 2 payment module "this.item" is undefined

texts:
I tried to create my own custom payment module in Magento2.1.1 CE, and there is one thing I just can't figure out.

In many of the out-of-box modules, there is a property "this.item", for example vendor/magento/module-offline-payments/view/frontend/web/js/view/payment/method-renderer/banktransfer-method.js : line 22, which were often used for getTitle() or getCode(), and the most importantly for selectPaymentMethod().

However, "this.item" in my method renderer is always undefined, and I just can't find where & what I should do to assign it the desired value.

My js code is attached below:

define(
[
    'uiComponent',
    'Magento_Checkout/js/model/payment/renderer-list'
],
function (Component,rendererList) {
    'use strict';
    rendererList.push(
            {
                type: 'pay2go',
                component: 'Logic_Pay2go/js/view/payment/method-renderer/pay2go-renderer'
    });
    return Component.extend({});
});

And the method renderer:

define(
[
    'jquery',
    'Magento_Checkout/js/view/payment/default'
],
function ($, Component, quote, additionalValidators) {
    'use strict';

    return Component.extend({
        defaults: {
            template: 'Logic_Pay2go/payment/pay2go'
        },
        redirectAfterPlaceOrder: false,

        afterPlaceOrder: function () {
            console.log(this.item); // Undefined.
            $.mage.redirect(window.checkoutConfig.payment.pay2go.redirectUrl);
        }
    });
});

The other behaviors were inherited from Magento_Checkout/js/view/payment/default.
Can any one please enlight me? Thanks.


texts: Check products in cart if they are out of stock before place order REST API : Magento 2

texts:
I am building mobile application using Magento 2, I had an old defined cart which had a product and when checking out it gives an error saying the item is out of stock, that happened after payment and placing the order. I checked this product in backend and found its Quantity was 0 and out of stock. checked with my friend and knew that he bought it in a test case.

Ho can I fix this problem and check all products in cart are in stock OR out of stock Using REST API?


texts: Magento 2 : How to set multiple currencies in one storefront?

texts:
Magento 2, how to set multiple currency supports for one store.
I want to display currency in header of site.

Thanks.


texts: Magento 2 : place order after a click on place order button in custom payment module

texts:
I'm a beginner on Magento. I try to create a custom payment module. All work fine but when I click on the "place order" button on the checkout page, the order is not add to the orders list of the current user.
I want to make custom action after a click on the "place order" button before calling if it exists, the default action set by Magento to add an order to the orders list of the current user using the current quote.
Something like that:
placeOrder: function() {
   //When the user click on "place order" button

   //Custom module action
   //action_1
   //action_2
       .
       .
       .
   //action_n

   //Call the default magento action to create an order using the current quote
   magento_default_placeOrder_action();
}


texts: Examples website with payload of all magento 2 rest api

texts:
Hello a few weeks ago here I saw a website that contained all the payloads of the magento 2 rest api but now I can't find it please can you pass it to me.?

I am looking for the payload of this api:

POST   /V1/products/options
PUT    /V1/products/options/:optionId

thanks


texts: Warning: Illegal string offset 'value' customer configuration?

texts:
When i open 'customer configuration' from the system configuration, I got the  fatal error:

  Warning: Illegal string offset 'value'  in
  httpdocs/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php
  on line 111

This fatal error only appears when i select a website value different than 'default config'.


texts: Magento 1.9 - Order object passed to event observer is empty

texts:
I am trying to get data from a new order placed on our website to use it for integration with our ERP/CRM system.

I use the event sales_order_place_after and my observer function fires as expected, but it seems the order object passed to the observer has no data at all. I also tried the event checkout_submit_all_after as pointed in this answer with same results.

After placing a new order I can see it normally in the admin panel, with all the items and customer data, so maybe I am not accessing it correctly in the observer.

My observer function looks like this:

public function newOrder(Varien_Event_Observer $observer)
{
    Mage::log(print_r('new order function start', true), null, 'new-order.log');

    // tried both those
    $order = $observer->getEvent()->getData('order');
    $order = $observer->getEvent()->getOrder(); // tried this too

    // tried both those
    $items = $order->getAllVisibleItems();
    $items = $order->getAllItems();

    $customer_id = $order->getCustomerId();
    $customer_name = $order->getCustomerName();
    $customer_email = $order->getCustomerEmail();

    // Those had same result
    //$customer_id = $order->getCustomer()->getId();
    //$customer_name = $order->getCustomer()->getName();
    //$customer_email = $order->getCustomer()->getEmail();

    Mage::log(print_r($items, true), null, 'new-order.log');
    Mage::log(print_r($customer_id, true), null, 'new-order.log');
    Mage::log(print_r($customer_name, true), null, 'new-order.log');
    Mage::log(print_r($customer_email, true), null, 'new-order.log');

    Mage::log(print_r('new order function end', true), null, 'new-order.log');
}

And the output on the log file:

  2017-05-18T11:10:10+00:00 DEBUG (7): new order function start

The end function log never appears. Am I accessing the data in a wrong way?


texts:
I've created a custom image attribute for the category. The image will be saved in media/catalog/category/example location.

When I upload the image, preview showing as a broken image even though image exists in that location.

$installer->addAttribute($entity, 'g_main_image', array(
    'input'=>'image',
    'type'=>'varchar',
    'label'=>'Gallery Main Image',
    'required'=>false,
    'visible'=>true,
    'user_defined'=>true,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));

Image preview showing http://localhost/dev/media/catalog/category/audi.jpg but the actual image is in

http://localhost/dev/media/catalog/category/gallery/audi.jpg


texts: Bootstrap + Magento UI with LESS and Materialize

texts:
What is the best way to integrate a CSS/JS library with Magento 2?

I understand that Magento is packaged with it's own UI library however it does not contain half of the features in modern frameworks. (bootstrap/materialize/etc).

With a theme extended from blank, including bootstrap causes conflict due to class names being the same (.modal-content or .mark for example).

With a theme that has no parent, Require JS doesn't work and it will take a long time to go through and re-write everything.

So, how can we use an external library without conflict?

How are you integrating JS/CSS frameworks?


texts:
I have my comparable products page in a table.
In my fist row there is Description.
In my 3rd row there is SKU
I want to move my SKU in the first row

How to achieve it?


texts: No Email Send for Password Reminder After Reset Password in Magento1.9.2.4?

texts:
My All emails are being sent except one, which is a reminder mail after reset Password.

Suggest what can I do achieve this.


texts: How add grid field to filter section in magento 2?

texts:
I use Ui grid in my custom module. I want to add my field to filter section. What parameter required to enable filter on my field.

Here is my filed code

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


texts: Question about SQL query on collection - Magento 1.7

texts:
I'm displaying data in a grid using a prepareColumns function.

I have two tables I want to join table "admin_user"

to:

table "customer_group" where both have 'customer_group_id' and I want to display the 'customer_group_code' from the "customer_group" table

I did something similar to this before to display the admin role ID using this code:

$collection = Mage::getResourceModel('admin/user_collection');
        $collection->getSelect()->join(
            array('ar' =>'admin_role'),
            'ar.user_id = main_table.user_id'
        ) ->join(
            array('ar2' => 'admin_role'),
            'ar.parent_id = ar2.role_id',
            array('role_name')
        );

I then tried to add onto the collection using:

$collection->getSelect()->join(
              array('ar' => 'admin_role'),
                'ar.customer_group_id = customer_group.customer_group_id',
                array('customer_group_code')
            );

But this gives me an error :( not sure what's wrong.


texts:
Do you know any trick for showing product attributes on product page not only on comparative page?

Thanks


texts: ELB + ECS + EFS + RDS amazon,cron job with magento 1.9

texts:
We are migrating our Magento 1.9 to AWS.
We have already implemented an RDS MySQL database, an EFS for static and PHP files.
Alsa with we has a load balancer connected with for the moment 2 servers EC2.
My question is about the cron job on Magento.

Is there any way to use launch cron on my infra? My both EC2 are the same and I don't want to select a master just for my jobs. If there is a failover, I want my job is still running.
If I decide to put my cron in my both server, is it any risk that a task runs twice at the same time?

Also, if you are using elasticache, should I have an S3 or does it work with an EFS also?

Thanks a lot
Thomas


texts: pdo_mysql extension is not installed error on magento2

texts:
I'm facing this type of extension error on local machine. I also Checked pdo_mysql extension install on my server.It show enable status during execuate commond .
which is :
 php -i|grep PDO
It Shows PDO support => enabled
But execuate Some indexing commond it seems error.
I h've attched Screen Shot on my terminal Captured.
I'm using php 5.6.20 and mysql v5.6+


texts: MAGENTO 2.3.3 ups carrier model plugin getting error

texts:
Magento 2.3.3 Getting below error when creating plugin for Magento\Ups\Model\Carrier class

  1 exception(s): Exception #0 (BadMethodCallException): Missing
  required argument $data of Magento\Ups\Model\Carrier.

  Exception #0 (BadMethodCallException): Missing required argument $data
  of Magento\Ups\Model\Carrier.

As my understand issue is because of class::__construct last param (newly added in to 2.3.3) $proxyDeferredFactory is not follow compatibility

  Magento\Ups\Model\Carrier::__construct (last parameter should be null)

It should be null require

Consider basic knowledge of Plugin!

Welcome suggestion to work with lower MAGENTO version also.


texts: Get product collection as per store currency in magento2

texts:
I want to get product collection as per store vise.

Currently, I created 2 store

1) IN , 2) US.

In IN set INR and in US set USD. By default store is US.

When I change store and set IN then product price I get in USD in product collection.

How can i get product collection price in INR in product collection when store is IN?


texts: Change customer group upon buying a specific product

texts:
This question has been asked a few times before but none of the answers have worked for my specific case.

What I want:
If someone purchases a product off of my store (We will call it Prime Membership) then their customer group will automatically be changed to whichever group I specify (We will call this Special Group). So When a customer purchases Prime Membership then they will be placed in the customer group called Special Group.

I have followed the instructions here: https://stackoverflow.com/a/27057781/4043494

The observer code is giving me some trouble. I have made all 3 files mentioned in that post and implemented my own module/package where necessary in the code. I have changed the category ID to my own, and even went as far as changing the Sku of the product to be the name of the Group. None of this seems to have made this work correctly. The group of the customer just will not change.

This code I actually used just because it seemed to be the closest thing to getting what I want to work.

I would rather just define one specific product as opposed to a category that the product is in. I feel like this should be rather simple but I may be wrong.

To go over it again and make a long story short what I want is this: Someone buys a product that I specify, and they automatically get put into a customer group that I specify.

Any and all help is much appreciated.

UPDATE:

<?xml version="1.0"?>
<config>
  <modules>
    <Package_Module>
      <version>0.1.0</version>
    </Package_Module>
  </modules>
  <global>
    <models>
      <package_module>
        <class>Package_Module_Model</class>
        <resourceModel>module_mysql4</resourceModel>
      </package_module>
    </models>
    <events>
    <sales_order_place_after>
        <observers>
            <package_module_sales_place_order_after>
                <class>package_module/observer</class>
                <method>changeGroup</method>
            </package_module_sales_place_order_after>
        </observers>
    </sales_order_place_after>
    </events>
  </global>
</config>

Observer:

 <?php
    class Package_Module_Model_Observer
    {

public function changeGroup(Varien_Event_Observer $observer)
{
    $order = $observer->getEvent()->getOrder();
    $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());

    // ensure it's not guest checkout
    if ($customer->getId()) {
        $items = $order->getAllVisibleItems();
        foreach ($items as $item) {
            $sku = $item->getSku();
            if ($sku == "Special") {
                $customer->setGroupId(5);
                $customer->save();
                break;
            }
        }
    }
}
}

Got this to work.


texts: How to place the Magento forms fields side by side

texts:
I want to place my form fields side by side as in the image below. i am aware that you can style the individual forms elements within the fieldset. however in my situation i want to place two form filed side by side.

am i correct in assuming that i have to make a custom page to do this and then render the fields manually. Or is it possible to use CSS from within the form filed to render them side by side.


texts: Change of customer login error message magento2

texts:
I am trying login with invalid customer email address, that doesn't exist in magento db.

When i try to login with that email. I am getting error like

"You did not sign in correctly or your account is temporarily disabled."

even though account doesn't exist.

Shall we show as "Customer Doesn't Exist!!!." instead of above error.

I have used the plugin like below

 public function afterExecute(\Magento\Customer\Controller\Account\LoginPost $subject, $result)
{
    $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
    if ($subject->getRequest()->isPost()) {
        $login = $subject->getRequest()->getPost('login');

        if (!empty($login['username']) && !empty($login['password'])) {

            $customerId = $this->getCustomer(trim($login['username']));
            if(isset($customerId) && $customerId!= ''){
                $currentCustomer = $this->getcurrentcustomer($customerId);
                try {
                    return $result;
                }
                catch (\Exception $e)
                {
                    $message = "Invalid user Credentials.";
                    $this->messageManager->addError($e->getMessage());
                    $this->session->setUsername($login['username']);
                    $this->responseHttp->setRedirect('customer/account/login');

                }
            }else{
                $message = "The email address not Exist!";
                $this->messageManager->addError($message);
                $result->setPath('customer/account/login');
                return $result;
            }

        }
    }

}

public function getCustomer($email)
{
    try{
        $websiteID = $this->_storeManager->getStore()->getWebsiteId();
        $customer = $this->_customer->create()->setWebsiteId($websiteID)->loadByEmail($email);
        $userId = $customer->getId();
        return $userId;
    }catch (\Exception $e){

        return false;
    }
}

The message is showing but, It is also showing the other message also, How can we hide that? Thanks


texts: How to set an attribute option's position per product?

texts:
Is there any way to set an attribute option's position per product?

To clarify with a simple scenario, we sell blue shirts and pink shirts.   For products in a women's category, we want the pink shirts first in the list, for men, we want blue.

Thanks!


texts: Magento2.3 - Dynamic configurable product data when selecting a simple product

texts:
Could someone point me in the right direction of creating a plugin that when you select an option within a configurable product, It requests the data via AJAX to a controller where I can retrieve the sku and potentially the stock for that simple product?
Thanks in advance!.


texts: Magento 1 Admin panel a lot of problems please help

texts:
We started to get a lot of problems in our magento admin back panel.
The problem is that we cannot enter to products and to some of extensions.
It simply loaded for several minutes and than going to nothing or to 504 time out gateway.

The guys of server says no any restrictions. "All ok from our side"
The sucuri guys ( we use sucuri) also says that "all ok from our side"
The front web is running excellent without any problem. Getting customers everyday no any issues with orders or checkout.

It simply not possible to make any change fron admin panel.

For example we installed the extension for google merchant feed. Also not possible to open it.

Some functions like "open customers, open orders, send tracking numbers are working without problem"

I asked from server guy to send the live error logs when I try to open any of products and see these errors

  [Thu Feb 28 06:22:13.022649 2019] [autoindex:error] [pid 30938:tid
  47894805636864] [client 192.88.135.5:25599] AH01276: Cannot serve
  directory /home/sextoyzone/public_html/media/: No matching
  DirectoryIndex (index.php) found, and server-generated directory index
  forbidden by Options directive

  [Thu Feb 28 05:59:02.148870 2019] [autoindex:error] [pid 16384:tid
  47894818244352] [client 192.88.135.5:3703] AH01276: Cannot serve
  directory /home/sextoyzone/public_html/media/: No matching
  DirectoryIndex (index.php) found, and server-generated directory index
  forbidden by Options directive

  [Thu Feb 28 02:40:47.701871 2019] [autoindex:error] [pid 30791:tid
  47894826649344] [client 66.249.75.85:58755] AH01276: Cannot serve
  directory
  /home/sextoyzone/public_html/media/catalog/product/cache/1/image/x200/040ec09b1e35df139433887a97daa66f/2/3/:
  No matching DirectoryIndex (index.php) found, and server-generated
  directory index forbidden by Options directive

  [Wed Feb 27 15:18:04.016345 2019] [:error] [pid 1727:tid
  47838238512896] [client 192.88.135.5:8492] client denied by server
  configuration:
  /home/sextoyzone/public_html/master-series-crimson-tied-embossed-ankle-cuffs.html

  [Wed Feb 27 15:17:56.575693 2019] [:error] [pid 1727:tid
  47838236411648] [client 192.88.135.5:6122] client denied by server
  configuration: /home/sextoyzone/public_html/magebird_popup, referer:
  https://www.sextoyzone.com/sexual-enhancers/female-enhancers/orgasm-sensitivity.html

Any help will be appretiate. Feeling stupid that cannot change my own product on my own online store... Weird situation.


texts: Ubuntu 15.10: Error thrown on Magento Admin and Homepage

texts:
I have installed a fresh setup of Magento 2.1 on my Ubuntu 15.10 and everything worked out perfectly. But as soon as I enabled my module which I currently developed on my Windows machine, I received following error

There has been an error processing your request

Exception printing is disabled by default for security reasons.

Error log record number: 963627958

After I disabled my module it still showed the same error, but the error was gone as soon as I ran following command

php bin/magento setup:di:compile

I enabled my module again and ran above code again and worked out fine.
This time I cleared Static Cache and Javascript/CSS cache from Admin Panel, I encountered the same error again and this time above code didn't help at all.

Before coding in Windows, I was on Ubuntu and because of this same issue encountered again and again I switched to Windows, but Windows was too slow to develop so I again switched to Ubuntu.

This error is a nightmare, I never encountered this error on Windows.

Please help.


texts: Magento 2 - How to get recent month's best seller products?

texts:
I am get bestseller product using below code but it will not display best seller products of latest month, It will display bestseller product from starting.

Can anyone tell me how can I filter best seller product.

Thanks In Advance.

<?php
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $productCollection = $objectManager->create('Magento\Reports\Model\ResourceModel\Report\Collection\Factory');
    $collection = $productCollection->create('Magento\Sales\Model\ResourceModel\Report\Bestsellers\Collection');

     $collection->setPeriod('month');

    foreach ($collection as $item) {
        print_r($item->getData());
    }

In short I want to implement below query logic.

  SELECT * FROM sales_bestsellers_aggregated_monthly ORDER BY
  sales_bestsellers_aggregated_monthly.id DESC


texts: How can I display a text block between two dates? I would like to display a remark on the homepage and possibly on product detail pages, but only for one week in August. I could edit the homepage manually, but if I can set it now and if it works automatically that would be great. Is there a way to do this in magento or do I need a module for it?