texts: Layout broken after installing german language pack

texts:
I installed the german language pack from this site as descripted: https://github.com/splendidinternet/Magento2_German_LocalePack_de_DE
I copied all files to /app/i18n/splendid/de_DE/

remove rm pub/static/frontend/Magento/luma/de_DE/js-translation.json
php bin/magento setup:static-content:deploy -f
php bin/magento setup:upgrade
rm -rf var/di this folder does not exist
php bin/magento setup:di:compile

After that the links and text are in german but the layout is broken:

In the source of the site the link to the file is:
 "baseUrl": "http://127.0.0.1/magento2/pub/static/version1604958349/frontend/Magento/luma/de_DE"

The number is equal with the number in the deployed_version.txt file.
The pub\static folder looks like:

I think there is the folder missing with the version number in it.
I cleaned the cache several times, deployed and did a reindex but this all does not work and I don't get the folder generated. What else can I do? Thanks


texts:
Web Page

I've been trying to correct that wrap unssuccesfully, it's just messed with the cloud-zoom... Im using a custom theme i've bought and even with the original style.css the problem persists. Thanks in advance!

Problem:

Problem http://puu.sh/lnWPF/caffe66c5a.jpg


texts: Magento 2 - Minified JS/CSS not generated in pub/static

texts:
When enabling minify js and minify css within admin my storefront breaks. The markup is trying to call the minified files however these are not generated causing a lot of not found errors in browser console.

The store is in production mode and I have tried deploying static content and flushing all caches.

This is only an issue on the second store front however and the other seems to work perfectly with all js / css merged and minified correctly and generated within pub/static. For the second store front only non minified files seem to be present.


texts: Using SearchCriteria and FIlterBuilders is it possible to have a nested AND condition inside ORs?

texts:
So I know how to create AND condition using the addFilter and how to add OR conditions using FilterBuilder however if I wanted to do do a search like (only using searchCriteria, no direct collection work).
WHERE (email = '12345@email.com' AND status = 'pending') OR (status = 'complete' AND is_virtual = 1)
Is there a nice simple way to do this ?


texts:
In my custom product type model, I have:

public function prepareForCartAdvanced(Varien_Object $buyRequest, $product = null, $processMode) {
    $product->setMyProperty(500);
    return parent::prepareForCartAdvanced($buyRequest, $product, $processMode);
}

In my product type's price model, I have:

public function getPrice($product) {
    // This displays 500
    echo $product->getMyProperty();
    exit;
    // This does not return 500 - the product's price in cart is 0.00
    return $product->getMyProperty();
    // This does return 500 - the product's price in cart is 500.00
    return 500;
}

Why can I not return $product->getMyProperty() even though the value I have set is properly echoed?

No matter what I do, I am only able to set the return price if I key a number in directly. I cannot set any value in the price model based on something passed through $product.


texts: Failed to upload images in Magento 1.9.3.1

texts:
Every time I upload an image through Product Add form, I always get this error:

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

Script: http://domain.com/js/lib/uploader/flow.min.js:2

Anyone got a clue?


texts: Magento 2: I want to change Item collection sequence on cart page

texts: I want to change cart sequence on cart page Price ascending wise. Please share a page link item collection for cart page.


texts: Magento 2 : Import product with custom csv

texts:
I have a custom product csv file https://drive.google.com/file/d/1f9t4REhn8-Ant58zRB6S0yRx1Rh1PctX/view?usp=sharing
how can I import it in Magento 2. Do you have any idea?


texts:
I had been doing some work on my development site and the next day the error displayed in the screenshot showed. I also cannot navigate away from this page. How do I fix this?

Error Message "A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later." on Account Information screen


texts: Change price at "checkout_cart_update_items_after"

texts:
I have some rules that change the price of product 'Z' if
the quantity of products 'X' is 'Y' In the cart, how can I check the quantity of a product in the cart and change the price of that product using the checkout_cart_update_items_after event, because I need this checked after clicking the update button or whenever I change the cart also helps.

more specifically what I need to know is how to change the price and get the quantity with this event
Any help is welcome!

Magento 2.3.3
Xampp
Win 10


texts: How to display total qty product in list.pthml

texts:
Under product name, I need to display total stock quantity of product.
I have used below code:

<?php
     $_productNameStripped = $block->stripTags($_product->getQty(), null, true);
 ?>
<?php /* @escapeNotVerified */
     echo $_helper->productAttribute($_product, $_product->getQty(), 'quantity_and_stock_status');
?>

But it's returning 0 for all.
Any solution?


texts: Unable to find Address views/.phtml files even with Template Path Hints

texts:
I need to be able to change this view (only very slightly to show the address ID)

The problem is, even with Admin Template Hints on I can't figure out where the relvant files are stored? Looking through the directory structure there isn't anything obvious either.

Has anyone else come across this? Is there another way of find out where these are?


texts:
I got this Fatal Error whenever I go to System > Permissions > Roles and Click any Role.

  Fatal error: Class 'Mage_Magentix_Fee_Helper_Data' not found in /public_html/app/Mage.php on line 547

but I can locate this:

  /app/code/local/Magentix/Fee/Helper/Data.php

What could be the possible solution to this?


texts: How to count custom data by custom attribute in magento 2

texts:
i have data array like this

array(1) { [0]=> array(3) { ["name"]=> string(6) "Ärzte" ["id"]=> string(2) "53" } }
array(1) { [0]=> array(3) { ["name"]=> string(15) "Bijouteriewaren" ["id"]=> string(2) "58" } }
array(1) { [0]=> array(3) { ["name"]=> string(7) "Optiker" ["id"]=> string(3) "110" } }
array(1) { [0]=> array(3) { ["name"]=> string(31) "Reisebüros & Reiseveranstalter" ["id"]=> string(3) "120" } }
array(1) { [0]=> array(3) { ["name"]=> string(2) "DJ" ["id"]=> string(2) "66" } }
array(1) { [0]=> array(3) { ["name"]=> string(10) "Damenmoden" ["id"]=> string(2) "65" } }
array(1) { [0]=> array(3) { ["name"]=> string(2) "DJ" ["id"]=> string(2) "66" } }
array(1) { [0]=> array(3) { ["name"]=> string(2) "DJ" ["id"]=> string(2) "66" } }
array(1) { [0]=> array(3) { ["name"]=> string(22) "Bordelle & Laufhäuser" ["id"]=> string(2) "61" } }

How to count data by id?

My code

$getBranche = $block->getBranchesBySellerId($subAccount['seller_id']);
foreach ($getBranche as $branche) {
?>
     <a href="<?php echo $branche['link'] ?>"><?php echo $branche['name'] ?>
<?php
}

My function getBranchesBySellerId()

public function getBranchesBySellerId($sellerId) {
    $nameBranche = $this->getBranche->getBrancheByIdSeller($sellerId);
    $id = $this->getBranche->getIdBranche($nameBranche);
    $selectedBranches[] = [
        'name' => $nameBranche,
        'id' => $id,
        'link' => $this->getUrl('branche/collection') . '?branche=' . $id
    ];
    return $selectedBranches;
}

UPDATE

Code : $this->getBranche->getBrancheByIdSeller();

public function getBrancheByIdSeller($sellerId){
    $customer = $this->customerModel->load($sellerId);
    $branch = $customer->getResource()->getAttribute(self::ATTRIBUTE_SERVICES)->getFrontend()->getValue($customer);
    return $branch;
}

It get all branche

EX : Count " ID = 66 " = 3


texts: Page with contact form scrolls to bottom on load

texts:
I have a problem with my website. On loading it scrolls automatically to the bottom.

It is because there is a contact form with focus on name. How can I remove this focus?

Site


texts: change logic stock status for visibility product view

texts:
i would like to change logic visibility:status
i want logic work like this

if any simple(child)product has qty > 0 Show product status in stock else show out of stock.
My code is
app/design/frontend/default/mythem/template/catalog/product/view/type/default.phtml

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

    <?php if ($this->displayProductStockStatus()): ?>
    <?php if((int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty() > 0): ?>

<?php echo $this->__('Availability:') ?> <?php echo $this->__('In stock') ?>

        <?php else: ?>

<?php echo $this->__('Availability:') ?> <?php echo $this->__('Out of stock') ?>

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

it logic working but issue is if configurable product has qty > 0 show out of stock.

i want  this logic just work for simple(child products)


texts: magento 2: dealing with module setup version when rolling back a deployment

texts:
Given the scenario:

 an update to a module is deployed and immediately results in breaking the checkout

The expected reaction could be to rollback the deployment.  However, with the way magento 2 handles module versioning (if a module's schema or setup version was altered during deployment and setup:upgrade was ran) this would result in an error requiring your module to match version listed in the setup_module table.

The only way I know how to resolve this error would be to either change the module version to match the db version after rolling back the deployment or to manually alter the module version number in the db back to its previous version after the rollback.

I am wondering

Why the magento team decided to have magento throw an error if the module setup or schema version does not match the version in the db?
What is the rollback strategy magento recommends given such a scenario?

...a warning in the logs would seem to be a better option to me rather than throwing a fatal error and forcing downtime.


texts: I need to add a icon instead the search input form and when I click on this icon to display the search input form? something like minicart.


texts: Which tables do I have to export to get to store specific products?

texts:
In which table of database could I export product title and meta for a determined store?

I need to take english titles and meta for products from my store id 3 (the english store)


texts: Let's say I'm creating a shop that sells and prints basketball jerseys and I want the customers to be able to enter the name and number that they want on the back of the jersey when they buy them. How do I accomplish this in Magento?


texts: Magento2 503 gateway timeouts when registering, placing orders or other transactional stuff

texts:
My Magento 2.1 installation seems to have issues with redirects after a transaction has been completed.
For example, registering as a customer gives a 503, placing a order gives a 503 and so on.

When viewing the back-end the transactions have been finished, when you refresh after register 503 you are nicely logged in and such.
When your checkout is still spinning the order has already been added in the back-end. Any clue?


texts: Customer group form field is not populating in form after save

texts:
I have added custom field in customer group but after save it is not populating in the form.
I have added field value in addValues function in _prepareLayout of form like below.but it is not display value in form.
// TODO: need to figure out how the DATA can work with forms
        $form->addValues(
            [
                'id' => $customerGroup->getId(),
                'customer_group_code' => $customerGroup->getCode(),
                'tax_class_id' => $defaultCustomerTaxClass,
                'mycustomfield'=>'test' /* this is my custom field */
            ]
        );


texts: Magento 2 delete search term through sql query

texts: I want to delete search terms with 0 search results from magento 2 database by writing sql query in file. How can I do this?


texts: Category grid doesn't show categories on homepage

texts:
I have multiple stores in my Magento. For each store I have created a home page in CMS > Pages > Manage pages. At the design tab I use this layout update XML code:

<reference name="content">
<block type="catalog/product_new" name="home-categories" template="custom/category_grid.phtml" after="-"/>

<!--
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<action method="setColumnCount"><columns>4</columns></action>
</block>
-->
</reference>

The result of including this code in the layout update XML textarea is that each category will be displayed at the homepage. See screenshots below:

Here the categories are working:
(the <ul> tag is included in the html)

Here the categories aren't working: (the <ul> tag is not included in the html)

The problem is that one store doesn't show the categories in the grid. I think that the solution to this problem lays somewhere else but I don't know where to look. Where can I look?

Update

The code of function getSelectSQL in "lib\Varien\Data\Collection\Db.php"

function getSelectSql($stringMode = false)
    {
        if ($stringMode) {
            return $this->_select->__toString();
        }
        return $this->_select;
    }


texts: How to display bundled products in category list when simple product is out of stock?

texts:
I'm trying to display the bundled product in the category product list on the frontend even when the simple product it concists of is out of stock. I only want to hide the add to cart button.

I've looked into changing the Mage_Bundle_Model_Product_Type class to return true on the stock check but that is not really a solution.

Is there a way to do this in a clean way either trough settings or by extending as little core code as possible?


texts: Magento 2: Admin price changes are not refreshing minicart immediately till checkout

texts:
I have added 1 product with it's price in Cart. It's value is 100 USD.

Now from backend I'm enabling Special Price & set it to 50 USD.

How can I directly apply that price in Cart? I know we can use Observer controller_action_catalog_product_save_entity_after after Admin Product Save & update quote_item table.

But it should be until checkout Whatever Paypal/Bank Transfer payment gateway.

I'm also changing price Group Wise/Tier pricing as well. Need to manage Group Wise Pricing & Special Price as well.

What is the best way to achieve this & how?

How to apply any price change like Special/Tier Price Immediately on Frontend for logged in or not logged in user who previously have that product in cart?

Strange: In Wordpress WooCommerce this case works fine.


texts:
I have added the cronetab.xml like below.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="customdesignsubcategories_cron">
      <job name="uploadFile_deletion" instance="KiwiCommerce\AdminActivity\Cron\Test" method="execute">
          <schedule>*/2 * * * *</schedule>
      </job>
    </group>
</config>

and also created the class in Directory like Vendor/Module/Crone like below but I could not check my cron is worked or not.

<?php

namespace KiwiCommerce\AdminActivity\Cron;

class Test
{
  protected $_logger;
  public function __construct(\Psr\Log\LoggerInterface $logger)
  {
      $this->_logger = $logger;
  }
  public function execute()
  {
      $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/system.log');
      $logger = new \Zend\Log\Logger();
      $logger->addWriter($writer);
      $logger->info('Your text message');
      exit;
  }
}

Above Message is not display in system.log file.

Please Help me to solve this issue.


texts:
I seem to be having a problem with my website roofmegastore.co.uk

The actual website works, however, when I try to access the admin page it comes up ERR_TOO_MANY_REDIRECTS. I checked env.php and the backend URL is definitely the same one as I had since the beginning. Any possible solutions to this?


texts:
how can I show cart items on any cms page?
So far I created a new block in my module

<?php

        namespace Yoursmartweb\Cinesolutions\Block;

        class CartSidebar extends \Magento\Framework\View\Element\Template
        {
            public function __construct(
                \Magento\Framework\View\Element\Template\Context $context,
                \Magento\Checkout\Model\Session $checkoutSession,
                array $data = []
            ) {
                $this->_checkoutSession = $checkoutSession;;
                parent::__construct($context, $data);
            }

            /**
             * Get quote object associated with cart. By default it is current customer session quote
             *
             * @return \Magento\Quote\Model\Quote
             */
            public function getQuoteData()
            {
                $this->_checkoutSession->getQuote();
                if (!$this->hasData('quote')) {
                    $this->setData('quote', $this->_checkoutSession->getQuote());
                }
                return $this->_getData('quote');
            }
        }

   And I created the phtml

    <?php
    // Get all visible items in cart
    $quote = $block->getQuoteData();

    foreach($quote->getAllVisibleItems() as $_item) {
        echo 'ID: '.$_item->getProductId().'
';
        echo 'Name: '.$_item->getName().'
';
        echo 'Sku: '.$_item->getSku().'
';
        echo 'Quantity: '.$_item->getQty().'
';
        echo 'Price: '.$_item->getPrice().'
';
        echo 'Product Type: '.$_item->getProductType().'
';
        echo 'Discount: '.$_item->getDiscountAmount();echo "
";
        echo "
";
    }

And i called the block in the cms page like this

  {{block class="Yoursmartweb\Cinesolutions\Block\CartSidebar"
  name="cart_sidebar"
  template="Yoursmartweb_Cinesolutions::cart_sidebar.phtml"}}

  But nothing shows up. Can anyone help me?

Thanks in advance


texts: Checkout page is blank, link has vanished and the cart button top has also vanished.

texts:
Everything was fine until the Checkout page went blank and then link has vanished and the cart button top has also vanished. Then If I add a product into the cart and then it goes to the cart page its just blank.

Compilation is disabled, mage_cart is enabled.

Please help


texts: After enabling the module created, browsing back to the page gives me blank page instead. Viewing the source of the page gives me basic html tags.


texts: Magento 2 run native product csv import programtically

texts:
I have been searching for a way of achieving this but so far no luck. I have also looked through the core and found where it is called (vendor\magento\module-import-export\Controller\Adminhtml\Import\Start.php) but can't work out where to define the CSV file to import.

I know I need to pass data to it like so:

Array
(
    [form_key] => 123456789xyz
    [entity] => catalog_product
    [behavior] => append
    [validation_strategy] => validation-stop-on-errors
    [allowed_error_count] => 10
    [_import_field_separator] => ,
    [_import_multiple_value_separator] => ,
    [import_images_file_dir] =>
)

Any one have any hints as to how I can run the native CSV import via code?

Thanks


texts: After being redirected to Paypal page, and click the Pay button i received this error.


texts:
So I've extended the Layered Navigation to include a few extra option collectables that are always there, regardless of filters applied.  I would like to have the Layered Nav show up on all category pages because of this, even when the category you're in doesn't have any products.  Where should I go about looking to force this?

Alright, as far as I've gotten;

I've used catagory_catalog_view_type_default.xml to get the block onto every page.  I was able to confirm that the block is being loaded up via a DD in the constructor.  However, the template simply does not get loaded up, even when I place items outside of the canShowBlock() check, which suggests to me there is some kind of check elsewhere.  Any ideas?


texts: How to get custom attributes in the search query of rest API

texts:
I try to get custom attributes of the customer in orders API. All attributes show in orders but the customer attribute not displayed in the search query
API:
http://127.0.0.1/test/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=customer_id&searchCriteria[filter_groups][0][filters][0][value]=4


texts:
After updating Magento 2 from version 2.1.7 to 2.1.8 there is no css loading for the backend (front end works fine). How can I get the css to load for the admin?

After deploying static content I got this error:


texts: Multi Site Magento store won't reimport a CSV of products that I just exported

texts:
I have two different sites for my magento store. Each site is originated in a different country. I am trying to create a configurable product with attributes such as colour and size. These attributes if they are set will have prices attached to them.

Ex:

color -> Red   -> 5$
color -> Black -> 10$
size  -> Small -> 20$
size  -> Large -> 30$

That would be the prices for one of the sites on those attributes. Then on the other site I would like to increase the prices on the color's. I can complete this using the magento admin panel and it works.

I would like to create it through importing a CSV. So I exported the working product through CSV then I deleted the product through the admin panel. Then I try to import the CSV back into the magento admin panel but I get the error "Product with specified super products SKU not found in rows" for all the _super_products_sku. This is because when I exported the product all the simple products were listed after the configurable product. I then switch the position of them and I don't get any errors when I check the data. But the item doesn't function as intended. Only some of the configurations show up and the prices for the different attributes are the same for both sites.

I can't upload the CSV's so if you would like to see them I can put them in a dropbox link and send them.

Any ideas would be appreciated


texts: Show Stock Level/QOH on the Sales_Order_Create_Search_Grid in the backend

texts:
We are trying to show a column containing the current Quantity on Hand for each product in the "Please Select Products to Add" search grid in the Magento Backend.

I have so far tried to follow two different post's answers:

https://stackoverflow.com/questions/17069097/magento-show-stock-levels-in-sales-order-create-search-grid
Magento add stock qty in backend new order creation

However get the column, the filtering works, but no QOH is shown, and if we view the source the td only contains a nbsp.

We are using Magento EE 1.13.1.0, so I suppose it's possible that our Grid.php is different than the one in 1.8x or 1.9x CE but it seems doubtful.

Does anyone have any feedback or suggestions on something we might try? I am not sure if I am allowed to paste the source from EE but can if it will help.

Edit:

Here is a screenshot the intended result (albeit broken):


texts: How to give back link to grid from custom admin phtml file in magento 2?

texts:
I have custom Admin grid in my magento 2.

In that each row has view link when I click on view it opens complete details (same as Edit) after that I should come back to admin grid when I click on Back button/link in that (view) phtml file.

How Do I achieve this ? Actually redirect url we can use in controller but in custom phtml what we should use?


texts: Magento 2: How to include my jquery lib in admin

texts:
How can i include my jQuery lib files in magento 2.

Updated

         <block class="Magento\Customer\Block\Account\AuthenticationPopup" name="authentication-popup" as="authentication-popup" template="account/authentication-popup.phtml">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="authenticationPopup" xsi:type="array">
                            <item name="component" xsi:type="string">Magento_Customer/js/view/authentication-popup</item>
                            <item name="children" xsi:type="array">
                                <item name="messages" xsi:type="array">
                                    <item name="component" xsi:type="string">Magento_Ui/js/view/messages</item>
                                    <item name="displayArea" xsi:type="string">messages</item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </block>

How dependencies of this file is set and how  they getting added


texts:
I want to add Currency parameter in Magento 2 page URL.Like

www.example.com/product.html?currency=GBP

Is there any way to do this?
Need help.Thanks

EDIT: Created a plugin but not working

di.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Product\Url">
        <plugin disabled="false" name="Digital_CurrencyCodeAddress_Plugin_Magento_Catalog_Model_Product_Url" sortOrder="10" type="Digital\CurrencyCode\Plugin\ProductUrl"/>
    </type>
</config>

module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
  <module name="Digital_CurrencyCode" setup_version="1.0.0"/>
</config>

registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Digital_CurrencyCode',
    __DIR__
);

ProductUrl.php

<?php
namespace Digital\CurrencyCode\Plugin;

class ProductUrl
{

    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    private $storeManager;

    public function __construct(
     \Magento\Store\Model\StoreManagerInterface $storeManager
    ){

        $this->storeManager = $storeManager;
    }
    public function beforeGetUrl(
            \Magento\Catalog\Model\Product\Url $subject,
            \Magento\Catalog\Model\Product $product,
            $params = []
    ) {

        if(empty($params) || (!empty($params) && !array_key_exists('_query', $params))){

            if(!array_key_exists('_query', $params)){
                $params['_query'] = [];
            }
            if(!array_key_exists('currency', $params['_query'])){
                 $params['_query']['currency'] =$this->storeManager->getStore()->getCurrentCurrency()->getCode();
            }

        }

        return [
            $product,
            $params
        ];
    }
}


texts: How to get all processing and pending orders programmatically?

texts: How can I get a list of all the orders in processing and pending status in Magento 2?


texts: Magento 2.3 Catalog Price Rules Is Not One Of Condition not working

texts: In Magento 2.3.3 I have created a new product type (based off a simple product) and upto now everything has been working correctly except for this one bug. if I use either Sku Is Not One Of or Is Not as a condition in Catalog Price Rule then the sku that I have added still gets added to the catalogrule_product table for that discount. I've also tried using multiple skus for Is Not One Of and again they don't get excluded. I also tried changing If All These Conditions Are True to False and the doing Sku Is or Sku Is One Of but again the same sku is being discounted and added to catalogrule_product. Any help with this would be much appreciated.


texts: Change the checkout form field classes and names

texts:
I am trying to figure out how to customize the checkout form by changing classes because I want to stylize it with bootstrap instead of the default Magento styles. I don't see them defined anywhere and with my reading and looking at the Magento developer documentation it looks like they are dynamically generated http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_field.html But in that documentation it doesn't look like there is any way of adding custom classes to the wrapper elements or anything.

This is the default output for the First Name:

        First Name

<input class="input-text" type="text" data-bind="
    value: value,
    valueUpdate: 'keyup',
    hasFocus: focused,
    attr: {
        name: inputName,
        placeholder: placeholder,
        'aria-describedby': noticeId,
        id: uid,
        disabled: disabled
    }" name="firstname" placeholder="" aria-describedby="notice-DPGHTAP" id="DPGHTAP">

I would prefer to have an output similar to this:

        First Name

<input class="form-control input-text" type="text" data-bind="
    value: value,
    valueUpdate: 'keyup',
    hasFocus: focused,
    attr: {
        name: inputName,
        placeholder: placeholder,
        'aria-describedby': noticeId,
        id: uid,
        disabled: disabled
    }" name="firstname" placeholder="" aria-describedby="notice-DPGHTAP" id="DPGHTAP">

Notice how there is now a form-group and form-control class added.

How does one accomplish this if everything is dynamically generated?


texts:
Is there a way to inject custom core_config_data into magento?

I would like to set web/secure/base_url, web/unsecure/base_url and some others config dynamic and depending on the host.

I tried to remove the core_config_data values from the database and inject a new XML node: default/web/secure/base_url to the config in the index.php.
But I think before the Mage::run() it's to early and after the Mage::run() it's to late to change the config.

Does someone tried something familiar or is there already a cool solution?


texts: How to load and update tier price for large products collection for more then 50000 products

texts:
We have more then 50000 products in our website and i want update tier price for existing website.
I have added code for update tier price for 4 customer groups. and it is working for 500 to 600 products. but when i want all products tier price then it is showing 500 error. please give me solution or  how to use callback function in magento2 so that i can update products tier price
I have used code like and it is working 500 to 600 products limit
 use \Magento\Catalog\Api\ProductTierPriceManagementInterface;
 include('app/bootstrap.php');
 $bootstrap = Bootstrap::create(BP, $_SERVER);
 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $state = $objectManager->get('Magento\Framework\App\State');
 $state->setAreaCode('frontend');
 $productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
 $productcollection = $productCollection->addAttributeToSelect('*')->setOrder('entity_id','ASC')->setPageSize(800)->load();;
 $i=1;
 $tierPrice= array();
 foreach ($productcollection as $product)
 {
         $p_id = $product->getId();
         $p_price = $product->getPrice();
         if($p_price >0)
         {
             $newPrice1=($p_price /2.5)*2;
             $newPrice2=($p_price /2.5)*1.8;
             $newPrice3=($p_price /2.5)*1.6;
             $newPrice4=($p_price /2.5)*1.4;
             $productRepository = $objectManager->get('\Magento\Catalog\Model\ProductRepository');
             $productObj = $productRepository->getById($product->getId());
             $tierPrice[0] = array('website_id' => 0,'cust_group' => 5, 'price_qty' => 1 , 'price' => $newPrice1);
             $tierPrice[1] = array('website_id' => 0,'cust_group' => 6, 'price_qty' => 1 , 'price' => $newPrice2);
             $tierPrice[2] = array('website_id' => 0,'cust_group' => 7, 'price_qty' => 1 , 'price' => $newPrice3);
             $tierPrice[3] = array('website_id' => 0,'cust_group' => 8, 'price_qty' => 1 , 'price' => $newPrice4);
             // $productObj->setPrice(103.59);
             $productObj->setTierPrice($tierPrice);
             $productObj->save();
             echo "Price Updated for Product Id : " .  $p_id."
";
             echo"Product count number " . $i."
";
         }
   $i++;

 } ```


texts: How to change Tax-class for 6000 products

texts: I've about 6000 products with empty TAX-CLASS, what is the best approach to correct it to a proper TAX-CLASS. All the products will get the same tax-class insteed of an empty one


texts: Magento 2: Recalculate bundle price with number from textfield

texts:
I cerated a bundle product and placed two input fields on the page for the user to input length and width. I would like to calculate a value and let set options of the bundled product depending on the input.
F.e.:
if calculation = 2 --> Choose option 1
if calculation = 3 --> Choose option 2

Two questions:
a. Where is the javascript placed that calculates the bundle?
b. It is probably possible to trigger a click with javascript. But maybe there is a smarter way.


texts: Magento 1.9.x Discounts deducted from Excl. Tax Price even when Including Tax is set in Apply Discount On Prices Settings

texts:
We struggle to make our Discount/Tax calculation working alright - we tried all possible settings and nothing seems to work as we need (and what we assume as usual need).

We need: Discount to be deducted from Incl. Tax prices, and tax calculation to happen after discount.

Example:

Product subtotal excl. Tax = 100.00
Product subtotal incl. Tax (VAT 20 %) = 120.00
Discount (Fixed amount discount for whole cart) = 70.00

Having following settings set in Tax > Calculation Settings:

[Apply Customer Tax] - After Discount
[Apply Discount On Prices] - Including Tax
[Apply Tax On] - Custom Price if available

We would assume this calculation logic:

Total paid by the customer = 50.00 (120 - 70)
Tax (VAT 20 %) = 10.00 (50 * 0.2)

However, what we get is this:

Total paid by the customer = 30.00
Tax (VAT 20 %) = 6.00 (30 * 0.2)

What is happening is this:
Discount gets deducted from Excl. Tax Price, instead of Incl. Tax Price (although it is the one which is set in Settings!).

Interestingly, if we change settings of [Apply Customer Tax] to "Before Discount", discounts (both fixed amounts or %) get deducted from Incl. Tax Price. Unfortunately we cannot use this option, as in this case tax get (obviously) calculated from before the discount price.

So the question is - what can we do to make the combination of

[Apply Customer Tax] - After Discount
[Apply Discount On Prices] - Including Tax

work as discount being deducted from Incl. Tax prices & tax being calculated from post-discount total? We assume it should work absolutely fine but it does not in our case and our IT agency cannot find a way to fix it.

If any of you have experience with this, we would be very grateful if you share your knowledge.

[Magento ver. 1.9.3.0]

Thank you.


texts: Magento 2 Backend: Make orderable qty per source and salable quantity

texts: There's a way to make orderable "Quantity per source" and "Salable quantity" coloumns on backend product list?


texts: i need to link the js file in admin inside pdate layout xml tab in magento 2

texts:
I need to link a JS file in admin inside update layout xml tab in magento 2
please give if you any solution.

<head>
    <script src="js/productcollection.js">
</head>


texts: Magento 2 Add to cart using Ajax on response from other domain

texts:
We have to add product into cart using on the bases of Ajax response from another domain on requesting Magento 2 Add to cart url or function.

Request url or domain:

  "xyz.com/checkout/cart/add/uenc/aHR0cDovL2NvbW1vbmNhcnQyLWxvY2FsLmJhbGZvdXIuY29tL3VjLXByb2R1Y3QtZGVtby10d28uaHRtbA,,/product/2/sid/6i79tqjdshfvt5o6avkhpb7jl4/category/1234567/id/2/"

Response domain: "localhost/"

So here is the problem:

Product has been added to cart but while getting response customer cart session has been changed to new and new quote id is created I.e fresh cart session will be created and existing products from the cart are wipeout and new added products will be shown only. Also on every response for the request having new session for cart.
On using request url on the browser its working fine and product has been added to cart as expected.

Issue is when we are using that add to cart functionality with Ajax or adding product after response from localhost domain has issue.
I guess response is coming from cross domain that’s why its creating problem?

If any one faced this kind of situation and have solution for Magento 2.1.6  will be appreciated.

NOTE: This the way Iam using is working fine in Magento 1 versions but not working in Magento 2


texts: Magento2: How to update products position in category via CSV?

texts:
I want update product position attribute in category through the CSV feed.
Anyone have any idea OR sample CSV which can accomplish my requirement.


texts: How to calculate tax in for configurable product in magento1.9?

texts:
I  am working on removing tax in certain condition of the product.I had overridden getFinalPrice() for this but unfortunately it is not working in case of configurable products.
Please help me in this


texts: Translate all magento1.9.2 emails in French language

texts:
We are running mangento1.9.2 website which contains two stores i-e English and French.

Now all the emails sent to users are only in English language but if the users in French store then email should be sent in French language.

Kindly guide me that how can I translate the magento emails into French.

Thank you


texts:
I install this module in fresh magento 2 but i just see on frontend shipping address module should show credit card fields.

here is module link
https://github.com/ajzele/B05032-Foggyline_Paybox

please advice how to ad form fields in this module if its not define.


texts:
How could I add a new JS Component, using required and following the Magento's pattern via an XML which I can determine a unique page (e.g. using a checkout_index_index.xml)

I don't want to create a PHTML just to add load a JS Component.


texts: How to add drop down menu for store change

texts:
I want to add a store change URL in the header nearby sign in (multi-store).

eg: the main website shows multi-store links


texts: Magento2: How I can change cart item price in API /V1/guest-carts/:cartId/items?

texts:
I add item to cart via API /V1/guest-carts/:cartId/items and I have to change price for someone items (if they has specific sizes for example).
Class handles this request:
\vendor\magento\module-quote\Model\GuestCart\GuestCartItemRepository.php
public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem)
{
    /** @var $quoteIdMask QuoteIdMask */
    $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartItem->getQuoteId(), 'masked_id');
    $cartItem->setQuoteId($quoteIdMask->getQuoteId());
    return $this->repository->save($cartItem);
}

How I can do that trick?
Updating price via Observer is doesn't seem to work for API:
Magento 2: Rest API "Checkout Cart Product Add After" event is not working


texts:
I try to override some core files and in my custom module I injected the dependencies like

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Checkout\CustomerData\Cart"
                type="MyVendor\Custom\CustomerData\Cart" />
    <preference for="Magento\Tax\CustomerData\CheckoutTotalsJsLayoutDataProvider"
                type="MyVendor\Custom\CustomerData\CheckoutTotalsJsLayoutDataProvider" />
</config>

the second one is getting executed but the first does not seems to use the requested file.If set a var_dump in my override file no output is generated


texts: How do I deserialize the return json to c# class

texts:
I am trying to deserialize the returned JSON to a simple POCO like I  normally would do with my integrations.  The issue I am having is that normally I would just grab an example json dump into an online converter and then use that class to handle my deserializations.  I would handle small issues as they came up.

Does anyone have a set of C# poco representing the classes returned by magento2?

My deserialization code:

 var orders = (MyProject.Magento2.Item)JsonConvert.DeserializeObject(response.content, typeof(MyProject.Magento2.Item));

Where MyProject.Magento2.Item is the POCO of the returned object.


texts: Buy 3 of a subset of products get x% discount

texts:
We are trying to set up a promotion where if you buy 3 of a subset of products you get x% discount.  It looked like we should be able to do this out of the box using sales rules conditions but I can;t get it to work.

Basically, I have set the rule conditions to be:

If ALL  of these conditions are TRUE :

If total quantity  equals or greater than  3  for a subselection of items in cart matching ALL  of these conditions:
    SKU  is one of  sku1,sku2,sku3

And the action to be:

Percent of product price discount 10%

When I add 3 of a the qualifying products (i.e. 1 of sku1 and 2 of sku2) I would expect to get a 10% discount but I'm still being charged full price.

Can anyone see what I'm doing wrong?  This has been tested on our dev site and a clean Magento install with sample data.


texts:
I've created a new module in magento 2 and I want to add some additional files so that I can create a calculator. I'm unsure where to create a file that calls the functions of my calculator class and where I can pass data into the functions.

Say I have a php file as follows, what would be my code and where would I be creating the file so that I can all these function?.

<?php

namespace Mage\Calculator\Model;

class Calculator{

public function divide($x, $y)
{
    return $x/$y;
}

public function multiplication($x, $y)
{
    return $x*$y;
}

}

Cheers


texts: Create credit memo for my payment method

texts:
I'm making a new payment method for Magento 1.9. for now I can make an order and have the invoice correctly. I wane to add the possibility to make credit memos using my payment method, but i can't find the way. This is how i pay the order:

    $order->setState(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW, true, 'Payment Success.');
    $order->save();

    $transaction = Mage::getModel('core/resource_transaction');
    $transaction->addObject($order);
    $transaction->addCommitCallback(array($order, 'place'));
    $transaction->addCommitCallback(array($order, 'save'));
    $transaction->save();

    $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
    $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
    $invoice->register();
    $invoice->getOrder()->setIsInProcess(true);
    $transactionSave = Mage::getModel('core/resource_transaction')
        ->addObject($invoice)
        ->addObject($invoice->getOrder());
    $transactionSave->save();

    Mage::getSingleton('checkout/session')->unsQuoteId();
    Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure'=> false));
    return;

I have this in my model:

  protected $_canRefund = true;
  public function refund(Varien_Object $payment, $amount) {
    return parent::refund($payment, $amount);
  }

But this do not allow the creation of a credit memo. I read here that natively, the Magento API doesn't support online refunds. You have to create a local version of it which implements some methods which are normally only called when raising credit memos in the admin. But after i implement the sample i was in the same place.
Please, someone have an sample to make an online refund API?


texts: Magento 2 - Add captcha to before order place button

texts: I'm developing a custom module to add captcha before place order button.


texts: I'm using magento 2.0.7 with custom theme and I get the following issue in all mails.But it is properly working in luma theme.


texts:
What's the right way to package a theme for the errors folder?

That is, Magento's serves its 503 page and Store Exception 404 pages out of the following folder

errors/*

The errors folder contains a mini-theming system that ships with a default theme

errors/default/

and has a local.xml system that allows users to change that theme.

errors/local.xml.sample

I know as an extension developer I can ship a custom theme for errors by using a namespaced folder

errors/packagename_modulename

However, is there anyway for me to activate this by default, short of writing some code to create/replace the local.xml file in this folder?


texts: How to change "Account Created In" value from the Customer grid in Admin panel

texts:
The customer has a value of "Account Created In".
They are also displayed in the customer grid.

If you change the value of "Send Welcome Email from" on the customer information edit screen,

The value of "Account Created In" will also change.

But the value of the customer grid does not change,

How do I change the values in the customer grid as well?


texts: Catalog Search gives different results every request : Magento 2

texts:
I did search several consecutive times for catalog search in the search box in the header of the store, but every time gave me different results as following:

Also, I can see this difference when use REST API :

  http://domain.com/index.php/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=search_term&searchCriteria[filterGroups][0][filters][0][value]=life&searchCriteria[sortOrders][0][field]=relevance

Can any body give an explanation ?


texts: how to update products from frontend side in magento 2?

texts: I need to update product from frontend side.so, is there any possibility  to update products from frontend side in magento2 ?


texts: Session data not saving through controller

texts:
I've got a couple controller that I'm trying to use to save and retrieve a custom piece of session data.  It works on my local development environment but doesn't work on my staging environment.  Here's the specs for my local environment:

Apache 2.4
PHP 7.0.16
Magento 2.1.5
Mysql 5.7

Here's the spec's for my staging environment

Apache 2.2
PHP 7.0.15
Mysql 5.6
Magento 2.1.5
Redis
Varnish

Here's my get controller:

<?php

namespace Foo\StoreLocator\Controller\Store;

class Get extends \Magento\Framework\App\Action\Action
{
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $customerSession;

    /**
     * Save constructor.
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Customer\Model\Session $customerSession
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Customer\Model\Session $customerSession
    ){
        $this->customerSession = $customerSession;
        parent::__construct($context);
    }

    public function execute()
    {
        $selectedStore = $this->customerSession->getSelectedStore();

        return $this->resultFactory
            ->create(\Magento\Framework\Controller\ResultFactory::TYPE_JSON)
            ->setData($selectedStore);
    }
}

Here's my set controller:

<?php

namespace Foo\StoreLocator\Controller\Store;

class Save extends \Magento\Framework\App\Action\Action
{
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $session;

    /**
     * Save constructor.
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Customer\Model\Session $customerSession
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Customer\Model\Session $customerSession
    ){
        $this->session = $customerSession;
        parent::__construct($context);
    }

    /**
     * @return void
     */
    public function execute()
    {
        $data = $this->getRequest()->getPostValue();

        $this->session->setSelectedStore($data);

        return;
    }
}

I'm calling the controllers via AJAX call on product details pages.  On my staging environment, the getter always returns null.  I thought maybe it was an issue with full page cache being enabled on my staging environment because I don't use any caching on my local environment, but I disabled full page cache on staging and the issue persists.

Any ideas what's going on and/or how to fix this issue?  I've reworked things to use a cookie but I'd really like to use the customer session.


texts: Deleting archived products - Will the products inside orders be affected?

texts:
I have a lot of archived products that I would like to delete.

But I am using a function in the frontend where users can see their old orders and what products were bought:

$orders = Mage::getResourceModel('sales/order_grid_collection')
     ->addFieldToFilter('store_id', $storeId)
     ->load();

Some of these products are already archived.

When I delete all archived products, can the products inside the orders still be accessed? Or will I lose those products?


texts: How to detect Spam Bot list on magento 2

texts:
I've found this module which prevent spam bot on magento 2.
But i've a question: i don't know how this spam bot list work.
How do we know what's the name of the spam bot and put it in this list so this feature can do the job?
In other words, how do we detect the spam bot list?
Thanks for reading. Have a nice day.


texts:
I am using XAMPP.  I'm trying to download a free extension from Magento Connect and I'm getting the following error:

community/ET_*****: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure


texts:
What is the code to do it he can see three products in one category only??

<?php

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

$collection->addStoreFilter();

$catid = '68'; //your category id
$category = new Mage_Catalog_Model_Category();
$category->load($catid); // this is your category id!
$collection = $category->getProductCollection();
Mage::getModel('catalog/layer')->prepareProductCollection($collection);
$collection->getSelect()->order('rand()');
$collection->addStoreFilter();
$numProducts = 4;
$collection->setPage(1, $numProducts)->load();
foreach($collection as $product) {
$product = Mage::getModel('catalog/product')->load($product->getId()); /* Load Products by ID*/
echo $product->getName();
echo $product->getShortDescription();
endforeach;
?>


texts: Problems with newsletter2go Magento 1 extension

texts:
we have a problem connecting the newsletter2go extension for Magento 1 properly to our shop.

connecting to the n2go service from within the magento admin backend worked. But when goin to the newsletter2go backend to check the integration, we cannot complete the setup (Button "Einrichtung abschließen"). Our magento api responds with 403 error, see screenshot. I know that this works with magento´s built-in API2 mechanism. Any ideas what to do?


texts: Magento 2: Import with required attributes

texts:
If I want to import products via csv-file I need to have all the required attributes as columns in my csv-file right?

Can anyone tell me what the attributes 'price_type', 'price_view','shipment_type','sku_type' and 'weight_type'(in the image) mean and where I can find more information(reference) on them ?

Regards


texts: Customer session expired after user clicks back button

texts:
I am building a site in magento. User can able to login and login session was created successfully.

Take this scenario.

User added a product to cart (Already Login)
Going to the checkout page
There he clicks back button on the browser(in both firefox/chrome) and he went to the home page.
At that time the session was expired.

Could you please help me to resolve this. Is there any way to maintain the session, even if the user clicks back button or forward button.


texts: Magento 2: Can you Filter By store_id Using a Product Repository

texts:
In Magento 2, it's not possible to add a store_id filter to a product collection directly.  Instead, you need to use the addStoreFilter method, which adds a special "product limitation filter".  It appears that addFieldToFilter is meant for attributes specific to a particular collection, and the product limitation filters are meant for attributes that might be shared globally across collections (store_id, website_id, category_id, etc).

Given that, is is possible to create a filter for a product repository to get a list of products filtered by store_id?  Attempting to use a filter like this with a repository

/* @var $filterBuilder \Magento\Framework\Api\FilterBuilder */
$this->filterBuilder->setField('store_id')
    ->setValue('1')
    ->setConditionType('eq')
    ->create();

produces the following error

Invalid attribute name: store_id

i.e. the repository attempts to create a filter on the underlying collection with the addFieldToFilter method.


texts: How to over ride php file in magento 2.3

texts:
I want to do some changes in

vendor/magento/framework/Stdlib/DateTime/Date.php

How can I override the file in app folder?


texts: Magento doesn't show CVV for customers when checking out -2

texts:
Sorry (I'm repeating this question because I can't edit or comment on my previous question)..

I'm using Magento 1.9.2.2 with latest updates installed and a custom Theme that I paid for. If a customer checks out and gets to the payment section, he/she enters credit card information and will be able to see everything on the screen EXCEPT the CVV. If you try to add anything in that box, nothing shows up and it seems like that field is not allowing numbers to show up.

I've tested an actual transaction on (Live) and I was able to complete the transaction. The issue is if you don't click and add any numbers in the CVV, you will get the error message that you're missing the CVV. but you can click on it and type the "invisible numbers" and it will complete the transaction.

How can this be fixed? I would like to allow numbers to show for the customer or remove the CVV completely.

I would like to know how to find the page where I can edit the field and make it show the numbers instead of hiding the numbers or not showing any characters in the field.

PS: I'm using Paypal pro


texts: Take recurring subscription payments via Guest checkout - Magento 2

texts:
We have a client who is keen to take recurring payments BUT only allows guest checkouts
They ideally wanted to use Braintree, but it seems the Braintree recurring payment extension only works with customers either logging in to or creating an account (which for conversion optimisation reasons, the client doesn't want)
Does anyone know of any extensions that will allow recurring payments AND guest checkout in Magento 2?  Ones that work with Braintree would be preferable, but at this point I'll take any payment processor
Thanks


texts:
we have a live magento 1.8 site which has been running fine until recently, where we were unable to send emails via Sparkpost - this was identified as being an issue with TSL1.0.

we have forced magento to send via TLS1.2, however, in order to do this we needed to upgrade the php version from 5.5.9 to 5.6.  This has worked, and emails are sending correctly.... however, the cron tasks are not running.

I have scoured the web to try and rectify this, but cannot find the reason at all.  Im inexperienced in cron setup, however through the many things I have tried, ive not got a basic understanding.

we have AOE Scheduler installed
heartbeat is not working
all tasks are pending - and never get run
cron_schedule DB table is populated with all tasks - but they are all pending, none get executed
I can manually run a task through AOE scheduler, and this executes fine

crontab -l shows:

* * * * * ! test -e /srv/www/delilahcosmetics.com/public_html/maintenance.flag && /bin/bash /srv/www/delilahcosmetics.com/public_html/scheduler_cron.sh --mode always
* * * * * ! test -e /srv/www/delilahcosmetics.com/public_html/maintenance.flag && /bin/bash /srv/www/delilahcosmetics.com/public_html/scheduler_cron.sh --mode default

php -v

Shows as

PHP 5.6.37-1+ubuntu14.04.1+deb.sury.org+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

I have tried adding:

$isShellDisabled = true;

to cron.php - with no effect

despite setting the value of the system user in AOE scheduler to "www-data" - this has no effect either, and AOE scheduler seems to think this is running through "" (no system user)

cron.log shows no errors

WHAT AM I MISSING??
please help.
thanks


texts: Magento Cloud - Disable Deployment for Specific Branch

texts:
I am using Starter Cloud Magento enterprise and i have created 4 Branches - Master,Staging,Development and local. there is limit for creating branches on starter Feature.
So my requirement is i want to keep local branch just for code push and all the developers push their code on the local branch i want to merge it on development and deploy changes on development together. But right now there is no such option and deployment takes lot of time which isn't feasible for us when working.


texts: Magento 2: sales_order_save_after called twice after place an order

texts:
I'm using Magento 2.3.4 and tried to catch the data order using sales_order_save_after observer like this:
etc/events.xml
<event name="sales_order_save_after">
    <observer instance="Vendor\Module\Observer\Sales\OrderSaveAfter" name="vendor_module_observer_sales_ordersaveafter_sales_order_save_after"/>
</event>

Vendor\Module\Observer\Sales\OrderSaveAfter
public function execute(
    \Magento\Framework\Event\Observer $observer
) {
  $order = $observer->getEvent()->getOrder();
  if ($order && $order->getId()){
    $origState = $order->getOrigData('state');
    $curState = $order->getData('state');
    $oldStatus = $order->getOrigData('status');
    $newStatus = $order->getStatus();

    $this->_helper->customLog('OrderSaveAfter Observer', 'test.log');
    $stateLog = 'origState: '.$origState.';'.'curState: '.$curState;
    $statusLog = 'origStatus: '.$oldStatus.';'.'curStatus: '.$newStatus;
    $this->_helper->customLog('State Log => '.$stateLog, 'test.log');
    $this->_helper->customLog('Status Log => '.$statusLog, 'test.log');
  }
  return $this;
}

but i noticed , it logs the same things twice after place an order, is there a way to prevent this?


texts: Create a new DropDown (select) product attribute (with options) in magento via SOAP API v1

texts:
I am trying to create a global product attribute that is used for configurable product.
This is how I would do it using the admin backend:

With the following options (for example):

So, I tried to do the above using the SOAP API (v1) like this:
$client = new SoapClient('http://domain.com/api/soap?wsdl');
$session = $client->login('apiUser', 'apiPass');

$attributeData = [
    'attribute_code' => 'test',
    'scope' => 'global',
    'frontend_input' => 'select',
    'options' => [
        'values' => [
            0 => 'Red',
            1 => 'Green',
            2 => 'Blue'
        ]
    ],
    'default_value' => '',
    'is_configurable' => 1,
    'used_in_product_listing' => 1,
    'is_visible_on_front' => 0,
    'apply_to' => '',
    'is_comparable' => 0,
    'is_used_for_promo_rules' => 0,
    'is_required' => 0,
    'is_unique' => 0,
    'is_searchable' => 0,
    'is_visible_in_advanced_search' => 0,
    'frontend_label' => [[
        'store_id' => 0,
        'label' => 'Test'
    ]]
];

try
{
    $result = $client->call($session, 'product_attribute.create', $attributeData);
    var_dump($result);
}
catch (SoapFault $sf)
{
    var_dump($sf);
}

$client->endSession($session);

When I execute this script, I get the following error:
Invalid request parameters.

Any ideas what I am doing wrong here?


texts: Magento 2 how to add customer chooser in cart price rules condition

texts: I want to add customer chooser in cart price rules conditions like category and product chooser. Can anyone help me with this?


texts: Magento2 how to use foreach in email templates to send multiple items and customers information?

texts: I want to send custom email.In that i have to display multiple customers and customers cart items.For that I have created a custom module.In that I have written model to get all the needed data.How can I display the multiple items and multiple customers information in the email template.Thanks in advance.


texts:
I am working on product collection. Here is my query:

  $_product =
  Mage::getModel('catalog/product')->addWebsiteFilter($allWebsiteIds)->load($productid);

But this is not working.

As reference check this link. I want to load detail in this line

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

but with "addWebsiteFilter" also.Any one know how i can achieve this.


texts: In magento 2 how can we login customer programatically using email and password?

texts: In magento 2 customer login programatically using email and password?


texts:
I already have a magento website and recently I get a mobile app for my website.

Can I use the Magento cloud service still as I am an old customer of them?


texts:
Fatal error: Class 'Mageplaza\Core\Helper\AbstractData' not found in
  /home/dukaania/public_html/testing2/app/code/Mageplaza/SocialLogin/Helper/Data.php
  on line 32

Facing this issue after run upgrade command in Magento 2


texts: How to collect customer data who has added the product to wishlist?

texts:
I have a requirement that is collect customers data like wishlist, address and send them to another server using SFTP. These all should be programmatically.

  Could anyone please guide me on this?

Your help will be greatly appreciated!


texts: How to customize a check cart item-action in magento 2?

texts:
How to customize or override a item-action tool bar in checkout cart in magento 2.

My actual item-action is:

My expectation is:


texts:
Does anyone try integrating SimplyPost with Magento, Is there any plugins or giudes I can follow? So far I could find only the SimplyPost API. I'm new to magento, So have no idea where to start. I will appreciate any kick-start.
Peace!


texts: Magento 2 How to get all existing values for one attribute

texts:
I need to get all existing values for a custom product attribute.

  Setup/UpgradeData.php

$eavSetup->addAttribute(
    \Magento\Catalog\Model\Product::ENTITY,
    'manufacturer_name',
    [
        'type' => 'varchar',
        'label' => 'Manufacturer Name',
        'input' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
        'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_WEBSITE,
        'visible' => true,
        'required' => false,
        'user_defined' => true,
        'searchable' => false,
        'filterable' => false,
        'comparable' => false,
        'visible_on_front' => false,
        'used_in_product_listing' => true,
        'used_for_sort_by' => false,
        'group' => 'Roche',
        'sort_order' => 10
    ]
);

Assuming that the following data is present in the database

| product_id | manufacturer_name |
|------------+-------------------|
| 1          | Manufacturer 1    |
| 2          | Manufacturer 1    |
| 3          | NULL              |
| 4          | Manufacturer 2    |

I want to retrieve the following list

  Manufacturer 1
  Manufacturer 2

I've try the following code but it doesn't work, it always return a empty array.

  Block/Manufacturers.php

/**
 * Get all manufacturers list
 * @return array
 */
public function getManufacturerListing()
{
    $attributes = $this->eavAttributeRepository->get(\Magento\Catalog\Api\Data\ProductAttributeInterface::ENTITY_TYPE_CODE,'manufacturer_name');
    $options = $attributes->getSource()->getAllOptions(true,true);
    return $options;
}

Do I need to create a  SQL request with a join or something like that ? Please help. Thanks


texts: Plugin in Magento 2.1 not being recognized

texts:
I'm trying to create a plugin for Magento 2.1.3 that disables the flat rate shipping method in the cart, but keeps it enabled in the admin panel.

I've followed the instructions to the best of my knowledge, and Magento doesn't seem to be picking up my plugin.

Here's what I've got:

app/code/MaadDecor/DisableFlatRate/etc/di.xml:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\OfflineShipping\Model\Carrier\Flatrate">
    <plugin name="hidePlug" type="MaadDecor\DisableFlatRate\Plugin\Hide" sortOrder="1" disabled="false"/>
</type>

app/code/MaadDecor/DisableFlatRate/Plugin/Hide.php

<?php

namespace MaadDecor\DisableFlatRate\Plugin;

use Magento\Backend\Model\Auth\Session;
use Psr\Log\LoggerInterface;

class Hide
{
    protected $backendSession;

    /**
    * @var LoggerInterface
    */

    private $logger;

    public function __construct(Session $session, LoggerInterface $logger)
    {
        $this->backendSession = $session;
        $this->logger = $logger;
    }

    public function aroundCollectRates($subject, callable $proceed)
    {

        $this->logger->info('hit before the auth check');
        if ($this->backendSession->isLoggedIn()) {
            return $proceed();
        }
        $this->logger->info('hit after the auth check');
        //        return $proceed();
        return false;
    }
}

For some reason none of the logs are being added, and the shipping rate still displays on the front end.

Any ideas?


texts: Change "Add to Cart" Button Text Of Widget Magento 2.3.3

texts:
I want to change button text "Add To Cart" To "Some Text" With Custom Condition For Widget... Using Custom Module

Create widget :-


texts: How to tell which products are not catgorized via phpmyadmin

texts: I'm trying to pull a list of all products that are not in categories via php-myadmin, is this possible? What is the best way to go about doing this?


texts: How to detect and Modify robots.txt inside Magento

texts:
How do I modify and ensure that the magento site has robots.txt please?

I am checking if the site has robots.txt as it is being flagged by our SEo tool . see screenshot - http://prntscr.com/k07bvl

Thanks!


texts: How to avoid credit card number validation in Magento 2

texts:
As I need to stop credit card number validation in Magento 2 checkout page. How can I done this? Here is the error displayed in payment form,

Note

Am using Paymetric extension for credit card payment.


texts: Import/Export-Module: how can I import images to a custom attribute?

texts:
In the backend I created my own product attribute, named custom_image.

I know how to create a csv file in order to import products to magento. But it doesn't seem to work with custom image attributes.

I assumed to simply create another column, naming it custom_image, and filling it with the image, as I would do with the other default image attributes.

But it doesn't work.

Does anybody know how to make it work?


texts:
I'm running Magento CE 2.2.4.

When the system sends any emails, they send as the webserver's hostname. I'm not sure where/what handles sending emails, but it seems its missing the from address.

I have contacts setup under Store Email Addresses, but they seem to be ignored.

Any help would be massively appreciated.


texts: Images in folder but not showing in admin and front

texts:
I have moved site to another server but some of the images are not showing on front and admin.they are available in folder.

Is there any solution to it?


texts: Magento 2: Fatal error: Uncaught Error: Call to a member function getId()

texts:
After adding custom module on Server. It's giving below error

 Fatal error: Uncaught Error: Call to a member function getId() on null
 in
 /var/www/html/magento/vendor/magento/module-backend/Block/Menu.php:296
 Stack trace: #0
 /var/www/html/magento/vendor/magento/framework/View/Element/AbstractBlock.php(975):
 Magento\Backend\Block\Menu->getCacheKeyInfo() #1
 /var/www/html/magento/vendor/magento/framework/View/Element/AbstractBlock.php(1027):
 Magento\Framework\View\Element\AbstractBlock->getCacheKey() #2
 /var/www/html/magento/vendor/magento/framework/View/Element/AbstractBlock.php(652):
 Magento\Framework\View\Element\AbstractBlock->_loadCache() #3
 /var/www/html/magento/vendor/magento/framework/View/Layout.php(542):
 Magento\Framework\View\Element\AbstractBlock->toHtml() #4
 /var/www/html/magento/vendor/magento/framework/View/Layout.php(518):
 Magento\Framework\View\Layout->_renderBlock('menu') #5
 /var/www/html/magento/var/generation/Magento/Framework/View/Layout/Interceptor.php(206):
 Magento\Framework\View\Layout->renderNonCachedElement('menu') #6
 /var/www/html/magento/vendor/magento/framewo in
 /var/www/html/magento/vendor/magento/module-backend/Block/Menu.php on
 line 296

It's displaying when Session Timeout from Admin


texts:
I wrote a specific code but it should run only when a popup is on. Not only a specific popup but all the popups on the site.

How can I achieve it?


texts:
As a vendor, I am preparing to potentially link my store to offer dropship to another website (they take orders, I do fulfilment and processing on Magento 2), and create an API for this via Magento 2 (System > Extension > Integrations). The dropship site is using jetti.io for API purposes.
I will be creating an admin user on Magento's back end, followed by an API key set but I want to set it with the bare minimum permissions required for dropship, so, I need to give the drop ship API permissions to:

Read (but not edit) any product data including stock availability or sellable stock, image paths, attribute values etc.
Create orders and mark as paid or create the invoice (they receive the payment)
Read/check status of orders it has created so Magento side we handle the shipment including related shipments and credits for returns, or cancelled orders (we, the vendor should have the cancellation right)

I want to ensure everything else permission-side is excluded (such as customer data, orders that have not been placed/created via the API are not accessible, and every other area of Magento). Obviously this is security best practice.
Can anyone explain this or point me in the direction of resources which will explain this setup permission-wise? I have of course reached out to jetti.io and the dropship channel but as a vendor and store owner/manager, I'd prefer to understand from a Magento 2 perspective of what data is being shared by API permission on the back end (screenshot below) and what minimum rights would be required, plus any information which may have to be exchanged which is not required.
The screenshot below has no relevant permissions, it's just a screenshot of the permissions by API available, this one is the default reporting API permissions:


texts: Magento1.9 - shared cart - force checkout in product store

texts:
When using multi-store with shared cart across all stores eg:

Store1 - ProductA
Store2 - ProductB

When in Store1, add ProductA to cart.
Navigate to Store2 > cart > checkout

How can I force the customer to checkout in Store1?
(eg not checkout in current store: store2)

So use the Store ID of the product currently in the cart for the checkout process.

The reason: I have different currency for each store, using this:

app/code/core/Mage/Directory/etc/system.xml:
<label>Base Currency</label>
<show_in_store>1</show_in_store>

I need to force checkout in the currency for the product (product store base currency)

I don't want to use multiple websites.
Magento 1.9.2.4


texts: Magento 2.1.8 error on MGS builder sale section

texts:
I'm working with MGS frontend builder and i'm getting an console error "require" not defined on sale product section and new product section.
I don't have this bug on my local environment, just on production server.
I deleted cache, reindexed,compiled and deployed and no luck.

This error seems so common. Does anyone have any idea ho to fix it?

Thanks!


texts: Magento Programatically customer login not working in REST API

texts:
I am trying to customer login programatically for REST API with below script, but it always shows "Invalid login or password" but actually those are working from controller or login through website

$session = Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer);
     $status = $session->login($data['email'],$data['pwd']);

Is there any way to customer login check


texts: get current store id for backend system configuration

texts:
For my shipping module, I have created a block which has group of form element.

<options translate="label">
    <label>Other Settings</label>
    <frontend_model>Namespace_Module_Block_Form_Field_Options</frontend_model>
    <sort_order>172</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>
</options>

And this is block which I have created.

class Namespace_Module_Block_Form_Field_Options extends Mage_Adminhtml_Block_System_Config_Form_Field {
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
        $value = Mage::getStoreConfig('carriers/namespace_module/optionalfield');
        $xhtml = '<input type="text" class="input-text" value="'.$value.'" name="groups[namespace_module][fields][optionalfield][value]" />';
        return $xhtml;
    }
}

In this block I have create more many options, It is working fine. But the issue is that in system->configuration,
  Mage::getStoreConfig('carriers/namespace_module/optionalfield'); is returning value which is saved in default config, And not showing value according to the store selected.

In each store Mage::getStoreConfig('carriers/namespace_module/optionalfield'); is showing value which is saved in default config.

So I think I use this code Mage::getStoreConfig('carriers/namespace_module/optionalfield',$store_id) than it will show me values according to store selected in system->configuration.

So guide me how to get store id in this block


texts: Catalog Price Rule apply to products with multiple Category but only apply to one Category

texts:
I have a bit of a complex question, I want to apply three Catalog price rules to a category with products that are in multiple categories, however the three rules are different percentages off 15%, 20% and 30%. Since Magento applies the rule on a product level not the category it keeps applying the rule on all the categories the product is in and not the one category I want it to. Is there a way around this?

tl;dr Apply multiple catalog price rules too a single category with products that are in multiple categories.


texts: How to do use a different theme on search result page instead of default?

texts:
How do I make the search results page use a different theme like you can on category pages?
As, I'm using a different theme for a catalog on my store, but when you use the mini search it pulls the default store theme.
For example,


texts: How does Magento 2 handle cross browser styling?

texts:
I've seen modernizr in use on Magento 2 but so far I haven't seen any examples of fixing cross browser issues (and yet a lot of use of flex). The compatible browser list is quite merciless - is this why I haven't seen it handled as frequently?

What is the best practise for browser compatible css? Or targeting browsers / features specifically?


texts:
Create Category drop down in which when we put category and put product name if product belongs to that category it will show product else not show any product
I created a PHTML to call  getCategories

app/code/Mageplaza/HelloWorld/view/frontend/template/notice.phtml

$collection = $block->getCategories();
foreach ($collection as $categorycollection){
    print_r($categorycollection->getName());
}

app/code/Mageplaza/HelloWorld/Block/notice.php

public function getCategories() {
        $categoryFactory = $_objectManager->create('Magento\Catalog\Model\ResourceModel\Category\CollectionFactory');
        $categories = $categoryFactory->create()
            ->addAttributeToSelect('*')->addFieldToFilter('is_active', 1);
        print_r($categories);
        return $categories;
}


texts: Getting error during programatically add to cart product

texts:
Giving below error during add to cart programmatically in  Magento 2 enterprise edition. Community version it is properly working.

Error:
Exception #0 (InvalidArgumentException): ampromo_cart is unknown type

Using below code for add to cart product

$productId = 2232;
$params = array(
        'form_key' => $this->formKey->getFormKey(),
        'product' => $productId, //product Id
        'qty'   =>1 //quantity of product
    );

//Load the product based on productID
$_product = $this->productFactory->create()->load($productId);
$this->cart->addProduct($_product, $params);
$this->cart->save();

Error screenshot

I am using below custom script for add to cart product programatically:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('memory_limit', '5G');
error_reporting(E_ALL);

use Magento\Framework\App\Bootstrap;
require '../app/bootstrap.php';

$bootstrap = Bootstrap::create(BP, $_SERVER);

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

$productId = 2459;
$product = $objectManager->create('\Magento\Catalog\Model\Product')->load($productId);
$cart = $objectManager->create('Magento\Checkout\Model\Cart');
$formKey = $objectManager->create('\Magento\Framework\Data\Form\FormKey')->getFormKey();

$params = array(
                    'form_key' => $formKey,
                    'product' => $productId, //product Id
                    'qty'   =>1
                    );
$cart->addProduct($product, $params);
$cart->save();


texts: Magento2 filter by "sales products" on a category list page

texts:
I'd like to add a filter in categories lists to display only products on sales. For now I use a filtered attribute like "marketing" and I add manually all products in sales define by a Catalog Rule.

Is there a way to programmatically check with a cron if a rule exist and add the "sales" value for the "marketing" attribute to products that match this rule?

Or maybe add a custom filter?


texts: How to create module for Rest Api , Magento2

texts: Who can help, how to create a structure in the custom module for Rest Api ?


texts: Rewriting a model that has already been rewritten

texts:
I've read about ten different places (mostly answers on Magento stack exchange) about how to rewrite a model that has already been rewritten, but can't get my module to work. I've used the "Modules conflict detector" extension to try to debug the problem, with no success.

So my module rewrites a model from another module, which rewrites a core model.

The relevant part of the other module's config.xml:
(file path /app/code/local/GoMage/Navigation/etc/config.xml)

<?xml version="1.0" encoding="utf-8"?>
<config>
  <modules>
    <GoMage_Navigation>
      <version>3.2</version>
    </GoMage_Navigation>
  </modules>
  <global>
    <models>
      <catalog>
        <rewrite>
          <layer_filter_item>GoMage_Navigation_Model_Layer_Filter_Item</layer_filter_item>
        </rewrite>
      </catalog>
    </models>
  </global>
</config>

My config.xml:
(file path /app/code/local/OOTD/Navigation/etc/config.xml)

<?xml version="1.0" encoding="utf-8"?>
<config>
  <modules>
    <OOTD_Navigation>
      <version>0.1</version>
    </OOTD_Navigation>
  </modules>
  <global>
     <models>
        <catalog>
          <rewrite>
            <layer_filter_item>OOTD_Navigation_Model_Layer_Filter_Item</layer_filter_item>
          </rewrite>
        </catalog>
     </models>
  </global>
</config>

/app/etc/modules/OOTD_Navigation.xml:

<?xml version="1.0" encoding="utf-8"?>
<config>
  <modules>
    <OOTD_Navigation>
      <active>true</active>
      <codepool>local</codepool>
      <depends>
        <GoMage_Navigation />
      </depends>
    </OOTD_Navigation>
  </modules>
</config>

/app/code/local/OOTD/Navigation/Model/Layer/Filter/Item.php:

class OOTD_Navigation_Model_Layer_Filter_Item extends GoMage_Navigation_Model_Layer_Filter_Item {
  // ...
}

I've tried so many things I don't know what to do anymore. If you need more information just ask. Thanks in advance.


texts: When uploading a picture to a product from the admin It doesn't show up on the front end until I run catalog:images:resize

texts:
Is there something else I can do to show the picture on the frontend? Without the catalog:images:resize command??

Thanks!


texts: Magento2 : Custom Magento extension to display info on success.phtml

texts:
I am trying to Create my first custom extension. Unfortunately i think that i miss something.

In the magento 2 root directory i have the following files:

  /app/code/Clud7/Skroutz/registration.php

    <?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Clud7_Skroutz',
    __DIR__
);

  /app/code/Clud7/Skroutz/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Clud7_Skroutz" setup_version="1.0.0" />
</config>

  app/code/Clud7/Skroutz/etc/frontend/routes.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="clud7" frontName="skroutz">
            <module name="Clud7_Skroutz" />
        </route>
    </router>
</config>

  app/code/Clud7/Skroutz/Block/Success.php

<?php
namespace Clud7\Skroutz\Block;
class Success  extends \Magento\Framework\View\Element\Template
{
    public function getSomething()
    {
        return 'returned something from custom block.';
    }
}

  app/code/Clud7/Skroutz/view/frontend/layout/checkout_onepage_success.xml

<?xml version="1.0"?>
<body>
    <referenceContainer name="order.success.additional.info">
        <block class="Clud7\Skroutz\Block\Success"
               name="clud7.order.success"
               template="Clud7_Skroutz::order/success.phtml"
               after="-">
        </block>
    </referenceContainer>
</body>

  app/code/Clud7/Skroutz/view/frontend/templates/order/success.phtml

<?php /* @var $block \Clud7\Skroutz\Block\Success */?>
<?php echo __('Custom template file content.'); ?>
<?php echo $block->getSomething(); ?>

My module is activated and also my magento 2 is compiled and cache cleaned.
Also static content deployed.


texts: unset an item in an array based on conditional IF statement

texts:
I have an array that gets imported daily. For the specific field 'special_price' i only want it to import into Main Website > Main Website Store > Default Store View

Default store view = 1

protected function _getFieldNames()
{
    return array(
        'company_number',
        'sku',
        'style_number',
        'name',
        'div_code',
        'div_desc',
        'color_code',
        'color',
        'size_type',
        'size',
        'price',
        'weight',
        'description',
        'special_price',
        'tax_code',
    );
}

I can instantiate the class like so:

$storeId = Mage::app()->getStore()->getStoreId();

My question is how to parse that one specific field for only the default store and let the other updates run as usual. I assume i'm using an IF statement.

Is it possible to just unset() that item based upon an IF statement?

or... since it's a function would i have to return an array without special price if it met the conditions?

something like so:

(Mage::app()->getStore()->getStoreId() === Mage::app()->getWebsites()[1]->getDefaultStore()->getStoreId()) return array(without special_price);

Any help would be greatly appreciated. Thank you.

I noticed this function now that extends the function above:

protected function _getFieldNames()
{
    $fieldNames = parent::_getFieldNames();
    $fieldNames[13] = 'specifications';
    $fieldNames[14] = 'frame_color';
    $fieldNames[15] = 'lens_color';
    $fieldNames[43] = 'special_price';

    return $fieldNames;
}

I had to add the unique value of 43 which represents the cell from excel when being imported.

How about this?

protected $_attributesToUpdate = array(
    'name',
    'description',
    'price',
    'tax_class_id',
    'weight',
    'country_of_manufacture',
    'specifications',
    'electric_cn',
    'electric_style',
    'electric_color',
    'electric_div',
    'electric_div_desc',
);


texts: How and where I can log the fail payment error for all Payment method in Magento 1?

texts:
I want to log error on payment fails on checkout page but I can not find the way to where I can log the error message for all the payment method?

For example:

1) I selected the PayPal payment method and press continue button at that time it returns a message like that.

I want to log this type of error message on save payment.

I have tried savePaymentAction but I can not find it there.

Is there any event or method where can I log it?

Help would be greatly appreciated.


texts: Magento core_url_rewrite table excessively large

texts:
I've noticed a large amount of reports that this table itself can become extremely cluttered, I'm running a site with ~5000 SKUs and ~250 categories (single-store) and a resultant core_url_rewrite table of over 600,000 lines and over 500MB large which is insane.

This can slow down site performance and result in a very bulky database. I've done some digging and found quite a few posts regarding this, most notably:

Core_url_rewrite bug: Massive amount of duplicate url’s for each product generated on index
Magento Commerce - Bug Tracking - Issue #29020

//These links have been removed since the implementation of the new boards

Now I understand that the table can be truncated and reindexed, but this doesn't solve the problem, it just prolongs the issue from happening again.

From what I understand, part of the issue is products which have the same url key based on the product's name, thus resulting in indexed links.

A fix mentioned is:

app/code/core/Mage/Catalog/Model/Url.php on line ~807:

Change:

 if ($product->getUrlKey() == '' && !empty($requestPath)
       && strpos($existingRequestPath, $requestPath) === 0
 )

To:

 if (!empty($requestPath)
       && strpos($existingRequestPath, $requestPath) === 0
 )

But even this does not completely resolve the issue.

My question is as follows:

If you have experienced this issue, have you managed to set up an effective, logical & efficient algorithm which does not involve "managing" the issue repeatedly, but actually resolving the matter once and for all?

Would really appreciate some insight into this.

BTW: Please do yourself a favor and check what your table is looking like right now, you may be experiencing this issue and the performance impact as a result thereof without even knowing it - I didn't.

Edit: I have been in contact with www.Nexcess.net (a Magento platinum hosting partner) and they have confirmed that they have had clients request that their core_url_rewrite table requires truncation as a result of being too bulky.

A big worry of mine is the SEO impact that this may have, which is why I'd like a solution as opposed to procrastinating the issue from arising again.

Update: Nexcess mentioned that with the duplicate products within the table it may actually be hurting SEO as it is.


texts: Bank Transfer email template not translated

texts:
We have 3 payment methods in our shop :

  Sofort
  Paypal
  Bank Transfer

Once an order is placed with Sofort or Paypal, correctly translated Order Confirmation email is sent to customer.

When the Bank Transfer method is used, the Order Confirmation email is sent, but not translated.

Thanks!


texts:
I have a magento 2 store where currently i am displaying all products including out of stock products.
The requirements is, i need only display products including out of stock products which are available in our offline store. For this i have a webservice, which when called with a list of products returns whether they are available offline or not.
How would i proceed to hide out of stock products which are not available offline?
Is there an easy way of doing this?


texts:
I want to remove the register-link from the header links, so I have wrote in the default.xml of the Module_Customer of my theme:

<referenceBlock element="register-link" remove="true"/>

The problem is the block is not removed and I don't know why.


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

texts:
I have used custom color picker in my extension and I remove it but got this error.

I checked following questions but not working anymore in Magento 2.2.1.

Magento 2.1.1 - How to add color picker in admin configuration options?

Magento 2 - How to add color picker in admin configuration options?enter link description here


texts: how to change cookies life time without from admin login

texts:
Accidently I have changed the cookies life time = 1 seconds,

Now I am not able to change it to other values, Because When I login my session will destroyed in 1 second.

So Any one know that how can I change cookies lifetime without login from admin panel?.

Or is there any other any other way to set it?

Help Me.
Thanks in Advance


texts: How do I give the right path for fopen() function?

texts:
I want to create (write) a csv file in a specific folder. the name of this folder is attin_csv. In the image you can see where is located this folder.

This is my code:

  $csv[0] = $header;
    //Creating attributes csv file
    $file = fopen("../attin_csv/attributes.csv","w+");
    foreach ($csv as $line){
        fputcsv($file,explode('%%',$line),"^","`");
    }


texts: Wysiwyg editor field is redirecting to 404 error in the front end form in Magento 2

texts:
We are facing strange issues, we have a form with wysiwyg-editor as a field, while saving, the form is redirecting to 404 error: Page not found., if we remove below script then everything is working/saving fine. But we want implement/add wysiwyg-editor field in our template.

Can any one help us on this.

Html :

   <textarea type="text" id="company_description"
            name="company_description" title="company_description"
            class="input-text companydesc wysiwyg-editor" aria-hidden="true"><?php echo strip_tags($sellerDetails->getDesc());?>
   </textarea>

Script :

<script>
                        require([
                            'jquery',
                            'mage/adminhtml/wysiwyg/tiny_mce/setup'
                        ], function(jQuery){

                            var config = '',
                                editor;

                            jQuery.extend(config, {
                                settings: {
                                    theme_advanced_buttons1 : 'bold,italic,|,justifyleft,justifycenter,justifyright,|,',
                                    theme_advanced_buttons2: null,
                                    theme_advanced_buttons3: null,
                                    theme_advanced_buttons4: null,
                                    theme_advanced_statusbar_location: null
                                },
                                files_browser_window_url: false
                            });
                    editor = new tinyMceWysiwygSetup(
                                'company_description',
                                config
                            );
                           editor.turnOn();
                           jQuery('#company_description')
                            .addClass('wysiwyg-editor')
                            .data(
                                'wysiwygEditor',
                                editor
                            );
                         });
                        </script>


texts:
What I'm trying to do is to override one single method in Model/Observer.php of other module. I followed this tutorial: http://www.atwix.com/magento/overriding-observers/.

As a result I've created my own module.
Its etc\config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Package_MyModule>
            <version>1.0.0</version>
            <platform>ce</platform>
        </Package_MyModule>
    </modules>
    <global>
        <helpers>
            <mymodule>
                <class>Package_MyModule_Helper</class>
            </mymodule>
        </helpers>
        <models>
            <mymodule>
                <class>Package_MyModule_Model</class>
            </mymodule>
            <theirmodule>
                <rewrite>
                    <observer>mymodule/observer</observer>
                </rewrite>
            </theirmodule>
        </models>
    </global>
    <frontend>
        <events>
            <event_name>
                <observers>
                    <their_controller_predispatch>
                        <type>disabled</type>
                    </their_controller_predispatch>
                    <mymodule_controller_predispatch>
                        <type>singleton</type>
                        <class>mymodule/observer</class>
                        <method>someObserverMethod</method>
                    </mymodule_controller_predispatch>
                </observers>
            </event_name>
        </events>
    </frontend>
</config>

My observer class itself extends initial observer class (and also my module depends on initial module):

class Package_MyModule_Model_Observer extends Package_TheirModule_Model_Observer
{
    public function someObserverMethod($observer)
    {
        ...
    }
}

Initial module has several events, that are handled by that observer class (let's say, 10).

When I try to run my code I get the following error: "Mage registry key "_singleton/mymodule/observer" already exists". I've tried all solutions for this error from magento.stackexchange.com and none of them worked for me.

But, and that is interesting, when I add all other missed events to my config.xml (9 of those, that I do not want to override), everything works fine. But I do not want to do that, cause I lose advantages of overriding then.

So my question is: how to override only one method of observer of other module and not get this strange error?


texts: graphql product query huge perfomance hit when filtering with multiple attributes

texts:
I have used the below GRAPHQL query to get the product list.
{
  products(filter: {category_id: {eq: "77"},color:{in:["5437","5438","5449"]}, price:{from:"100", to:"200"},paint_usability:{in:["5554"]},paint_quantity:{in:["5553","5546"]}, approval:{in:["2", "4"]}}, pageSize: 10, sort: {name: DESC}) {
}

but It will take time to get the product data. I have enabled SQL log and I find one query to load the time
INSERT INTO `search_tmp_60a797f2ed7ce8_60598401` SELECT `main_select`.`entity_id`, SUM(score) AS `relevance` FROM (SELECT DISTINCT  `search_index`.`entity_id`, (((0) + (0) + (0) + (0) + (0) + (0) + (0)) * 1) AS `score` FROM `catalog_product_index_eav` AS `search_index`
 INNER JOIN `cataloginventory_stock_status` AS `stock_index` ON stock_index.product_id = search_index.entity_id AND `stock_index`.`website_id` = 0 AND `stock_index`.`stock_id` = 1
 INNER JOIN `catalog_product_index_eav` AS `color_filter` ON `search_index`.`entity_id` = `color_filter`.`entity_id` AND `color_filter`.`attribute_id` = 93 AND `color_filter`.`store_id` = 1
 INNER JOIN `catalog_product_index_eav` AS `approval_filter` ON `search_index`.`entity_id` = `approval_filter`.`entity_id` AND `approval_filter`.`attribute_id` = 165 AND `approval_filter`.`store_id` = 1
 INNER JOIN `catalog_product_index_eav` AS `paint_quantity_filter` ON `search_index`.`entity_id` = `paint_quantity_filter`.`entity_id` AND `paint_quantity_filter`.`attribute_id` = 197 AND `paint_quantity_filter`.`store_id` = 1
 INNER JOIN `catalog_product_index_eav` AS `paint_usability_filter` ON `search_index`.`entity_id` = `paint_usability_filter`.`entity_id` AND `paint_usability_filter`.`attribute_id` = 198 AND `paint_usability_filter`.`store_id` = 1
 INNER JOIN `cataloginventory_stock_status` AS `color_filter_stock_index` ON color_filter_stock_index.product_id = color_filter.source_id AND `color_filter_stock_index`.`website_id` = 0 AND `color_filter_stock_index`.`stock_id` = 1
 INNER JOIN `cataloginventory_stock_status` AS `approval_filter_stock_index` ON approval_filter_stock_index.product_id = approval_filter.source_id AND `approval_filter_stock_index`.`website_id` = 0 AND `approval_filter_stock_index`.`stock_id` = 1
 INNER JOIN `cataloginventory_stock_status` AS `paint_quantity_filter_stock_index` ON paint_quantity_filter_stock_index.product_id = paint_quantity_filter.source_id AND `paint_quantity_filter_stock_index`.`website_id` = 0 AND `paint_quantity_filter_stock_index`.`stock_id` = 1
 INNER JOIN `cataloginventory_stock_status` AS `paint_usability_filter_stock_index` ON paint_usability_filter_stock_index.product_id = paint_usability_filter.source_id AND `paint_usability_filter_stock_index`.`website_id` = 0 AND `paint_usability_filter_stock_index`.`stock_id` = 1
 INNER JOIN `catalog_product_index_eav` AS `visibility_filter` ON search_index.entity_id = visibility_filter.entity_id AND `visibility_filter`.`attribute_id` = 99 AND `visibility_filter`.`value` in ('2', '4') AND `visibility_filter`.`store_id` = '1'
 INNER JOIN `catalog_category_product_index_store1` AS `category_ids_index` ON search_index.entity_id = category_ids_index.product_id AND category_ids_index.store_id = '1'
 INNER JOIN `catalog_product_index_price` AS `price_index` ON search_index.entity_id = price_index.entity_id AND price_index.website_id = '1' WHERE (search_index.store_id = '1') AND (category_ids_index.category_id in ('77')) AND (`price_index`.`min_price` >= '100' AND `price_index`.`min_price` <= '200' AND `price_index`.`customer_group_id` = 0) AND (color_filter.value  IN ('5437','5438','5449')) AND (approval_filter.value  IN ('2','4')) AND (paint_quantity_filter.value  IN ('5553','5546')) AND (paint_usability_filter.value  IN ('5554'))) AS `main_select` GROUP BY `entity_id` ORDER BY `relevance` DESC, `entity_id` DESC
 LIMIT 9223372036854775807

any solution on this?