texts: 1.9 authorize.net direct post fails admin orders

texts:
We setup a fresh install of Magento 1.9.3.4

We're trying to create admin orders using Authorize.net Direct Post and it's not working.

We get an error in the console

  Uncaught ReferenceError: transport is not defined

Looking @ the code in /js/mage/directpost.js we found on line 309

saveAdminOrderSuccess : function(data) {
    var response = transport.responseJSON || transport.responseText.evalJSON(true) || {};

    if (response.directpost) {
        this.orderIncrementId = response.directpost.fields.x_invoice_num;
        var paymentData = {};
        for ( var key in response.directpost.fields) {
            if(response.directpost.fields.hasOwnProperty(key)) {
                paymentData[key] = response.directpost.fields[key];
            }
        }
        var preparedData = this.preparePaymentRequest(paymentData);
        this.sendPaymentRequest(preparedData);
    } else {
        if (response.redirect) {
            window.location = response.redirect;
        }
        if (response.error_messages) {
            var msg = response.error_messages;
            if (Object.isArray(msg)) {
                msg = msg.join("\n");
            }
            if (msg) {
                alert(msg.stripTags().toString());
            }
        }
    }
},

Something is clearly wrong here, because the variable data passed in in saveAdminOrderSuccess : function(data) is not being used anywhere in the function.

Has anyone gotten Authorize.net Direct Post to work for admin orders?

Strangely enough, this works just fine on the front end, in that code the functions variable is named transport

saveOnepageOrderSuccess : function(transport) {
    if (transport.status == 403) {
        checkout.ajaxFailure();
    }
    var response = transport.responseJSON || transport.responseText.evalJSON(true) || {};

    if (response.success && response.directpost) {
        this.orderIncrementId = response.directpost.fields.x_invoice_num;
        var paymentData = {};
        for ( var key in response.directpost.fields) {
            if(response.directpost.fields.hasOwnProperty(key)) {
                paymentData[key] = response.directpost.fields[key];
            }
        }
        var preparedData = this.preparePaymentRequest(paymentData);
        this.sendPaymentRequest(preparedData);
    } else {
        var msg = response.error_messages;
        if (Object.isArray(msg)) {
            msg = msg.join("\n");
        }
        if (msg) {
            alert(msg.stripTags().toString());
        }

        if (response.update_section) {
            $('checkout-' + response.update_section.name + '-load').update(response.update_section.html);
            response.update_section.html.evalScripts();
        }

        if (response.goto_section) {
            checkout.gotoSection(response.goto_section);
            checkout.reloadProgressBlock();
        }
    }
},

I tried switching out data for transport in the saveAdminOrderSuccess function but that didn't help.


texts: How to remove block from left or right panel in magento 2?

texts:
I want to remove compare product and wish list block from left panel.

I don't want to change template. I am using 2columns-left.

in magento 1.x, We uses like following in layout file.

<cms_index_index>
   <reference name="left">
      <remove name="left.newsletter"/>
   </reference>
</cms_index_index>

What to do to remove block from magento 2.x?


texts: Download or save page as HTML on Button click

texts:
I want to download or save the page as an HTML when someone clicks on the Download button or link.
Please check the below code.
<button class='download'>Download</button>
Download

    FULL HTML

When someone click on Download the html file will genrate start with 'builder' class.


texts:
Does anyone know how to make product attributes visible only when they exist?

Ex. you have a T-shirt, models are Spiderman and Thor (model attribute), and available on red, blue and green (color attribute).

Let's say that Spiderman is available in red and blue.
               Thor is available in blue and green.

How to make color picking available to customers only after picking the model?
Also, how to get rid of the crossed out values, instead making only the available colors appear in the store?

Thanks in advance :)


texts: Can I get store configuration value in layout.xml file?

texts:
I have created a module in which I have some setting in admin panel for layout.

My layout.xml code (in this I have added link in top links):

<reference name="top.links">
            <action method="addLink" translate="label title" ifconfig="mbyte/mbyte_links/map_header">
                <label>Store locator</label>
                <url>storelocator/index/index</url>
                <title>Store Locator</title>
                <prepare>true</prepare>
                <position>2</position>
        </action>

Like I have added ifconfig="mbyte/mbyte_links/map_header" in action to check weather it is enable or not in configuration setting.

I have also one more configuration setting for <title>. Now my question starts

Is this possible to get configuration value which I have set in admin panel and directly set here in layout file, if yes what is the procedure to do this?

Thanks in advance!


texts: Fatal error: FileIterator contains 1 abstract method must therefore be declared abstract or implement the remaining methods

texts:
I need to add a custom shipping method. I was fallowging this tutorial: https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/
I am receiving this error:

  Fatal error: Class Magento\Framework\Config\FileIterator contains 1
  abstract method and must therefore be declared abstract or implement
  the remaining methods (Countable::se) in
  C:\xampp\htdocs\magento\vendor\magento\framework\Config\FileIterator.php

Any ideas? I am not finding this interface in the code I added fallowing the steps. Thanks


texts: Magento configswatches Call to a member function toOptionArray() on a non-object

texts:
I am using Magento 1.9.1.0 when I go to admin >catalog > configurable swatches in admin

I get the error below:

  Fatal error: Call to a member function toOptionArray() on a non-object in app\code\core\Mage\Adminhtml\Block\System\Config\Form.php on line 463

My magento version was updated from 1.9 to 1.9.1.0

I could not figure out how to fix it, based on some online research
when I comment below text from file
"app/code/core/Mage/ConfigurableSwatches/etc/system.xml"

it works fine

commented text :

                <swatch_attributes translate="label">
                    Product Attributes to Show as Swatches in Product Detail
                    <frontend_type>multiselect</frontend_type>
                    <source_model>configurableswatches/system_config_source_catalog_product_configattribute</source_model>
                    <sort_order>20</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <can_be_empty>1</can_be_empty>
                </swatch_attributes>
                <product_list_attribute translate="label">
                    Product Attribute to Use for Swatches in Product Listing
                    <frontend_type>select</frontend_type>
                    <source_model>configurableswatches/system_config_source_catalog_product_configattribute_select</source_model>
                    <sort_order>30</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                </product_list_attribute>


texts:
I tried to install

  EE-1.14.3.9-1.14.3.10-2018-09-17-05-45-48.diff patch

using command

patch -p1 -f  EE-1.14.3.9-1.14.3.10-2018-09-17-05-45-48.diff

I also tried command

patch -p1 -f  EE-1.14.3.9-1.14.3.10-2018-09-17-05-45-48.diff

I tried both ways, however It's stuck once I fire the command. I don't get any kind of errors in log. Magento also works smoothly but installation cannot proceed.


texts: Bundle Product - Discount if ALL items in bundle are selected

texts:
I would like to discount the price of a bundle product by 15% if the customer orders all the products in the bundle.  I don't want to use the 'Special Price' option because I want all the simple products in the bundle to show their full price; if they are all selected, however, I want the total price to be discounted by 15%.

I think I could do the frontend price display part easily enough with javascript, but what would be the proper way to check if the bundle is full and set the corresponding price for the shopping cart in the backend?


texts: Magento2 Checkout Page Spinner keeps Loading

texts:
I am using Magento 2.3.5 .My checkout page keeps loading and i am unable to do the further process.
I have run all commands like flushing cache or setup upgrade but nothing is working. In Console i am getting following error:
Console error1:
Cannot create property 'checkout-data' on string '29/10/2020'
at customer-data.js:173
at Function..each..forEach (underscore.js:150)
at Object.update (customer-data.js:171)
at Object.set (customer-data.js:303)
at saveData (checkout-data.js:24)
at Object.setInputFieldEmailValue (checkout-data.js:273)
at UiClass.initialize (email.js:44)
at UiClass.initialize (wrapper.js:109)
at new UiClass (class.js:49)
at Object.initComponent (layout.js:137).
Console error 2:
Uncaught Error: [object Object]
at Object. (customer-data.js:95)
at fire (jquery.js:3238)
at Object.fireWith [as rejectWith] (jquery.js:3368)
at done (jquery.js:9848)
at XMLHttpRequest.callback (jquery.js:10317)
Can anyone please help.


texts:
I am new at developing Magento 2 (Magento 2.3), I develop module to show my custom template But I get this error

when I die('sumthing') in execute function it works correctly

  1 exception(s):
  Exception #0 (Magento\Framework\Exception\RuntimeException): Type Error occurred when creating object: Parcode\Contacts\Controller\Index\index\Interceptor

this my code

route.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="contacts" frontName="contacts">
            <module name="Parcode_Contacts" />
        </route>
    </router>
</config>

my Controller: Index

<?php
namespace Parcode\Contacts\Controller\Index;

class Index extends \Magento\Framework\App\Action\Action
{
    protected $_pageFactory;
    protected $_postFactory;
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $pageFactory
    )
    {
        $this->_pageFactory = $pageFactory;
        return parent::__construct($context);
    }
    public function execute()
    {

        // die('somthing'); works correctly
        return $this->_pageFactory->create();
    }
}

layout file:

view/layout/contacts_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="content">
            <block class="Parcode\Contacts\Block\Contact" name="contacts_index_index" template="Parcode_Contacts::index_index.phtml"  />
        </referenceBlock>
</page>

template:
view/templates/index_index.phtml


texts: Observing core_block_to_html_after for a specific block

texts:
I need to replace a few values in a few blocks, starting with category/view or more specifically product/list. I found an excellent writeup by Ben Marks, but as far as I can tell, I can only observe the abstract event and not specify this for specific blocks. This would be my ideal situation.
Alternatively, I'd like the method to be a no-op as soon as possible, if it's not the block I want. Is $observer->getBlock()->getName() or something to that effect, my only option or are the cheaper ways to filter my block?


texts: Difference betweet Mage::getModel('catalog/product')->load(1) and $collection->getFirstItem();

texts:
I have to load some products... The (my) traditional way to load a product is:

Mage::getModel('catalog/product')->load($id);

Now I have the problem, that some products can be loaded by this way - but some not.

I'm sure, there is no difference between those products... Simple, enabled, Catalag/Search, on Stock...

So - this doesn't work:

    $productId = '133110';
    $product = Mage::getModel('catalog/product')
        ->load($productId);
    $price = $product->getPrice();

But this works:

    $productId = '133110';
    $product = Mage::getModel('catalog/product')->getCollection()
        ->addAttributeToFilter('entity_id', $productId)
        ->addAttributeToSelect('price')
        ->getFirstItem();
    $price = $product->getPrice();

Why???


texts: Magento 2: Get Admin User Details By Token Rest API

texts: I want to get admin user details by providing a token via HTTP header. How could I retrieve admin user details of this on Rest API.


texts: Force products collection to use EAV instead of flat table

texts:
In Magento 2, how can I temporarily disable the flat catalog? I have a product collection associated with a frontend store and want it to be loaded via EAV tables.

I looked how the collections determine if flat tables should be used, but did not find a way to inject the setting anywhere.

In Magento 1 I would have changed the loaded configuration value for "flat catalog enabled":

Mage::app()->getStore($storeId)->setConfig('catalog/frontend/flat_catalog_product', 0);

Do I still need to resort to global state like this? If so, how? Or is there a more elegant way?


texts:
I would like to turn off image scaling in the default RWD skin or make it so it does not do any form of image zooming for the product category images. If the browser requires a 280 pixel wide image, then it should be using  a 281 pixel wide image or find a larger one to downscale. Right now, it takes these tiny 210 pixel wide image which features text and zooms in on them making them look aweful.

After reading numerous posts on the Internet, I have yet to find a solution to this specific issue. The only solution I found so far is to make the product category have five columns instead of 4 to make it less likely that this issue will occur. Unfortunately, this is not much of a solution as I find five columns less pretty and more confusing to view than four columns. Does anyone know how to resolve this issue with the RWD skin/theme?

I'm using Magento 1.9.1.


texts: Magento 2.2.3 - How to fix ColorPicker issue in admin configuration?

texts:
My admin store was working correctly search on google
and follow this question created file as given but still problem is exist

if any developer can explain what i am doing wrong ?? in the above link some pls describe the above related procedure


texts: Magento url rewrite custom formatted product url

texts:
Does anybody has a proper solution for rewriting Product URL's in the following format:

http://domain/{product_id}_{title}

And furthermore get rid of the prefix Magento pastes before the title in case of duplicates.

Thanks!


texts: Magento how to re-index product prices pro-grammatically

texts:
I am trying to re-index product prices after update in my product price but its not working showing me old price in product list page.I am using this code

$process = Mage::getModel('index/indexer')->getProcessByCode('catalog_product_price');
$process->reindexAll();

i also tried this one

$reindex = Mage::getModel('index/process')->load(2);
$reindex ->reindexAll();

But its not working. I have tried from by this command

  php indexer.php --reindex catalog_product_price

Its working fine showing me updated prices.


texts:
I hope someone can help. We have a very strange problem. We found out that some products didn't have tax in the shop so we had a look in de backend. The right class is selected when editing a product but when I look in the database the tax_class_id is set to 0 while it should be 7 in this case. Also when I change it in the database and safe the product again by the magento backend it's again reset to 0. I already tried to truncate and disable the flat products tables but it does not make a difference. The strange this is that there seems no difference in products that keep the tax_class_id at 7 and the ones that are reset to 0.

We are using magento 1.8.1.0


texts: Adding custom layouts for CMS and Category use with custom module trouble

texts:
I have a category in my store that requires a totally different layout to the standard Magento layouts. So I created a new copy of the 1column.phtml and renamed it and made one small change to test.

Now the problem is that the custom layout is not showing up. I created a module (which is working as it is seen in the Admin > Config > Advanced overview).

My files and contents are as follows:

app/etc/modules/Test_Page.xml

    <?xml version="1.0"?>
<config>
    <modules>
        <Test_Page>
            <active>true</active>
            <codePool>community</codePool>
            <version>0.1.0</version>
            <depends>
                <Mage_Page />
            </depends>
        </Test_Page>
    </modules>
</config>

app/code/local/Test/Page/etc/config.xml

    <?xml version="1.0"?>
<config>
    <modules>
        <Test_Page>
            <version>0.1.0</version>
        </Test_Page>
    </modules>
    <global>
        <page>
            <layouts>
                <homepage module="page" translate="label">
                    Homepage
                    <template>page/home.phtml</template>
                    <layout_handle>homepage</layout_handle>
                </homepage>

            </layouts>
        </page>
    </global>
    <frontend>
        <layout>
            <updates>
                <Test_Page>
                    <file>test_page.xml</file>
                </Test_Page>
            </updates>
        </layout>
    </frontend>
</config>

app/design/frontend/test/default/layout/test_page.xml

    <?xml version="1.0"?>
<layout>
    <homepage translate="label">
        Home Page
        <reference name="root">
            <action method="setTemplate"><template>page/home.phtml</template></action>
            <action method="setIsHandle"><applied>1</applied></action>
        </reference>
    </homepage>
</layout>

I can't see anything I've screwed up, It's being read as a module but the custom layout is not being shown up :(


texts: Layered navigation loads only part of information

texts:
Thats one my attributes that should be visible in layered navigation:

 $eavSetup->removeAttribute(Product::ENTITY, 'supported_software');
        $eavSetup->addAttribute(
            Product::ENTITY,
            'supported_software',
            [
                'type' => 'text',
                'input' => 'multiselect',
                'frontend_class' => 'required-entry',
                'label' => 'Supported software',

                'group' => 'Technical parameters',
                'sort_order' => 190,

                'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
                'frontend' => '',
                'source' => '[vendor]\DbSchema\Model\SupportedSoftware\Adminhtml\Source\SupportedSoftware',

                'default' => 10,

                'is_wysiwyg_enabled' => false,
                'is_html_allowed_on_front' => false,

                'used_for_sort_by' => false,

                'global' => ScopedAttributeInterface::SCOPE_GLOBAL,
                'visible' => true,
                'required' => true,
                'user_defined' => true,

                'searchable' => false,
                'visible_in_advanced_search' => false,

                'search_weight' => '',
                'filterable' => true,
                'filterable_in_search' => true,
                'comparable' => true,
                'visible_on_front' => true,
                'used_in_product_listing' => true,
                'unique' => false,
                'apply_to' => 'downloadable,bundle',
                'is_used_for_promo_rules' => true,

                'is_used_in_grid' => false,
                'is_visible_in_grid' => false,
                'is_filterable_in_grid' => false,

                'is_required_in_admin_store' => '',

                'system' => 0,
            ]
        );

Moreover this attribute has digit values for admin store and varchar values for frontend (default store view). But I don't think it is the problem here.
Layered navigation appears on frontend properly. I have in db about 40 products added programatically (tests) and all of them should have some values of this attribute  (I am adding these values for admin - but for frontend are being added simultanously). Sometimes my attributes shows up in layered navigation but sometimes not. If I add product from adminhtml manually values its values appears in layered navigation, but they erase former values. For example - if I have 10 product with values x and 10 with values y and I add product with value z in layered navigation after reindex/cache flush only appears results for only one product with value z.

All of my categories are anchored.

EDIT: Some attributes - escpecially the ones which have source model Yes/No in fact appear in lay nav in correct way and also react on changes of values of attributes properly.

EDIT: The same attribute if I added source model instead of options still doesn't appear in lay nav.


texts: Vertex Tax Calculation is really Slow on 2.4.2

texts:
Magento 2.4.2 - vertex module calculation is extremely slow which makes the entire website slow wherever there is a calculation related code like add to cart , Checking totals on Checkout process etc.
Steps to reproduce (*)
I have Installed the vanilla Enterprise Edition on My system and i am testing the add to cart Api on Product listing Page
First thing u need to be logged in as a customer or if u are using Guest Account the calculation is skipped
once u login just go to product Listing and try to add the Product it will take u more then 5 secs just to add the product when vertex is enabled and without it takes 0.5 sec so there is a huge difference in performance and because this entire checkout process is becoming slow. On our production where we have more data it takes more then 10 secs just to add a product with a better environment.
After doing debugging i found
vendor/vertex/module-tax/Model/Api/Data/QuotationRequestBuilder.php Line 94 -buildFromQuoteDetails this function is taking a lot of time and also this function is being called multiple times basically the calculatetax function and slowing down entire website.
public function buildFromQuoteDetails(QuoteDetailsInterface $quoteDetails,
$scopeCode = null)
{
$quoteMapper = $this->mapperFactory->getForClass(RequestInterface::class, $scopeCode);

$request = $this->requestFactory->create();
$request->setShouldReturnAssistedParameters(true);
$request->setDocumentDate($this->dateTimeFactory->create());
$request->setTransactionType(static::TRANSACTION_TYPE);
$request->setCurrencyCode($this->storeManager->getStore($scopeCode)->getBaseCurrencyCode());

$taxLineItems = $this->getLineItemData($quoteDetails, $scopeCode);

$request->setLineItems($taxLineItems);

$seller = $this->sellerBuilder
    ->setScopeCode($scopeCode)
    ->setScopeType(ScopeInterface::SCOPE_STORE)
    ->build();

$request->setSeller($seller);

$request->setCustomer(
    $this->customerBuilder->buildFromQuoteDetails(
        $quoteDetails,
        $scopeCode
    )
);

$this->deliveryTerm->addDeliveryTerm($request);

$configLocationCode = $this->config->getLocationCode($scopeCode);

if ($configLocationCode) {
    $locationCode = $this->stringUtilities->substr(
        $configLocationCode,
        0,
        $quoteMapper->getLocationCodeMaxLength()
    );
    $request->setLocationCode($locationCode);
}

return $request;
}

With Vertex Enabled :

With Vertex Disabled :

Please note till 2.3.5 it was working really fast there was no issue . But after the upgrade of 2.4 it as slowed down. in 2.4.1 it was slow but slightly better then 2.4.2 but now in 2.4.2 its extremely slow which is bringing the entire website down. Please let me if there is any solution.


texts:
I want to create a module for customized t-shirts design. Configurator modules consist following features:

Product Image upload
Text configuration on production
Size
Colors

For size and color, I can simply use configurable products default functionality of magento.
But by this module I want to be able to upload logo or any custom image to be applied on t-shirt and also want to have option to write text (option to choose text font and color).

Can any one suggest me the way how can I start on it (by adopting which PHP library and javascript library, I can do this. I am comfortable with creating custom module in magento.

Thanks in advance


texts: Can't edit products after upgrade from 2.3.2 to 2.3.3

texts:
I've just upgraded to 2.3.3 from 2.3.2 however if I now try and edit a product it gives me this error in the browser:

An error has happened during application run. See exception log for details.

If I look in exception.log I can see these two lines:

[2019-11-03 18:29:18] temando.CRITICAL: "accountId" is required. Enter and try again. {"exception":"[object] (Magento\\Framework\\Exception\\InputException(code: 0): \"accountId\" is required. Enter and try again. at vendor/magento/framework/Exception/InputException.php:91)"} []
[2019-11-03 18:29:18] main.CRITICAL: Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded {"exception":"[object] (InvalidArgumentException(code: 0): Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded at vendor/magento/framework/Serialize/Serializer/Json.php:26)"} []

I've tried doing the usual flush cache, remove generated etc. I've also tried disabling modules but still can't find a solution.

I'm assuming that it's the unable to serialize value error but given it does it on every product and doesn't give any more info about the error I'm a bit stuck!


texts: product filters in layered navigation not working on category page

texts:
I have created a category and shows a static block and products on this category by selecting the option "static block and products" in category settings.

it is showing static block contents and products but the layered navigation in left sidebar are not working FILTERS are not filtering the products.

There is an error in console is that the reason?

"NetworkError: 404 Not Found - http://usatilea.nextmp.net/skin/frontend/base/default/js/lib/imagesloaded.js"

"NetworkError: 404 Not Found - http://usatilea.nextmp.net/skin/frontend/base/default/js/app.js"

"NetworkError: 404 Not Found - http://usatilea.nextmp.net/media/catalog/category/"

 Location { href="http://usatilea.nextmp.n...orcelain.html?color=134",  origin="http://usatilea.nextmp.net",  protocol="http:",  more...}
 porcela...lor=134 (line 2674)
"NetworkError: 404 Not Found - http://usatilea.nextmp.net/usa-tiles/media/wysiwyg/09.png"

And my static block has this code in it:

      <?php
      $_categories = $this->getCurrentChildCategories();
      if ($_categories->count()):
      $categorycount = 0;
      foreach ($_categories as $_category):

    if ($_category->getIsActive()):
        $cur_category =       Mage::getModel('catalog/category')->load($_category->getId());
        $layer = Mage::getSingleton('catalog/layer');
        $layer->setCurrentCategory($cur_category);
        $catName = $this->getCurrentCategory()->getName();
        if ($categorycount == 0) {
            $class = "first";
        } elseif ($categorycount == 3) {
            $class = "last";
        } else {
            $class = "";
        }

     ?>

        <li class="item <?= $class ?> sub-cat-items">
        <a href="<?php echo $_category->getURL() ?>" title="<?php echo $this->
        htmlEscape($_category->getName()) ?>"><img src="<?php echo Mage::getBaseUrl('media').'catalog/category/'.$cur_category->getThumbnail() ?>" width="580" alt="<?php echo
        $this->htmlEscape($_category->getName()) ?>" />

<?php echo
        $this->htmlEscape($_category->getName()) ?>

    <?php
    endif;
    if ($categorycount == 3) {
        $categorycount = 0;
        echo "
\n\n
";
    } else {
        $categorycount++;
    }
      endforeach;
    endif;
    ?>

Please look at the code and tell me if i am doing anything wrong here is the category page link: click here for category page


texts:
I want to get all in stock attributes in configurable products. I have got some code stack overflow, but these are showing non stock product also,

My code:

$configurable= Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
                $simpleCollection = $configurable->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions('qty', array("gt" => 1));
                /* -------- Add this  ------- */
                $simpleCollection->getSelect()->join('cataloginventory_stock_status', 'cataloginventory_stock_status.product_id = e.entity_id', array('stock_status'));
                $simpleCollection->getSelect()->where("`cataloginventory_stock_status`.`stock_status` = 1");

                $productAttributeOptions = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
                $attributeOptions = array();
                foreach ($productAttributeOptions as $productAttribute) {

                foreach ($productAttribute['values'] as $attribute) {
                $attributeOptions[$productAttribute['label']][] =
                array('id' => $attribute['value_index'],
                'label' => $attribute['label'],
                'mainId' => $productAttribute['attribute_id'] );
                }

                }
                print_r($attributeOptions);

its show all options but need only in stock attributes. please help


texts: Detect "was previous page from the same magento website?" If yes: then dont show APP notice

texts:
We have an APP popup that popups in mobiles. It depends on a meta param in the header.

We would like to create an if / else scheme like

if new visitor: print the meta param
else (if not new and already on site: : do not bother the visitor

Is there a quick session() method for this that we could use?


texts: Magento2: During reindex Serialization failure: 1213 Deadlock found when trying to get lock

texts:
During php bin/magento indexer:reindex

   SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: INSERT INTO `catalog_category_product_index` (`category_id`, `product_id`, `position`, `is_parent`, `store_id`, `visibility`) SELECT `cc`.`entity_id` AS `category_id`, `ccp`.`product_id`, ccp.position + 10000 AS `position`, 0 AS `is_parent`, 18 AS `store_id`, IFNULL(cpvs.value, cpvd.value) AS `visibility` FROM `catalog_category_entity` AS `cc`
     INNER JOIN `temp_catalog_category_tree_index_2843287b` AS `cc2` ON cc2.parent_id = cc.entity_id AND cc.entity_id NOT IN (1)
     INNER JOIN `catalog_category_product` AS `ccp` ON ccp.category_id = cc2.child_id
     INNER JOIN `catalog_product_entity` AS `cpe` ON ccp.product_id = cpe.entity_id
     INNER JOIN `catalog_product_website` AS `cpw` ON cpw.product_id = ccp.product_id
     INNER JOIN `catalog_product_entity_int` AS `cpsd` ON cpsd.entity_id = cpe.entity_id AND cpsd.store_id = 0 AND cpsd.attribute_id = 97
     LEFT JOIN `catalog_product_entity_int` AS `cpss` ON cpss.entity_id = cpe.entity_id AND cpss.attribute_id = cpsd.attribute_id AND cpss.store_id = 18
     INNER JOIN `catalog_product_entity_int` AS `cpvd` ON cpvd.entity_id = cpe. entity_id AND cpvd.store_id = 0 AND cpvd.attribute_id = 99
     LEFT JOIN `catalog_product_entity_int` AS `cpvs` ON cpvs.entity_id = cpe.entity_id AND cpvs.attribute_id = cpvd.attribute_id AND cpvs.store_id = 18
     INNER JOIN `catalog_category_entity_int` AS `ccad` ON ccad.entity_id = cc.entity_id AND ccad.store_id = 0 AND ccad.attribute_id = 54
     LEFT JOIN `catalog_category_entity_int` AS `ccas` ON ccas.entity_id = cc.entity_id AND ccas.attribute_id = ccad.attribute_id AND ccas.store_id = 18 WHERE (cpw.website_id = '1') AND (IFNULL(cpss.value, cpsd.value) = 1) AND (IFNULL(cpvs.value, cpvd.value) IN (2, 3, 4)) AND (IFNULL(ccas.value, ccad.value) = 1) ORDER BY `cc`.`entity_id` ASC
     LIMIT 31500 OFFSET 500 ON DUPLICATE KEY UPDATE `category_id` = VALUES(`category_id`), `product_id` = VALUES(`product_id`), `position` = VALUES(`position`), `is_parent` = VALUES(`is_parent`), `store_id` = VALUES(`store_id`), `visibility` = VALUES(`visibility`)

I try:

reset all indexes
also I try fix issue with deadlock:
https://www.tigren.com/fix-deadlock-error-reindexing-magento-2/

Still the same issue. Any other solution?


texts: How to add Select All option in Export Settings of Magento 2

texts: I want to export one attribute of product. For this I have to select all other attributes one by one for excluding. Can anyone please tell me How can I add the Select All option to select all the option at once for exclude.


texts: SQLSTATE[23000]: Integrity constraint Error when updating products via CRON

texts:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento_database`.`catalog_product_entity_media_gallery_value`, CONSTRAINT `FK_CAT_PRD_ENTT_MDA_GLR_VAL_VAL_ID_CAT_PRD_ENTT_MDA_GLR_VAL_ID` FOREIGN KEY (`value_id`) REFERENCES `catalog_produc)

I have scoured the internet but nothing seems to work. I have seen the Magento DB repair tool but I believe that would make things more complicated.


texts: Add product custom attribute to order export?

texts:
Anyone has any clue on how to add custom product attribute to order export?

Cant realy show any code, cause I have only been googling so far, as I have no clue on how to handle something like this.

Much appreciated!


texts: add tranaction ID via API to order and complete order

texts: after place order in magento and get order ID how can i add transaction ID to order ? is it possible with API ? i get transaction id from bank server and want to add it to order and complete order status.


texts: Magento2 import products via csv into multiple categories

texts:
In Magento2 multistore view website. I have a csv I am trying to import products into the site and identify which categories in each storeview (root category) each product should be in. However it seems to just create some of the categories even though they exist already instead of just adding the products to all the listed categories
As an example in the categories column in on of my rows I have a value like
YD/Color Diamonds, RJ/Color Diamonds
Should I wrap the entire cell in a double quotes or just trying to figure out how it will know the comma is not indicating a separate column and should all be treated as one column cell.
I get an error like
Category "RJ/Color Diamonds" has not been created. URL key for specified store already exists.


texts: Shopping Cart Price Rule for items from two categories

texts:
I was recently requested to create a Price rule which applies a discount of 15% to shopping cart containing items from two different categories. I've configured the Conditions as below:

However I'm not able to work out the Actions rules, adding 2 categories (128, 129) in wouldn't help.

I'm using Magento ver. 1.9.2.2.

Any thoughts?

Cheers


texts: Magento 2 class not exist error occurs when overriding a controller

texts:
error:
a:4:{i:0;s:68:"Class namespace\modulename\Controller\CustomLoginPost does not exist";i:1;s:6711:"#0 C:\xampp2\htdocs\magento2\lib\internal\Magento\Framework\Code\Reader\ClassReader.php(19): ReflectionClass->__construct('namespace\modulename...')

di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Customer\Controller\Account\LoginPost" type="namespace\modulename\Controller\Account\CustomLoginPost" />
</config>

anyone can help? I have checked the path is correct, the module is enabled.


texts:
Is there any way to serve scaled images?

Specially, when images are already uploaded like product images or some CMS page images.

I'm not looking for some solution that will scale images one-by-one. I need something that can scale uploaded images automatically.

I'm working on speed optimization and want to improve serve scaled images score.


texts: How to identify if region_id is required or region (region_name) is required?

texts:
I am creating customer address in Magento 2 programatically.

In few countries the region_id is required, which can be obtained from the model \Magento\Directory\Model\Region, for example forUS country and in few countries the region is required which is a text field, for example for Italy country.

How to identify if region_id is required or region (region_name) is required for the country?


texts: What could cause the installation of most payment-related modules lead to VAT being calculated twice?

texts:
This is a problem we have been experiencing with the websites of two of our clients for a very long time. Almost every single time we install a module that is in some way related to payment functionality, VAT is calculated twice. This leads to a lengthy process of having a support team fix it and extensive testing, and them ultimately also not knowing exactly where the issue had originated from. Because this costs a lot of time, we are prioritising finding out where this problem is originating from right now.

We have gone over all the system settings and have tried out numerous of combinations, spent hours in total debugging code and scouring Google, but to no avail. We're just finding it very odd that it happens with almost every payment-related module, so there must be a common point where things turn bad.

Could anybody point us into the right direction?

Thanks a lot in advance.


texts: Configure Magento to use Elasticsearch for Magento ver. 2.2.4 Open Source

texts:
I am trying to implement Elasticsearch to my Magento ver. 2.2.4 Open Source web store.

I followed this guide step by step until I hit a snag where "Elasticsearch" is not available in the admin configuration area.

  From the Search Engine list, click Elasticsearch or Elasticsearch 5.0+ as the following figure shows. (The Elasticsearch 5.0+ option is not available for Magento 2.1.)

The option for Elasticsearch is missing and the only available search engine is MySQL.

I ran composer update thinking it might be the code base missing some files but after successfully accomplishing the composer update, the issue still persist.

Should the "Elasticsearch" Search Engine option be available in the configuration out of the box for this version of Magento? Is this option available for anyone?


texts: How to create new product slider in home page in Magento 2

texts: I want to create a new product slider in home page of my website without using external extension.


texts:
I'm usign this script to cancel an order. But adding some logs on the function that I using I can see that I have a problem with that.

if ($allInvoiced) {
        echo "allinvoiced";
        return false;
 }

 public function getQtyToInvoice()
{
    if ($this->isDummy()) {
        return 0;
    }

    $qty = $this->getQtyOrdered()
        - $this->getQtyInvoiced()
        - $this->getQtyCanceled();
    return max($qty, 0);
}

The order was generated programmatically with a chemo payment method. What's wrong here ?.


texts: Getting dropdown value from system.xml issue in Magento

texts:
This is part of my system.xml:

<config>
    <sections>
            <mynamespace_mymodule translate="label" module="mynamespace_mymodule">
        .....
                    <groups>
                       <display translate="label" module="mynamespace_mymodule">
                            Display settings
                            <frontend_type>text</frontend_type>
                            <sort_order>20</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                            <fields>
                                <showlinks translate="label">
                                    Custom Text
                                    <frontend_type>select</frontend_type>
                                    <sort_order>10</sort_order>
                                    <show_in_default>1</show_in_default>
                                    <show_in_website>1</show_in_website>
                                    <show_in_store>1</show_in_store>
                                    <source_model>adminhtml/system_config_source_yesno</source_model>
                                </showlinks>
                            </fields>
                        </display>
                     </groups>
                 </mynamespace_mymodule>
            </sections>
</config>

This is how I got the value from my dropdown:

Mage::getStoreConfigFlag('mynamespace_mymodule/display/showlinks', 1)

and the results is always false. I checked the value from db and it is 1 or yes. The selected value is yes but it always returns me NOT null but false. Why ?


texts: Magento 2.3 CE: Remove/Disable RabbitMQ feature completely

texts:
Does anyone know any way to disable/remove RabbitMQ from Magento 2.3.3 as this involves queues like product_action_attribute.update , product_action_attribute.website.update and exportProcessor?

While doing product bulk attribute update/product import, the queue table is populating even if RabbitMQ is not installed.

Due to this catalog is not updating.
Console commands like queue:consumers keeps running.

Saw this also - Which core modules use RabbitMQ in Magento Open Source 2.3?


texts: order (picking list) pdf, sort by location code

texts:
We have made a PDF picking list, which also shows the location codes of the products.
The attribute for the location code is:

$Location = Mage::getModel('catalog/product')->load($item->getProductId())->getData('location_shelf');

I am trying to sort the list by location code

So far I only found a piece of code which sorts the products by name

$items = $order->getAllItems()  ; // Gets items --- need to sort them first!
        $_sortedItems = array();
            // build array, inserts order items into array and sort

        foreach ($items as $item) :
            $_sortedItems[$item->getName()] = $item;
        endforeach;

        ksort($_sortedItems);
        foreach ($_sortedItems as $item) {   //pass sorted items back one at a time in alpha' order

        if ($item->getParentItem()) {
            continue;

            }

When I change the item->getName into

$item->getData('location_shelf')

It just shows 1 product on the picking list.

How do I correctly adjust it so my picking lists sorts by location_shelf?


texts: How to display the my menus in the header section that is to the top of the home page?

texts:
I want to display the my categories in the header section that is to the top of the home page.I already try the code in page.xml like this.But it doesn't work .
Please help.

<block type="core/text_list" name="content" as="content" translate="label">
    <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
        Navigation Bar
        <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
    </block>
Main Content Area
</block>


texts: Best Practice of OCI Connection (Punch Out) for Magento 2

texts:
Do you know what is the best practice of OCI connection (Punch out) with Magento 2?
If you guys have any good reference of middleware / module please let me know.
Thanks.


texts: magento 2.3.4 installtion stuck at 99% without error at Installing admin user


texts: Magento 2 : How can we identify phpexecutable or not?

texts:
I'm working on creating custom console in which i have to add code that will check php is executable using below class.
If PHP executable then which PHP version is executable.

SyncCommand.php

namespace Soft\Multi\Console\Command;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Shell;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputOption;
use Exception;
use Magento\Framework\App\Filesystem\DirectoryList as DirectoryList;
use Magento\Store\Model\StoreManagerInterface as StoreManagerInterface;
use Magento\Framework\App\State as AppState;

use Symfony\Component\Process\PhpExecutableFinder as PhpExeFinderFactory;

class SyncCommand extends Command
{
    protected function execute(InputInterface $input, OutputInterface $output)
    {
            //accepting results of $pathToCallPHP variable as php71, php, php73 etc...
             $pathToCallPHP = $this->_phpExecutableFinder->getData();

    }
}

di.xml

<type name="Magento\Framework\Console\CommandList">
        <arguments>
            <argument name="commands" xsi:type="array">
                <item name="syncCommand" xsi:type="object">Soft\Multi\Console\Command\SyncCommand</item>
                </argument>
        </arguments>
    </type>


texts: grant total not reduced after applay cupon code in magento 1.9

texts: i have applayed a cupon code which have 100 rs rduction after apply this code i can see the discont as 100 but the grant total have no change please refer the picture


texts: Magento 2: this.options.jsonConfig.mappedAttributes is undefined

texts:
Configurable products are not changing the pictures while selecting attributes like size or color.
I really don't know how to fix this problem. It is two days now and I still facing the same issue.

I noticed while I click on the attribute, it's giving me this error on the swatch-renderer.js.

this.options.jsonConfig.mappedAttributes is undefined

This is the default swatch-renderer of Magento 2.3.3, not a custom one from the theme.

Can you please help me with that?
PS, I'm on Magento 2.3.3

Thanks!


texts: Magento: Which is optimized way to get single record?

texts:
load by Id

$data = Mage::getModel('module_name/model)->load($id);

or

//collection by filter

$data = Mage::getModel('module_name/model)->getCollection()->addFieldToFilter('id',$id);


texts: Troubleshooting "Base table or view not found"

texts:
I run into the following when trying to enable Flat Categories in the admin config. I don't know why mm is being referenced as a table and do not see it declared as a table in any of our modules.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_db.mm' doesn't exist, query was: UPDATE `mg_core_config_data` SET `scope` = ?, `scope_id` = ?, `path` = ?, `value` = ? WHERE (config_id='102')

I also see this when trying to enable quick search when editing attributes.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_db.mm' doesn't exist, query was: UPDATE `mg_catalog_eav_attribute` SET `attribute_id` = ?, `frontend_input_renderer` = ?, `is_global` = ?, `is_visible` = ?, `is_searchable` = ?, `is_filterable` = ?, `is_comparable` = ?, `is_visible_on_front` = ?, `is_html_allowed_on_front` = ?, `is_used_for_price_rules` = ?, `is_filterable_in_search` = ?, `used_in_product_listing` = ?, `used_for_sort_by` = ?, `is_configurable` = ?, `apply_to` = ?, `is_visible_in_advanced_search` = ?, `position` = ?, `is_wysiwyg_enabled` = ?, `is_used_for_promo_rules` = ?, `search_weight` = ?, `is_recipe_attribute` = ?, `is_product_searchable` = ?, `is_recipe_searchable` = ?, `api_attribute_id` = ? WHERE (attribute_id = '147')


texts: How to get the css file path in magento?

texts:
<link rel="stylesheet" type="text/css" href="magento/skin/frontend/default/default/css/styles.css" media="all" />

how can i get this path in magento ?

i have tried this code but it didn't work.

<link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/styles.css');?>">


texts: I am using Magento ver. 1.11.2.0. Site is having an error in admin side "cache_dir is not writable".  Site frontend is working fine and in admin side only dashboard and configuration first page  is working. other pages in admin side is giving this error "cache_dir is not writable". I checked the cache and var folder permission ,permission is set to 0777. I deleted the cache folder too. error is still not gone.


texts: Add column of order SKU's to admin orders page

texts:
I'm adding a custom column to admin orders table (based on this article).

protected function _prepareCollection()
{
    // here I'm fetching data
    $collection = Mage::getResourceModel($this->_getCollectionClass())
        ->join(
                'sales/order_item',
                '`sales/order_item`.order_id=`main_table`.entity_id',
                array(
                    'skus'  => new Zend_Db_Expr('group_concat(`sales/order_item`.sku SEPARATOR ",")'),
                    'names' => new Zend_Db_Expr('group_concat(`sales/order_item`.name SEPARATOR ",")')
                    )
            );
    $collection->getSelect()->group('entity_id');

    $this->setCollection($collection);

    return parent::_prepareCollection();
}

protected function _prepareColumns()
{
    $this->addColumn('sku', array(
    'header'    => Mage::helper('Sales')->__('Skus'),
    'width'     => '100px',
    'index'     => 'skus',
    'type'        => 'text',

    ));
    $this->addColumn('names', array(
    'header'    => Mage::helper('Sales')->__('Name'),
    'width'     => '100px',
    'index'     => 'names',
    'type'        => 'text',
    ));

    // e.t.c.
}

Which works fine, I can now see the SKU's and product names of orders in this table.

Except one big flaw, each SKU and Product Name is printed twice . I assume that it's because configurable products are sold.

Is there any way to prevents this duplication and force it to select only simple products?


texts: Grouped products's simple products exempt from shopping cart rule. How to fix?

texts:
When a simple product (SP) associated to a grouped product is added to the cart, this works differently from a typical configurable-simple product setup. The product added to the cart is actually the simple product itself (as opposed to, say, a configurable product with its associated SP's attributes), and the shopping cart price rules are not being applied because the SPs are not visible. I've tested this by making the SP in the cart visible and price rule applies.

Reference (Promotion -> Shopping Cart Price Rules -> Conditions tab):
It's a simple rule that give a $3 discount if an item in the shopping cart is included in category 547. The product (simple) being added and its parent (grouped) are both in category 547. Action tab filtering is left empty.

Where do I start looking to debug and find a solution for this? I'd like to see if it's possible to make these rules apply to the Not Visible SPs, but I can't seem to find a place to get started. Any ideas?


texts: Magento index management getting error while reindex data

texts: In magento version 1.7.0.2 whenever i tried to reindex data it takes long time and after that it will display 500 Internal Server Error.


texts: Magento 2: Sort Product Collection by date added to category

texts:
From a category page, I grab the product collection from the category object like so

$productCollection = $category->getProductCollection()->addAttributeToSelect('*');

However, the results are sorted in the reverse order of how they appear on the category page. The products on the category page are sorted in the same way they are in the Magento admin (which I assume is simply 'date added to category').

Is there a way I can use

$productCollection->setOrder()

In a way that returns my collection in the same order as they appear on the category page?


texts: PHP Fatal error: Call to undefined function is_resource() in Zend/Log/Writer/Stream.php line 115

texts:
Magento has been really slow and unresponsive lately for me.
Sometimes restarting the server solves it, but the problem reoccurs after a few good minutes.

Here's what I found in error.log (apache2).
A lot of those fatal errors:

  PHP Fatal error:  Call to undefined function is_resource() in /home/sites/billyguyatts.com.au/docs/lib/Zend/Log/Writer/Stream.php on line 115

Could someone point me in the right direction ?


texts: How to move Magento 2 Search bar to be centered

texts:
Here is my current search bar:

And here is my expectation:

I still don't understand about how to make centered search bar like that ?

here is my html (from inspect element):

Skip to Content

            Default welcome msg!

        Sign In

Create an Account

Toggle Nav

Search

        <form class="form minisearch" id="search_mini_form" action="http://senheng.local/catalogsearch/result/" method="get">

                    Search

                    <input id="search" type="text" name="q" value="" placeholder="Search entire store here..." class="input-text" maxlength="128" role="combobox" aria-haspopup="false" aria-autocomplete="both" autocomplete="off">

        Advanced Search

                <button type="submit" title="Search" class="action search" disabled="">
                    Search
                </button>

        </form>

        Compare Products

any help would be really appreciated.


texts: "NetworkError: 404 Not Found - http://localhost/magento2/pub/media/"?

texts:
i run magento2 get error

  "NetworkError: 404 Not Found -
  http://localhost/magento2/pub/media/"

i tried run php -f bin/magento setup:upgrade

get
missing permissions magento2/pub/media

how do fix it. nay help?


texts: Problem export product - no valid data sent

texts:
I need to export all the products in Magento 1.9 with the module Mage_ImportExport, but in export setting when I select product as Entity Type, Magento doesn't load any Entity Attributes.

So when I click on "Continue" I get the error "No valid data sent"

I've checked the web server log file that gives this error:

PHP Fatal error:  Call to a member function getName() on a non-object app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line 171

the error part of that Product.php is:

   /**
 * Initialize categories ID to text-path hash.
 *
 * @return Mage_ImportExport_Model_Export_Entity_Product
 */
protected function _initCategories()
{
    $collection = Mage::getResourceModel('catalog/category_collection')->addNameToResult();
    /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
    foreach ($collection as $category) {
        $structure = preg_split('#/+#', $category->getPath());
        $pathSize  = count($structure);
        if ($pathSize > 1) {
            $path = array();
            for ($i = 1; $i < $pathSize; $i++) {
                $path[] = $collection->getItemById($structure[$i])->getName();
            }
            $this->_rootCategories[$category->getId()] = array_shift($path);
            if ($pathSize > 2) {
                $this->_categories[$category->getId()] = implode('/', $path);
            }
        }

    }
    return $this;
}

and the line 171 is:

 $path[] = $collection->getItemById($structure[$i])->getName();

any suggestions?


texts:
I'm having problems getting the Catalog Search indexer to complete. All other indexers are fine.

Here's the exact error taking from shell

Catalog Search indexer process unknown error:
Notice: Undefined offset: 1 in
/home/tbyte/public_html/vendor/magento/module-catalog-
search/Model/Indexer/Fulltext/Action/Full.php on line 384

Inside full.php on line 384 is this:

$productIndex = [$productData['entity_id'] => $productsAttributes[$productData['entity_id']]];

indexer:status shows 0 in backlog but catalog search status as Reindex Required.

I've tried the following to no avail:

Reinstall of Magento by renaming env.php
Commands such as setup:di:compile, db-schema upgrades, cache:clean etc

This problem is stopping products from being displayed on the front end.

I'm running Magento 2.2.6


texts: Getting product stock levels / quantities in Magento 2.3

texts:
I have the following code to get a product collection but how do I also return back the stock levels too

$products = $this->productCollectionFactory->create()
            ->addAttributeToSelect('*')
            ->addAttributeToFilter('type_id', Type::TYPE_SIMPLE);


texts:
Is there a way to get the list of all Locale for set up stores?

As you would get Locale for the current store with

\Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Framework\Locale\Resolver')->getLocale();


texts: Magento2 - Use placeholder {{base_url}} in multistore

texts:
In magento1 you can set the base url's in a multistore like this:
{{base_url}}en/, {{base_url}}nl/, etc.

Trying that in Magento 2 will result in the following Error:

  Invalid Base URL. Value must be a URL or one of placeholders: {{base_url}}

Is there a workaround to achieve this without editing the database directly?

What I want to achieve is to work with multiple developers in one database.


texts:
I have a lot of custom attributes but one of them is not editable via Magento backend anymore. It gives 500 error on edit and server logs says:

AH01797: client denied by server configuration: /.../app/etc/local.xml

Could not find a solution for it yet. Any suggestions?

EDIT

It seems that the real error is caused by a memory limit problem:

[19-Jun-2017 07:35:04 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 85 bytes) in /.../lib/Zend/Db/Statement/Pdo.php on line 291

So I will check the database, maybe there are too many attributes or something like this. If that does not work I could try to increase the memory limit, but I think I will check the database first.

EDIT2

I have checked the database and the memory limit:

The memory limit is set to 256M and I think that's ok or do you think I should increase this?

Furthermore, I have seen that the table eav_attribute_option contains 459465 entries. So I have checked this table and this is the result:

COUNT(option_id) | attribute_id
2 |18
28 | 177
34158 | 185
218 | 186
425059 | 188

The attributes with id 185 and 188 contain a lot of options. So I have checked this and the attribute with id 188 is the attribute which produces the 500 error. This attribute is called 'color_frontend' and contains some color options like black, blue and so on, but the sum of this colors will not reach the count of 425059. So I will check the import script which imports product data and adds this options. There must be an issue with the add option function.


texts: I installed a new extension last night and in the morning my whole server crashed. I ran the SSH command mysqlcheck --all-databases -r and I noticed it said the table customer_grid_flat doesn't exist on one of my websites. How do I repair this?


texts: Validation for file type not working in File Upload in Magento 2 Store Configuration

texts:
I am following below Article to upload file in store configuration:
https://www.mageplaza.com/devdocs/how-file-upload-sytem-configuration-magento-2.html

I have defined custom backend model as mentioned in this artice to validate my file type:

<?php

namespace Vendor\Package\Model\Config\Backend;

class CustomFileType extends \Magento\Config\Model\Config\Backend\File
{
    /**
     * @return string[]
     */
    public function getAllowedExtensions() {
        return ['csv'];
    }
}
?>

and in system.xml, it's like this:

<field id="import" translate="label" type="Magento\Config\Block\System\Config\Form\Field\File" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Import CSV</label>
                    <comment>Comment</comment>
                    <backend_model>Vendor\Package\Model\Config\Backend\CustomFileType</backend_model>
                    <upload_dir>upload</upload_dir>
</field>

but it's not working. I can upload image files too!!

What's wrong with this code?


texts: How can I set a global variable in Magento 2?

texts:
The scenario is I want to set my variable to a global variable from a phtml file and call in a module file or block file.

So what would be some code or tutorial link that I set my variable to global and call in a module or class file?


texts: How to manually import/migrate orders & customers from Magento1 to Magento 2 database tables?

texts:
What is the best way to manually move the orders and customers to Magento 2.2.6 from Magento 1.8.1 without any third part extensions? there are around 100 records only.

I was able to migrated all the data and setting initially from the "clone" version of the live Magento 1 database to fresh Magento 2 database last month using the data-migration-tool. Now the magento 2 site is ready, i need to migrate the new orders and customer (for the past month, around ~50 records) to the Magento 2 site. I'm not able to get the delta migration tool work correctly. What is the way to manually move those records over, perhaps which database tables to copy the records from?

Thank you!


texts: Magento pagination is not working after removing some products from a collection

texts:
In the category products page I need to display the products in order which we select from the option drop down (price, position or name). At the same time I need to move Out Of Stock products last.

I override the Mage_Catalog_Block_Product_List_Toolbar setCollection() function and added below code:

$outOfStock = array();
        foreach ($collection as $key => $item) {
            $product = Mage::getModel('catalog/product')->load($key);
            $inStock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getIsInStock();
            if ($inStock == 0) {
                $outOfStock[] = $product;
                $collection->removeItemByKey($key);
                //Mage::log($inStock, null, 'sssssssssss.log');
            }
        }

        // re-add $items
        foreach ($outOfStock as $item) {
            $collection->addItem($item);
        }

Using this code all the Out Of Stock products are moving to the end of the collection. But the issue is after adding above code pagination is NOT working correctly.
All the products display in one page.

Can anyone please help me. Thank You.


texts: How to add/remove links on my account navigation magento2?

texts: How to remove "Billing Agreements" and "My Wishlist" links from the navigation menu on customer account page?


texts:
I have a feature in my cart where the customer can pick to add last minute deals to their shopping carts and for products which are grouped products a pop up box appears showing the different options for them to select.

My only problem is that once they select their options and click add to cart the product gets added but the page doesn't refresh so they wont be able to see a product has been added to their cart until they refresh the page.

So my question is how to i make thepage refresh when the Add to cart button is pushed.

The code that creates the button is this:

                    <?php if($_product->isSaleable()): ?>
                        <?php echo $this->getChildHtml('addtocart') ?>
                    <?php endif; ?>

I tried just adding this code instead as this is how i have added buttons before:

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->helper('checkout/cart')->getAddUrl($product)?>')"><?php echo $this->__('Add to Cart') ?></button></button>

But when i do that nothing shows up.

this is the code in the addtocart.phtml (creates the button)

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

    <img src='<?php echo $this->getSkinUrl('images/ajax-loader.gif')?>'/>
    <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>
    <?php echo $this->getChildHtml('', true, true) ?>

<?php endif; ?>

If you can help thank you, if you need more information just let me know.


texts:
In Magento 1.8.1.0 the button for layout update at CMS > Widgets does not work any longer. According to the Chrome Developer Tools it has to do with javascript and the notice I get is:

  Uncaught ReferenceError: WidgetInstance is not definedonclick @ (index):997

What would cause such an error?


texts: All categories are disappeared in my menu?

texts:
Now I have a very big problem. All categories disappeared from my menu.

All categories are active. I tried to refresh the cache and reindex all index but it didn't work.

Any idea for my problem ?


texts: Dynamically add simple products to bundle

texts:
We have 1000 simple products that we want to be a part of a bundle. We are not sure if the Admin interface for bundle products can handle 1000 simple products.

So we want to load specific simple products that we show to the user as a choice and add the simple product they choose to the bundle that goes into the cart quote.

Example:

User goes to product page for the bundled product.
We load a collection of 20 simple products of the 1000 simple
products and the user chooses one of those products.
We add the simple product to the bundle and add it to the cart
quote.

Need to know how I would do this and if it is possible.


texts: What is "Phoenix/Moneybookers" module for?

texts:
Is there any special reason that there is one module installed in community folder by default?

app\code\community\Phoenix\Moneybookers

Just found one line in Mage_Adminhtml_Helper_Help_Mapping $_moduleMappings

'system_config/edit/section/moneybookers' => 'payment/gateways.html',

... that is used in Mage_Adminhtml_Helper_Data::setPageHelpUrl()

Is it used anywhere? Does somebody use it? Can I remove w/o doubt?


texts: How to remove ''Attribute' section block in magento 2 backend (admin page) add new product page?

texts: Using magento 2.2, in admin page. I want to add new product without using Attribute . So how to remove this block?


texts:
How can I retrieve the cost of fixed delivery (Handling Fee) that is set in administration, in one of my phtml files, so I can show the value of it?

Thank you


texts: How To Start Submitting Magento2 Extension on Magento Marketplace

texts:
Hi its been around almost a year working with magento and during this times, i have learned so many new things form this community about magento first of all thanks you for all the support.
Now coming back tot he question, since i have deep interest working with modules so i want to start up with module development and upload it on the magento market place. so i know every process in details as i know that will be certain points that will be missed in magento 2 documents.
https://devdocs.magento.com/guides/v2.4/extension-dev-guide/package/package_mktpl.html
so i want someone to explain it to me, who has already worked on this and has an understanding
Thanks


texts: Building Multistore Magento Shop: One code base vs. different installations, pro and contra

texts:
We have to create and run (and do fulfillment) a webshop for 3 customers. Different urls, different layouts, different products but same product types (clothing). Each shop at least two languages.
You can run it in one Magento installation but I think about to use 3 separate.

What are pros and contras for each strategy?

I collected the following by now:

Pro single installation / contra separate:

deployment easier
only one version repo, fixing a bug needs 3 changes
one connection to ERP instead of 3
administation much easier, a new attribute with 50 options and translations is not nice to insert 3 times for example

Contra single installation / pro separate:

Magento slowsdown with many products
reindexing problems with many products, with one-third it could run
if you have to invalidate caches, only on shop is affected
heavy traffic concerns only one and not all shops
special needs of customers can be implemented faster (and with less if statements:))


texts: How to add custom button to product page to three different places (magento 2)?

texts:
Button position decide by store owner(using admin panel). There are three positions.if user select test01 button's position others shouldn't be display.(Display only one place depend on user decision)

Here is my xml code.
`

<referenceBlock name="product.info.addtocart">
  <block class="Magento\Catalog\Block\Product\View" name="test1.tab" template="testbutton::catalog/product/view/toptoaddtocart.phtml?id=test1" group="main_info"></block>
</referenceBlock>

<referenceBlock name="product.info.main">
  <block class="Magento\Catalog\Block\Product\View" name="test2.tab" template="testbutton::catalog/product/view/toptoaddtocart.phtml?id=test2" group="main_info" after="product.info.addtocart"></block>
</referenceBlock>

`
 Previously I tried with 3 .Phtml pages but it effected to fail varnish cache test.Now I'm using one phtml file. Now cache issue is ok. but button display in three places.How can resolve this issue?


texts: I need to validate text fields in magento shipping address popup in checkout page.I can edit validation for other forms locally.I tried many thing still not able to find the solutions.please send the location of file in magento folder and where to change the validation??


texts: Mangento2 : Use default loader for all process

texts:
Magento2 use loader for specific portion which are being updating.
i.e minicart section,product image section,estimate shipping.
I want show default loader in page.
How can I do that?


texts: Magento 2 Override default header template

texts:
I have created my own theme by extending the Magento/Blank theme.

Now want to override the default header template files link.phtml, topmenu.phtml, header.phtml which is located at vendor/module-theme/view/frontend/templates into my theme.

My theme is located at app/design/frontend/MyModule/MyTheme

So please let me know how I can override and what will be the structure for it.


texts: Magento2 : How to make a redirect with params

texts:
I have a form with several inputs.(text and file).

    <form id="form-configurator" class="form-configurator " name="formconfigurator" action="index/toto" method="post" enctype="multipart/form-data">
       <input id="input-file" name="file" type="file" class="input-text required-entry" accept=".txt"></input>
       <input id="input-foo" name="foo" type="text" class="input-text required-entry"></input>
       <input id="input-bar" name="bar" type="number" class="input-text required-entry"></input>
       <input name="submit" value="the Name" type="submit" class="button nav-anchor" id="OrderButton"></input>
    </form>

The form submission calls a controller in which I manage to get the form parameters.
At the end of the controller execution, I have redirect it to another page :

class toto extends \Magento\Framework\App\Action\Action
{
    protected $_resultPageFactory;
    protected $_resulFactory;

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

    public function execute()
    {
        $post = $this->getRequest()->getPost();
    ....
    $resultRedirect = $this->_resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT);
                $resultRedirect->setPath('foo.html');
                return $resultRedirect;
}

The redirection works but I do not manage to pass parameters.

(I found an alternative solution by adding to the url ?params=, but i would like them to be hidden like in POST)

Thank you for your help


texts: Protocol "https" not supported or disabled in libcurl

texts:
I am trying to install an extension in my magento store through Magento Connect but I am facing the below issue. I checked my php info and curl is enabled.
The extension I a installing is http://connect20.magentocommerce.com/community/TBT_Enhancedgrid

Error is

If anybody has the solution for this please help me to fix this ..

Thanks in advance .


texts: Add to Compare: is there known exploitation?

texts:
Last week, one of my site received a bruteforce attack. When I check log/reports, I see this in my report:

  a:5:{i:0;s:313:"SQLSTATE[23000]: Integrity constraint violation: 1452
  Cannot add or update a child row: a foreign key constraint fails
  (DB_Name.catalog_compare_item, CONSTRAINT
  FK_CAT_CMP_ITEM_PRD_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY
  (product_id) REFERENCES catalog_product_entity (entity_id) ON
  DELETE CA)";i:1;s:2627:"#0
  /lib/Varien/Db/Statement/Pdo/Mysql.php(110):
  Zend_Db_Statement_Pdo->_execute(Array)

  {main}";s:3:"url";s:451:"/catalog/product_compare/index/items/495,543,1957,1960,1963,2192,2195,2593,2643,5656,5659,5663,5667,5670,6913,6914,6915,6916,6917,6918,6919,6920,6964,6965,6966,6967,6968,6969,6970,6971,6975,6978,6979,6980,6986,8319,9386,9397,9467,9470,9473,9476,9895,..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%afetc/passwd/uenc/aHR0cHM6Ly93d3cuZGlnaXRhbGNpbmVtYS5jb20uYXUvY2xlYXJhbmNlP3Bvd2VyX2FtcF9zcGVha2VyX2NoYW5uZWw9MzAxJmFtcDtwcmljZT0xNTAwLQ,,/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

Interestingly, these lines are different for each report:

/%5c../%5c../%5c../%5c../%5c../%5c../%5c../etc/passwd/uenc/

..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%afetc/passwd/uenc

Are there any known vulnerability in compare function? How can we deal with this?


texts: Using foreach change the position of my product collection

texts:
The best way to explain this issue is showing an example:
In the product list.phtml I had the following
<?php
     $logger->info($_productCollection->getData());
     foreach ($_productCollection as $_product){
         $logger->info('id product ' . $_product->getEntityId());
     }
     foreach ($_productCollection->getData() as $_product){
         $logger->info('id product with array ' . $_product['entity_id']);
     }
?>

My collection has the next data
array (
  0 =>
  array (
    'entity_id' => '172',
    'sku' => '139373',
    'cat_index_position' => '0'
  ),
  1 =>
  array (
    'entity_id' => '147',
    'sku' => '144486',
    'cat_index_position' => '5'
  ),
  2 =>
  array (
    'entity_id' => '148',
    'sku' => '144485',
    'cat_index_position' => '6',
  )
)

The first foreach I get the next log
id product 147
id product 148
id product 172

In the second foreach:
id product with array 172
id product with array 147
id product with array 148

The first foreach is changing the position of my collection regarding the 'entity_id'. The second foreach is the order that I want but I need the $_product object and not the array.
Why my collection is changing the order of  my products?


texts: How to remove handling fees if customer select pick from store?

texts:
I am using extra fees extension, if customer choose shipping method : Pick from store how to remove Handling fees(extra fees extension).

  What event used to check if customer chooses to pick from store in
  checkout page, if customer chooses to pick from store how to remove or
  hide handling fees.

If i use https://stackoverflow.com/a/40486717/11697039  what is my event.


texts:
I have a Magento 1.8 CE and I figured out that when using "Product Flat Catalog", the attribute "image" is not collected.
How can i add that attribute to "Product Flat Catalog"
It is not possible to set "Use for Listing" from Manage Attributes.

Any other way to do that?


texts: Add the Options List to the email template when sharing Wishlist

texts:
I have been looking into adding the the custom options list (located in app/design/frontend/CUSTOMTEMPLATE/default/template/wishlist/options_list.phtml) in the email that is sent when sharing the wishlist via email.

I have also found the thread about the function being used (https://stackoverflow.com/questions/15821118/finding-a-magento-method-definition-specifically-getoptionlist) but I do not understand it.

I tried copy and pasting the code in options_list.phtml into the wishlist/email/items.phtml file, but obviously that does not work. I literally just need to list out the custom options that were saved to the wishlist items, inside the email that is sent when sharing.

Anyone know how to do this?


texts: Search results are from our test site instead of the live site. Magento 1.9

texts: When you go to my site https://www.gesusa.com and search for example Maxjax, the items in the result goes to https://test.gesusa.com/


texts: Magento 2.2.5: Admin login page redirect loop 301/302 after installing SSL and enabling HTTPS

texts:
Preconditions

Ubuntu 18.04 DigitalOcean droplet
Nginx 1.1.4
MariaDB 10.1.34 (MySQL 15.1)
PHP 7.1 (Using FPM)
Redis server 4.0.11

Steps to reproduce

Download Magento 2.2.5 via Composer
Install Magento 2.2.5 via CLI using existing database
Install SSL certificate.
(At this point the website is functioning properly).
Enable https on magento frontend and admin.
Execute setup:upgrade,setup:di:compile,indexer:reindex,cache:flush and setup:static-content:deploy in that order.

Expected result

Frontend is displayed without any security warnings.
Admin is displayed without any security warnings.

Actual result

Frontend is displayed without any security warnings.
Admin is stuck in 301/302 redirect loop
I can see in the headers that the SSL certificate is recognised as valid.

Notes

I have this problem running 2.2.5 with nginx and redis, no varnish, all on a single digitalocean droplet.

I have read that it can be to do with cookie configuration and set cookie_path to "/" and cookie_domain to both ".example.com" and "example.com", neither of which have produced successful results. I have made changes to the default nginx config provided by magento as suggested above but that wasn't successful either. The nginx config file for my website is as follows:

upstream fastcgi_backend {
         server  unix:/run/php/php7.1-fpm.sock;
}

server {
        listen 80 default_server;
        listen [::]:80 default_server;
        index  index.php index.html index.htm;
        server_name  example.com www.example.com;

        set $MAGE_ROOT /[web_root]/magento;
        set $MAGE_MODE production;

        access_log [path_to_access].log;
        error_log [path_to_error].log;

        include /[web_root]/magento/nginx.conf.sample;

        return 301 https://$server_name$request_uri;
}

server {
        listen 443 ssl;
        index  index.php index.html index.htm;
        server_name example.com www.example.com

        ssl_certificate /path/to/ssl.crt;
        ssl_certificate_key /path/to/ssl.key;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers [ssl_cipher];
        ssl_session_cache    shared:SSL:10m;
        ssl_session_timeout 24h;
        keepalive_timeout 300s;

        set $MAGE_ROOT /[web_root]/magento;
        set $MAGE_MODE production;

        access_log /path/to/access.log;
        error_log /path/to/error.log;

        include /[web_root]/magento/nginx.conf.sample;
}

Edit

I raised this as an issue on github and was advised that I should set the unsecure base url to https, then remove the 301 redirect from my nginx config. I've done this, restarted the server and re-deployed magento to ensure everything is completely fresh. Deleted browser cache and disabled caching in code inspector prior to visiting website and admin page still returns a redirect loop.

Edit #2

I looked at app/etc/env.php and noticed that, alongside the usual base, media, static etc. entries that are found within the system>web>... entry in env.php, there was another entry at the bottom of the file with just the base urls, both set to http.

Although they are duplicate entries, I didn't want to delete them because I'm not sure why magento has created them (I've never manually edited the env.php file for this instance). Instead, I just updated every value which began "http://" with "https://...".

Now I can access the admin panel, but the configuration options for secure URLs in Stores>Configuration>General>Web>Url Options are greyed out and the frontpage no longer redirects to https, though there is no mention of http anywhere in the config file.

I guess that it is greyed out because I'm running in production mode, but I want to make as few changes as possible to the system because it's so close to functioning.


texts: How to add a custom form in a custom payment method

texts:
I've created a custom payment method in Magento.

The custom payment method requires additional fields to be filled in and are required for that specific payment method only.

I've found an answer in this post: Magento 2 - How to add a custom field to checkout and then send it

But this will add custom fields in every payment method...

So my question is, is it possible to add custom form in a specific payment method?


texts: Magento Upgrade - Is there any DB change after magento upgrade

texts:
I have done Magento version 1.9.1.1 upgrade to Magento 1.9.3.8. in local machine.

Now, is there any new DB changes in my local machine DB?

I am planing to a add files only to LIVE server. Is this works fine ?

I am not sure about these.

Can any one guide me regarding this ?


texts:
I tried to reposition my cart block to a other header location.
Since then I am getting this javascript error which is annoying since I only repositioned a block.

Uncaught TypeError: Unable to process binding "foreach: function (){return { data:cart().items,as:'item'} }"
Message: Unable to process binding "foreach: function (){return $parent.getRegion($parent.getItemRenderer(item.product_type)) }"
Message: Cannot read property 'simple' of undefined

This is the block i repositioned.

  <block class="Magento\Checkout\Block\Cart\Sidebar" name="minicart" as="minicart" after="store_language" template="cart/minicart.phtml">
                <arguments>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="types" xsi:type="array"/>
                        <item name="components" xsi:type="array">
                            <item name="minicart_content" xsi:type="array">
                                <item name="component" xsi:type="string">Magento_Checkout/js/view/minicart</item>
                                <item name="config" xsi:type="array">
                                    <item name="template" xsi:type="string">Magento_Checkout/minicart/content</item>
                                </item>
                                <item name="children" xsi:type="array">
                                    <item name="subtotal.container" xsi:type="array">
                                        <item name="component" xsi:type="string">uiComponent</item>
                                        <item name="config" xsi:type="array">
                                            <item name="displayArea" xsi:type="string">subtotalContainer</item>
                                        </item>
                                        <item name="children" xsi:type="array">
                                            <item name="subtotal" xsi:type="array">
                                                <item name="component" xsi:type="string">uiComponent</item>
                                                <item name="config" xsi:type="array">
                                                    <item name="template" xsi:type="string">Magento_Checkout/minicart/subtotal</item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                    <item name="extra_info" xsi:type="array">
                                        <item name="component" xsi:type="string">uiComponent</item>
                                        <item name="config" xsi:type="array">
                                            <item name="displayArea" xsi:type="string">extraInfo</item>
                                        </item>
                                    </item>
                                    <item name="promotion" xsi:type="array">
                                        <item name="component" xsi:type="string">uiComponent</item>
                                        <item name="config" xsi:type="array">
                                            <item name="displayArea" xsi:type="string">promotion</item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>


texts: I have database table and it has couponcode. There is same coupon code for same product. I have made the limit on couponcode. When someone uses the couponcode, i want to delete the number from total coupon. lets say i have a table named socialcoupon and it has row named coupon code and total number of coupon. each time someone uses the coupon, it get stored in database but i want to be able to count how many coupon are used.


texts: How to reduce stock in inventory when order is placed and not when shipped . "Decrease Stock When Order is Placed"is already set to yes , still count does not decrease on order placement.


texts: Change store id of the order at the time of checkout

texts:
In my website i can change the store as per the region from the front end , but while placing the order , i want to change the order store id as per the product
vendor region store id even if the website is in another region(store id) . How can i set the store id as per the product's vendor region store id while checking out the order.


texts:
I want to delete the Disable product completely, through Observer! Programatically
Like if we have a Disable Product, We have to delete it.

  Product is disabled an event is triggered and remove that product from
  customers cart


texts: How to check what suppee patches have been installed on Magento

texts:
there are multiple patch are available.
that we install in our site

i just want a script to find out which patch are install in my magento site.

anyone help?


texts: Magento 2 compile css error during upgrade

texts:
I have made some changes in CSS and upgrade as usually, it gives that error but suddenly hide from and no prob will come on CSS deploying but now it struck and I have no idea why.
I tried to recompile and then upgrade but this error is not going and CSS is not coming on front-end.
Another error comes after a long wait which is mmap() function that I also don't know of.


texts: Test all soap endpoint api with Wizdler chrome extenssion

texts:
We can check rest api with all the parameter detail from swagger so I would be highly appreciated if you guys have tested SOAP api with any tool then please guide me.
I have installed Wizdler chrome extenssion but don't know how to use it with magento2 SOAP api.
In which Url I can get all the SOAP endpoint xml definition and make compatible to run it with Wizdler
All services like this URL::
Dummy Soap API


texts: How to use the Zend SOAP adapter in a Magento2 payment gateway

texts:
I would like to make a SOAP request to a payment gateway doing so the Magento2 way. Unfortunately I am struggling with what to me seem incomplete developer docs and a lack of examples to borrow online. I am not wanting to send the customer off to some payment gateway page, I need to have the checkout page take the payment and retrieve a token.

The instructions I have struggled with are here:

https://devdocs.magento.com/guides/v2.2/payments-integrations/payment-gateway/gateway-client.html

It says:

  Following is the illustration of how a Zend client can be added in di.xml:

...and then gives no further information on how to use the Zend SOAP classes.

I have had a look at a few other payment gateways and have yet to find one using the SOAP client. Some payment gateways including the Braintree gateway use their own library for communicating with the server.

Does anyone have any knowledge of a payment gateway that uses the suggested method of using the Zend SOAP client to communicate with the payment gateway?


texts: Magento 2 call customer/address/new/ form in popup

texts:
I am looking for solution to add new address form in my custom module phtml file.This form will save with ajax.

I have no idea about it.Please help me.


texts:
I'm trying to import 500 images (at a time, 13000 total) using a csv.

I keep getting the following error:

  Imported resource (image) could not be downloaded from external
  resource due to timeout or access permissions in row(s).

The images are in var/import, and the permissions are set to 777

The file validates without any issues, but errors out once I hit the import button.
Does anyone know how to solve it ? Thanks in advance.


texts: Top navigation menu merge with accout button

texts:
New to Magento 2, so sorry if I'm asking silly question, but i really need some help here. My boss wanted to create a new website using the new Magento 2.3 for his company. So we bought hosting, install Magento 2, give permissions, install theme etc.

I'v created a top menu navigation according to my boss likes about witch category to appear in the top of the menu and to set up the way he likes it. The theme is responsive and he likes it, but there is a bug of the css or simply of the menu rendering showing on the picture below. The Add to cart button, The wish list button and the, Add to cart button.

I simply tried to rearrange the categories in the Catalog->Categories , and there is a bit of satisfaction in there, if i make it that way. But because of responsiveness of the theme on other devices the menu and the buttons still appears that way on the scree(see screenshot).

Pls help.

I tried this -> Topmenu Nav not Rendering

Working on this solution right now, but I'm not sure will it help.

Any advice is gratefully appreciate


texts: Magento 2.2.2 display catalog price rule on category page for configurable items

texts:
I have a magento 2.2.2 based website and the site consists mostly of configurable items.

My issue is when I create a catalog price rule when you go to a category page it just shows the price of the item and it is only when you click on a product and view the product detail page and select a configurable item do you then see the discounted price.

So is there any off the shelf/default magento2 setting to make the category pages show the discounted price?


texts: How to capture the User ID using magento's customer Token?

texts:
How do I make a call to that URL that captures the  User ID, using Magento customer Token in magento 2 rest API?

How Magento 2 makes calls in-between for the APIs ?


texts:
is it possible to load customer model using only token?

One of my method generate a token this way:

$token = Mage::helper('customer')->generateResetPasswordLinkToken();
            $customer->changeResetPasswordLinkToken($token);

and my second method takes this token in argument. Based on that i have to get customer model beacuse i want to change his password.


texts: Script to import product thumbnails automatically magento 2 help

texts:
I tried to execute the following script

$_product->addImageToMediaGallery($returnUploadedImagePath, array('image','thumbnail','small_image'), false);

I am getting vendor error , is there a script to upload images to avoid the
error

  Fatal error: Uncaught Magento\Framework\Exception\LocalizedException: The image does not exist.
  /vendor/magento/module-catalog/Model/Product/Gallery/Processor.php on line 131


texts: Magento 2.1: Update shipping rate on providing zipcode in cart page

texts: In the UPS shipping method, when we type zip code the shipping rate will be automatically calculated based on the zip code provided. The same thing I have to customize in flatrate too. I have my custom function which returns the shipping rate on providing the zip code. I can call that function on providing the zip code in cart page (Summary Block). Please help me to write that code. I tried to find the ajax call running on typing the zip code. How can I add the same feature as in ups to flaterate. Anybody help please.


texts: New Admin Module created showing 404 error

texts:
I'm building an Admin module for the first time by following this tutorial

I have created everything & the module is showing in the backend, but when  I clicked the submenu of my module, instead of showing the controller content, what i can see is the "page not found" html page !!

The config details :

<config>
<modules>
  <Pgs_AramexSync>
    <version>1.1.0</version>
  </Pgs_AramexSync>
</modules>
<global>
  <models>
    <aramexSync>
        <class>Pgs_AramexSync_Model</class>
    </aramexSync>
  </models>
<helpers>
    <aramexHelper>
        <class>Pgs_AramexSync_Helper</class>
    </aramexHelper>
</helpers>
 <events>
      <catalog_product_save_after>
        <observers>
            <aramexSync>
                <class>aramexSync/observer</class>
                <method>productUpdate</method>
            </aramexSync>
        </observers>
    </catalog_product_save_after>
</events>
</global>
<admin>
<routers>
    <aramexHelper>
        <use>admin</use>
        <args>
            <module>Pgs_AramexSync</module>
            <frontname>aramexsync</frontname>
        </args>
    </aramexHelper>
</routers>
</admin>
<adminhtml>
<menu>
    <menu1 translate="title">
     <title>Aramex Warehouse Sync</title>
        <sort_order>90</sort_order>
            <children>
                <menuitem_1>
                    <title>Prepare Shipments</title>
                    <action>adminhtml/aramexsync/warehouse</action>
                </menuitem_1>
            </children>
    </menu1>
</menu>
<acl>
    <resources>
        <admin>
            <children>
                <menu1 translate="title">
                    <title>Aramex Warehouse sync</title>
                    <sort_order>90</sort_order>
                    <children>
                        <menuitem_1>
                            <title>Prepare Aramex Warehouse Shipment</title>
                        </menuitem_1>
                    </children>
               </menu1>
           </children>
       </admin>
    </resources>
 </acl>
<acl>
    <resources>
        <admin>
            <children>
                <system>
                    <children>
                        <config>
                            <children>
                                <aramexSync_options>
                                    <title>Pgs Aramex Sync Settings</title>
                                </aramexSync_options>
                            </children>
                        </config>
                    </children>
                </system>
            </children>
        </admin>
    </resources>
</acl>

The controller :
App->local->Pgs->AramexSync->controllers

<?php

     class Pgs_AramexSync_WarehouseController extends Mage_Adminhtml_Controller_Action{
    public function indexAction() {
        $this->loadLayout();
        $this->_addContent($this->getLayout()->createBlock('core/template'));
        echo "Hello World";
        $this->renderLayout();
    }
}

I am working in Magento 1.9, I can't figure out what is wrong with the code.


texts: How to export attribute values with their ids?

texts: I need to get all attribute values with their ids into a .csv file. Is it possible to export this data by creating an advanced profile or something? Need the easiest option.


texts: Magento 2 search by Chinese words is not working

texts:
We are developing a site with product contains multiple languages (English, Traditional Chinese and Simplified Chinese). The search function for english is working fine but it failed to search product using Chinese.

Note: We are using Magento v2.0.8


texts: Two cart price rule - don't apply the both discount at same time

texts:
I have two cart price rules.
The first rule 5% on all products on the cart.
second on one product - if quantity is one of 2, 4, 6, 8...
when I use this option on the second rule ( Discard subsequent rules ): The first rule will not be applied to the product until the second rule is not met.
when I apply the condition on the first rule ( If total quantity  is not  2  for a subselection of items in cart matching ALL  of these conditions: SKU is  PR/10190  )
it works fine but if the quantity is 3 both rules will apply.
what I want to do apply the second rule on quantity 2 and apply the first rule on the rest of quantity 1.


texts: Read only connection for an admin extension

texts:
I'm just adding the clean reports community extension to my site and very useful it is (Thanks Kalen Jordan et al)
https://github.com/kalenjordan/custom-reports

Part of the docs sensibly suggest limiting this to a read only connection to prevent sql injection should anyone get into the admin area, but i'm just not sure how to do that. I'm aware of the config resources section with the _read, and i can see that this extension allows configuration of a named connection - the helper method that gets the connection reads

    $resource       = Mage::getSingleton('core/resource');
    $connectionName = Mage::getStoreConfig('reports/cleansql/default_connection');
    if (!$connectionName) {
        $connectionName = 'core_read';
    }
    return $resource->getConnection($connectionName);

My questions are, is core_read automatically read only? if not how do i setup an additional connection that is genuinely read only, i assume using a different mysql role?

TIA


texts: How to know all available methods and how to use them

texts:
I'm still learning how to use Magento and I see that it has lots of useful methods. However, my only way of learning that a method exists, and how to use it, remains looking at code that's already done, asking, or searching in the Internet.

How should I do when I need something specific? In the official documentation in Magento's webpage there is not a complete reference. It's not like in Java, with Javadoc, for example.

How did you do, when you were in learning phase, to know what is available to use? Is there any website with good information about that?


texts:
Got a English and Dutch Store View

When I do Translate Inline for example for the Dutch Store View he also use that Translation for the English Store View and the other way around.

Someone an idea what that can be?