texts: custom layout not rendering for overridden login method

texts:
Please some one dont close this as duplicate, no answers fixing my issue:

Im trying to create a new page in which login and register come together and will have custom fields.

Below is the my folder structure:

app
    - code
        - local
            - Php
                - Customer
                    - etc
                    - controllers
                    - Model

app
    - design
        - frontend
            - default
                - php
                    - layout
                    - template

Below is the module config file:

app/code/local/php/Customer/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Php_Customer>
            <version>0.1.0</version>
        </Php_Customer>
    </modules>
    <frontend>
        <routers>
            <customer>
                <use>standard</use>
                <args>
                    <modules>
                        <php_customer before="Mage_Customer">Php_Customer</php_customer>
                    </modules>
                </args>
            </customer>
        </routers>
        <layout>
            <updates>
                <customer module="Php_Customer">
                    <file>php_customer.xml</file>
                </customer>
            </updates>
        </layout>
    </frontend>
</config>

Below is account controller:

app/code/local/php/Customer/controllers/AccountController.php

<?php

require_once 'Mage/Customer/controllers/AccountController.php';
class Php_Customer_AccountController extends Mage_Customer_AccountController
{
    public function loginAction(){
        die('Php Overriden');
        $this->loadLayout();
        $this->renderLayout();
    }
}

Below is the layout config:

app/design/frontend/base/default/layout/php_customer.xml

<?xml version="1.0"?>
<layout>
    <php_customer_account_login>
        <reference name="content">
            <block type="module/ablock" name="login" template="popup_login.phtml" />
        </reference>
    </php_customer_account_login>
</layout>

below is the template file:

app/design/frontend/base/default/template/popup_login.phtml

HTML Rendered Successfully

When I echo something in the controller its printing on the screen, So I understood module added. but the phtml file is not rendering.

Below is exception log file:

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Php_Customer_Block_Login' in D:\wamp\www\promo\app\Mage.php:595

No error log captured.


texts:
Notice: Undefined variable: modelRepository in
  /home/server/web/server.dev.vendor.com/public_html/app/code/TemplateMonster/FilmSlider/Block/Widget/FilmSlider.php
  on line 121

public function createSlider()
{
    try {
        $sliderId = $this->getSliderId();
        $modelRepository = $this->_filmSliderRepository->getById($sliderId);
    } catch (\Exception $e) {
        echo __('Can not load slider');
    }
    return $modelRepository;
}

Just updated to 2.3.0 and get this error when open home page, how can i solve this?


texts: How to resolve this error on frontend : "Invalid header value detected"

texts:
I am finding the following error on front-end after running the command
bin/magento setup:static-content:deploy in putty

There has been an error processing your request
Exception printing is disabled by default for security reasons.

After checking the var/report/1036366111049 file I am getting the following error :-

    a:4:{i:0;s:29:"Invalid header value detected";i:1;s:1881:"#0 vendor/zendframework/zend-http/src/Header/AbstractLocation.php(48): Zend\Http\Header\GenericHeader::splitHeaderLine('Location: https...')
    #1 vendor/zendframework/zend-http/src/Headers.php(448): Zend\Http\Header\AbstractLocation::fromString('Location: https...')
    #2 /home/superadmin/public_html/FACE/vendor/zendframework/zend-http/src/Headers.php(352): Zend\Http\Headers->lazyLoadHeader(0)
    #3 vendor/zendframework/zend-http/src/PhpEnvironment/Response.php(93): Zend\Http\Headers->current()
    #4 var/generation/Magento/Framework/App/Response/Http/Interceptor.php(310): Zend\Http\PhpEnvironment\Response->sendHeaders()
    #5 /vendor/zendframework/zend-http/src/PhpEnvironment/Response.php(128): Magento\Framework\App\Response\Http\Interceptor->sendHeaders()
    #6 var/generation/Magento/Framework/App/Response/Http/Interceptor.php(336): Zend\Http\PhpEnvironment\Response->send()
    #7 vendor/magento/framework/HTTP/PhpEnvironment/Response.php(44): Magento\Framework\App\Response\Http\Interceptor->send()
    #8 vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\HTTP\PhpEnvironment\Response->sendResponse()
    #9 var/generation/Magento/Framework/App/Response/Http/Interceptor.php(117): Magento\Framework\App\Response\Http\Interceptor->___callPlugins('sendResponse', Array, Array)
    #10 vendor/magento/framework/App/Bootstrap.php(259): Magento\Framework\App\Response\Http\Interceptor->sendResponse()
    #11 index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
    #12 {main}";s:3:"url";s:6:"/FACE/";s:11:"script_name";s:15:"/FACE/index.php";}

Please help me how to resolve this Error.


texts:
I have 3 difference currency on my Magento store.
I want to add Delivery options with prices but I want price to change for selected currency.


texts: Frontend not working after magento upgrade

texts:
I have upgrade magento version from 2.1.14 to 2.2.9.

Admin panel is working properly but frontend not working.

Showing this error:

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'arguments': Missing child element(s). Expected is ( argument ).
Line: 840

I have run upgrade, compile, deploy command. I have also try to change mode but still frontend not working.

  debug.log showing this

[2019-07-11 10:09:22] report.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_464f7cbd6294e40256ecc52fd4711dd60_page_layout_merged and handles default, cms_noroute_index, cms_page_view, cms_noroute_index_id_no-route: Please correct the XML data and try again. Element 'arguments': Missing child element(s). Expected is ( argument ).
Line: 840
 [] []
[2019-07-11 10:09:22] report.ERROR: Element 'arguments': Missing child element(s). Expected is ( argument ).
Line: 840
 [] []

Any help will be appreciated.  Thank You.


texts: Not able to place the order If it is configurable product in magento 2

texts: Not able to order configurable product If I click on Proceed to checkout it will take us to payment page then if we click on Place order it'll get redirected to "http://fourkart.co.in/test3/checkout/cart/" page


texts: It's possible to use Typescript in Magento PWA Studio?

texts: I'm starting to study the PWA Studio, and I enjoy using Typescript. So I want to know if it's possible to do that.


texts:
I can't seem to locate how this script is getting into the head section of my site but it's stealing credit cards. I've grepped the entire codebase and searched the entire database for "seooptimization" and found nothing so it must be added via createElement somewhere? What's interesting is it's added in the middle of all my theme js files. Can anyone help me track this down and figure out how to avoid it getting into the head of my site because I've chased it around for months now. I've removed it from the cms_block in the database, from miscellaneous scripts in the admin and they just keep finding new ways to put it on the site, now I can't even track it down to get it off. Here's what it looks like.

<script src="https://mage-seooptimization.com/events" id="magento-init"></script>

EDIT: So I finally was able to remove this. I found it in the database in one of my footer blocks in the cms_block table. It was disguised as follows:

<script>var meta_tags = ["0604104A124B2257060A0F021D1605114537","4B030D1849001802451A57514D014C164C0604181E040D59124A5D50", "19034A475057444D120B0405190E5E090D090002101F0B4C1A", "11110A04001B1C5E0C0C0E040E36164D1131192B50591E140B", "0245065705191A05080704154D0F1117420B5C12571317070B15", "15200E0F0C1317044D4519020410001145435A1757030016", "3111161808140C04004A4D12041A5749", "570D161E1105435F4A0F0B06135403000D051102101D0C180B151F161E4B01050C591C06000C1E1251504B", "114B110F15370D04170B0814021C58420B0E465A5E1D04050F0F0216", "5D0C0C031551504B014C0204171D5E04121A04181D33", "180C0E0E4917504B07100F001D044B"];</script>

Maybe someone can comment on how that could possibly end up being a script in the head section of the site?

Also, this doesn't solve how it got there in the first place. Are there any known methods to inject code into the database for Magento 2.2.6 that may need patched? As far as I know I have all available patches applied.

List of enabled modules:

Aitoc_DimensionalShipping | EkoUK_ImageCleaner | Experius_WysiwygDownloads | FishPig_WordPress | FishPig_WordPress_RelatedProducts | MagePal_GuestToCustomer | MagePsycho_Customshipping | Amasty_Base | Amazon_Core | Amazon_Login | Amazon_Payment | FME_Faqs | Bold_OrderComment | Klarna_Core | Klarna_Ordermanagement | Magefan_LoginAsCustomer | Amasty_CronScheduleList | FME_Prodfaqs | Amasty_GiftCard | Klarna_Kp | Ebizmarts_MailChimp | Dotdigitalgroup_Email | Mageplaza_Core | Mageplaza_Smtp | Magiccart_Alothemes | Magiccart_Magicmenu | Magiccart_Magicproduct | Magiccart_Magicslider | Magiccart_Shopbrand | Magiccart_Testimonial | Mirasvit_Core | Mirasvit_Misspell | Mirasvit_Report | Mirasvit_Search | Mirasvit_SearchAutocomplete | Mirasvit_SearchLanding | Mirasvit_SearchMysql | Mirasvit_SearchReport | Mirasvit_SearchSphinx | Mirasvit_SearchUltimate | ShipWorks_Module | Temando_Shipping | VNS_Custom | Vertex_Tax | WeltPixel_Backend | WeltPixel_Maxmind |


texts: Magento Approach on going from Quote to Order to Invoice

texts:
I am wanting to understand some things of how Magento "thinks" (i.e. how the designers designed it).  One area is related to tax calculations, and when they occur.

Using the OnePage Checkout, I see that the quote is already present (in the database) when you click "Place Order", but it's set into the ::getQuote() object.

I also note that inside function saveOrderAction(), the following line is called if there is payment data:

....
$this->getOnepage()->getQuote()->getPayment()->importData($data);
....

which in turn calls collectTotals()

I notice there is no tax set at this point for the quote - and in fact there are no tax fields in sales_flat_quote like there are in sales_flat_order.

My question: Is the philosophy here basically, "We don't calculate the tax on the quote level because the address may change"?  Or is there another reason?  Tax fields are basically only in the _order and _invoice sections of sales_flat_..

(Clarification: _tax fields are in the sales_flat_quote_item table, but not in the sales_flat_quote table)


texts: Applied coupon code removed when visitor opts to log in to their Magento Account to checkout

texts:
Our setup:

Magento Community Edition 1.8.1
Checkout uses a customised version of Onestepcheckout.com's 1 page checkout extension.
Promotional Gift - extension by Magestore

I'm having a weird issue with a coupon code we have setup using Magestore's Promotional Gifts > Shopping Cart Rules.

The rule automatically adds two products to any basket where the customer's basket subtotal is equal to or more than £40, once the visitor has applied the voucher code we have set for this offer.

When I test applying the voucher code, it works as expected. The two products are automatically added to the cart with a value of free.
However when I proceed to the checkout; our site asks visitors to either checkout as a guest or login to their customer account, if I chose to login to my existing customer account, when the page reloads to display the checkout forms, the voucher code had been removed and the free items are no longer in the basket summary.

NOTE: If I click edit on the checkout page's basket summary, it takes me back to the cart page, and if I apply the voucher code again (while now logged in) it keeps the free items in the basket when I proceed through to the checkout.

But obviously this is not ideal, it would be best if it did not remove it when customers log in to their account.

Also, if I checkout as a guest, the free items/voucher code show as expected in the checkout page.

So I was wondering where the fault might lie here?
Is it a known Magento bug or the customisation work we've done to the onestepcheckout extension or is this something controlled by Magestore's extension?


texts: msrp field doesn't show on product edit form

texts: The attribute seems to have come with Magento2 as I cannot delete it.  It is set to global, I made sure the database lists it as is visible, it is set through attribute set, I added another field called product_msrp that does show up and work but why does the msrp field not show up?  I would much rather use this field as it might be tied to other modules/functionality and already have data imported into it.


texts: Mage_tax_Helper_Data not found on Mage.php

texts:
When clicking through to the "add to cart" it's not showing the correct information.
When switched to the standard theme all works fine.
We are also getting this error at the base of the code.

**Fatal error:** Class 'Mage_‘tax’_Helper_Data' not found in /homepages/15/d213158410/htdocs/designerchocolates/app/Mage.php on line 547


texts: how to add +91 prefix in phone number field in magento 2 checkout form

texts:
Hi there I want to have prefix +91 in Magento 2 checkout form phone number field how can i achieve this kindly share the files to edit I am new to magento2
Thanks for your help


texts: Use PHP in static Block by calling .phtml

texts:
I'm having problems with getting a .phtml file that contains some php to show in a static block. I've been searching the web and SO for days but I still can't figure out what I'm doing wrong.

I have a static block called "block_product_secondary_bottom". In this block I have various html code and text which displays in the area that I want it to (on the product page). So I'm comfortable with setting up static blocks.

What I've tried to do is create a .phtml containg PHP and include this in the block. The .phtml file is located in "/app/design/frontend/default/default/template/myphp/myphpcode.phtml"

The .phtml file simply contains:

<?php
echo "Here I will write my custom PHP code";
?>

In the static block above my text (that shows correctly) i've put:

12345:{{block type="catalog/product_view" template="myphp/myphpcode.phtml"}}

I've put the 12345: to test make sure I know where the code should be. This shows, but there is nothing after it.

Please could you point me in the right direction, like I said I've spent days trying to figure this out!

Thanks
Chris


texts:
Hi i am using below code for wishlist but i not getting below result.

$customer = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*');
$wishList = Mage::getModel('wishlist/wishlist')->loadByCustomer($customer);

Mage_Wishlist_Model_Wishlist Object
(
    [_eventPrefix:protected] => wishlist
    [_itemCollection:protected] =>
    [_store:protected] =>
    [_storeIds:protected] =>
    [_cacheTag:protected] => wishlist
    [_eventObject:protected] => object
    [_resourceName:protected] => wishlist/wishlist
    [_resource:protected] =>
    [_resourceCollectionName:protected] => wishlist/wishlist_collection
    [_dataSaveAllowed:protected] => 1
    [_isObjectNew:protected] =>
    [_data:protected] => Array
        (
        )

    [_hasDataChanges:protected] =>
    [_origData:protected] =>
    [_idFieldName:protected] => wishlist_id
    [_isDeleted:protected] =>
    [_oldFieldsMap:protected] => Array
        (
        )

    [_syncFieldsMap:protected] => Array
        (
        )

)


texts: Supplier,Brand,Category Name fetch of all products from sql ? magento2

texts:
Hi i want to extract list of all these fields with respect to products in my magento2 store from sql query but no idea in which table they are , please provide me necessary sql query for that job , i would be so thankful to you peoples!

Category |  BrandName | SupplierName |  ProductName | Barcode


texts:
After applying EmailMessageInterface_2.3.3_backward_compatibility_composer-2019-10-30-10-20-09.patch in Magento 2.3.3, getting below error in log files.

main.CRITICAL: Type Error occurred when creating object: Magento\Framework\Mail\EmailMessage, Argument 2 passed to Magento\Framework\Mail\EmailMessage::__construct() must be of the type array, null given, called in /var/www/html/m233/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116 [] []

Please advise


texts: Magento 2 How to hide payment method when the Basket Subtotal is ZERO

texts:
I want to hide the payment methods when the basket subtotal is "0"

i have few products in my website where price is "0" but the customer has to pay for shipping incase if they want to purchase the product i want to hide all the options for payment methods so there will be no transaction been made. Is this possible


texts: Get shipments by order number in Magento 1.9 API

texts:
I am trying to get the list of shipments for a given order via the API (I use the SOAP API but I don't think it matters).
I don't have the order ID but the 9-digit number (the increment_id from the sales_flat_order table).
I can see the following code in the API method I am trying to call:
    /**
     * Retrieve shipments by filters
     *
     * @param null|object|array $filters
     * @return array
     */
    public function items($filters = null)
    {
        $shipments = array();

        $shipmentCollection = Mage::getResourceModel('sales/order_shipment_collection')
            ->addAttributeToSelect('increment_id')
            ->addAttributeToSelect('created_at')
            ->addAttributeToSelect('total_qty')
            ->joinAttribute('shipping_firstname', 'order_address/firstname', 'shipping_address_id', null, 'left')
            ->joinAttribute('shipping_lastname', 'order_address/lastname', 'shipping_address_id', null, 'left')
            ->joinAttribute('order_increment_id', 'order/increment_id', 'order_id', null, 'left')
            ->joinAttribute('order_created_at', 'order/created_at', 'order_id', null, 'left');

        $apiHelper = Mage::helper('api');
        $filters = $apiHelper->parseFilters($filters, $this->_attributesMap['shipment']);
        foreach ($filters as $field => $value) {
            $shipmentCollection->addFieldToFilter($field, $value);
        }

        ...
        return $shipments;
    }

From: Mage/Sales/Model/Order/Shipment/Api.php (slightly edited for brevity).
I don't fully understand the syntax of this query but it seems like a join is made with the orders table, and then filters are added from the filters API parameter.
I have tried to call this API this way (calling from a C# program):
var shipments = Client.SalesOrderShipmentList(sessionId, new Filters
{
    filter = new AssociativeEntity[]
    {
        new AssociativeEntity
        {
            key = "order_increment_id",
            value = "000000006"
        }
    }
});

I am getting the following error:

'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'order_increment_id' in 'where clause', query was: SELECT main_table.increment_id, main_table.created_at, main_table.total_qty FROM sales_flat_shipment AS main_table WHERE (order_increment_id = '000000006')'

It seems that the join isn't being translated to SQL.
I have tried several things like prefixing the column name with the orders table name, to no avail.
Am I doing something wrong?
Thank you


texts: Update stock level in a particular warehouse

texts:
We have multiple warehouses for our web-store and we want to update stock via script whenever we get new stock in. However, when I try to update the stock level via program, the stock level goes up superficially but stock in the warehouse remains to show "0". This is a major problem and creates stock issues in our website.

I am attaching a snapshot for you to see what the issue is:

As you can see, the stock itself within the Product attributes state it is 22, however it's value within the warehouse stock = 0. How can I go about updating the stock value in the specific warehouse programmatically?

When I try to update stock via the following code :

$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($xyzModel->getId());
            $stockItem->setData('qty', $newQty);
            $stockItem->setData('is_in_stock', $newInStock);
            $stockItem->save();

It only updates the stock superficially, as shown in the photo.

Any help would be appreciated. Thanks in advance!


texts:
My current version of Magento is 2.3.2 . I followed the docs
and i executed the following commands in the console:

cp composer.json composer.json.bak
composer remove magento/product-community-edition --no-update
composer require magento/product-community-edition=2.3.3 --no-updatecomposer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.14.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~3.0.0 magento/magento2-functional-testing-framework:2.4.5 pdepend/pdepend:2.5.2 phpmd/phpmd:@stable phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:~3.4.0 --sort-packages --no-update
composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update

composer update

The result of the composer update is the following:

  [Composer\DependencyResolver\SolverProblemsException]
  Problem 1
      - Installation request for magento/product-community-edition 2.3.3 -> satisfiable by magento/product-community-edition[2.3.3].
      - magento/product-community-edition 2.3.3 requires guzzlehttp/guzzle ^6.3.3 -> no matching package found.
    Problem 2
      - magento/framework 102.0.3 requires guzzlehttp/guzzle ^6.3.3 -> no matching package found.
      - magento/module-wishlist-sample-data 100.3.3 requires magento/framework 102.0.* -> satisfiable by magento/framework[102.0.3].
      - Installation request for magento/module-wishlist-sample-data 100.3.* -> satisfiable by magento/module-wishlist-sample-data[100.3.3].

  Potential causes:
   - A typo in the package name
   - The package is not available in a stable-enough version according to your minimum-stability setting
     see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
   - It's a private package and you forgot to add a custom repository to find it

  Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Does anyone know how to fix the this guzzle issue ? Thnx!


texts: I'm using magento 1.9.2.4 with Authorize.net and PayPal. How to add CVV field to Magento checkout page?


texts: Allow single county gives empty drop down options in front-end checkout Country field in Magento 2

texts:
We have configured Allow Countries to Canada in admin. On fronted, by default the checkout page country field is loading with Canada, but if we click on country drop down, empty drop-down fields are displaying.

Reference code.

<option value=""> </option>
<option data-title="" value=""></option>
<option data-title="Canada" value="CA">Canada</option>

Reference image.

Can any one help us on restricting country field to only one country instead of displaying empty or please select value options, so that allowed country can be one country by default and country field is non-select.


texts: Magento 1.9 : Switch Products msrp/price in onepage checkout

texts:
I have created a custom module and created an observer method for "sales_quote_collect_totals_before" event. In this method, I check some of the quote data. Based on the current checkout data, I'd like to apply MSRP prices on products that are placed in the cart. Or switch products back to normal prices, if the criteria are not satisfied.

How can I do that?

Here's a sample of the code:

public function changeQuotePrices(Varien_Event_Observer $observer){
    if (Mage::app()->getRequest()->getModuleName() == 'onepage'){
        $event = $observer->getEvent();
        $quote = $event->getQuote();
        $quoteShippingAddress = $quote->getShippingAddress();
        if (!is_null($quoteShippingAddress->getId())){
            $quoteShippingAddress->collectShippingRates()->save();
            $quoteShippingMethod = $quoteShippingAddress->getShippingMethod();
            if($quoteShippingMethod && $quoteShippingMethod == "payonpickup_payonpickup"){
                $cart = Mage::helper('checkout/cart')->getCart()->getQuote()->getAllItems();
                foreach($cart as $item) {
                    $product = Mage::getModel('catalog/product')->load($item->getProductId());
                    $_msrpPrice = Mage::helper('core')->currency($product->getMsrp(),true,true);
                    if($_msrpPrice > 0){
                        /* apply msrp product prices */
                    }
                }
            }else{
                /* apply normal product prices */
            }

        }

    }
}


texts: How do I fix "Front controller reached 100 router match iterations" for broken link?

texts:
I'm using Magento ver. 1.9.2.1 and having trouble linking to one page on the front end. The link works fine some of the time and other times throws up this "Front controller reached 100 router match iterations". This problem occurs no matter where we try to link to this page from other pages on our site.
I've tried creating a new page and rebuilding the code in there and changing the page URL - but with no success.
Any advice much appreciated.


texts: Magento 2 Grid Serializer not reloading additional input column data

texts:
When using grid serializer with additional input columns, the additional fields are not actually reloaded, only an array containing the product_ids, but not the additional inputs.

<?xml version="1.0" encoding="UTF-8"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <container name="root" label="Root">
        <block class="VendorName\MyModule\Block\Adminhtml\Salesrep\Edit\Tab\Products" name="mymodule_edit_tab_products"/>
        <block class="Magento\Backend\Block\Widget\Grid\Serializer" name="products_grid_serializer">
            <arguments>
                <argument name="input_names" xsi:type="array">
                    <item name="0" xsi:type="string">product_field_select</item>
                    <item name="1" xsi:type="string">product_field_text</item>
                </argument>
                <argument name="grid_block" xsi:type="string">mymodule_edit_tab_products</argument>
                <argument name="callback" xsi:type="string">getSelectedProducts</argument>
                <argument name="input_element_name" xsi:type="string">products</argument>
                <argument name="reload_param_name" xsi:type="string">reload_products</argument>
            </arguments>
        </block>
    </container>
</layout>

The posted data for "reload_products" will only output an array with product keys:

array(
0 => "1805",
1 => "1604",
2 => "1804"
);

How can I include the additional "input_names" columns when the grid is reloaded?
Additional input information is lost.


texts: Valid values for the target path in Magento admin custom url rewrite section

texts:
I am writing a script to create the custom url rewrite in magento. This will take a csv file as input and create the url rewrite.

I have a field in the csv file as id_path also.

I have one concern that do I need to follow a particular format for the id_path or I can have any unique value in this field?

Following are given in magento documentation

somewhere/new-page

http://magento.com

suppose my target_path is destination.html should I use id_path as destination or destination.html ?


texts: How to set a Flag when paypal payment failed

texts:
I would like to set a flag in DB when a paypal payment failed.
Is there an Observer I can observe in order to achieve this ?


texts: Error "_colors.less" during static-content:deploy

texts:
I am using magento 2.1.4

The command $ php bin/magento setup:static-content:deploy has always worked fine for me without any error.

Recently, in attempt to install new plugins, running the same command will crash the site and produce similar errors for all themes.

It seems to indicate that the compiler is looking for this "_colors.less" file which doesn't exist.

Compilation from source:
adminhtml/Magento/backend/en_US/mage/gallery/gallery.less
Unable to get content for 'adminhtml/Magento/backend/en_US/css/source/lib/variables/_colors.less'

Anyone can help? Thanks.


texts: show html text message in Json set response popup

texts:
After complete the Ajax request I am getting a popup. I need below text in html format but it is showing as it is. I need link text with html format.

Mage::app()->getResponse()->setHeader('Content-Type', 'text/html')->setBody('Please click here link to run the import process');


texts:
I am using this refer module to fetch the username with newsletter in the footer. I properly installed this module, but I could not find the layout.xml file in the module. When I call it in my footer it does not work. Can anyone help me to solve this problem? Any help will be appreciated.

Refer module: github.com/aligent/newsletter-extended

call file in footer

<?php echo $this->getLayout()->createBlock('core/template') ->setTemplate('mediarocks/newsletterextended/subscribe.phtml')->toHtml();?>


texts: When posting a shipment, will the payment be captured?

texts:
When posting a shipment for an order using the Magento API, will the payment be captured?

Assume the following is true in this scenario:

Authorize.net is being used to process payments
Authorize.net is configured to Authorize Only as it's Payment Action
An order is placed using Authorize.net
A shipment is posted through the Magento API for this order

Does it matter if the entire order is shipped? Or if the shipment is only for part of the order?


texts: How can I explicitly get product image URLs which use the insecure media URL as their base?

texts:
Our default site configuration uses a CDN for our insecure media URLs and no CDN for our secure media URLs.  This is how things should work the majority of the time, but we have a case that needs to explicitly retrieve insecure URLs despite normally being a secure request.

The code which returns the URLs is using the product and the image helper to return resized versions of the media gallery:

foreach ($product->getMediaGalleryImages() as $image) {
    $imageUrl = (string) Mage::helper('catalog/image')
                ->init($product, 'image', $image->getData('file'))
                ->keepFrame(false)
                ->constrainOnly(true)
                ->resize($imageSize);

    $imageUrls[] = $imageUrl;
}

What's the best way to return resized insecure product gallery image urls?


texts: How to apply condition for specific page in magento?

texts: I want to apply condition for specific page coming from url. It is neither a category page nor a custom cms page. Url is like localhost/project/index.php/news/blog.html. I want to apply condition for this news/blog.html . News or blog is not a category and not any cms page. Can anybody help me?


texts: Magento 2: Update specific input field class via Knockout

texts:
I would like to update / add a class to a specific text input field via Knockout (as opposed to just using JQuery).

For example, I'd like to add another class to the input below.

And, more importantly, if I were to also want to update the 'value' and 'id' via the bindings, how would one do that?


texts: cart to show coupon or shopping cart rule with tax

texts:
There is major problem with cart and discounts,
it always shows amounts without taxes calculated for it.
For shopping cart rules, coupons etc.

How to manage the code to show discount with correct tax amount added to it right in the cart. This is the only one row in totals that cannot be set to show with tax applied.

Thanks
Tomek


texts: Use Magento 2 Web API to pull product data

texts:
I'd like to be able to recreate sections of my magento site outside of the magento root folder.

I have a Wordpress based site, and I'd like to have template files in the Wordpress theme be able to pull e.g. product details, the product template, or even the Magento checkout (if this is possible somehow).

This would be so that Wordpress takes responsibility for CMS content and frontend CSS, whilst Magento takes care of the product catalog and orders. There appear to be a few ways this might be possible, but I'm finding the official documentation pretty vague!

Note: I'm aware of using the Fishpig extension to pull Wordpress content into Magento, this isn't what I'm trying to do!

I believe my idea was possible in Magento 1 by doing something like this:
Load / Get a block outside of Magento routing for external use

I currently have my filesystem organised as follows:

/
/index.php
/wp/<wordpress>
/mage/<magento>

The index.php file is currently being used to initiate both the Wordpress session and the Magento session, my method was based on this post: How can I bootstrap Magento 2 in a test.php script?

Doing this lets me initiate the Wordpress frontend, and injecting the following into my wordpress template files works:

<?php echo get_class($this->_objectManager->create('\Magento\Catalog\Model\Category')); ?>

(outputs: "Magento\Catalog\Model\Category\Interceptor" )

So I can use a Mage function inside a Wordpress  theme. But it's a hacky approach and creates a clash on the __() function, since both Mage and Wordpress declare their own version of this function as part of their respective translations modules (I commented it out in app/functions.php).

I think the better way to do it might be using API calls: http://devdocs.magento.com/guides/v2.0//extension-dev-guide/service-contracts/service-to-web-service.html

My question is - which approach (SOAP vs REST vs something else) would seem simplest and most suitable and why? Clearly I am going to have to do some learning here, but is there any documented example of anybody doing anything similar to this?

or should I abandon this idea completely?!


texts: What is name file responsible for sending email to guests frontend order? Magento 2.1

texts:
What is name file responsible for sending email to guests frontend order?

Thanks


texts: how to move fotoroma navigation thumbnail vertical to horizontal in magento 2

texts: how to move fotoroma navigation thumbnail vertical to horizontal to the bottom of the main image in magento 2


texts: How to get dial code from selected country in textbox before telephone filed using knockout js

texts:
I want to develop functionality in that i have created one field for country dial code on checkout page and according to changes of country dropdown dial code will be changes automatically in that field.
So can anyone have idea then please share with me.


texts: Make the default Country India or some others

texts: when I am adding shipping address the default country is United States. How can I make it India?


texts: How to redirect user from magento store to another website , like to facebook or twitter?

texts:
I have tried to write as follows

facebook

in my template file located at:

  /app/code/Your/Store/view/frontend/templates/todays/deal.phtml

But it is redirected to

  http://192.168.0.147/yourStore/your-store/todays/www.facebook.com/
  So it takes me no where.
  In above redirected link your-store is frontname of my module in which my template resides.


texts: Products in cart removed when user logs out

texts:
When a customer is logged in, he got some products in the cart and he logs out.
The products are removed from the cart and the cart is completely empty.

How can I fix that when a customer logs out, the products stay in the cart?

I do use the persistent shopping cart


texts: magento2 rest api ship to name not adding after creating shipment

texts:
Ship to name is not adding while creating shipment using Rest Api with below api url:

http://127.0.0.1/magento225/rest/V1/shipment/

Body:

{
 "entity":{
   "orderId":9,
   "store_id":1,
  "items":[{"orderItemId":15,"qty":1}]
  }
}

please find the below screenshot:


texts: Magento 1.9 how to set products to out of stock if quantity is 0 using php?

texts:
The website I am currently working on has a bug where it will not update the in stock status to out of stock when the quantity is zero.

Importing a product that has zero quantity and then a reindex does not work.

I have also done an SSH reindex and rebuild the tables using the shell indexer.php.

Editing the product in the inventory tab of a product to set the quantity to zero will set the product to out of stock.

I need a way to use php and cron to do this every couple of hours to compensate for this error.

I found this code on the net and have tested it before and made it work but now it no longer works:

$collection = Mage::getResourceModel('cataloginventory/stock_item_collection');
    $outQty = Mage::getStoreConfig('cataloginventory/item/options_min_qty');
    $collection->addFieldToFilter('qty', array('gt' => $outQty));
    $collection->addFieldToFilter('is_in_stock', 0);
    foreach($collection as $item) {
        $item->setData('is_in_stock', 1);
    }
    $collection->save();
    Mage::app()->getCacheInstance()->cleanType('block_html');

Any help is appreciated.


texts: How to downgrade Magento Enterprise 2.x to Community edition

texts:
My site uses Magento EE 2.1.8, I want to downgrade to Magento CE 2.1.8 , I havn't found steps to do that. I just found lot of articles for Magento 1.
I see that there are two methods for downgrading,

Either deleting some enterprise files and db tables from the enterprise setup, or
Install a fresh CE setup and migrate extensions and data.

Any help please?


texts: Relation between Search results and Inventory data / settings? Some things work, some don't

texts:
I have a ton of items I imported via REST API.  They don't show up in search.  For this test I'm just using the LIKE operator.  Magento 1.8

What works:

Manually edit a single product
Set qty=1 and is_in_stock to yes/1
If prompted, redo search index

The problem is this doesn't scale; I have tens of thousands of products.

What doesn't work, attempt 1:

System -> Configuration -> Catalog / Inventory -> Stock Options
Display Out of Stock Products = Yes
Redo search index (all indexes, just to be safe)

This is the purported fix that I found on Google a while back, but annoyingly doesn't work.

What doesn't work, attempt 2:

Run SQL command: UPDATE magento.cataloginventory_stock_item SET qty = 1, is_in_stock = 1;
Redo search index (all indexes, just to be safe)

I know you're not supposed to do this, but this is a dev system and I wanted to try.

Use REST API?

I believe I tried this some time back and it didn't work.
Even if it did work, it'd be too slow.  We're moving away from the REST API because it takes days / weeks to complete for a large data-set.

Questions:

When I manually edit a product and set qty=1 / in-stock=yes, it's clearly doing something "special", above and beyond tweaking the cataloginventory_stock_item table.  What else is it doing?
Is there some way to simulate whatever that is?
What the heck is the point of the "Display Out of Stock Products = Yes" option if it doesn't affect search?

Magento seems to do a lot of internal filtering... I'm guessing that something in my data doesn't quite match.


texts: Magento 1.9 customer can not login after SSL installation

texts:
I am using magento 1.9 version for my site. I have installed SSL coupe of days back after that customer are not able to to login to my website.

I followed this solutions

Can't log into Secure (SSL) Magento site on front end in Chrome

magento 1.9 customer can not login

Customer Login Doesn't Work in 1.9

but still customer can not able to login to the site.


texts: Pop-up modal on clicking 'Add to Cart' button!

texts:
In Magento-2.2, when we click 'Add to Cart' button,
we need to show the following message as a pop-up modal:

  "Product is added to cart!"

I know how to create modal outside of Magento with css.

But I failed to implement that inside Magento
by changing in this file:

app/design/frontend/MyVendor/ThemeName/Magento_Catalog/templates/product/view/addtocart.phtml

  REMOVEED CODE:

<button type="submit"
        title="<?= /* @escapeNotVerified */ $buttonTitle ?>"
        class="action primary tocart"
        id="product-addtocart-button">
    <?= /* @escapeNotVerified */ $buttonTitle ?>
</button>

  ADDED CODE:

<button type="submit"
        title="<?= /* @escapeNotVerified */ $buttonTitle ?>"
        class="action primary tocart"
        id="product-addtocart-button">
    <?= /* @escapeNotVerified */ $buttonTitle ?>
</button>

    X

Product is added to cart!

Have you done this already?
Please show us your experience.
Is there any other way?
Big Thanks!


texts: How to get customer billing address id using soap api?

texts:
I want to get customer all information using soap api.
Code I am using

<?php
require_once "includes/config.php";
$session_id = $_SESSION['session_id'];
//call customer.list method
$result = $cli->customerCustomerList($session_id);

//echo "
";
//var_dump($result);
//echo "
";

foreach($result as $customer){
    $customerInfo = $cli->customerCustomerInfo($session_id, '135');
    //$address = $cli->customerAddressInfo($session_id, $customer->customer_id);
    //echo $customer->customer_id;
    echo "
";
    print_r($customerInfo);
    //print_r($address);
    echo "
";
    break;
}

And this is my response

object(stdClass)#2 (11) {
  ["customer_id"]=>
  int(135)
  ["created_at"]=>
  string(25) "2013-05-16T02:46:11-07:00"
  ["updated_at"]=>
  string(19) "2013-06-24 19:50:46"
  ["store_id"]=>
  int(0)
  ["website_id"]=>
  int(1)
  ["created_in"]=>
  string(5) "Admin"
  ["email"]=>
  string(19) "johndoe@example.com"
  ["firstname"]=>
  string(4) "John"
  ["lastname"]=>
  string(3) "Doe"
  ["group_id"]=>
  int(1)
  ["password_hash"]=>
  string(97) "60d0b6777081273c90d9dcf6342b18d511d539f5f119b56a364b2b0ff6dd29f1:O9hr8Lafe1STOCnJkp2ZHjFMrfM9plGn"
}

I can not see the customer address id on response. So how can I get address of the customer?? Can anyone help me??


texts: Adding multiple coupon codes to one shopping cart price rule

texts:
I have a list of 10 coupon codes and I would like to add them to one shopping cart price rule.

I wonder if this is possible.

Thanks for your help!


texts: Changing category url key is not updating URL Rewrites

texts:
I have a category called "Sport Shoes" in magento. The category has lots of subcategories and products on it. It's url key is "sport-shoes".

After changing category url key to "shoes-for-sports", no magento URL Rewrite is updated. All redirects are the same and no category or product url containg "shoes-for-sports" is working.

I have tried re-indexing products but that didn't solve the issue. I do not dare to use some kind of url regenerate extension, cause my website contains 150k+ products. It would take days to complete such a proccess.

But this is feature that should work ok in magento by default.

How can I fix it?


texts: Why is full page not cached in Magento 2 even if FPC is enabled?

texts:
I am using Magento EE 2.1.1 and FPC is enabled (built-in).

What I suppose is, if any page(homepage, category or product pages) is accessed next time, Magento should dispatch whole page content from the cache. But this is not happening. I can see many individual blocks are getting rendered.

Can anyone shed some light on it, please?

Is it normal behaviour? or a bug in Magento EE 2.1.1
Will full page only be cached in the case of Varnish instead of built-in FPC?

NOTE: The value of HTTP header X-Magento-Cache-Debug is always MISS


texts: Shipping Method is not rendered in Checkout though it is returned

texts:
I am using Magento 2 version 2.1.8

In checkout step, we have the Flat Rate shipping method enabled & we added a simple product to cart.

We can see the Flat Rate method returned via AJAX but the method is not displayed in frontend. It is still "Sorry, no quotes are available..."

Check

How can I debug the issue on Magento 2?

Where is the code check the shipping methods to show ?


texts:
Good day

is Magento 1 still being supported at this moment?
Because I see no replies in the issues that are posted recently like 2019.
All the answers are two years most of them are no longer relevent like this

  Warning: is_readable() expects parameter 1 to be a valid path, string given  in ...../web/lib/Varien/Io/File.php on line 535

I have been sitting with this error and doesn't seem like I am getting any answer in most magento platforms even here I haven't been answered.

Thanks


texts: Remove header part and add new header from my custom module magento 2.0.1?

texts:
I have created one module and theme, theme extend to magento blank.I am trying to remove the header part in app/design/frontend/Gworks/Gtheme/Magento_Theme/layout/default.xml. But none of changes in my page. Please any help to dictate where I did mistake

below one is my dafault.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">     <body>         <remove name="header.container"/>     </body> </page>

Magento Blank theme dafault.xml path vendor/magento/theme-frontend-blank/Magento_Theme/layout/default.xml

at the same time how to add new header?


texts: Adding a second product grid in category admin for "featured products"

texts:
I would like to add a new category products tab on the category admin page with a product grid same as the default category product grid.

The only difference is, i need this grid to save selected products in a custom table with the following fields:

1.id
2.product_id
3.category_id
4.position

This will then allow me to have "featured products" with separate product ordering as shown in the wireframe below:

Screenshot of Subcategory displaying the "featured products".

Initial thoughts

Build a custom tab similar to Mage_Adminhtml_Block_Catalog_Category_Tab_Product
Create an observer to save category relation on
catalog_category_save_after
Get product ids with current category id from custom table and mark as selected


texts: Magento 2 Rest Api Based Layered Navigation WIth Selected FIlter

texts:
I am looking to write rest API for layered navigation with selected filter .
I have checked below link
https://magento.stackexchange.com/questions/262052/magento-2-api-how-to-get-layer-navigation-filters...
But it just give layered navigation based on category not after filter selected by user like color,brand etc.
Any suggestion and help ?


texts: How to add serializable attribute to category?

texts:
I tried this

$installer->addAttribute(
    'catalog_category',
    'ser_attr',
    array(
        'input_renderer' => 'namespace_module/block',
        'backend' => 'adminhtml/system_config_backend_serialized_array',
    )
);

and

class namespace_module/block
    extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
{
    protected function _prepareToRender()
    {
        $this->addColumn('price', array(
            'label' => 'price'
        ));

        $this->_addAfter = false;

        return $this;
    }
}

But then when I visit edit category page in admin, there's no html/css/js available, only the table with price row.

By the way, I want something like this: http://www.integer-net.com/2015/03/17/how-to-create-tables-in-magento-system-configuration/ and I followed that tutorial, but it uses system.xml, not a setup script.


texts: For Diskstation: Which type of product should I choose?

texts:
In one Diskstation there are 4 to 20 or more bays where we can keep our Drives of storage 500GB,1,2,3,4,5,6,8,10TB inside each bay.

Let us say I have diskstation of 4 Bays So total 40TB can be stored in it. Each bay can hold maximum 10TB in it.

Let us say Diskstation price is $100
500 GB Drive Price is $10
1 TB Price is $20 and so on

So customer will see diskstation product at $100
And he can choose in 1st bay what storage capacity he needs,
he can choose in 2nd bay what storage capacity he needs,
he can choose in 3rd bay what storage capacity he needs..

My question is that which product type should i choose and how to do this?

Because in 4 bays product, each bay have 9 Choice. And there is some products with 20 bays also


texts: Magento 2.3 What are the profits of using db_schema.xml instead of using setup script?

texts: Magento 2.3 used db_schema.xml instead of setup script. What are the benefits of using db_schema.xml over setup script?


texts: Magento 2 add array to collection in Admin Block Grid

texts:
I am trying to add an array to collection in Block Admin Grid but i want able to do that,

 protected function _prepareCollection() {
        //echo "preparecollection function"; exit;
       $collectionlist = array();
       $collection = $this->_collectionFactory->create()
                          ->addAttributeToSelect('cb_exitintentt')
                          ->addNameToSelect()
                          ->addAttributeToSelect('group_id')
                          ->addAttributeToFilter('cb_exitintentt', 1)
                          ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
                          ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
                          ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
                          ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
                          ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');

       foreach($collection->getdata() as $cusList ){

            $ordercollection = $this->_orderCollectionFactory->create()
                                   ->addFieldToSelect('*')
                                   ->addFieldToFilter('customer_id',$cusList['entity_id'])
                                   ->setOrder('created_at','desc');
          // $collection->getSelect()->from(null, array('last_order_date' => $data['0']['created_at']));
           $coutOrders = $ordercollection->count();
           if($ordercollection->getData()){
                $data = $ordercollection->getData();
                $sum = array_sum(array_column($data, 'base_grand_total'));
                $lastOrderCreatedDate =  $data['0']['created_at']; //exit;
                $collectionlist[] = array('entity_id' => $cusList['entity_id'],
                                          'email' => $cusList['email'],
                                          'created_at' => $cusList['created_at'],
                                          'group_id' => $cusList['group_id'],
                                          'billing_telephone' => $cusList['billing_telephone'],
                                          'billing_country_id' => $cusList['billing_country_id'],
                                          'billing_region' => $cusList['billing_region'],
                                         );
              // print_r($collectionlist);
           }
       }
    $attr = $collection->getSelect()->from(null, array('last_order_date' => $data['0']['created_at']));
    $this->setCollection($collection);

    return parent::_prepareCollection();
}


texts: Magento 2.3.3: Does catalog_product_view.xml not pass down containers to specific product types?

texts:
I have created a catalog_product_view.xml in my theme and when I go to create a widget and select all product types in the layout updates section I can see my custom container I created.

If I then change to simple product type I can't see my container. Do I really need to configure each product type individually?

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <!-- Custom Containers -->
        <referenceContainer name="content">
            <referenceContainer name="product.info.main">
                <container name="test.container" label="Test Container" after="product.name" htmlTag="div" htmlClass="test-container" />
            </referenceContainer>
        </referenceContainer>
    </body>
</page>


texts: Is it worth to prepare for Magento 2 Certification in 2018?

texts:
I'm new to using Magento and wish to get into Magento 2 development. I've got some questions—

What languages should one learn before getting into Magento 2 learning/development?
What are some good online resources (for beginners) to learn Magento 2?
Is getting a Magento 2 certificates (Associate Developer and/or Professional Developer) worth it?  The two exams together cost more than $450 and definitely demand a lot of time in preparation.
Whether these certificates are actually valuable in IT industry (as of 2018)?


texts: Showing Dropdown next to Related Products with Custom Options

texts:
Hi I have related simple products attached to all my simple products. An example is I sell a teddybear, and the customer can optionally add a hat to the teddybear at an extra cost. Normally, then can see the hat on the right, and tick the checkbox before clicking Add to cart - which adds both the teddybear and the hat.

Problem is when I have custom options on the hat for different colours or sizes. The checkbox disappears from the related list.

Using Magento 1.8 Community, does anyone know how to add the dropdown choice next to the checkbox (and ensure the dropbox is chosen if checkbox is ticked before adding main product to cart)

Many thanks


texts: Magento 2 : Save date and MultiSelect field value added in Ui_Component

texts:
I've been facing issue with saving date field value.

I've added custom date field in sales_rule form , Field is added but can't able to save its value to DB.

Previously i added text field and its working fine but I am having issues for date and MultiSelect input.

  Vendor/Module/adminhtml/ui_component/sales_rule_form.xml

<field name="end_date" formElement="date">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">sales_rule</item>
            </item>
        </argument>
        <settings>
            <validation>
                <rule name="validate-date" xsi:type="boolean">true</rule>
            </validation>
            <dataType>text</dataType>
            End Date
            <visible>true</visible>
            <dataScope>end_date</dataScope>
        </settings>
    </field>

    <field name="brand_ids" formElement="multiselect">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">sales_rule</item>
            </item>
        </argument>
        <settings>
            <validation>
                <rule name="validate-brands" xsi:type="boolean">true</rule>
            </validation>
            <dataType>number</dataType>
            Brand List
            <dataScope>brand_ids</dataScope>
        </settings>
         <formElements>
        <multiselect>
            <settings>
                <options class="Vivek\ShopAsGroup\Block\SalesRule\BrandList"/>
            </settings>
        </multiselect>
</formElements>
    </field>

What is missing ? Any suggestion would be really helpful to me.

Thanks in Advance.


texts:
I have a Magneto 2.2.3 instance and when we check for security scan it is showing below error:

  We have determined that your Magento installation's configuration
  file(s) are publicly accessible over HTTP

user.ini

How can I resolve this?

Thanks in advance.


texts: Magento 2: How to complete AJAX request in Plugin?

texts:
Magento 2 : Add to Cart Button redirect to contact page

I have the below code which works fine. But it's not completing the AJAX request.

namespace Custom\Module\Plugin\Checkout\Controller\Cart;

class Add {

    protected $_checkoutSession;
    protected $_messageManager;
    protected $_redirect;
    protected $_request;
    protected $_response;

    public function __construct(\Magento\Checkout\Model\Session $checkoutSession, \Magento\Framework\App\Response\RedirectInterface $redirect, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\App\RequestInterface $request, \Magento\Framework\App\ResponseInterface $response) {
        $this->_checkoutSession = $checkoutSession;
        $this->_redirect = $redirect;
        $this->_messageManager = $messageManager;
        $this->_request = $request;
        $this->_response = $response;

    }

    public function beforeExecute(\Magento\Checkout\Controller\Cart\Add $subject) { // Before Product Added to Cart
        $this->_messageManager->addError(__('Error'));
        $this->_request->setParam('product', false); // Will not add product to Cart
        $this->_response->setRedirect($this->_redirect->getRefererUrl());
        $this->_checkoutSession->setNoCartRedirect(false);
    }
}

It keeps showing "Adding.." on the "Add to Cart" button.


texts: Which PDF Support Chinese Language In Magento?

texts:
Which PDF Support the Chinese Language In Magento?

We need to send Chinese order email from Chinese store of Magento.

so please suggest me which PDF support?


texts: Can't view orders in admin if quote or product is deleted

texts:
When trying to open some orders from the order grid in the admin panel, the resulting page is mostly blank. I don't see any customer details, order line items, totals, etc.  When looking at the system.log I see errors like this for different orders

[2017-06-05 23:05:25] main.CRITICAL: No such entity with cartId = 67 [] []
[2017-06-05 23:06:34] main.CRITICAL: Requested product doesn't exist [] []

That seems to suggest that if either the quote for the order, or the product ordered, was deleted, it can't be shown in the admin.

I checked the MySQL database and it seems to support this theory.  If the sales_order.quote_id doesn't exist, or the sales_order.quote_id -> quote_item.sku doesn't exist you can't view the order.

Is this is bug?  Isn't deleting quotes and products a normal operation?


texts: magento2 bulk edit the meta-titles for the category pages

texts:
I need to bulk edit category meta title in magento2.
Can anyone tell me the method or any way?


texts:
i'm working on a magento CE 1.7.0.2 and I have to update indexes from shell. However I'm trying the commands:

php -f indexer.php info

and also

php -f indexer.php -- -reindex catalog_url

but they don't show any output.

UPDATE

If I add -d display_errors=1, it returns:

Fatal error: Call to a member function getSingleton() on a non-object in indexer.php on line 45

Any idea why?
thanks so much


texts: Magento 2: Translate input placeholder attribute string in Knockout html template

texts:
I can translate strings in Knockout html templates like this:

And the translations come from pub/static/<area>/<vendor>/<theme>/xx_XX/js-translation.json.

But I do not know how to translate a value in an HTML attribute, e.g. the placeholder attribute on an input tag, like

<input type="text" placeholder="Email" />


texts: Magento2 When does magento considers a cart to be abandoned

texts:
Magento2 I would like to know when does Magento consider a cart to be Abandoned.
In short, is there any specific changes made in cart or cart table when notifies that the  cart is abandoned cart.


texts: How to display all submenu in Magento 2?

texts:
I want to display level0 and level1 of menu in the same line like in photo:

Any help please ?
Thanks


texts: Replace product image without getting _1 in filename

texts: I'm in the process of replacing my product images with new photos with the same filename.  When I delete the old image in magento then reupload the new image, it adds _1 to the end of the filename, which makes me think it hasnt really deleted the old image.  How can I fully delete the old image via magento so when I re-upload it keeps the correct filename?


texts: how to get catalog products filtering attribute code magento 1.9?

texts:
Actually i want to get catalog products filtering attribute code magento 1.9.If anyone has idea regarding it.

generally we use Mage::getModel('catalog/product') here using this factory instance i want to filter the products with attribute codes

<?xml version="1.0"?>
<config>
  <modules>
    <Shop_Custommodule>
      <version>0.1.0</version>
    </Shop_Custommodule>
  </modules>
  <frontend>
    <routers>
      <shop>
        <use>standard</use>
          <args>
            <module>Shop_Custommodule</module>
            <frontName>shop</frontName>
          </args>
      </shop>
    </routers>
        <layout>
          <updates>
            <shop>
              <file>shop.xml</file>
            </shop>
          </updates>
        </layout>
  </frontend>
  <global>
    <helpers>
      <shop>
        <class>Shop_Custommodule_Helper</class>
      </shop>
    </helpers>
    <blocks>
      <shop>
        <class>Shop_Custommodule_Block</class>
      </shop>
    </blocks>

  </global>
  <adminhtml>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <shop>
                                        <title>shop - All</title>
                                    </shop>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
  </adminhtml>
</config>


texts: Magento 2 I want my clothing size to be remembered across for the session

texts: A selected size filter in layered navigation on a category page must be remembered and reapplied automatically when again visiting that category or any other category in that session.


texts: Review Form is not showing on the product page

texts:
I have added the following configuration code to the config.xml to show the review section on product view but it just showing the heading of the review section and not the actual form there.

 <block type="review/product_view_list" name="product.reviews" as="reviews" template="review/product/view/list.phtml" after="additional">
   <action method="addToParentGroup"><group>detailed_info</group></action>
   <action method="setTitle" translate="value"><value>Reviews</value></action>
 </block>

What else i need to do to make it work in perfect way,


texts: How to prevent Magento to generate urls for disabled categories?

texts:
Using Magento 1.9.x

I have a lot of disabled categories that I'm utilizing in my store to view specific products on Magento frontend.

Magento creates Urls for those disabled categories with and products are assigned to them.

I have this setting "Use Categories Path for Product URLs" as No

Any suggestion on how to prevent Magento stop generating URL for disabled categories would be helpful.


texts: Magento2 Avalara Tax plugin issue with EE 2.3.3 version while placing an order

texts:
I have used following avalara tax module in Magento 2.3.3 EE version:

https://marketplace.magento.com/avalara-avatax-magento.html
i have configured all settings properly and taxes are also showing correctly in cart and checkout pages but i am getting following error while placing any order at last step(payment step):
{
    "0": {
        "code": 500,
        "message": "Fatal Error: 'Object of class Magento\\Company\\Model\\Order could not be converted to string' in '/var/www/html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php' on line 91",
        "trace": "Trace is not available."
    }
}

can anyone help me out what could be an issue?


texts: How Can I add Any jQuery Plugin in Magento 2.3.0

texts:
I am trying to add owl Carousel js file in app/design/frontend/My/theme/web/js/carousel.min.js
but I am unable to add it to my site header.


texts:
Unsure what triggers these in the system.log but it's writing hundreds of these to the log constantly.

DEBUG (7): <?xml version="1.0"?><widgets></widgets>

DEBUG (7): <?xml version="1.0"?><jstranslator></jstranslator>

DEBUG (7): <config/>

For example.

Please could someone advise how to debug these or find the cause/how to remove them? Have been unable to find much documentation of these errors.

Thanks in advance.


texts:
How can I delete a customer in magento by refering using its object from Mage::getModel("customer/customer") ?

I already researched in google and with the bad luck I found nothing.


texts: Native product commenting system for Magento 2

texts:
I have not been able to find a native commenting system for Magento 2.

I am in the need of a commenting system that is "not" working based on Disqus, Facebook or any third party website, but runs on the shop's server.

Users should be able to comment on each product's page and the commenting system can be moderated through the Magento admin panel. Is there a Magento Module that offers such functionality?

As an example, please look at the attached screenshot. It explains that I am not looking for a reviewing system that we already have in Magento, but instead, I am looking for something more like what we get when we install a Disqus or Facebook comment module on Magentto. So if a Disqus comment is added (for example) then users can use their Disqus ID to add a comment on a product's page. I need that sort of commenting but without being connected to a third party website, I want users to use their own name, and info stored in their account, in the store. I hope it makes sense and if not, please let me know and I will explain more.

Any help is greatly appreciated.

--


texts: Does Persistent Shopping Cart work for guest (unlogged) visitors?

texts:
I'm wondering if the settings described under persistent shopping cart work for guest (unlogged) visitors. I.e. can I set them so that when a visitor comes in, adds things to cart, closes the browser, comes back a month later, he will see the items he added before?

The description of the "Persist Shopping Cart" option made me suspect so:

  Set Persist Shopping Cart to one of the following:

  Yes

  If the session cookie expires, the persistent cookie is preserved. If
  a guest shopper later logs in or creates a new account, the shopping
  cart is restored.

  No

  The shopping cart is not preserved for guests after the session cookie
  expires.

However, on trying it out, it seems that persistent_shopping_cart cookie is only created after log in.

I know I can "sort of" make it work by extending regular session expiration to e.g. one year, as described e.g. here but that's not what I'm after.

Many thanks!


texts: Multistore with 2 domains - theme issues

texts:
Using this knowledge base entry from Magento I have tried to set up multiple domains to access my Magento store

System > Manage Stores

in the menu System > Manage Stores I have the following

System > Configuration

in the menu tab of System > Configuration I have set the Base URL with trailing slash (/) for both Unsecure and Secure

in the design tab of System > Configuration (both themes I am trying to use are in default)

Current Package:     [ default     ]

Translations:        [             ] (blank)
Templates:           [             ] (blank)
Skin (Images / CSS): [             ] (blank)
Layout:              [             ] (blank)
Default:             [             ] (blank)

Originally I had tried using this method to set the theme, it had not worked, then I found the tutorial and went to that method.

.htaccess

in my .htaccess I have (which should cover www.site1(2).com and also site1(2).devenv.com)

SetEnvIf Host .*site1.* MAGE_RUN_CODE=base
SetEnvIf Host .*site1.* MAGE_RUN_TYPE=website

SetEnvIf Host .*site2.* MAGE_RUN_CODE=c_base
SetEnvIf Host .*site2.* MAGE_RUN_TYPE=website

In index.php I echoed out the env variable to make sure I was getting what was needed, and did get base on site1 and c_base on site2

System > Design

I am setting my template using the System > Design menu item and only 1 theme works for both sites (default/mycustomtheme)... none of the default themes work (default/default, default/modern, rwd/default)

Results

If I attempt to load any theme other than this custom theme I get a page with no CSS files loaded, no theme files loaded (though if you search for a file that falls within the theme it is there, for instance http://site1.devenv.com/skin/frontend/default/mycustomtheme/images/footer-logo.png, the file is there and exists, along with the css files (there is no script or link for any theme files in the header, in fact there is nothing between the opening head and closing head tags)

/skin/frontend/default/mycustomtheme/ works for all stores
/skin/frontend/default/{default|blank|iphone|modern}/ does not work for any store
/skin/frontend/rwd/default/ does not work for any store

I do know that the site1 and site2 are both being fetched properly as they have different home page cms, and the proper home page cms is being called with the proper url

Questions

How can I get the ability to alter themes within my stores (what am I doing wrong or missing)?
Could it be a server setting blocking this?  Is there something server side I should be looking at?

log

in my system.log file I have the following error when trying to load a new template

2015-03-05T15:20:50+00:00 CRIT (2): Not valid template file:frontend/base/default/template/ec/header.phtml
2015-03-05T15:20:51+00:00 CRIT (2): Not valid template file:frontend/base/default/template/ec/footer.phtml


texts: Magento 1.9 how to run product alert notifications after updating stock item

texts:
I am updating products stock like this:
$_product = Mage::getModel('catalog/product')->loadByAttribute('sku',  $sku);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
if ($_product) {
    $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product);
    if (!$stockItem->getId()) {
        echo "No stock item for $sku".PHP_EOL;
    } else { // if there is, update it
        $stockItem->setQty($qty);
        $stockItem->setManageStock(true);
    }
    echo "$sku UPDATED to $qty".PHP_EOL;
    $stockItem->save();

} else {
    echo "$sku does not exist".PHP_EOL;
}

This works fine, but I need the alert emails to be sent (back in stock notifications), but with this code they do not run. I have also tried adding the below:
$_product->setData("_hasDataChanges", true);
$_product->save();

To try to force the catalog_product_save_after event to fire. But it doesn't
Any ideas?


texts: How to product counts by click plus button and minus button in magento 2

texts: I tried plus and minus buttons for product counts increase and decrease in proceed to checkout dropdown menu but i can't. Can anyone have an idea about this?


texts: My french store tax calculating wrong tax in shopping cart

texts:
My french store (a testing site) is calculating the wrong tax in shopping cart, but right in backend panel, in Manage tax rate, the french store rate is set to 20, for example, if the price is 139, the right tax should be 23.17 (my production site is showing 23.17 as same as i see in backend)

The shopping cart should show the tax amount as same as i see in backend (23.17 but not 27.8), anyone know what is the problem?


texts:
I added a custom attribute to customer entity with a custom source model in which I defined my toOptionArray method but when I open the customer to edit, I am getting this error:

Fatal error: Call to undefined method Namespace_Module_Model_System_Config_Source_Customer_AllowedPaymentMethods::setAttribute() in /home/ashfame/www/domain.lo/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php on line 389

What's setAttribute method supposed to do? I don't see it being defined in any other source model file in core? Should I be extending my class with some abstract class, then again all core source models don't extend from any class. What piece am I missing here?


texts:
Alright, this is pretty embarrassing. Setup scripts are supposed to be no problem, but I am having an awful time executing my install script.

config.xml

<config>
  <modules>
    <Redacted_Tsc>
      <version>1.0.0</version>
    </Redacted_Tsc>
  </modules>
  <global>
    <resources>
      <tsc_setup>
        <setup>
          <module>Redacted_Tsc</module>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </tsc_setup>
    </resources>
  </global>
</config>

mysql4-install-1.0.0.php

$installer = $this;
$installer->startSetup();

$tscRoot = Mage::getModel('catalog/category')
    ->setName('Redacted TSC')
    ->setUrlKey('tsc')
    ->setIsActive(1)
    ->setIsAnchor(0)
    ->save()
    ;
$site = Mage::getModel('core/website')->getCollection()
    ->addFieldToFilter('code', 'redacted')
    ->getFirstItem()
    ;

$storeGroup = Mage::getModel('core/store_group')
    ->setWebsiteId($site->getId())
    ->setName('TSC')
    ->setRootCategoryId($tscRoot->getId())
    ->save()
    ;

$store = Mage::getModel('core/store')
    ->setWebsiteId($site->getId())
    ->setGroupId($storeGroup->getId())
    ->setName('TSC Store')
    ->setIsActive(0)
    ->save()
    ;
$installer->endSetup();

Couple of notes about the installer: I decided that it would be nice to have automated site/store group/store/root category creation so that I can be certain that the developed product is the same as what's in production. Figured an installer would be a handy way to go. If I'm crazy, let me know!

Redacted_Tsc.xml

<config>
  <modules>
    <Redacted_Tsc>
      <active>true</active>
      <codePool>local></codePool>
    </Redacted_Tsc>
  </modules>
</config>

Checklist:

There's no entry in the core_resource table
Caches are 100% off


texts: temando error when we tried to edit/add products in magento

texts:
When we tried to edit/add products, we are getting following error in magento

Source model "temando/entity_attribute_source_packaging_mode" not found for attribute

"temando_packaging_mode"


texts: Change default logo to .SVG image programatically

texts:
Magento does not support loading svg through admin panel, so i am trying to change the website logo through code.

My logo is here:

public/app/design/frontend/Name/Name_theme/web/images/my-logo.svg

I changed the file name here:

public/app/design/frontend/Name/Name_theme/Magento_Theme/layout/default.xml

it now looks like this:

<block class="Magento\Theme\Block\Html\Header\Logo" name="logo">
    <arguments>
        <argument name="logo_img_width" xsi:type="number">147</argument>
        <argument name="logo_img_height" xsi:type="number">24</argument>
        <argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
    </arguments>
</block>

I deleted the cache using the command:

rm -rf public/var/cache

But this does not seem to help and my logo is not displaying.

Are there any other ways i can achieve this?


texts:
I have following module for courses added on my magento store

class Abhi_Courses_Block_Course_List extends Mage_Core_Block_Template
{
    public function __construct()
    {
        parent::__construct();
        $courses = Mage::getResourceModel('abhi_courses/course_collection')
                         ->setStoreId(Mage::app()->getStore()->getId())
                         ->addAttributeToSelect('*')
                         ->addAttributeToFilter('status', 1);
        $courses->setOrder('display_order', 'asc');
        $this->setCourses($courses);
    }

and following code to get courses list on list template.

$_courses = $this->getCourses();

I have two websites setup, one for UK and another for US and there are two different display order fields for both websites

display_order_us
display_order_uk

I am able to get the current website store on list template but not able to sort the courses based on particular field like if user is on UK site courses should be sorted by display_order_us field value.

I tried following but its not working ( passing field as parameter )

$_courses = $this->getCourses('display_order');

and in controller

public $param;
     public function __construct($sort_order='')
    {
        parent::__construct();
        $courses = Mage::getResourceModel('abhi_courses/course_collection')
                         ->setStoreId(Mage::app()->getStore()->getId())
                         ->addAttributeToSelect('*')
                         ->addAttributeToFilter('status', 1);
        if($sort_order !=''){
          $courses->setOrder('display_order', 'asc');
        $this->setCourses($courses);
    }


texts:
We have implemented one local solutions for Magento invoices, where there is an unique code on every Magento invoice (this is according to our local law). We see that now every default Magento invoice has that unique code. After the installation of extension, we have embeded that code in Abstract.php to be dispalyed in all invoices that are generated.

We will now like to seperate Magento invoices and leave classic Magento invoices for all payment methods besides credit card payment. As we are Magento starters, we dont have deep understanding of Magento invoices, so we need some informations:

Does someone have a good links / resources on magento invoices part to learn from?
What is the general logic behind Magento invoices? Can someone briedly explain how they work, and what is used from Magento to generate one invoice?
We need to implement somehow if condition (if paymentmethod credit card, then use special invoices with code from extension, if not then use regular magento invoices).
On the Magento invoice files, where are the points the payment methods are defined. What will we need to change and do to split these invoices?


texts: Certain short strings in URL prefix causing 404

texts:
OK, so, been scratching my head all day with this one.

Essentially - I have a Magento installation which sits off the back of a WordPress installation:

localhost/ [this is where WordPress sits]
localhost/shop/ [this is Magento's home]

All elements of the website, except the catalogue are being handled through WordPress. Magento only deals with the catalogue.

The website is to be completely localised for the UK, rest of Europe and US markets. On WordPress, I've achieved this effectively using the qTranslate plugin, so all the following are working:

localhost/uk/
localhost/eu/
localhost/us/

In Magento, I've created 3 storefronts and using the configuration I've managed to make them appear as:

localhost/shop/uk/
localhost/shop/eu/
localhost/shop/us/

However, for consistency I would prefer for the 1st URL segment to always represent the locality. I've therefore deployed a little htaccess, edited the relevant configuration (both the Base Link URLs) for each store view and localhost/eu/shop & localhost/us/shop both work exactly as intended.

localhost/uk/shop/, however, causes every page to 404. Initially I tried changing the defaults round (which had no effect), then I tried renaming (and changing the configuration) such that the domain was localhost/en/shop. It then worked exactly as intended, and to prove the fault I renamed the (working) /eu/shop/ to /uk/shop/ which caused the same 404s I had previously.

Some other strings I've tried which also cause problems:

fr
it
zd
xx
gbr

Can anybody work out what is causing this strange behavior, and suggest how I might go about making it work?

As requested, here's the htaccess:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # Redirect old /shop/uk/ to new /uk/shop
  RewriteCond %{THE_REQUEST} ^/shop/([a-z]{2})(.*)$ [NC]
  RewriteRule ^ %1/shop/%2 [R=302,L]

  # Load the right file for new /uk/shop
  RewriteRule ^([a-z]{2,3})/shop/(.*)/?$ /shop/index.php?___store=$1 [L]
  RewriteRule ^([a-z]{2,3})/shop/?$      /shop/index.php?___store=$1 [L]

</IfModule>

I should add that this is definitely working in so much as the user is being sent to the store (rather than the WordPress 404 which would otherwise kick in).


texts: Disabled product remains in catalog_category_product index (Magento Enterprise)

texts:
The Setup

Magento EE 1.13
Product is within 1 or more categories and is enabled.
Product status is changed to disabled.
Product still appears on all category pages - the issue is that the product is still in the catalog_category_product index.

The Problem

Unlike in CE where all indices can be rebuilt by the admin user, reindexing catalog_category_product manually is not possible in EE. Supposedly, catalog_category_product is (see below or EE13 Reindexing) to be reindexed when a product is updated, but this does not appear to be the case.
As a result, products that are disabled are not removed from catalog_category_product_index and these products continue to show up on the category pages.

My Question
Is there anything that I can do via configuration or otherwise that will allow the client to reindex OR update the index when a product is disabled so that I don't run into this problem?  I see that you can schedule a reindex, but that only occurs once per day at most.
Obviously I can shell in and run php -f indexer.php -- --reindex catalog_category_product but this won't do for the average shop owner.


texts: Magento customer reset password customer_flowpassword error

texts:
I currently have a error in my 1.9.3.2 store.

When a customer wants to reset their password, the Magento Report error page is displayed.

When check the report, I get the following error:

a:5:{i:0;s:156:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'customer_flowpassword' doesn't exist, query was: DESCRIBE `customer_flowpassword`";i:1;s:2832:"#0 /lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)

Problem is related to the update to 1.9.3.2, where the table was not created.

Should this solve the issue?

CREATE TABLE `customer_flowpassword` (
  `flowpassword_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Flow password Id',
  `ip` varchar(50) NOT NULL COMMENT 'User IP',
  `email` varchar(255) NOT NULL COMMENT 'Requested email for change',
  `requested_date` varchar(255) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Requested date for change',
  PRIMARY KEY (`flowpassword_id`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_EMAIL` (`email`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_IP` (`ip`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_REQUESTED_DATE` (`requested_date`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Customer flow password' AUTO_INCREMENT=9 ;

How can I solve that?


texts: How can I disable a single module in local.xml?

texts:
Our live Magento site has the FishPig WordPress plugin in place, however in development this should be disabled completely as the WordPress site isn't there.

I understand that this can be disabled in app/etc/modules/Fishpig_Wordpress.xml but I don't want this to get committed in to Git.

Is there a way which the module can be disabled (or enabled) in a specific environment using local.xml or similar?


texts: Hot to get all items in observer on remove product action on Magento 2

texts:
I created an observer on sales_quote_remove_item action, and i want to take all the product that remains in cart after I remove a product, and i can't.

The only thing that i can take in observer it's the product that i want to remove from order.

My observer look like this:

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;

class CheckoutSessionRemoveObserver implements ObserverInterface
{
    private $_sessionManager;

     public function __construct(
        \Magento\Framework\Session\SessionManager $sessionManager
    ) {
        $this->_sessionManager = $sessionManager;
    }
    public function execute(\Magento\Framework\Event\
    Observer $observer)
    {
        $quote = $observer->getQuoteItem();
        $sku = $quote->getSku();
        print_r($sku); die();
    }
}

Does anyone know how can i take all the product that remains in the cart after deleting?


texts: Magento themes are developed responsive only related to width or to height also?

texts:
I need information about Magento themes.

We are planning to buy a Magento theme.

Most of the themes are responsive by width only.

Are Magento themes developed responsive only related to width or also to height?


texts:
I set up new email templates for everything that sends out an automated email eg. forgotten password, new order, invoice, shipment etc... and assigned them to their relevant places.

However, I've been testing them and none of them are coming through.

Anyone have any idea as to why?


texts: In magento 2 , while uploading a image ,where the image will be saved temporarily

texts:
I have created UI-component form.In that, I have more than 1 image fields while uploading an image where I need to check whether the image is saved in a temporary directory or not?
Noe the image is saved in temporary directory as well as pub/media folder.
Now I need to create new folder to save my small, large, medium,extra large in seperate folders inside my module folder. Please provide me a solution

upload.php(upload controller)

public function execute()
    {
        try {
            //Saves the image in temporary directory
            // $result = $this->imageUploader->saveFileToTmpDir('general[image]');

            if (isset($_FILES['upload']['tmp_name']['small_image'])) {
                //$this->checkImage('upload', $this->helperData->getSmallImageProperties(), 'small_image');
                $result = $this->imageUploader->saveFileToTmpDir('upload[small_image]');
            }
            else if (isset($_FILES['upload']['tmp_name']['medium_image'])) {
               // $mediumImage = $this->checkImage('upload', $this->helperData->getMediumImageProperties(), 'medium_image');
                $result = $this->imageUploader->saveFileToTmpDir('upload[medium_image]');
            }

            elseif (isset($_FILES['upload']['tmp_name']['large_image'])) {
               // $this->checkImage('upload', $this->helperData->getLargeImageProperties(), 'large_image');
                $result = $this->imageUploader->saveFileToTmpDir('upload[large_image]');
            }
            elseif (isset($_FILES['upload']['tmp_name']['extra_large_image'])) {
                //$this->checkImage('upload', $this->helperData->getExtraLargeImageProperties(), 'extra_large_image');
                $result = $this->imageUploader->saveFileToTmpDir('upload[extra_large_image]');
            }

}


texts: Catalog price rule with no effect although it is active and catalogrule_product_price shows correct entries - how to troubleshoot?

texts:
We have a Magento 1.9.2.1 shop where catalog price rules have no effect at all. The shop consists of two websites and has multiple customer groups. We tried to set up catalog price rules for one or both websites, for one or all customer groups and with or without conditions. Obviously we also applied them and even reindexed all indexes.
Always with the same unpleasant outcome: Regardless if a guest or logged in customer is using the store the rule has none effect in the frontend.

When we look up any product ID in the catalogrule_product_price table in the DB we do find the price rule ID there for all websites and customer IDs with the expected (so correctly discounted) prices. getMatchingProductIds() and getData() of the corresponding rule also returns the expected data we couldn't find anything unusual looking in it.

We do use a couple of extensions but none should hook into the price calculation. We never used catalog price rules before in this shop so we wouldn't know if it has worked at some point.

We are a little bit out of ideas and have followed all obvious tips regarding this topic so any further tips how something like that can be troubleshooted better would be appreciated very much!


texts:
I am new to Magento 2 and customising Magneto 1 to Magento 2. I need some solutions regards to manage stocks. Let me give you a brief about it.
I am creating a method "updateInventoryStock($sku, $count = NULL)" in Magento 2.
So here it the code in Magento 1.9 :
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($update->getId());
if ($stock->getManageStock()) {
    $stock->setQty(floatval($count));
    $stock->setIsInStock($count > $stock->getMinQty());
    $stock->save();
}

Now how can I replicate this in Magento 2? Help me out.
Thanks


texts: Magento Contact Form: What is the 'hideit' input for?

texts:
Looking at the Magento Contact Module (be it magento1 or magento2) there is a hidden field name="hideit".

<input type="hidden" name="hideit" id="hideit" value="" />

Here the full snippet from magento2:

        <input type="hidden" name="hideit" id="hideit" value="" />
        <button type="submit" title="<?php /* @escapeNotVerified */ echo __('Submit') ?>" class="action submit primary">
            <?php /* @escapeNotVerified */ echo __('Submit') ?>
        </button>

However, apart from being in the post validation, this field does not seem to be used anywhere in the code.

if (\Zend_Validate::is(trim($post['hideit']), 'NotEmpty')) {
    $error = true;
}

What is it used for?


texts: Downloadable Products - Fatal error: Call to a member function addToChildGroup()

texts:
The downloadable products are not viewable on the frontend.  When I enable php errors I get the following message:

  Fatal error: Call to a member function addToChildGroup() on a
  non-object in
  /chroot/home/taylored/tayloredexpressions.com/html/app/code/core/Mage/Core/Block/Abstract.php
  on line 815

I've tried disabling all modules, no change.
I've tried reverting to the default theme, no change.

I don't know if it is a clue or not, but the page cuts off in the middle of this piece of Magento javascript:

var optionsPrice = new Product.OptionsPrice(

Anyone have any idea how to debug with this error??? I really could use some help and pointers on how to track this down and fix it.

http://www.tayloredexpressions.com/supplies/downloads/2015-6x6-dated-calendar.html

Magento 1.9.0.1

Thanks! :-)


texts: magento2 database roll back error Multiple queries can't be executed. Run a single query and try again

texts:
Hello I want to rollback database in magento2. i have tried from admin panel System->Bakcup but i have found error Failed to rollback. i have try two to three time for admin panel same error here. after i have to try roll back from CLI i have used belowed command

php bin/magento info:backups:list
php bin/magento setup:rollback --db-file=1610173295_db_jan082021database.sql
after i have getting below error Multiple queries can't be executed. Run a single query and try again.

atteched sceen short for that


texts: When adding in my custom scrpts (JS and CSS), I add in <css src="css/custom-styles.css" after="-"/> or <link src="js/custom-js.js" /> in the default_haed_blocks.xml file. I have a PHP script which will generate some dynamic meta information, but how would I include it in every page like the CSS and JS files?


texts: Is the Magento 2 file system allowed to be owned by www-data? + Permissions question

texts:
I work at a company where I noticed that most of our Magento 2 file system is owned by www-data and in the www-data group on our Ubuntu server.Furthermore, the docroot directory /var/www/<websitename> has the same ownership, and an exceeding amount of directories in the Magento file system have both www-data ownership and 777 permissions, e.g. app, bin, pub and var amongst others.The main user that is used for CLI work is not in the www-data group.
Is this an acceptable practice in some situations? Or is it always bad practice? Should I tell the webmaster to consider changing this?
I consider this to be unnecessary and a dangerous security vulnerability, but I want to know whether it's permissible in some cases.


texts: Magento 2.2.4 enterprise edition in `catalog_product_entity_int` table they use 'row_id` instead of `entity_id

texts:
I am afraid, i just want to know in catalog_product_entity_int table they use row_id instead of entity_id. and also other table use row_id

I don't understand difference why they use row_id instead of entity_id, what is the reason behind this change this field?

Check below screen-shoot

Any help would be Appreciated.


texts: Magento 2.2.6 Web Setup Wizard not working

texts:
I am using the Magento 2.2.6(CE).

In Admin Panel, System => Tools => Web Setup Wizard redirect to the following url

  Url: BASE_URL/setup/index.php/session/unlogin

How to solve this issue?

Thanks in Advance.


texts: definition path to shipping model when create custom shipping method

texts:
Have problem with creating custom shipping method. When new module for shipping method is active then checkout process stop after insert shipping details. No shipping methods shows up either checkout proccess stopped. I think my problem is in definition path to shipping model in my config.xml. Please see my config.xml below. Actually path to model is \app\code\local\Devpassion\Osobno\Model\Carrier\Osobno.php.

<?xml version="1.0"?>
<config>
<modules>
    <Devpassion_Osobno>
        <version>0.1.0</version>
    </Devpassion_Osobno>
</modules>
<global>
    <models>
        <devpassionosobno>
            <class>Devpassion_Osobno_Model</class>
        </devpassionosobno>
    </models>
    <resources>
        <devpassionosobno_setup>
            <setup>
                <module>Devpassion_Osobno</module>
            </setup>
        <connection>
            <use>core_setup</use>
        </connection>
        </devpassionosobno_setup>
    </resources>
</global>
<default>
    <carriers>
        <devpassionosobno>
                <active>1</active>
                <model>Devpassion_Osobno/carrier_osobno</model>
                <name>Devpass Osobno</name>
                <title>Osobno preuzimanje</title>
        </devpassionosobno>
    </carriers>
</default>


texts: $attribute->isInSet($setId) returning true even when $attribute isn't in the attribute set

texts:
$attribute = Mage::getModel('eav/entity_attribute')->load($attributeId);
$attributeSets = Mage::helper('my_helper')->GetAllAttributeSets();

foreach($attributeSets as $attributeSet)
{
    if($attribute->isInSet($attributeSet->getAttributeSetId()))
    {
        $attributeSetId = $attributeSet->getAttributeSet();
        break;
    }
}

While debugging, I expect the first iteration of the loop to skip over the if.  It keeps returning true.

Digging deeper, I see the isInSet() function has this:

public function isInSet($setId)
{
    if (!$this->hasAttributeSetInfo()) {
        return true;
    }

This is where I get my true from, which makes no sense to me.  hasAttributeSetInfo() is just a magic method which checks to see if attribute_set_info isset...which it is not.  So the if condition resolves to true, and true is returned, effectively not returning the expected value.

Is this a bug?

Or am i just using it incorrectly?

Edit:
The entire point of what I'm trying to do is get all admin user defined attribute sets that do not have $attribute in them.  In my specific case, there will only be two admin user defined attribute sets.  One of these sets has $attribute in it.

The solution I went with was to create a system config field which uses a custom source model.  The source model converts all the admin user defined attribute sets to an option array, which can be explicitly targeted, thereby removing the need for my original question.

I still feel like there's a better answer out there for my original question though.  I find it difficult to believe that I can't easily figure out to which attribute sets an attribute belongs.


texts: Migrated to Magento 2.3.4 - Update Anchor settings in Category getting error

texts:
If i disable anchor setting i am getting the following error,

Note: My site migrated from Magento 1.9.2.3


texts: Configurable swatches 1.9.2 max attributes

texts: I am using configurable swatches that was included with the new version of Magento...It works great, until I reach what seems to be the max number of allowed swatch-ed attributes. How would I go about changing the max number? Sounds like maybe an array is initialized and I'm reaching the bounds of it...?


texts:
This is a follow-up of sorts to : shipping method name alias.

The issues I found:
1) the translate.csv works like a charm for UPS shipping.  it does NOT work for USPS
2) the change to
    escapeHtml($_rate->getMethodTitle()) ?>

works fine, but you have to do it in 14 different locations, thus making maintenance a nightmare.
3) the change suggested in the thread will only affect what is displayed on the screen, not what is in the DB, ergo, not what is emailed to the clients, or exported in reports, etc

what I really want to do is override the value upstream, after the response from USPS is received, before it gets consumed by the application and have that updated value in the database.

I'm wondering if the below, found in app/code/core/Mage/Sales/Model/Quote/Address/Rate.php would be a good place to do it.

public function importShippingRate(Mage_Shipping_Model_Rate_Result_Abstract $rate)
{
    if ($rate instanceof Mage_Shipping_Model_Rate_Result_Error) {
        $this
            ->setCode($rate->getCarrier().'_error')
            ->setCarrier($rate->getCarrier())
            ->setCarrierTitle($rate->getCarrierTitle())
            ->setErrorMessage($rate->getErrorMessage())
        ;
    } elseif ($rate instanceof Mage_Shipping_Model_Rate_Result_Method) {
        $this
            ->setCode($rate->getCarrier().'_'.$rate->getMethod())
            ->setCarrier($rate->getCarrier())
            ->setCarrierTitle($rate->getCarrierTitle())
            ->setMethod($rate->getMethod())
            ->setMethodTitle($rate->getMethodTitle())
            ->setMethodDescription($rate->getMethodDescription())
            ->setPrice($rate->getPrice())
        ;
    }
    return $this;
}

Also, I think that once I use a standardized text, then the translate.csv actually does become active, but that's secondary.

Thanks !