texts: Get Option Description by Option ID (outside the product)

texts:
I got Option ID from single attribut in category page by:

$request = $this->getRequest()->getParams();

Of course i parse it and i receive attribute name and attribute option ID.

I want description for this single attribute ID.

I receive Title by Attribute Option ID but i don't have any idea how to get description (details) of product. Can someone give me some information about that? My code to get Title:

$attributeDetails = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $main_key);
echo $optionValue = $attributeDetails->getSource()->getOptionText($attribues_id[0]);

Thank you!


texts: Magento 2.3: Backorder is not working. how its work?

texts: Backorder is not working on Magento 2.3. How it works?


texts: Im looking for suggestion for adding dynamic product into newsletter automation have no idea how to implement it


texts: Implement the option of choosing product weight on drop down option

texts: I Would like the same exact option shown in the image to implement on my site. how can it be done


texts: Restrict product add to cart in magento 2

texts:
i am using magento 2.1.5, and i have two tax classes. and i want to add only one tax class product in cart at a time. if customer try to add another tax class product, it will throw the massage.

for this i tried by adding plugin.

 public function beforeaddItem(\Magento\Quote\Model\Quote $subject,$item)
{

     $productTax = array();
     $storeId = $this->storeManager->getStore()->getId();
     $items = $this->quote->getItems();

     $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/cartblock.log');
     $logger = new \Zend\Log\Logger();
     $logger->addWriter($writer);
     $logger->info(json_encode($items));

     foreach($items as $_item) {

         $writer = new \Zend\Log\Writer\Stream(BP . 'var/log/cartblock.log');
         $logger = new \Zend\Log\Logger();
         $logger->addWriter($writer);
         $logger->info(json_encode($_item->getData()));

        $productList = $this->productRepository->getById($_item->getProductId(), false, $storeId, true);
        $productTax[] = trim($productList->getTaxClassificationKey());
    }
   $productNew = $this->productRepository->getById($item->getProductId(), false, $storeId, true);

    if(!empty($productTax) && !in_array(trim($productNew->getTaxClassificationKey()),$productTax)){
        throw new \Magento\Framework\Exception\LocalizedException(__('You only order Same Tax Class product.'));
    }

    return [$item];
}
 }

But Its not working. Please help.


texts: Submit Files in Admin Form - Magento 1.7

texts:
app/code/local/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php

inside: protected function _prepareForm() I added:

$form = new Varien_Data_form(array(
                'id' => 'edit_form',
                'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
                'method' => 'post',
                'enctype' => 'multipart/form-data'
            )
        );

However when the form is created and I inspect element it doesn't have the property of enctype="multipart/form-data"?


texts:
When I Was Upgrading Magento 1.8.1.0 to Magento 2.4 I had Got This Error Please Guide Me.
[martarab@inpro3 public_html]$ php bin/magento setup:upgrade
Cache types config flushed successfully
Connectiondefault" is not defined
In ResourceConnection.php line 148:
Connectiondefault" is not defined


texts: Magento 2 : connect remote database over ssh tunnel

texts:
I have a database setup on remote server that is accessible via SSH.
I need to connect magento 2 on my localhost to this mysql database via ssh tunnel.

is this possible?
if yes how?


texts: CE 1.9 - OnePage Checkout - Initially Hide All Steps until Login / Register / Guest Checkout Selected

texts:
By default there are five steps to the Magento checkout process. This can be quite overwhelming for customers. I would like to reduce these steps or atleast give that perception.

My idea is to initially hide all the steps apart from the first one. Customers can then choose from the three options - login, register or checkout as guest.

Once customers have made a choice the rest of the steps should appear and the login step above dissapear.


texts:
Here is the link with the result.
In the image you can see the path of all files :

this is my Attila3->HelloWorld->Block->HelloWorld.php file :

<?php
class Attila3_HelloWorld_Block_Index extends Mage_Core_Block_Template{
}

this is my Attila3->HelloWorld->controllers->IndexController.php file:

<?php
class Attila3_HelloWorld_IndexController extends Mage_Core_Controller_Front_Action{
    public function IndexAction() {

      $this->loadLayout();
      $this->getLayout()->getBlock("head")->setTitle($this->__("My title"));
            $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
      $breadcrumbs->addCrumb("home", array(
                "label" => $this->__("Home Page"),
                "title" => $this->__("Home Page"),
                "link"  => Mage::getBaseUrl()
           ));

      $breadcrumbs->addCrumb("my title", array(
                "label" => $this->__("My title"),
                "title" => $this->__("My title")
           ));

      $this->renderLayout();

    }
}

this is my Attila3->HelloWorld->etc->config.xml file:

<?xml version="1.0"?>
<config>
  <modules>
    <Attila3_HelloWorld>
      <version>0.1.0</version>
    </Attila3_HelloWorld>
  </modules>
  <frontend>
    <routers>
      <helloworld>
        <use>standard</use>
          <args>
            <module>Attila3_HelloWorld</module>
            <frontName>helloworld</frontName>
          </args>
      </helloworld>
    </routers>
    <layout>
        <updates>
            <helloworld>
              <file>helloworld.xml</file>
            </helloworld>
        </updates>
    </layout>
  </frontend>
  <global>
    <helpers>
      <helloworld>
        <class>Attila3_HelloWorld_Helper</class>
      </helloworld>
    </helpers>
    <blocks>
      <helloworld>
        <class>Attila3_HelloWorld_Block</class>
      </helloworld>
    </blocks>
  </global>
</config>

this is my Attila3->HelloWorld->Helper->Data.php file:

<?php
class Attila3_HelloWorld_Helper_Data extends Mage_Core_Helper_Abstract
{
}

this is my Attila3->layout->helloworld.xml file from "frontend":

<?xml version="1.0"?>
<layout version="0.1.0">
  <helloworld_index_index>
    <reference name="root">
      <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
      <block type="helloworld/index" name="helloworld_index" template="helloworld/index.phtml"/>
    </reference>
  </helloworld_index_index>
</layout>

this is my Attila3->template->helloworld->index.phtml file from "frontend":

Hello World ! I am a Magento Guy.

this is my etc/modules/Attila3_HelloWorld.xml content:

<?xml version="1.0"?>
<config>
  <modules>
    <Attila3_HelloWorld>
      <active>true</active>
      <codePool>local</codePool>
      <version>0.1.0</version>
    </Attila3_HelloWorld>
  </modules>
</config>

I selected the Attila3 theme from admin->design and cleared the caches. and this is the result :

What im doing wrong ??? I want to display the string "Magento guy ....." thx


texts:
I'm creating a module that will allow me to upload some data from a csv file to our database.  However, this file doesn't seem to be returning anything, any idea why?

public function uploadData(Varien_Object $object)
{
    $csvFile = $_FILES['groups']['name']['store_information']['fields']['basename_modulename_import']['value'];

    $io = new Varien_Io_File();
    $info = pathinfo($csvFile);
    $io->open(array('path' => $info['dirname']));
    $io->streamOpen($info['basename']);

    $headers = $io->streamReadCsv();
    Mage::log('what is headers? THIS: ' . $headers); //headers isn't anything
    Mage::log(empty($headers)); //returns true

    //$adapter = $this->_getWriteAdapter();
    //$adapter->beginTransaction();
    try {
        $rowNumber = 1;
        $importData = array();
    } catch (Exception $e) {
    }

    $io->streamClose();

}

The CSV file in question looks like:

LSK1, ls,2, rsk1,2, lsubk1,1, lsb1p,1
w12sb65r, w12,4, b65r,4, tmb,4, vs,4
hw907, aa10181,5
xftk5, hw438,1, xft2,1, fph2,1, fsu28,1, f225,1, hw242,1
tlk1, bulb1157,1, tlb1,2, tlba,2, tlbp1,1, tllg1,1, tll13,2, hw227,1

$info is set to:

Array(
    [dirname] => .
    [basename] => kitInventory.csv
    [extension] => csv
    [filename] => kitInventory
)


texts: Homepage product order is changed if changing product list order (desc / asc)

texts:
I show product on my HomePage by using following method :

  {{block type="xxxx/catalog_product_list" category_id="283" template="catalog/product/list.phtml"}}

By using a category i can choose the order of my product (Category Products > Position)

The problem is that if i sort by desc or asc a product list then the homepage product order is changed based on product ID (desc or asc)

I want my homepage product to keep the Category Products > Position order even if we sort product list by desc or asc, is it possible ?

Thx


texts:
I'm trying to conditionally set a cookie IF a certain query string parameter exists. My Class is an observer. The config.xml code:

<frontend>
    <events>
        <controller_action_predispatch>
            <observers>
                <my_module>
                    <class>my_module/observer</class>
                    <method>setCookie</method>
                </my_module>
            </observers>
        </controller_action_predispatch>
    </events>
</frontend>

The observer class (app/code/local/My/Module/Model/Observer.php):

class My_Module_Model_Observer
{
    public $_defaultParam = null;

    public function setCookie(Varien_Event_Observer $observer = null, $setCookie = true)
    {
        $myCookie = 'source';
        $myCookieVal = $this->getQueryString($myCookie);
        $myCookiePeriod = (int) 86400 * 30;
        $myCookieEnabled = Mage::getStoreConfig('my_module/my_group/source_cookie', Mage::app()->getStore());
        if ($setCookie) {
            if ($myCookieEnabled == 1 && $myCookieVal) {
                $doCookie = $this->setCookie($myCookie, $myCookieVal, $myCookiePeriod, false);
            } else {
                if ($this->getCookie($myCookie)) {
                    $doCookie = $this->delCookie($myCookie);
                }
            }
        } else {
            $doCookie = $this->getCookie($myCookie, true);
        }
        return $doCookie;
    }

    public function getQueryString($param = null)
    {
        $queryParam = Mage::app()->getRequest()->getParam($param, 'notset');
        $paramValue = $queryParam ? (string) $queryParam : $this->_defaultParam;
        var_dump('ParamValue: ' . $paramValue);
        return $paramValue;
    }

    public function setCookie($cookieName = null, $cookieVal = null, $cookiePeriod = 3600, $setEncode = true)
    {
        $model = Mage::getModel('core/cookie');
        if ($setEncode) {
            $cookieVal = base64_encode($cookieVal);
        }
        $curStore = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
        $urlPath = parse_url($curStore);
        $cookiePath = rtrim(str_replace('index.php', '', $urlPath['path']), '/');
        var_dump('CookieVal: ' . $cookieVal);
        $theCookie = $model->set($cookieName, $cookieVal, $cookiePeriod, $cookiePath);
        return $theCookie;
    }
}

The query string looks like this:

mydomain.com?some=rubbish&then=what&we=really&want=this&source=my

You will notice in the method getQueryString, I'm var_dump'ing the variable $paramValue. It' spits out string(14) "ParamValue: my".

Also, in the setCookie method, the var_dump spits out string(13) "CookieVal: my".

HOWEVER, the cookie is set with the value notset! That means the $param is null, yes? But the var_dumps tell me otherwise. Why is the correct value not set in the cookie?

I guess I've been staring at this too long and need some eyes; could be my own stupidity! Thanks for taking a look.

~ Edit ~

I also tried to loop through all the query string params by changing the getQueryString method to the following:

public function getQueryString($param = null)
{
    $queryParams = Mage::app()->getRequest()->getParams();
    foreach ($queryParams as $pid => $p) {
        $paramValue = ($pid == 'source') ? $p : $this->_defaultParam;
    }
    var_dump('ParamValue: ' . $paramValue);
    return $paramValue;
}

But the result is the same.


texts: I need to use the Magento REST API to create an order from a mobile client. In my case, mobile side will implement the payment directly using PayPal SDK. What I need to do is to create an order by setting the payment method to money order and perform a guest checkout. Which API(s) should I use to achieve this?


texts: Magento 2 - making company required causes error on checkout

texts:
When I set company to required under config -> customer information.

After that I got this error when tap/click on next/continue button.

Please check the shipping address information. company is a required field.

Any ideas?


texts: What do the indices of the 2nd-level array returned by getMatchingProductIds() represent?

texts:
I'm trying to get the products that are matched by a certain Catalog Price Rule (ID: 1) by using getMatchingProductIds(). The function returns all products, with their IDs as indices of the 1st level array. The second level array will have values either 0 or 1 depending on whether that product matches the Catalog Price Rule.

For example, my code:

Mage::getModel('catalogrule/rule')->load(1)->getMatchingProductIds();

returns something like:

Array (

    [1348] => Array (
        [0] => 1
        [1] => 1
        [2] => 1
        [4] => 1
    )
)

where 1348 is a product ID.

What do the indices in the 2nd level array (0, 1, 2, 4) represent? Why are there 4 of them? Why does it skip 3? Can their values NOT be all "1" even if the product matches the Catalog Price Rule?

(I do know that since they are all equal to 1, it means the product matches the Catalog Price Rule. But I don't know why there are 4 elements in that array, and what the indices mean.)

EDIT

My rule:

Status - Active
Websites - 3/3 selected (main website, example1.com, example2.com)
Customer Groups - 4/4 selected (not logged in, general, wholesale, retailer)
From Date - 1/10/13
To Date - 9/12/13
Priority - 1
Conditions - if any of the conditions are true: category is 160
Apply - To Fixed Amount
Discount Amount - 10
Enable Discounts to Subproducts - No
Stop Further Rules Processing - No
Related Banners - none


texts: magento default total return with decimal currency

texts: please help me how to change the decimal to comma in the currency of magento. Right now it is showing by default like this >> Total: € 590.9000 (It is calling the default total function of magento) rest is working fine and coming with commas, is it possible to change the default decimal value to comma. Thankx in Advance.


texts:
I need to create a multilanguage site. I created more store view with code : en, it and es, but when i select a different store  are not translated texts. But it's okay if imposed System -> Configuration -> General -> Local option, the text are translated in that case, but if a "runtime" change the store does not change language.

I hope to get advice, thanks.


texts:
I’m unable to login in my Magento mobile store. I have multiple website Magento store. My main website URL is abc.com and for mobile it is m.abc.com. Perfectly works.

I am using different theme for mobile website and both website have 3 different languages store view.

My problem is that if I logged in my main store before then I couldn't login in my mobile site. If I delete all the cookies then it works.

How can solve this problem?

Thanks


texts: Magento 2.2.1 - Disable Add to Cart for Specific Products

texts: I need to figure out a way to disable the "Add to Cart" button on specific products. I found this link, but it creates a full attribute set which I don't want to do. How can you add an attribute and make this feature work in the site?


texts: Database problem while integrating wordpress theme with magento

texts:
I used df3dtheme database for magento installation and wptheme database for wordpress installation. Since I've 2 different databases, I'm facing a problem. Here is the screenshot.

How to enter name, user name and password? There is no password for mysql.
P.S: I'm using phpmyadmin.


texts: Shipping Table Rates on Weight for local area and for States. How do I set up using Shipping Table

texts:
I'm creating csv file for shipping in Magento.

Shipping Rule is:

If Sub-Total is above Rs.800 , Shipping will be free.
If Sub Total is below Rs.800 and
 weight is between 1-250gm  , shipping will Rs 13. for local city
 weight is between 1-250gm  , shipping will Rs 15. for Gujarat State

I have create something like this

Country Region/State    Zip/Postal Code     Weight (and above)  Shipping Price
IND          Gujarat        380%                 1                  13
IND          Gujarat         *                   1                  15

here zip code for local city is (380001,380002.....380085)

My Question is :

How can I set shipping charge for local ? Whether it is possible using zip code, what format is correct ?
I have free shipping enable from configuration of Shipping Method. But when Sub total exceeds from Rs.800 , It show radio button. how can I remove table rate if amount is going to above Rs.800

Output something like


texts:
Have you tried Renaming the Vendor/Module name with different cases
For instance: Vendor_Module to VENDOR_Module?

After renaming the module name I tried to setup:upgrade, but got the below issue,

  Integrity constraint violation: 1062 Duplicate entry 'VENDOR_Module'
  for key 'PRIMARY', query was: INSERT INTO setup_module (module,
  schema_version) VALUES (?, ?)

Yes, we can manually remove the module from setup_module table and rerun the setup. However, there are many using this module. Is there any dynamic solution to this?

P.S: This pertains only to the custom module I have created and not the core modules


texts: Magento 1.9 change grouped product page layout

texts:
I'm new to Magento and try to play with layout of grouped product page.

Page I want to change layout, page link https://www.prorider.us/org/index.php/economy-bike-helmets-100.html

I create a grouped product with 4 associated products, and using Custom Design default/blank. Now I like to move the bike helmet images (quickview) to top of page, above associated products list. How to do that?


texts: Product Discount Groups and Customer Groups

texts:
How can I set-up Product Discount Groups and add different prices for the Customers Groups?

I want to import different products in Magento: E.g. one sheet has 30.000 products. The products are sorted in around 30 Product Discount Groups, so every Product Discount Groups has around 1000 products. I want to have the Product Discount Group information added with the product, e.g. Product 1000 is part of the Product Group AA.

Then I want the option to configure different prizes/discounts of the Product Discount Groups for the Customer Groups. E.g. Customer Group Retailers 0%, Group Wholesaler 30%, Group Consumer Price * 1,3.

How could I do this the best way?


texts: Magento2 : How to get home url in Knockout HTML template

texts: i want to get cart url in  Knockout HTML template magento 2


texts: Magento 2: setCustomPrice vs. setOriginalCustomPrice

texts:
I have seen several examples showing how to adjust prices in carts. I do not understand the difference between setCustomPrice and setOriginalCustomPrice. Where is CustomPrice and OriginalCustomPrice used later on?

class CustomPrice implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer) {

        $item=$observer->getEvent()->getData('quote_item');
        $product=$observer->getEvent()->getData('product');
        $price = $item->getProduct()->getFinalPrice()+60;
        $item->setCustomPrice($price);
        $item->setOriginalCustomPrice($price);
        $item->getProduct()->setIsSuperMode(true);
        return $this;
    }
}


texts: Admin Form fetch values from Database and keep it selected in dropdown

texts:
I have a custom module in admin, where I am display values in dropdown format something like below using addField function.

<select onchange="checkSelectedBean(this.value)" class="required-entry select" name="nic_id" id="nic_id">
<option value="-1">Please Select</option>
<option value="1_1.1">America</option>
<option value="2_2.2">China</option>
<option value="3_3.3">India</option>
<option value="4_4.4">Japan</option>
</select>

Here 4 is the ID for Japan and 4.4 is its unique value.

Now, If I select Japan as an option and save it, I have split the post value i.e. 4_4.4 and the value saved in DB is 4 which is okay. But when I edit the same record its not showing me the saved option Japan but dropdown list of all options.

I need to know how can I make Japan as selected option in dropdown, when admin edits the same record.

Right now its showing me the dropdown list only and not the saved option.

I am fetching value from my Model/Nic.php like below.

public function toOptionArray()
         {

          $nicCollection = Mage::getModel('nic/nic')->getCollection();

          $nicarray = array(array('value'=>-1, 'label'=>'Please Select'));

          foreach ($nicCollection as $nicList){

                $nicarray[] = array('value'=>$nicList['nic_id']._.$nicList['nic_cost'],'label'=>$nicList['nic_name']);
          }

          return $nicarray;

        }

Admin form to fetch selected dropdown with values

$fieldset->addField('nic_id', 'select', array(
          'label'     => Mage::helper('nic')->__('Nic'),
          'class'     => 'required-entry',
          'values'    => Mage::getModel('nic/nic')->toOptionArray(),
          'name'      => 'nic_id',
          ));

Pls Help.

Thanks.


texts:
I am using table rates.

In the menu System > Configuration > Shipping Methods, change the "Current Configuration Scope" to a website then an Export button will become available in the Table Rates section. The condition should be "Weight vs. Destination" to get the right file. Download the exported file and modify it to something like this;

Country  Region/State  Zip/Postal Code  Weight (and above)  Shipping Price
UK       *             *                0                   3.68
UK       *             *                1                   6.68

Now it is working fine, but if my product weight is 0.9 then it goes of 3.68 not for 6.68. I want to calculate my price on decimal value of weight also.I am new here plz help me


texts: How to integrate Payment gateway with Magento 2 REST API?

texts: We are trying to build the generic android mobile app which can be used by magento 2 owners using REST API for Magento2 and have implemented the basic features for the app. As most of the people uses paypal for the payment gateway, we planned to use the paypal Android SDK for our mobile app but the problem is that we are not able to find the REST API to submit the transactionId or PaymentId to magento2. Do we need to write our own API for this or is there any existing rest API which we can use and submit the transactionId to magento2 store? Please help us.


texts: Magento 2: get Custom Collection by Asc sort order with position 0 at end of list

texts:
How to get Category product collection with Product position 0 at end of list in collection.

Get Product Collection with position greater than 0 comes first and at the end of collection All 0 position product are arrive.

like,
3 Product in category collection with position is 0,1,2.
I want to get collection like position 1,2,0 all 0 position index are end of list in collection.

code for php,

class Featured extends \Magento\Catalog\Block\Product\ListProduct
{
    protected $categoryFactory;

    public function __construct(
        \Magento\Catalog\Block\Product\Context $context,
        \Magento\Catalog\Model\CategoryFactory $categoryFactory,
        array $data = []
    ) {
        $this->categoryFactory = $categoryFactory;
        parent::__construct(
            $context,
            $data
        );
    }

    public function getCategoryProductsAscZeroLast($categoryId)
        {
            $products = $this->categoryFactory->create()->load($id)->getProductCollection()->addAttributeToSelect('*');
            //$products->getSelect()->setOrder('cat_index_position', 'DESC');
            return $products;
        }
}


texts: Contact form redirects to different page after submitting the form

texts:
I have contact us page which includes map, form, and some text. the page url is /contacts_page, but when i submit the form it goes to some different url i.e /contacts/index and this new redirect page shows thank you message and contact form. I want to make the url to redirect on same page after submitting with thank you message near the form or in place of form. below is my form.html code. Can anyone check and help me how to fixed it?
I dont understand how to display proper html code here

<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

<form action="<?php echo Mage::getUrl('contacts/index/post'); ?>" id="contactForm" method="post">

<?php echo Mage::helper('contacts')->__('Contact Information') ?>

                    <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" placeholder="<?php echo Mage::helper('contacts')->__('Name') ?>" type="text" />

                    <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" placeholder="<?php echo Mage::helper('contacts')->__('Email') ?>" type="text" />

                    <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" placeholder="<?php echo Mage::helper('contacts')->__('Telephone') ?>" type="text" />

                    <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" placeholder="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="5" rows="3"></textarea>

        <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
        <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><?php echo Mage::helper('contacts')->__('Submit') ?></button>

</form>


texts:
I have a footer in my page.xml of my parent theme and here's it's code

            <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
            <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
                <label>Page Footer</label>
                <action method="setElementClass"><value>bottom-container</value></action>
            </block>
            <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
            <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
        </block>

I want to override it in my local.xml by changing the template .phtml file, I did that

        <reference name="footer">
        <action method="setTemplate">
            <template>page/html/herzone_footer.phtml</template>
        </action>
    </reference>

It's not taking any change effect, am I doing something wrong? thank you


texts: Apply configurable product categories to associated products?

texts:
Is there an easy way to copy a configurable product's category settings down to all its associated products?

A large number of products exist in the system without a category assigned (and thus aren't showing up in various product feeds).

Somewhere along the way, users changed how they entered data, so the category isn't getting copied down to associated products when they're being created.


texts: How can I show a Category Image on my Product Page

texts:
I've built a new Page-Template in Magento. On this template I will show the Category-Image and after that, the product grid (as standard). How can I get the Category-Image for my Template?

From my Template:

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

Category Image

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


texts: Magento2.4 API - Update product inventory for multiple sources (MSI)

texts:
I have created a product, which has two different sources assigned to it with different quantity allocated to both sources. I want to update product's quantity for both sources separately.

I am using following api - /rest/default/V1/products/{productSku}/stockItems/{itemId} with request body as-
{
    "stock_item": {
            "qty": 2100,
            "stock_id": "various for both sources", // 1 for 1st default source stock & 2 for my custom source stock
    }
}

API is updating product inventory on default source when given stock_id=1. But on my custom source created with stock_id=2 API returns 400 Bad Request as follows
{
    "message": "The stock item was unable to be saved. Please try again.",
    "trace": "#0 /var/www/php74/magento241/vendor/magento/module-catalog-inventory/Model/StockRegistry.php(181): Magento\\CatalogInventory\\Model\\Stock\\StockItemRepository->save()\n#1 /var/www/php74/magento241/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\CatalogInventory\\Model\\StockRegistry->updateStockItemBySku()\n#2 /var/www/php74/magento241/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\CatalogInventory\\Model\\StockRegistry\\Interceptor->___callParent()\n#3 /var/www/php74/magento241/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\CatalogInventory\\Model\\StockRegistry\\Interceptor->Magento\\Framework\\Interception\\{closure}()\n#4 /var/www/php74/magento241/generated/code/Magento/CatalogInventory/Model/StockRegistry/Interceptor.php(59): Magento\\CatalogInventory\\Model\\StockRegistry\\Interceptor->___callPlugins()\n#5 [internal function]: Magento\\CatalogInventory\\Model\\StockRegistry\\Interceptor->updateStockItemBySku()\n#6 /var/www/php74/magento241/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array()\n#7 /var/www/php74/magento241/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process()\n#8 /var/www/php74/magento241/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch()\n#9 /var/www/php74/magento241/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callParent()\n#10 /var/www/php74/magento241/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Webapi\\Controller\\Rest\\Interceptor->Magento\\Framework\\Interception\\{closure}()\n#11 /var/www/php74/magento241/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callPlugins()\n#12 /var/www/php74/magento241/vendor/magento/framework/App/Http.php(116): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch()\n#13 /var/www/php74/magento241/vendor/magento/framework/App/Bootstrap.php(263): Magento\\Framework\\App\\Http->launch()\n#14 /var/www/php74/magento241/index.php(39): Magento\\Framework\\App\\Bootstrap->run()\n#15 {main}"
}

How can I update product inventory on my custom source?


texts:
I'm currently writing multi-vendor extension,
I'm looking for sample code on how to override the inventory, so it shows inventory from a custom field,
Already tried overriding getQty of the Product class but that doesn't work,

Any ideas would be appreciated,

Thanks


texts: Magento SUPEE6788 how to make my extension compatible with magento older version

texts:
After installing Magento SUPEE6788 patches my module stop working so as per the instruction provided by magento in  http://magento.com/security/patches/supee-6788-technical-details and change config.xml

<admin>
   <routers>
      <adminhtml>
         <args>
            <modules>
               <Module_Name after="Mage_Adminhtml">ModuleName_Adminhtml</Module_Name>
            </modules>
          </args>
      </adminhtml>
   </routers>
</admin>

it is working with it but I want to make it compatible with magento 1.9.1 and lower how to perform it can anyone had any idea to perform it


texts: Magento 2.2 product collection doesn't return out of stock products

texts:
Magento 2.2.* seems to make it very difficult to get out of stock products in a collection! I have the following code which works fine in Magento 2.0 and 2.1:

use Magento\Framework\View\Result\PageFactory;
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;

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

public function __construct(
    \Magento\Framework\App\Action\Context $context,
    PageFactory $resultPageFactory,
    \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    CollectionFactory $collectionFactory
) {
    parent::__construct($context);
    $this->resultJsonFactory = $resultJsonFactory;
    $this->resultPageFactory = $resultPageFactory;
    $this->_storeManager = $storeManager;
    $this->_collectionFactory = $collectionFactory;
}

public function execute()
{
    // should get ALL products including out of stock ones
    $collection = $this->_collectionFactory->create();

Now testing it on Magento 2.2.1 and 2.2.2, and it is only retrieving products which are in stock - does anyone know a way to work around this?

I have looked at the internal code for collections and can't find any obvious differences - Any info much appreciated as this is a very irritating change that they've made!


texts: Magento 2 account temporarily disabled. Have tried unlocking

texts:
I have recently copied a site from a client server and set it up on an AWS EC2 instance. The front end of the site works fine, however when trying to log into the backend, I receive the error "You did not sign in correctly or your account is temporarily disabled".

I have already tried unlocking the account as suggested in another similar thread here, and when I tried creating a new user through the CLI, I receive the following error:

SQLSTATE[HY000] [2002] Connection refused

Any ideas?


texts: Assign Website Id without calling save();

texts:
I am doing a custom function for magento Admin.
The function is when author finished setup a product and save, the product will automatically assigned to certain websiteId when the conditions is met.

For that purposes I use catalog_product_save_after event. In that event, i cannot call ->save() otherwise its gonna be infinite loop.

I tried

$product->setWebsiteIds(array(13,14,1,7));
$product->getResource()->saveAttribute($product, 'website_ids');

But it seems that saveAttribute doesnt work on array attribute.

How should i assign desired websiteId to the product?
Thank you


texts: How can I get product list with its detail in rest API I'm on magento2

texts:
I'm working on native mobile application and want to display product after customer selected a category. I am able to get list of the product by category in rest request but that list don't have much details about the product.

Request : http://localhost/magento2/index.php/rest/V1/categories/24/products

(24 is category ID)

Response : [{"sku":"WH01","position":1,"category_id":"24"},...]

Earlier in Magento 1.9 product list was something like

{
2: {
entity_id: "2"
type_id: "simple"
sku: "Levis Bagpack"
description: "Bagpack"
short_description: "Bagpack"
meta_keyword: null
name: "Levis Bagpack"
meta_title: null
meta_description: null
regular_price_with_tax: 45
regular_price_without_tax: 45
final_price_with_tax: 45
final_price_without_tax: 45
is_saleable: true
image_url: "http://172.16.8.24:8080/magento/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/images/catalog/product/placeholder/image.jpg"
}-

What should I do to get more info about product so I can show image and other things in mobile app ?


texts: Magento 2.1.3 unable to reindex using SSH

texts:
I tried the instructions under Magento 2 Reindexing - One or more indexers are invalid. Make sure your Magento cron job is running

but am still unable to reindex. I ssh'd into my webserver and tried running the command that was suggested from the root, php bin/magento indexer:reindex but it didn't work, so I tried going to the directory
"blahblah.com"/shop/bin$ magento indexer:reindex

-bash: magento: command not found
(I have a /shop directory where my files are installed)

and I tried magento indexer:status (and some others but am not able to run the commands, keep getting command not found)

I also opened up the file manager, found the magento file, opened it up and searched for indexer but am not finding it either.

Can someone help me to understand how I can reindex the status under the Index Management of my magento site? Thanks.


texts: Multistore Images are not coming after Upgrade 2.2.6 to 2.3

texts:
I have multiple stores setup with more then 100K products and 500+ categories.

So my issue is when I upgrade Magento 2.2.6 to 2.3 the product images are coming properly from main store but some products images are missing from other stores, the images path are alright but the generated cache hash is wrong in other stores.

I have research for the issue and found that this is the bug in Magento after upgrade, So do you guys have any alternate solution for this ?

Any help would be appreciated.

Thanks!!!


texts: Magento 2: move the top links in the same container as the logo

texts:
I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

My top links (above the logo) are:

Compare Products
Default welcome msg!
My Account
My Wish List
Create an Account
Sign In

I need to remove all the links except:

My Account
My Wish List
Sign In

I want to move the 3 links above on the same block -

 - as the logo.

The logo will be floated to the left, while the 3 links will be floated to the right.

What files must I edit to achieve this?


texts: Different Static Resource for different layout in Magento 2

texts:
For my working purpose, I need to create a custom layout in Magento 2.

But I want to add specific CSS resource in the head for only that layout.

How can I achieve that?


texts: Where is 'catalog_product_save_before' dispatched?

texts:
I'm struggling to find the dispatch event for thecatalog_product_save_before.

I've done a find of my entire project on the following search term: catalog_product_save_before. It's only found in 3rd party modules.

I'm looking to utilise this event, but first I'd like to inspect the code around the dispatcher to ensure I'm doing it in the correct area.

Events are dispatched as follows:

Mage::dispatchEvent('catalog_product_save_before', $data_array);
// Assuming in this case that $data_array is a qualified array

This appears nowhere in the core, which is puzzling. Is it perhaps defined in a different way?


texts: hide the message "We don't have as many "ProductName" as you requested" when Product is already Present in cart

texts:
Steps to reproduce:

Add a new product. set it's quantity to 1.
Add the product to cart from product page.
Go back again to product page and add the same product to cart again.

What Happens now?

I get the message "We don't have as many "Product Name" as you requested."

What I want to happen?

If product is already Present in cart, it should not display this message and get redirected to cart when we press "Add to cart" button.

What I've tried till now !

In the file vendor/magento/module-catalog-inventory/Model/StockStateProvider.php, if I comment the following block of code

if (!$this->checkQty($stockItem, $summaryQty) || !$this->checkQty($stockItem, $qty)) {
            $message = __('We don\'t have as many "%1" as you requested.', $stockItem->getProductName());
            $result->setHasError(true)->setMessage($message)->setQuoteMessage($message)->setQuoteMessageIndex('qty');
            return $result;
        } else {

the message is not displayed and I get redirected to cart page, but the number of items in the minicart is incremented. It becomes  instead of 1.

So, my question is what is the best way to achieve this? Thanks for your time.


texts: Unabele to pass product object to child html from product list

texts:
I would like to call a child html element from product listing page. To do that I have added below in catalog.xml

         <reference name="content">
            <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
                <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
                    <block type="core/template" name="timer" template="catalog/product/deal/timer.phtml" />
..
..
             </block>
          </reference>

Then from list.phtml I added below,

            <?php
                $this->getChild('timer')->setData("product", $_product);
                echo $this->getChildHtml('timer')
            ?>

Now, In timer.phtml when I print as below,

<?php
    $_product = $this->getProduct();

    echo '<pre>'; print_r($_product->getData());
?>

It prints only first product data for all products listed in product list page. Assume if there are 10 products in listing page, first product info is being passed to timer.phtml for all remaining 9 products.


texts:
I am getting all the catalog of magento by python but i want the specific info about the product but don't have any lead on that --

url='http://domain.com/api/xmlrpc/'
server_instance = xmlrpclib.ServerProxy(url)
session = server_instance.login(API_USER, API_PASS)
inventory_list = 'catalog_product.list'
session, server_instance = getSession()

get session is a function for creating a session and server instance of this.

list = server_instance.call(session, inventory_list)

this returns me a list of a dictionary of all products having product id and SKU?
now how to get the info of that product?


texts: Creating new Attribute Label leads to Browser Crash

texts:
I have a Magento CE 1.7 project and when I go to "Catalog > Attributes > Manage Attributes" then click in any existing attribute.

Now, Tab "Manage Label/Option" on the section "Manage Options (values of your attribute)" I click on "Add Option", fill the field with any text and hit the button "Save and Continue Edit".

After that nothing else works anymore. The browser freezes and afterwards crashes. Has anyone else come across this issue and got it sorted?

Cheers.


texts: Can't get RSS feed block to get executed

texts:
I am trying to develop an improvement to a previously made module called "magento-stock-movements". So I created a separate module under the same NameSpace using a guide like this one.

The goal is for this to be an admin/backend only RSS feed like "Notify Low Stock" that updates each time there is a stock movement on Magento. I tried every config.xml setting I could possibly find under the sun, but nothing changed. And trust me I have refreshed the cache and reindexed Magento ad nauseam. I just get a page with an XML header and no content, no exceptions, no PHP fatal errors, no logs, nothing every time I go to mywebsite.com/index.php/rss/catalog/stockmovements.

All my code is on github for example. Has anyone tried to do this before? Can anybody point me in the right direction?


texts: Magento 2 error in swatchRenderer.js with configurable product image

texts:
I am getting error when click on the configurable product swatch and image is not changing.

  TypeError: gallery is undefined

It is working with default zoom functionality but I'm using an extension.

Functionality is not working with this image changing. Any one can say what is issue with this?

https://ktree.com/uploads/ktree_zoom-0.0.1.zip


texts: Magento 2 : How to change the quantity of items in the checkout?

texts:
How to change the quantity of cart items in the checkout? I have a select that should display the quantity of items in the cart. When changing the value, change the quantity of goods in the basket and recalculate the total amount of the order.

File: Magento_Checkout/web/template/summary/item/details.html

<select
   data-bind="options: qtyOptions, value: selectedQty, event: {change: updateQty($parent)}"
   class="cart-item__select js-cart-qty"
>
</select>

module-checkout/view/frontend/web/js/view/summary/item/details.js

updateQty: function(item) {
        var data = {
            item_id: item.item_id,
            item_qty: this.selectedQty()
        }

        $.ajax({
            url: url.build('checkout/cart/updateItemQty'),
            data: data,
            type: 'post',
            dataType: 'json',
            context: this,
        }).done(function (response) {
                alert('hey! you updated successfully, checkout cart.')
                console.log(response)
            })
            .fail(function (error) {
                console.log(JSON.stringify(error));
        });
    }


texts: Get product attribute by attribute group code ( [attribute_group_code] ) in magento 2

texts:
I want get attribute by [attribute_group_code]. Please help me.
My code is as follows:

<?php
$product = $this->getProduct();
$attributeSetId = $product->getAttributeSetId();
$groupCollection = $this->groupCollectionFactory->create()
    ->setAttributeSetFilter($attributeSetId)
    ->setSortOrder()
    ->load();
foreach ($groupCollection as $group) :
    $attributes = $product->getAttributes();
    echo "<pre>";
    print_r ($group->getData());
    echo "</pre>";
    ?>
    Return :
        Array
        (
            [attribute_group_id] => 21
            [attribute_set_id] => 4
            [attribute_group_name] => Operate
            [sort_order] => 3
            [default_id] => 0
            [attribute_group_code] => operate
            [tab_group_code] =>
        )

    // Get attrubte value , label
<?php endforeach; ?>

Thank you.


texts:
I try to compile a list of all product URLs for a given store. Given $productCollection prepared with store, status and visibility filter, this is how it works in Magento CE:

$catalogUrl = Mage::getResourceModel('catalog/url');

$select = $catalogUrl->getReadConnection()->select();
$select->from($catalogUrl->getMainTable(), array('request_path'));
$select->where('store_id = ?', (int)$storeId);
$select->where('product_id IN (?)', $productCollection->getAllIds());
$select->where('options IS NULL');
if (!Mage::getStoreConfig('catalog/seo/product_use_categories', $storeId)) {
    $select->where('category_id IS NULL');
}

foreach ($catalogUrl->getReadConnection()->fetchCol($select) as $requestPath) {
    $url = Mage::getBaseUrl('web') . $requestPath;
    // do something with $url
}

But how would you achieve the same in Magento EE, where the standard URL rewrite table is not used for products?

Is there a unified solution that works independent of the URL model in CE and EE?


texts: How to disable the sending of Magento's default Success Email Template upon newsletter sign-up

texts:
Magento CE 1.9.0.1

We recently signed up for an email and list management service that taps into Magento and allows us to manage all transactional and newsletter emails through their application. This is a very convenient service and we would like to disable some of our outgoing Magento emails and just their service handle it. The only problem is that they are new to Magento and do not currently have an option to disable the default emails that Magento sends out which would result in customers getting two sets of emails - specifically, I need to disable the Newsletter Subscription Success email, Order Update email and New Account Signup email.

Does anyone know of a way to do this programmatically?

I found this thread on SE which addresses the Newsletter Subscription email https://stackoverflow.com/questions/2844023/magento-store-dont-send-newsletter-success-email

There also seem to be an extension which has mixed reviews because it doesn't address custom email templates and has a few bugs: http://www.magentocommerce.com/magento-connect/disable-email-notifications.html


texts: Category Image Not Showing on frontend in magento2

texts:
I Am Using Below Code
When i Debug by Zend_Debug::dump($sub_category->getData())
Then image showing 'null' value.
Image uploaded in admin
array(30) {
  ["entity_id"] => string(2) "88"
  ["attribute_set_id"] => string(2) "11"
  ["parent_id"] => string(2) "39"
  ["created_at"] => string(19) "2018-10-31 13:26:40"
  ["updated_at"] => string(19) "2019-05-25 06:42:17"
  ["path"] => string(9) "1/2/39/88"
  ["position"] => string(1) "1"
  ["level"] => string(1) "3"
  ["children_count"] => string(1) "4"
  ["description"] => NULL
  ["custom_layout_update"] => NULL
  ["is_active"] => string(1) "1"
  ["landing_page"] => NULL
  ["is_anchor"] => string(1) "1"
  ["include_in_menu"] => string(1) "1"
  ["custom_use_parent_settings"] => string(1) "0"
  ["custom_apply_to_products"] => string(1) "0"
  ["name"] => string(6) "Aprons"
  ["url_key"] => string(6) "aprons"
  ["image"] => NULL
  ["meta_title"] => string(20) "Aprons for All Needs"
  ["display_mode"] => string(17) "PRODUCTS_AND_PAGE"
  ["custom_design"] => NULL
  ["page_layout"] => NULL
  ["thumbnail"] => string(10) "subcat2.jpg"
  ["custom_design_from"] => NULL
  ["custom_design_to"] => NULL
}

<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
$subcats = $category->getChildrenCategories();
?>
<?php foreach ($subcats as $subcat) {
$sub_category = $objectManager->create('Magento\Catalog\Model\Category')->load($subcat->getId());
?>
<img src="<?php echo $sub_category->getImageUrl() ?>">
<?php } ?>


texts: Magento 2 : What is profiler, what is it's purpose and how can it be used?

texts:
I came to knew that there is a profiler in Magento 2, but I am not sure what it does and what it can be used for.
Please explain.


texts:
I want to show my addresses on customer panel like this:
FA, Macon, rujeh st, NO12.

instead of:
fa
macon
rujeh
st no12

what should i do?


texts: Where is the install script located in the Magento folder?

texts: As sometimes my 2,5 yr old production site will redirect for unknown reasons to the install page I would like to know where the install script is located in the Magento folder. This way I can delete it for avoiding security breaches. Thanks everybody!


texts: Develop Extensions for Magento Enterprise edition is same as Community edition?

texts:
I wan to know, how to develop extension in magento Enterprise Edition ? is this same as Community Edition or some major or minor differences.
Please Help


texts: Magento cache concept store custom block or custom model object data

texts:
I do not understand properly cache concept in magento.

I want to store data in cache so when user again refer data/page ,it automatically get from cache that data rather than fire server request.When data changed from backend then it should go for request to server.How can I
Handle this from cache.
I have code but how can I use this code.

 Mage::app()->saveCache($data, $this->_cacheId, array(self::CACHE_TAG), 604800);

How fetch backend custom model data from backend using cache support ?. My model is Mage::getModel('testimonial/data')->getCollection() how can I use this model data as cache data ? OR how can fetch fast bulk custom model data ?somone understand to me ?


texts:
My problem is that my transactional emails come first after round about 30 minutes or later!

Dose anybody know what I do wrong?
I'm using the default mail transmitter from Magento

Thanks!


texts: can´t save new field in magento(1.9) customer registration checkout form

texts:
I followed the instructions to add a new field in customer registration from Add new field in magento(1.9) customer registration, works perfect!

I need help to add this field to customer registration on checkout page also.

I added this to my module xml (ea_dni is the name of my module):

<checkout_onepage_index>
    <reference name="checkout.onepage.billing">
        <action method="setTemplate">
            <template>ea_dni/billing.phtml</template>
        </action>
    </reference>
</checkout_onepage_index>

And I added the field in billing.phtml

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

                    <input type="text" name="eadni" id="eadni" value="<?php echo $this->htmlEscape($this->getCustomer()->getDNI()) ?>" title="<?php echo $this->__('DNI') ?>" class="input-text" />

So, I see the new field in checkout registration form, but this field is not saving to the database!

This is my install-1.0.0.php

<?php

$this->addAttribute('customer', 'eadni', array(
    'type'      => 'varchar',
    'label'     => 'DNI',
    'input'     => 'text',
    'position'  => 120,
    'required'  => false,//or true
    'is_system' => 0,
));
$attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'eadni');
$attribute->setData('used_in_forms', array(
    'adminhtml_customer',
    'checkout_register',
    'customer_account_create',
    'customer_account_edit',
));
$attribute->setData('is_user_defined', 0);
$attribute->save();

Can you help me? What am I missing?

Here is my app/code/local/EA/DNI/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <EA_DNI>
            <version>1.0.0</version>
        </EA_DNI>
    </modules>
    <global>
        <helpers>
            <ea_dni>
                <class>EA_DNI_Helper</class>
            </ea_dni>
        </helpers>
        <resources>
            <ea_dni_setup>
                <setup>
                    <module>EA_DNI</module>
                    <class>Mage_Customer_Model_Resource_Setup</class>
                </setup>
            </ea_dni_setup>
        </resources>
    </global>
    <frontend>
        <layout>
            <updates>
                <ea_dni>
                    <file>ea_dni.xml</file>
                </ea_dni>
            </updates>
        </layout>
        <translate>
            <modules>
                <EA_DNI>
                    <files>
                        <default>EA_DNI.csv</default>
                    </files>
                </EA_DNI>
            </modules>
        </translate>
    </frontend>
</config>


texts:
How to create a DataProvider that use in my grid?

I'm using uiComponent to create Grid.


texts:
I am creating a simple script to count items ordered in a multi-store Magento installation and display the results in a webpage. I have written something that correctly counts all ordered items.

I now wish to narrow this down and count only certain product ids for certain store ids. How can I target specific columns from $results?

require_once('./app/Mage.php');
Mage::app();

$resource = Mage::getSingleton('core/resource');

$readConnection = $resource->getConnection('core_read');

$dateToday = date('Y-m-d');
$noDays = 1;

for ($i = 0; $i < 7; $i++) {
    $pastWeek = date('Y-m-d', strtotime('-'.$noDays.' days', strtotime($dateToday)));
    $noDays++;
    $query = "SELECT * FROM `sales_flat_order_item` WHERE `created_at` BETWEEN '".$pastWeek." 00:00:00' AND '".$pastWeek." 23:59:59'";
    $results = $readConnection->fetchAll($query);
    $j = 0;
    foreach ($results as $value) {

        //something like - if (store id == 1) { if (product id == 2 || 3) { $j++; } else {

$j++;
        }
        echo "Date: ".$pastWeek." | Quantity Sold: ".$j."<br />";
    }


texts: pub/static folder did not regenerate while deploy

texts:
Whenever I clicked flush static files cache in admin panel it deletes files in pub folder, but it did not regenerate while deployment.

I don't know what is the reason for this.

Anybody who knows. please help me.


texts: Difference between WebService according to magento version?

texts: Do you know if there is any difference between the web services in Magento according to the version of Magento?


texts:
I am new to developer and want to implement blueprint3d library into my magento website https://github.com/furnishup/blueprint3d .
the html file requires 4 js files 'Three.js' Library and blueprint3d.js and some extra files for html propagation
blueprint3d.js requires threejs library
examples.js requires blueprint3d.js and so on.

I tried to include them in the head section of the layout but don't work

 <head>
        <css src="AWstreams_RoomPlanner::css/example.css" />
        <script src="AWstreams_RoomPlanner::js/three.js" />
        <script src="AWstreams_RoomPlanner::js/blueprint.js" />
    </head>

I also tried to use requireJs but i can't understand how it's work and i can't implement it

   var config = {
    paths : {
        THREE: "AWstreams_RoomPlanner/js/three.js",
        BP3D: "AWstreams_RoomPlanner/js/blueprint3d"
    },
    shim: {
        'BP3D' : ['jquery']
    }
};

How can i go through that


texts: Getting Gateway Time out error in backend for Configurable products

texts:
When i click on Edit or delete for Configurable Products in Backend i am getting error like

GateWay Time out Error

Website also loading slowly

For reference please find the attached image.


texts: How to get the admin login when a magento website is made live?

texts: I have made a e-commerce website in magento and made it live. The website is ok but when i am typing the admin url, it is showing 404 error. Can anyone say how to solve this error ?


texts: Magento 2 Import Export - Configurable Products

texts: Magento 2 provides import of configurable products features or not ? if it  provides, how should i import configurable products in magento 2 ?


texts: I would like to create custom forms that send the content to a predefined email address. How would I go about creating this? It is essentially the same as the default contact form but with different content.


texts: Is it possible to sort Magento sub categories by alphabetical order by default? NOT with mysql sporadically

texts:
Is it possible to sort magento sub categories automatically by alphabetical order? Currently the only way to do so in Magento, is to re-arrange them manually from the manage categories page in admin, which is very time consuming, particularly when like us you have over 1000 sub categories!! I've seen a few posts about hard coding the sql on the navigation.php page, but would prefer to create a module to do this over riding the core files. Any ideas?

This isn't a duplicate of the other question here:

Categories - how to display in alphabetical order? (Programmatically)

Our question is how can Magento automatically continually ensure categories are sorted in alphabetically. NOT running an SQL query every now and then to sort all categories live at that point. This would require a cron job to be setup to have it continually runnning or would have to be regularly manually run.

Our question is can the core magento files for creating the cateogry page layout be overridden by files sorting the sub categories automatically?

For our particular instance, we wouldn't want the top level categories sorted alphabetically. Just all sub categories underneath them. I hope this makes sense? There are numerous posts about how to do this with sql sporadically, but no actual proper solution.


texts: Magento 1.9 CE: configurable products stock alert

texts:
I sell t-shirts (configurable products) in three sizes (simple products).

I have set: System > Configuration > Catalog > Allow Alert When Product Comes Back in Stock - Yes

I have a simple product (Red T-shirt, size S) with 0 items (no stock), and the product page shows "Sign up to get notified when product is back in stock". That is ok.

But I want the notification alert link ("Sign up to get notified when this product is back in stock") to be displayed in the configurable product page (Red T-shirt page) if ANY of the simple products related to the configurable product (any of the sizes) is out of stock.

Is this even possible?

I am new to Magento, I am kind of lost here. I would really appreciate any help.

Thanks in advance.


texts:
The checkout/onepage is working with https. But, why checkout/cart is not?

Please see the detail in the following link.
http://pastebin.com/ASNZMixJ


texts: Magento 2 Localization Adding Links in CSV

texts:
How to add text with link in csv file of a module. For example,

"An error occurred"

I want to add text with link like below for this message.

"An error occurred.Please contact our customer servicehere


texts:
The folder var/session keeps constantly very big ammount of data whitch causing a big innode usage on the server,

everytime i delete files from session folder innode usage drops to minimum.

so i want to ask how can i automatically delete those session files every 24h for example.

i just started working with MAgento so i'm a little bit newbie so far so large explanation would be appreciated.

i know i should create a cron job somehow through cpanel or smt like that.


texts: Magento2 - How to install and check coding standards of extension for Magento Marketplace?

texts:
I want to check My Extension's coding standard for Magento Marketplace before submitting it on **Magento Marketplace*. Can anyone tell me how can I install coding standard in My Local Environment and check my extension whether this extension is eligible or not for Magento Marketplace code standard.

Thanks In Advance..!


texts:
In the below code what does the :: operator mean or do?

<?php $_helper = Mage::helper('catalog/category') ?>

Also what does the helper do exactly?


texts: Add button in Orders grid in Magento 1.9

texts:
I want add a button or a action in a column in the Orders grid. When I press the button I want to call a method from a controller (or a helper).

My first problem:
I want to remain in the page of the Orders grid and not open the url of the controller.

My second problem:
The method of the controller returns a string. I want to display that string in an alert box.

I tried using a rendeder but I can't solve my two problems.

I added a new column to Order grid using the observer:

config.xml

<adminhtml>
     <events>
        <adminhtml_block_html_before>
            <observers>
                <name>
                  <class>VendorName_ModuleName_Model_ObserverAddColumn</class>
                    <method>addColumnToGrid</method>
                </name>
            </observers>
        </adminhtml_block_html_before>
        </events>
</adminhtml>

Observer:

<?php

class VendorName_ModuleName_Model_ObserverAddColumn
{
    public function addColumnToGrid(Varien_Event_Observer $observer)
    {
        $javascript = "
                   alert('hello');
                ";

    $block = $observer->getEvent()->getBlock();
    // Check whether the loaded block is the orders grid block
    if (!($block instanceof Mage_Adminhtml_Block_Sales_Order_Grid) || $block->getNameInLayout() != 'sales_order.grid')
        return $this;

    // Add a new column rigth after the "view" column
    $block->addColumnAfter('view', [
        'header' => $block->__('Header'),
        'width' => '60px',
        'index' => 'index_example',
        'type'   => 'action',
        'sortable' => false,
        'getter'   => 'getId',
        //'renderer' => 'VendorName_ModuleName_Block_Adminhtml_Template_Grid_Renderer_CreateInvoiceRenderer',
        'actions'   => array(
                array(
                        'caption'   => Mage::helper('ModuleName')->__('Create Invoice'),
                        'url'       => array('base'=> 'routerName/controllerName/actionName'),
                    //'onclick' => 'window.location = "' . Mage::getUrl('routerName/controllerName/actionName') . '"',
                        //'target'=>'',
                    //'onclick' => $javascript,
                        'field'     => 'id'
                )
        ),
        'filter' => false
    ], 'entity_id');

    return $this;
}

}

Edit:
I thought to remove 'url' in 'actions' and uncomment 'onclick'. Then in $javascript I can make a Ajax.Request to the controller. The problem is that I don't know how to pass the order_id as a parameter.


texts: Cron does not reschedule currency_rates_update job until Cache Storage is flushed

texts:
One problem I have been assigned to investigate is to the updating of currency rates via the cron job.

I was able to get it to update fine, but when I went to run it again after changing the time (by about 2 minutes) the currency_rates_update job was not rescheduled in the cron_schedule table.

After experimenting I have found something strange. After changing the time for the currency rates to be updated I had to click on the Flush Cache Storage button in Cache Management before the cron would create the currency_rates_update entry. Once it has been created, it will work fine after that.

This is what I do to change the time:

Go to System > Configuration > General > Currency Setup
Change Start Time in Scheduled Import Settings to be 3 - 5 minutes ahead of my current time and save
Go to System > Cache Management
Select all the caches, set Actions to refresh and click on submit
Go to cron.php

After all of this the currency_rates_update isn't created, it's only created after I click on Flush Cache Storage button in cache management. I am wondering if I am missing a step that doesn't involve flushing the cache storage when I change the time.

NOTE: As a further test, I went onto a different build with a different database and turned off all the caches and cleared everything in cron_schedule before running cron.php, nothing was recreated until I flushed the cache storage.


texts: Magento2 - VirtualType argument replacement

texts:
I'm trying to remove the category filter in category view. But apart from that, my question is more about Magento 2 itself.

in di.xml of Magento_CatalogSearch , you just have to comment the "category" item to do that :

<virtualType name="categoryFilterList" type="Magento\Catalog\Model\Layer\FilterList">
    <arguments>
        <argument name="filters" xsi:type="array">
            <item name="attribute" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Attribute</item>
            <item name="price" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Price</item>
            <item name="decimal" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Decimal</item>
            <item name="category" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Category</item>
        </argument>
    </arguments>
</virtualType>

So I was trying to remove this argument, in a custom module, just copy/pasting it into my di.xml and removing the item category. But it does not work.

And yes, I wrote well my module.xml, with the sequence and depends nodes.

Is this possible, or do i have to do another Virtual Type? This way I could write a preference for categoryFilterList, but is this possible to modify an existing argument ?


texts:
We have use this for our Call for Price:

Hiding Price if 0

or

    <?php if ($_product->getFinalPrice() == 0) : ?>
                    <?php echo $this->__('Call for Price') ?>
                <?php else: ?>
                    <?php echo $this->getPriceHtml($_product); ?>
                <?php endif; ?>

For list.phtml and view.phtml. It work fine, the only problem is the text call for price used to replace the price are not at the same place where the price is. Can anyone help us with this?

Here is a picture

Thanks for any help!


texts: Proceed to checkout buttons suddenly missing

texts:
Very strange issue, suddenly the proceed to checkout buttons are missing from the mini cart and the normal cart. When I check the code I can see below

Mini cart

<?php if($_cartQty && ($this->isPossibleOnepageCheckout() OR $this->getQuote()->getHasError())){ ?>
<button class="button btn-gotocart" type="button" title="<?php echo $this->__('View cart') ?>" onclick="setLocation('<?php echo Mage::getUrl('checkout/cart/') ?>')">
<?php echo $this->__('Winkelwagen') ?>
</button>
<button class="button btn-checkout" type="button" title="<?php echo $this->__('Checkout') ?>" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')">
<?php echo $this->__('Afrekenen') ?>
</button>
<button class="button btn-update" type="button" title="<?php echo $this->__('Update'); ?>" name="update_cart_action" value="update_qty" onclick="mincart.save();">
</button>
<?php  } ?>

Normal cart

    <?php echo $this->getChildHtml('totals'); ?>
    <?php if(!$this->hasError()): ?>

    <?php foreach ($this->getMethods('methods') as $method): ?>
        <?php if ($methodHtml = $this->getMethodHtml($method)): ?>

<?php echo $methodHtml; ?>

        <?php endif; ?>
    <?php endforeach; ?>

    <?php endif; ?>

Only problem I now have is how to proceed with finding the issue :-(
When I manually go to the onestepcheckout page it works fine, I have shipping methods and payment methods available. When I remove

<?php if($_cartQty && ($this->isPossibleOnepageCheckout() OR $this->getQuote()->getHasError())){ ?>

the buttons show again


texts: Invalid User Name or Password after moving from sub-domain to main domain

texts:
After moving from sub-domain to main domain,

I can not able to login to admin panel. getting following message :

Invalid User Name or Password.

I set proper password which is in Admin_user[with md5] in database.

please help me to find solution.


texts: How To Give Product Details Print By Admin > Catalog - > Managed Products

texts:
From admin managed products, what are all the products i selected (Using checkbox) i need those products get a printout, printout like products image, name, description?

Is Possible?


texts: How to set default shipping method and country?

texts:
How can I set my default shipping method in the shopping cart to the country where my store is?

For instance, I want to set the default shipping method to the UK when the customer are on the shopping cart page.

By Magento default, you have to select your country where you want to ship your order to. Then you have to hit the button 'Get a quote' for the 'Estimate Shipping and Tax'. But I want to skip this step by setting the default shipping method to the UK automatically when you are on this page.

Is it possible?

I tried with this code below,

$shippingAddress = $this->getQuote()->getShippingAddress();
$shippingAddress->setCountryId('UK')->setShippingMethod('tablerate_bestway')->save();

But you have to refresh the shopping cart page for a couple of times before it sets the shipping method to the UK.

I need it set the shipping method to the UK as soon as you land on the shopping cart page though, is it possible?


texts: Product images are not uploaded in magento admin

texts: In magento admin while adding products image is not uploading.I tried by uploading in different browsers but it too doesn't worked.I have given 777 file permissions to media folder.When i upload image, image is stored in media/tmp/catalog/media folder.But it is not showing the image in the magento admin.Here is the screenshot of the issue.Can there be any reason for the image not saving in product in admin.


texts:
Can anyone let me know why below code of refer URL redirects to homepage, instead of last page visited in controller ?

This happens only in live website, beta website works perfect:

$resultRedirect = $this->resultRedirect->create(ResultFactory::TYPE_REDIRECT);
$resultRedirect->setUrl($this->_redirect->getRefererUrl());
return $resultRedirect;


texts: Magento - How to allow certain tags (iframe, embed) in Magento's CMS editor?

texts:
Problem: In cms page it's not possible to write any tag?. like

<iframe width="560" height="315" src="https://www.youtube.com/embed/_jHpnb-QmTA" frameborder="0" allowfullscreen></iframe>

If you click show/hide Editor button this content converted to

& lt;iframe width="560" height="315" src="https://www.youtube.com/embed/_jHpnb-QmTA" frameborder="0" allowfullscreen></iframe & gt;

I have tried according to their(tiny_mce) documentation. Also this solution. But no luck in Magento 1.9.3.2.

Any idea why it's not working?


texts:
I am trying to filter Best seller product collection like below.

Seems the setOrder is not working.

  class BestSeller extends \Magento\Framework\View\Element\Template
  {
    protected $_collectionFactory;
    protected $_storeManager;
    public function __construct(
     \Magento\Backend\Block\Template\Context $context,
     \Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory,
     \Magento\Store\Model\StoreManagerInterface $storeManager,
     array $data = []
   ) {
     $this->_collectionFactory = $collectionFactory;
     $this->_storeManager = $storeManager;
     parent::__construct($context, $data);
  }
  public function getBestSellerData(){
    $storeId = $this->_storeManager->getStore()->getId();
    $bestSellerProdcutCollection = $this->_collectionFactory->create()
                ->setModel('Magento\Catalog\Model\Product')
                ->setPeriod('day') //you can add period daily,yearly
                ->setOrder('id', 'desc')
                ->setPageSize(8);
    return $bestSellerProdcutCollection;

}

This is not filtering the best seller by id with descending order. Can anyone help me on this please.

Thanks


texts: Change default price filter behaviour for pwa in magento 2.3.4 using graphql

texts: I have a requirement in which i need to customise the default price filter in magento and change the behaviour so that the price ranges will be constant and need to show all the ranges after a price filter is applied (eg: like in myntra, there the initial price ranges will be maintained all the time even after a price filter is applied, please see the image attached). But currently in magento when we apply a price range filter, next ranges will be the new ranges based on the current products list and initial ranges will not be shown.Is this possible to that the ranges to be fixed using graphql? i am using the aggregation do display the filters.


texts: Using customer attribute in conditions Catalog Price Rules

texts:
Is it possible to add a customer attribute to the list with conditions under “please choose a condition to add” under “Catalog Price Rules”

It says “product attributes” but I also see Gender in that list which is a customer attribute.

I would like use an attribute with the company code, so I can give an individual discount to (customers of a) company.


texts:
Even tough I can add new custom css files, I'm unable to override the current styles.

I have done as described here but my button remains as original color blue:

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css-overview.html

Is there any step missing from this guidance?

Thanks!


texts: Magento 2 : Custom template file is loading after refreshing the page only?

texts:
Here is my code for overriding vendor module template. when the page corresponding to this layout loads, it is fetching template file from vendor.after the refresh it is fetching from my custom module.Please help.

<referenceBlock name="items">
        <action method="setTemplate">
            <argument name="template" translate="true" xsi:type="string">My_Sales::order/create/items.phtml</argument>
        </action>
 </referenceBlock>


texts: Magento 2 Get a list of Attribute Set Names and IDs

texts:
How would I get a list of Attribute Set names and IDs in Magento 2?

Edit: Adding code.

Edit 2: Added code that worked for me

<?php

namespace Company\CustomAttributes\Model\Config\Source;

use Magento\Eav\Model\ResourceModel\Entity\Attribute\OptionFactory;
use Magento\Framework\DB\Ddl\Table;

class Options extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{
    /**
     * @var OptionFactory
     */
    protected $optionFactory;

    /**
     * @param OptionFactory $optionFactory
     */
    public function __construct(OptionFactory $optionFactory)
    {
        $this->optionFactory = $optionFactory;
        //you can use this if you want to prepare options dynamically
        //$coll = $objectManager->create(\Magento\Catalog\Model\Product\AttributeSet\Options::class);
    }

    /**
     * Get all options
     *
     * @return array
     */
    public function getAllOptions()
    {
        /* your Attribute options list*/

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

        $coll = $objectManager->create(\Magento\Catalog\Model\Product\AttributeSet\Options::class);

        $this->_options=[ ['label'=>'Select Attribute Set', 'value'=>'']];

        foreach($coll->toOptionArray() as $d){
            if($d['label'] !== 'Default') {
                $this->_options[] = ['label' => $d['label'], 'value' => $d['value']];
            }
        }
        return $this->_options;
    }

    /**
     * Get a text for option value
     *
     * @param string|integer $value
     * @return string|bool
     */
    public function getOptionText($value)
    {
        foreach ($this->getAllOptions() as $option) {
            if ($option['value'] == $value) {
                return $option['label'];
            }
        }
        return false;
    }

    /**
     * Retrieve flat column definition
     *
     * @return array
     */
    public function getFlatColumns()
    {
        $attributeCode = $this->getAttribute()->getAttributeCode();
        return [
            $attributeCode => [
                'unsigned' => false,
                'default' => null,
                'extra' => null,
                'type' => Table::TYPE_INTEGER,
                'nullable' => true,
                'comment' => 'Custom Attribute Options  ' . $attributeCode . ' column',
            ],
        ];
    }
}


texts: Magento 2: How to use Multi Language in XML File

texts:
As in phtml file we use

<?php echo __('Title'); ?>

to Support Multi Language.

How to use same in XML File for Title

app\code\Custom\Module\view\frontend\layout\mymodule_index_index.xml

<referenceBlock name="breadcrumbs">
    <action method="addCrumb">
        <argument name="crumbName" xsi:type="string">Home</argument>
        <argument name="crumbInfo" xsi:type="array">
            <item name="title" xsi:type="string">Home</item>
            <item name="label" xsi:type="string">Home</item>
            <item name="link" xsi:type="string">{{baseUrl}}</item>
        </argument>
    </action>
</referenceBlock>


texts: Change app/etc/local.xml programmatically (simplexml?)

texts:
does anybody know the best way to change a node in local.xml within a custom module? Is there functionality within magento I can use or do I need to focus on a simplexml function in php?

Currenly I am trying for example this, but does't do anything

    // load the document
// the root node is <info/> so we load it into $info
$info = simplexml_load_file('/app/etc/local.xml');

// update
$info->config->global->resources->default_setup->connection->host = 'test';

// save the updated document
$info->asXML('/app/etc/local.xml');


texts: how do i call a function(controller) from xml in magento?

texts:
this is my code: etc/adminhtml.xml:

<?xml version="1.0"?>
<config>
    <menu>
        <attributegrouping translate="title">
            <title>Attribute Grouping</title>
            <sort_order>210</sort_order>
            <children>
                <system_configuration translate="title" module="attributegrouping">
                    <title>Add new group</title>
                    <sort_order>20000</sort_order>
                    <action>attributegrouping/addgroup</action>
                </system_configuration>
            </children>
        </attributegrouping>
    </menu>

this is the etc/config.xml :

<?xml version="1.0"?>
<config>
    <modules>
        <Netgroup_Attributegrouping>
            <version>0.1.0</version>
        </Netgroup_Attributegrouping>
    </modules>

    <global>
        <helpers>
          <attributegrouping>
            <class>Netgroup_Attributegrouping_Helper</class>
          </attributegrouping>
        </helpers>
    </global>
</config>

this is the controllers/AddgroupController.php content:

<?php

class Netgroup_Attributegrouping_Adminhtml_AddgroupController extends Mage_Adminhtml_Controller_Action
{
        public function indexAction()
        {
                echo 1;
        }

}

I want when i click on the "Add new group" in admin menu, to go to a controller function and display smth. in my case to the indexAction from class Netgroup_Attributegrouping_Adminhtml_AddgroupController. How should i do that ? thx


texts: Can you use EcomDev PHPUnit to unit test magento CE 1.9.x?

texts: On https://github.com/ecomdev/ecomdev_phpunit it says they support up to ce 1.7.x and ee 1.12.x. If the answer is no are there any tools to unit test magento 1.9.x?


texts: How to load an address by street attribute

texts:
I can load an address using the following code:

$addresses = $addressObj->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('firstname', $addressData['firstname'])
        ->addAttributeToFilter('lastname', $addressData['lastname'])
        ->addAttributeToFilter('city', $addressData['city'])
        ->addAttributeToFilter('postcode', $addressData['postcode'])
        ->addAttributeToFilter('telephone', $addressData['telephone'])
        ->load();

The issue is that street is an array when returned in the address object so how can I add street into my filters above?

I know I could load all the addresses and loop through them in code then compare the array with my data but I would like to avoid this step if possible a it's extra overhead.


texts:
I'm on magento 2.2.4 and i've a lot of different size in my attribute size,

So when i add a new one it's going to the end of the list, so i want to know if there is a way to sort them in alphabetic order ?

For exemple adding a buton for doing this or i don't know what else. If someone can help me it'll be good :D


texts: Tax rate cannot be removed. It exists in tax rule, but no tax rules exist

texts:
After transferring over using cart2cart, a bunch of duplicate tax rates/rules were copied over to the magento site because of a couple demo migrations before the real one.

So ,i removed the rules that were created, and now there are none. But there are still a bunch of duplicate tax rate. I thought since I got rid of the tax rules I would be able to delete the tax rates.

However when I try to delete any of them I get the error message "Tax rate cannot be removed. It exists in tax rule"

But there are no tax rules..What am I missing?


texts: use phtml code instead of xml code to display reviews

texts:
i added below code in catalog.xml file , now reviews section is displaying in product view page. but i want to display that only under particular tab.

<block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form"/></block>

Is there any way we can use phtml code to display this review section.

so i am planning to use that phtml code under that tab


texts: AS YOU CAN SEE NOT ABLE TO MANAGE CATEGORIES AS WELL AS THE SUB CATEGORIES ARE NOT SHOWING UP


texts: Payment extension for Apple Pay through Authorize.net on Magento 1

texts: Does anybody know of a payment module that supports Apple Pay through Authorize.net for Magento 1? I can find something for PayPal or Magento 2, but not specifically Magento 1 through Authorize.net.


texts: Programmatically add Custom Product Attribute to attribute set

texts:
Is there a way to add a custom Attribute (DB-Column, whatever) to product attribute sets?

I tried the following but it I get the error 'Wrong Entity ID':

/** @var Mage_Catalog_Model_Resource_Setup $this */
$this->addAttribute('eav/entity_attribute_set', 'pim_id', array(
    'group'         => 'General Information',
    'input'         => 'text',
    'type'          => 'text',
    'label'         => 'PIM ID',
    'backend'       => '',
    'visible'       => false,
    'required'      => false,
    'is_unique'     => true,
    'visible_on_front' => false,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));


texts:
I need to set My account link to be # . It shouldn't redirect anywhere.

There's a possible way to set it as # using plugin in module.

But I want to do it in theme. Is there's a way to achieve in theme?


texts:
I need to get the path of the current page like - /customer/account/ NOT http://magento.dev/customer/account/index/

Any idea how to do it?


texts: Magento2.4.0 - Getting issue of Elasticsearch while running setup upgrade command

texts:
Please guide me to solve it.
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Limit of total fields [7048] in index [mg2supprod_product_1_v1] has been exceeded"}],"type":"illegal_argument_exception","reason":"Limit of total fields [7048] in index [mg2supprod_product_1_v1] has been exceeded"},"status":400}


texts:
There is a grunt task black-list-generator that does this:

Running tasks: black-list-generator

Running "black-list-generator" task
Collect data from app/code/**/*.js: Start!
Collect data from app/code/**/*.js: Finish!
Collect data from app/design/**/*.js: Start!
Collect data from app/design/**/*.js: Finish!
Collect data from dev/tests/js/jasmine/tests/**/*.js: Start!
Collect data from dev/tests/js/jasmine/tests/**/*.js: Finish!
Collect data from lib/web/mage/**/*.js: Start!
Collect data from lib/web/mage/**/*.js: Finish!
The file was saved!

Done, without errors.

And some files with module names inside like:

vendor/magento/magento2-base/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt

But don't understand what that task actually does and how are blacklist.txt files used in the application.


texts:
Hoping this is really simple but nothing seems that simple in Magento...But at the moment my cart says Country, State/Province, Zip.

BUT it's a UK shop, so how do I change these to the relevant county/postcode inputs?

I've changed everything I can possibly find to UK and I cant seem to make this show county and Postcode?

Big thanks in advance for any help on how I can change this.


texts: Make customer phone number searchable in admin

texts:
How would I make the customers phone number searchable in admin for orders. Either in main admin search or the search bar in sales order grid. I have a custom column with the customers phone number.
sales_order_grid.xml
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="telephone" class="Fitzcode\AdminEdits\Ui\Component\Listing\Column\Telephone">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Phone Number</item>
                    <item name="sortOrder" xsi:type="number">6</item>
                </item>
            </argument>
        </column>
        <column name="comment" class="Fitzcode\AdminEdits\Ui\Component\Listing\Column\Comment">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Comment</item>
                    <item name="sortOrder" xsi:type="number">7</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

Telephone.php
<?php
namespace Fitzcode\AdminEdits\Ui\Component\Listing\Column;

use \Magento\Sales\Api\OrderRepositoryInterface;
use \Magento\Framework\View\Element\UiComponent\ContextInterface;
use \Magento\Framework\View\Element\UiComponentFactory;
use \Magento\Ui\Component\Listing\Columns\Column;
use \Magento\Framework\Api\SearchCriteriaBuilder;

class Telephone extends Column
{
    protected $_orderRepository;
    protected $_searchCriteria;

    public function __construct(ContextInterface $context, UiComponentFactory $uiComponentFactory, OrderRepositoryInterface $orderRepository, SearchCriteriaBuilder $criteria, array $components = [], array $data = [])
    {
        $this->_orderRepository = $orderRepository;
        $this->_searchCriteria  = $criteria;
        parent::__construct($context, $uiComponentFactory, $components, $data);
    }

    public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as & $item) {

                $order  = $this->_orderRepository->get($item["entity_id"]);
                $telephone = $order->getBillingAddress()->getTelephone();

                // $this->getData('name') returns the name of the column so in this case it would return export_status
                $item[$this->getData('name')] = $telephone;
            }
        }

        return $dataSource;
    }
}


texts: Fatal error: Uncaught Error: Call to undefined method Training\Reviews\Model\ResourceModel\Reviews\Collection::addAttributeToFilter()

texts:
I want SELECT COUNT (*) FROM name_table WHERE result LIKE 'likes%' to be executed, and a numeric value is displayed on the page.How do I do it? I'm a beginner. I'll be very grateful for your help!

  /Block/Reviews.php

<?php

namespace Training\Reviews\Block;

use Training\Reviews\Model\ResourceModel\Reviews\Collection;

use Magento\Framework\View\Element\Template;

class Reviews extends \Magento\Framework\View\Element\Template
{

public function _prepareLayout()
{
    $this->pageConfig->getTitle()->set(__('Users Reviews'));

    return parent::_prepareLayout();
}

protected $_productCollectionFactory;

protected $_productVisibility;

public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    \Training\Reviews\Model\ResourceModel\Reviews\CollectionFactory
$productCollectionFactory,
    array $data = []
) {
    $this->_productCollectionFactory = $productCollectionFactory;

    parent::__construct($context, $data);
}

public function getProductCollection()
{
    $collection = $this->_productCollectionFactory->create();

    $collection->addAttributeToFilter('result', ['like' => 'test'])
        ->load();
    $collection->count();

    return $collection;
  }
 }

  /Model/ResourceModel/Reviews.php

<?php
namespace Training\Reviews\Model\ResourceModel;
class Reviews extends
\Magento\Framework\Model\ResourceModel\Db\AbstractDb
{

protected function _construct()
{
$this->_init('training_reviews', 'news_id');
 }
}

  Model/ResourceModel/Reviews/Collection.php

<?php
namespace Training\Reviews\Model\ResourceModel\Reviews;

class Collection extends
\Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{

protected function _construct()
{
$this->_init(
    'Training\Reviews\Model\Reviews',
    'Training\Reviews\Model\ResourceModel\Reviews'
);
 }

}

  /Model/Reviews.php

<?php
namespace Training\Reviews\Model;
use Magento\Framework\Model\AbstractModel;
class Reviews extends AbstractModel
{

protected function _construct()
{
    $this->_init('Training\Reviews\Model\ResourceModel\Reviews');
}

}

/view/frontend/templates/reviews.php

<?php
$data->getProductCollection();

?>


texts: How to remove jQuery Conflict in prototype.js with 1.8.2.jquery.min.js

texts:
i am using 1.8.2.jquery.min.js for slideshow in home page. i have an error in console like this

electronics.html (line 156)
TypeError: element.attachEvent is not a function

element.attachEvent("on" + actualEventName, responder);   prototype.js (line 5653)

TypeError: element.dispatchEvent is not a function

element.dispatchEvent(event);                             prototype.js (line 5734)

it makes menu drop-down in category page not working.

I have tried jquery noConflict(); in all the way in Magento but it does not clear above bug.
Also, I have tried some more methods from google to clear but it does work properly.
can anyone help me to clear this error?


texts: Show all products from a specific store?

texts:
Is it possible to show all articles from a specific store?

I know I can filter for website, but it does not seem to be possible to filter for store.

Maybe there is a SQL query which I can use?


texts:
I need increase some values in my php.ini from magento-cloud environment, but with my user with admin roles opens the file in onlyread mode.
Searching I found this, wasn't succesfully
Disable/Readonly admin options Magento 1
and this
Read-Only Product Backend attribute
Even I've create a new user with admin role, in my web-cloud platform it hasn't option admin edition as this thread says:
https://github.com/magento/devdocs/issues/1786
Hoping any help, thank you.


texts: Edit layered navigation filter titles in Magento 1.9.2

texts:
I have layered navigation on my website as follows:

Category

Price

Size

I would like to edit the title of the filters. For example, change 'Category' to 'Product Type'... how can this be done in Magento?

Thank you.


texts: make custom attribute set as default selected

texts:
I have created new Attribute set say "My attribute set" . now when i add new product "default" one is selected by default , i want my custom attribute set to be selected as default one . i can not see any option in admin for same.

Also there in no option in Admin to set attribute set as default.
ALso there is no option to delete default one attribute set


texts: Content of $block->getAdditionalHtml() in list page

texts: In vendor\magento\module-catalog\view\frontend\templates\product\list.phtml, there is a code line <?php echo $block->getAdditionalHtml() ?>. From where did get this data?


texts: Changing the CopyRight Notification Year from 2019 to 2020 in Magento 1.9

texts: I tried out Admin -> System -> Configuration -> Design (left menu) -> Footer ->  Copyright but it is not changing the Year from 2019 to 2020....Any correct solution  ...Reply back to this Question as soon as possible....


texts:
I am using the UI component form with some additional attribute field using an HTML template. But I am not able to validate these field as par standard. required property is not working.

Example:

 <section class="admin__page-section price-lab attribute-lab-3">
            <label class="attr-label" for="nego">Nego </label>
            <select  required   data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
                    data-bind="options: negoOptions,
         optionsText: 'value', optionsValue: 'id'  ">

            </select>
        </section>


texts: How to add Store view selector in my custom admin grid module!

texts:
How can I add the Store view selector in my custom admin grid module![enter image description here][1]

I added this in my layout now its comming in my grid now to save store wise grid information in to database

Thanks in advance


texts: Categories not visible while adding product

texts:
i have never face such issue before, i am not sure why is this happening.
While adding product i am not able to access subcategories for one of the parent category.

I am not getting any option to expand tree for "Sport Nutrition" category.

Can any one please help me out?

Thank You.


texts: Shipping method - number of products flat rate

texts:
Hello I've found the way to implement shipping method for multiple products. I have created a new module and wrote the code to implement ( fore every four products add shipping cost of 2.99).When I insert the code into the module I cant proceed to the Shipping methods in the checkout it just loads for two seconds and stops. Could anyone spot the problem in my code ?

    protected $_code = 'shipping_mycarrier';

    public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
        if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {
            return false;
        }
        $result = Mage::getModel('shipping/rate_result');
        $reminder = 4;
        $defprice = 2.99;
        $products = $request->getAllItems();
        $noproducts = count($products);
        $price = ($noproducts / $reminder) * $defprice;

        $rate = Mage::getModel('shipping/rate_result_method');
        $rate->setCarrier($this->_code);
        $rate->setCarrierTitle($this->getConfigData('title'));
        $rate->setMethod($this->_code);
        $rate->setMethodTitle($this->getConfigData('name'));
        $rate->setPrice($price);
        $rate->setCost(0);

       return $rate;
    }

}


texts: Unable to add new custom module to magento admin panel

texts:
I am trying to add a new module to magento admin panel by following this article

http://alanstorm.com/magento_admin_hello_world_revisited
When I have added all the files correctly, on clearing cache, admin panel goes Blank , I have an other magento setup, when I move the same files to that set up, new module is created. What is issue in 1st set up, due to which I am unable to create a new module.


texts: My three modules use same observer use but my third module should run same observer in last

texts:
How  to set order of same observer in my three modules?

My each three modules declares same observer.

My first test1_module1 module use sales_convert_quote_item_to_order_item observer

My second test1_module2 module use samesales_convert_quote_item_to_order_item observer so I added <depends><Test1_Module1/></depends> this code in  app/etc/modules/Test1_Module2.xml  and I extends Test1_Module1_Model_Observer class in second module observer file

My third test1_module3 module use sales_convert_quote_item_to_order_item observer.

And My second module test1_module2 is optional so it may be present or not in test1 package  My last third module should run same observer in last(after first and second module) what I do ?

Note: My third module test1_module3 will dependent on first module test1_module1 and if second module not present third module same observer should run after first module and if second module present then third module observer should run after first and second module observer.


texts: How to add hh:mm:ss for the special price date in magento.1.9?