texts: Magento2 Custom EAV attribute text in layered navigation

texts:
Im having multiple custom EAV Attributes which only contain numbers and I want them to be used for filtering in the layered navigation.
I got an extra plugin for the layered navigation but I have to enable "Use in layered navigation" for my attribute which is not possible because it is of type "text".

But my attribute only contains numbers and I want to filter for it to. So is there any option to add it to layered navigation like the internal "price" attribute?


texts:
Good morning,
I have a problem ... clean installation plus sample products. When you do not choose attributes and press button add to cart, the page is going down. Why is this happening?

https://demo-magento-2.auroracreation.com/pl/argus-all-weather-tank.html


texts:
I am looking for a way to get a products most child like category. For example if I have

    category1 -> category1.1 -> category1.1.1

I then need category1.1.1

Assuming I have a product that belongs to all three categories is there a specific way to call the most deeply rooted category.

I know I can return all categories belonging to a product by doing this:

    echo $_product->getCategoryIds()

But I need a programmatical way to know which is the deepest child.


texts: Magento 2 : What is the correct namespace of Mage_Sales_Model_Quote_Address_Item?

texts:
What is the correct namespace of "Mage_Sales_Model_Quote_Address_Item" in Magento 2 ?

Thanks


texts:
I have a discount code for -100% of the shipping cost when 24 hour delivery is selected. The discount code works and deducts the amount (in this case £15.00) from the total. However this is not reflected in the table. What I wish for it to do is the following:

User chooses 24 hour discount
User enters discount code
discount is applied
Discount code is displayed in order review
Shipping amount is reduced from £15.00 to £0.00 to show user that the shipping discount code has worked and shipping is now £0.00

Currently the last step doesn't happen and you end up with the result in the image below:

I would like it to work as below:

I have tried adding custom javascript to scan the page every 1000ms for the -£15.00 and overwrite the shipping total to £0.00 when the discount is detected but it won't work on Magento.

Plugins used:

onepage checkout & ultimate shipper

Any advice would be greatly appreciated!


texts: How do you assign descriptions between 2 different stores and 2 languages?

texts:
Scenario:

Established Magento store (Store A) with 2 store views languages, English and French.
Large number of products (10k +)
New store (Store B) has been created (same Magento Installation), and carries all the same products as Store A

Problem:

When assigning all existing products from Store A to Store B, you are prompted for where the default information will come from. This only covers one store view (English).

Desired result:

How do you populate all the descriptions from Store A (French) to Store B (French)


texts: magento incorrect 404 not found url key for specific store view

texts:
we have two store views (english and spanish) in our magento ce 1.8.1.0 site, for the english store view home product links are working just fine, but in the spanish store view the url is adding "//storecode" in the link, resulting 404 not found page, we have set to "no" admin>general>web>Add Store Code to Urls ; other data is that out root category name is the name that it's being added after the "//" in  the product link.

any ideas what could be the problem?


texts: Magento 2 : How to set $_FILES = $file in Magento 2.3.0 with Magento Coding Standard?

texts:
I had develop one module and it works currectly
But When I have check Coding standard using phpcs
it will provide me Error in php coding standard

  --standard=MEQP2

Error is

i have get result of $_FILES in this format

Array
(
    [dynamic_rows_container] => Array
        (
            [name] => Array
                (
                    [0] => Array
                        (
                            [logo] => BACKGROUNDDEFAULT.jpg
                        )

                )

            [type] => Array
                (
                    [0] => Array
                        (
                            [logo] => image/jpeg
                        )

                )

            [tmp_name] => Array
                (
                    [0] => Array
                        (
                            [logo] => D:\xampp72\tmp\php1E43.tmp
                        )

                )

            [error] => Array
                (
                    [0] => Array
                        (
                            [logo] => 0
                        )

                )

            [size] => Array
                (
                    [0] => Array
                        (
                            [logo] => 120785
                        )

                )

        )

)

and I want in This

Array
(
    [logo] => Array
        (
            [name] => BACKGROUNDDEFAULT.jpg
            [type] => image/jpeg
            [tmp_name] => D:\xampp72\tmp\phpD833.tmp
            [error] => 0
            [size] => 120785
        )

)

and I have use this code to formate file array
this is my code

    foreach ($_FILES['dynamic_rows_container'] as $i => $item) {
        foreach ($item as $key => $value) {
            $file['logo'][$i] = $value['logo'];
        }
    }
    $_FILES = $file;

If any one has solution then Provide me.
thank u in advance.


texts: How to ship to multiple addresses using the Magento API (cart)

texts: I would like to be able to ship to multiple addresses on the same order using the Magento API. Is this functionality using the Magento API available? Or it is only available using the web interface?


texts: How to create a docker image of an existing Magento 2 website running with Apache/PHP7.2/MySQL/ubuntu 18.04 version

texts:
We have a Magento 2 website and are trying to deploy the website as docker containers running in Kubernetes in GCP. At present, we have the website set up with a LAMP. So I believe we need to have the 'Dockerfile' and 'docker-compose.yml' file. Also, trying to set up using the Ubuntu 18.04 image. Would like to have an understanding of whether this is the correct way to dockerize a website?
Thank you in advance for the help.


texts: Magento 2.3 - Set max compare products to 3

texts:
I want to limit the max products to compare to 3.
I tried to create this module: https://magento.stackexchange.com/a/159543/16894

But it seems that this does not work with Magento 2.3, because I do not get any message and still can add more than 3 items.

How can I achieve this?


texts: Move Paypal buttons from minicart to checkout step 2 under the Paypal payment button

texts:
When I turned on the Paypal on the site, they added Paypal buttons to me in the mini-cart.

Tell me how to move these buttons under the button on the checkout step 2.
There are a PayPal payment method and a process to checkout button.
I want these buttons to be under it with this button, how to implement it?


texts:
Working on authorize.net sandbox integration in Magento 2.2. I have followed instructions in setting up authorize net credentials. But when i try to place an order i receive an error as below

"An error occured on the server. Please try to place the order again"

But when i check the authorize.net sandbox account panel, there is an successful payment transaction. Also when checking in Sales->Orders there is a new order with no payment received.

Also using this link i tested the response of transaction.dll it says failed to load response.

My assumption is payment is authorized but it seems no response is received from authorize net.

Any assistance would be really appreciated .

Thanks in advance


texts: Login Observer - Get Address after Registration Redirect

texts:
I have an observer set up for customer login, and it is firing exactly as I need it to.  I need to have access to the customer's default shipping address within the observer, which I load via:

$defaultShipping = $customer->getPrimaryShippingAddress( );

This works fine, except when the user first registers; the $defaultShipping is null (I am assuming at this point is because the address itself hasn't been saved yet).  I have tried to overcome this by explicitly saving both the customer as well as all of the customer's addresses if $defaultShipping is null:

if( !$defaultShipping ) {
    $customer->save( );
    foreach( $customer->getAddresses( ) as $address ) {
        // Explicitly save each address (at this point there should only be one,
        // but looping just to be safe).  This should guarantee an ID for it
        // exists
         $address->save( );
    }

    $defaultShipping = $customer->getPrimaryShippingAddress( );
}

This however is still giving null for $defaultShipping.  Am I doing something wrong, or is there another way to load the default shipping address? Does the customer not get a default shipping address if they just registered (should I instead just choose an address from the collection if $defaultShipping is initially null?)


texts: Magento 2.3 How to create custom cms page url?

texts:
I have use Magento 2.3

Question: How to modify custom CMS page URL structure?

For example: I want to this type of page link.
http://mydomainxyz.com/parent-service/childpage

At present we are only able to create this type of url: http://mydomainxyz.com/childpage

So please provide me appropriate solution for this
Thanks


texts: Undefined index: cc_owner in /app/code/core/Mage/Checkout/Model/Type/Onepage.php

texts:
I am using Magento ver. 1.6.2.0.
On checkout step I am getting following in popup:

  Unable to set payment method

When I checked the exception.log I found more details like following :

  exception 'Exception' with message 'Notice: Undefined index:  cc_owner
  in app/code/core/Mage/Checkout/Model/Type/Onepage.php(604) : eval()'d
  code on line 17' in app/code/core/Mage/Core/functions.php:245

How can I fix this issue?


texts: How to change the order of Magento backend menu

texts:
How can I change the order of the Magento Admin-Menu (Backend)?
Please take a look a the picture. For example I want to move Kundenmeinungen und Bewertungen between Kategorien verwalten and Attribute. Is that possible and how?

http://fs5.directupload.net/images/160311/8uc4k5iy.jpg


texts:
I am having a translation issue where magento generates empty js-translation.json files only. This issue has been reported a number of times:

Github:

https://github.com/magento/magento2/issues/8508
https://github.com/magento/magento2/issues/9073
https://github.com/magento/magento2/issues/4067

Magento.stackexchange / stackoverflow:

Magento 2 - Translations : how does js-translation.json get populated? Mine is empty!
https://stackoverflow.com/questions/35876380/magento-2-translating-strings-in-js-ko

(Many more example can be found on google for these or similar.)

The only general solution seems to be to generate the file yourself. Now, It looks like the format described here should work: http://i18njs.com/ , but magento can handle a couple more things, like making translations dependent on modules and such.

Could someone give me a sample of a working js-translation.json file? Just a translatable string or 2 should probably be enough for me to create my own file.


texts: while creating custom module upgrade command not working and all other commands not working before it works at the time of magento2 installation

texts:
its showing one message-

Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html


texts:
I am searching all customers having provided name. But the "addAttributToFilter" is not giving the desired result. My code ignores the match and only return exact words. Here is my code

$client_name = (isset($_REQUEST['client_name'])) ? $_REQUEST['client_name'] : "";
$usersCollection = mage::getModel('customer/customer')->getCollection()
    ->addAttributeToSelect('*')
    ->addAttributeToFilter('group_id', '4')
    ->addAttributeToFilter(
    array(
        array('attribute' => 'firstname', array('like' => '%' . $client_name . '%')),
        array('attribute' => 'middlename', array('like' => '%' . $client_name . '%')),
        array('attribute' => 'lastname', array('like' => '%' . $client_name . '%')), ));

I'll post client name let say I posted "zain". Then it should return all customers having name zain. The query should return "Zain" "zain" "ZAIN".


texts: Custom module observer accessing other module controller actions

texts:
apologies in advance - I'm pretty new to Magento development but not to web dev in general. I have a strong background in OOP and MVC PHP frameworks but in all honesty I'm struggling to pick up Magento.

I have a custom module I've created in /local which has an observer running after an order is created. This is working fine and logging correctly. Once an order is created and one of the items matches a certain criteria I need it to create a 'job' automatically and render a barcode of the jobId to a static image.

I have all three elements (observer a new order, create a job, create a barcode) of the process working fine via their own controller actions, instigated from the admin area on an order but I can't figure out how to hook it altogether as part of the observer so it happens automatically on order creation.

How can I (or rather can I) use existing controller actions, saveJobAction for example, from within another module's observer? If so, what's the correct syntax for the call?

It needs to happen behind the scenes so I'm guessing a redirect or _forward wouldn't work in this instance?


texts:
I need to make a complex mysql query into a Magento collection to present in an admin grid. Query is:

SELECT g.increment_id AS magento_order_number,
       c.increment_id AS rcs_number,
       g.created_at AS date_entered,
       if(o.iorder_salesrep_email IS NOT NULL
          AND o.iorder_position_id IS NOT NULL, 'iOrder', 'eComm') AS order_system,
       group_concat(concat(oi.sku,' - ',CAST(oi.qty_ordered AS UNSIGNED))) AS products
FROM sales_flat_order_grid g,
     customer_entity c,
     sales_flat_order_item oi,
     sales_flat_order o
WHERE g.entity_id = oi.order_id
  AND c.entity_id = g.customer_id
  AND o.entity_id = g.entity_id
  AND o.store_id != 2
GROUP BY g.entity_id;

and i have absolutely no idea how to make it work.
So far i have a couple of joins but im pretty far from the expected results. Any suggestions or resources to handle this?


texts: Add a css class to the element in template

texts:
How can I add a CSS class to the element in the template?
for example, I want to add a CSS class to this element
<div class="page-wrapper example">


texts: Products won't display in frontend 2.1.7

texts:
None of my products are displaying in the front end. They appear fine in the admin panel, but they don't turn up in search or catalog. My categories are displaying fine, but no products in them. I flushed the cache and reindexed.

The quantity displays as 0, but I've tried changing it. When I save the product it always reverts back to 0.

I fixed a problem earlier where new static-content pages weren't appearing in front end. It was a known bug in 2.1.x (https://github.com/magento/magento2/issues/5008) and I'm wondering if the same bug isn't affecting my products as well. I tried following the steps that worked before, but still no products displaying.

I want to use Single Store Mode, but I've tried both single store and multistore and neither has any effect.

This is a new store created from the bitnami image on AWS.


texts: Frontend is not showing in magento 1.9 but there is no error showing

texts:
There are some problem with frontend. Please help. In config.xml I wrote the below code

<frontend>
        <routers>
            <faq>
                <use>standard</use>
                <args>
                    <module>Namespace_Faq</module>
                    <frontName>faq</frontName>
                </args>
            </faq>
        </routers>
        <layout>
            <updates>
                <faq>
                    <file>faq.xml</file>
                </faq>
            </updates>
        </layout>
    </frontend>

Layout: faq.xml

<?xml version="1.0"?>
<layout version="0.1.4">
    <default>
        <reference name="head">
        <action method="addItem"><type>js</type><name>varien/jquery-1.11.1.js</name><params/></action>
        <action method="addItem"><type>js</type><name>varien/accordion.js</name><params/></action>
            <action method="addItem"><type>js</type><name>varien/bootstrap.js</name><params/></action>
            <action method="addItem"><type>skin_css</type><name>css/bootstrap.css</name><params/></action>
        </reference>
    </default>
    <faq_index_index>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="faq/faq" name="faq" as="faq" template="faq/faq.phtml" />
        </reference>
    </faq_index_index>
</layout>

when I hit the url, blank page is showing like below


texts:
Magento 2 goes down with 100 concurrent users and i am using 2 server(load balancing) with 32 GB RAM, 16 core CPU and 6 GB php memory.
what should i do for 1000 concurrent user.
Please suggest me magento 2 is capable or not ?


texts: Run Magento2 Reindex only during off-peak hours

texts:
We have a Magento2 shop with 20.000+ products and multiple storefronts.

So reindexing takes a long time (about 10 minutes).

We want the reindexing of catalog_category_product and catalog_product_category to only take place at night.

Like Magento recommends over here:

  https://docs.magento.com/m2/ce/user_guide/system/index-management.html

But I don't know how to configure this. Does anyone have any idea?


texts: magento data migration error in Customer Attribute step

texts:
getting the error while migrating data from magento CE 1.9.2.2 to magento EE 2.1

    Error:
    [2016-08-29 10:10:00][DEBUG][mode: data][stage: data migration]

[step: Customer Attributes Step][table: customer_entity]: migrating 100% [============================]

Remaining Time: 1 sec [PDOException] SQLSTATE[HY093]: Invalid parameter

number: number of bound variables does n ot match number of tokens

Anybody please help.

Thanks Meena R


texts: Magento 2 - how to disable shipment creation using Event sales_order_shipment_save_before

texts:
I want to check if the products which are getting shipped are available in my warehouse and if these aren't available then i need to stop the further execution of shipment creation n throw an error message.

I am using "sales_order_shipment_save_before" event observer.

Please let me know what my execution function should return inorder to stop the shipment being created.

public function execute(Observer $observer)
{

}


texts:
Is the number of Catalog Price rules limited? Would 5000 be a problem?

I am trying to figure out a way to implement price rules.
Customers get a discount on a single article or on a group of articles. Either because of the customer group they are in, or an individual agreement.As Magento only supports pricerules per group, I wanted to treat a customer (a company) as a group as well.

Any thoughts highly appreciated.

The actual problem:

We are a wholesale company in lighting.
What I need to implement:
After login, the customer needs to see his own personal prices.
And of course, these price rules need to be updated regularly.

The customer can place an order via the site, but as most configurations are complex, and need customising, we always consult the customer. And the actual order and invoicing is always done via a separate erp system.

We have 4 files with price rules (generated from another system):

customerID - article(1500st)
customerID - articlegroup (75st)
customergroup - article (3000st)
customergroup - article-group (500st)

NB: I have placed the customer groups in a customer group category, so I could use it in the catalog price rules.

To determine the individual price:

If article in file 1 -> done. If not goto 2.
If articlegroup in file 2 -> done. If not goto 3.
If article in file 3 -> done. If not goto 4.
Articlegroup is in file 4. Done.

Perhaps an extension that would work?
Also willing to pay someone for this.
Hope someone can help me.


texts: COD only for a particular city in a country how to write the csv file in magento 1.9

texts:
I am using magento 1.9. And I want to set no cod for a country except for a city/state in that country.I'm stuck with creating the csv file. Can anyone help?

Thanks.


texts: Add to cart only works after item second item and then both items show

texts:
I am trying to add a product to the cart through a controller, one the first attempt the basket is loaded, and says there is nothing in it. Once I reload the controller for a second time the item is added and the basket it shown - with both the first and second item. The code being run each time is exactly the same.

        /** @var \Magento\Catalog\Model\Product $eventProduct */
        $eventProduct = $this->productsHelper->getProductById($eventProductId);

        // Set relevant options
        $params = [
            'product' => $eventProductId,
            'related_product' => null,
            'options' => [
                25 => $referenceNumber,
                26 => "{$event->getTitle()} on {$event->getEventDate()}"
            ],
            'qty' => $qty
        ];

        // Add to cart
        $cart = $this->cartHelper->getCart();
        $cart->addProduct($eventProduct, $params);
        $cart->save();

        return $this->_redirect("checkout/cart/index");


texts: Magento 1.9 extension obsolete in Magento 2.0?

texts:
I have many extensions that provided extended features in Magento 1.9. I would like to that the leap and migrate to Magento 2. Question: have some of these extensions become obsolete in Magento 2.0. In other words could simple configuration or simple modifications provide me with the same features in Magento 2.0?

Call For Price
ElasticSearch
Product price per customer
Ability to add a custom carrier, i.e. Free Local Delivery
One Step Checkout
Rich snippets
SEO capabilities, i.e. add Product Description, canonical url
List item
Banners
Advanced CMS page editing
AMP

Thanks for any feedback


texts: magento2 custom observer not getting called with execute()

texts:
is there any need to override my custom observer.

I have an observer like:

\Vendor\Module\Observer\MyObserver.php

<?php
 namespace Vendor\Module\Observer;
 use \Magento\Framework\Event\Observer;
 use Magento\Framework\Event\ObserverInterface;

 class MyObserver implements ObserverInterface
 {

/**
 * @var \Vendor\Module\Model\EngineFactory
 */
protected $tglssearchEngineFactory;

public function __construct(
    \Vendor\Module\Model\Engine $tglssearchEngineFactory

) {
    $this->tglssearchEngineFactory = $tglssearchEngineFactory;

}

  /*  public function createSearchObject(\Magento\Framework\Event\Observer $observer)
{
    echo 'obssr';
    $this->tglssearchEngineFactory->create()->getCatalogResult();
}
*/

  public function execute(\Magento\Framework\Event\Observer $observer)
 {
    echo 'obssrexe';
    $event = $observer->getEvent();
    $this->tglssearchEngineFactory->create()->getCatlogSearchResult();
}

 }

etc/frontend/events.xml

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
 <event name="controller_action_predispatch_catalogsearch_result_index">
    <observer name="controller_action_predispatch_catalogsearch_result_handler" instance="vendor\Module\Observer\MyObserver"/>
</event>
</config>

Is my event name correct?

My router frontname: tgllsearch

Controller name: result

Action: index

Now in my home page, when i try to search for a keyword for a product, the url gets redirected to

http://localhost:1338/magento2x_2/catalogsearch/result/?q=wirel

which i want it as

http://localhost:1338/magento2x_2/tgllsearch/result/?q=wirel

But from :
catalogsearch/result/?q=wirel
 my echo obssrexe is printing.

Should i have to override my Observer


texts: magento 2.2.1 setup:di:compile not finished / Fails

texts:
I did an upgrade from Magento 2.1.10 to 2.2.1, after some known issues the site is up again.

When I run a command setup:di:compile the compilation seems to be broken (see picture below). Also the var/di folder is empty.

How can I tackle this problem, or is DI not necessary any more in Magento 2.2?


texts:
How to add links to header top in magento 2.
i have tried to
<?xml version="1.0"?> <!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="header.links"> <block class=vendor\HelloWorld\Block\Link" name="add-new-header-link"> <arguments> <argument name="label" xsi:type="string" translate="true">New Link</argument> <argument name="path" xsi:type="string" translate="true">new-link</argument> </arguments> </block> </referenceBlock> </body>

but that does not seems to work


texts: Magento 2: Error on using API for add to cart

texts:
we have used magento 2 core api for add to cart, but when we add to cart by api and later if we try to add to cart for that same account from website it gives below error.
Server cannot understand Content-Type HTTP header media type application/x-www-form-urlencoded
we dont know why this error is coming. and its not adding to cart from website, when we remove that product from cart and add a new product from website then its working.
please help in this, thanks in advance.


texts: How to remain on the same page when I click on add to cart button in category page

texts:
When I click on add to cart (or) add to compare (or) add to wishlist in category page it is redirecting to homepage.But i want to remain in the same page.

It is working in another pages but it is not working in category page.


texts: Add product in cart according website by GraphQl

texts:
How can we add products in the cart according to the website?
I have multiple websites in a single Magento installation. When I am adding a product by GraphQl then it's adding the product on the base website. Not in the targeted website.
Even my all website URL is different and Graphql endpoint also using according to the website. But it's adding  in base website
For example, My endpoint is below
www.example-website2.com/graphql
But it's adding the product in below website
www.example-website1.com/graphql
Where I need to pass website id in below mutation. I have created token and cart id from this URL www.example-website2.com/graphql
mutation {
  addSimpleProductsToCart(
    input: {
      cart_id: "{ CART_ID }"
      cart_items: [
        {
          data: {
            quantity: 1
            sku: "simple-product"
          }
        }
      ]
    }
  ) {
    cart {
      items {
        id
        product {
          sku
          stock_status
        }
        quantity
      }
    }
  }
}


texts:
I have created custom module, which contain same value in a column,i want to get collection which must be group by to that column.

Mage::getModel('test/test')->getCollection()->getSelect()->group('order_id');

but it's giving an error in reports.

"Unrecognized method 'setPageSize()'";i:1;s:5777:"#0 /home/15766-20131.cloudwaysapps.com/enshfhxhrz/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php


texts:
I'm trying to send orders to a third-party after and ONLY after an order has been paid and has now been set to 'Processing' as status. What's the best observer to use to set up this to work for all payments types?

After reading several sources it seems like:

sales_order_invoice_pay

Should work for all payment methods but it seems like it has been removed on Magento 1.9: http://rabee.me/codes/magento/cheatsheet/1.9/

The other option was:

'sales_order_payment_pay'

But when I test it setting the payment method to "Check / Money order" it is NOT fired after I generate the invoice on backend using Order > Invoice > Submit Invoice

Is this method only called with the other payment methods? (paypal/authotize.net)

UPDATE:

After reading: this other question  it seems like the only way to guarantee that I'm exporting the order AFTER a payment (online or offline) has been made is to capture when an invoice is created, and that for Magento 1.9 the right observer is:

sales_order_invoice_register

Are invoices automatically created and sent after payment on online methods paypal/authotize.net? Will this still be true when using them on sandbox/test mode?

Thank you so much for your help


texts: After login it redirect to previous page but it's not logged in

texts:
i used this for after login redirection previous page

System > Config > Customer >Custumer Redirect Customer to Account Dashboard after Logging in > NO

It's working fine. But my problem is

First i login it redirects to home page but top link still showing login only after refresh my browser does it change to logout

if i set

System > Config > Customer > Customer Redirect Customer to Account Dashboard after Logging in > yes

it's working fine redirect to my account page and top link changes to logout

How do i fix it?


texts: Error While overridng the controller In Vendor in magento 2

texts:
I want to override the controller of vendor in my module

the original file path is Magento/Checkout/Controller/Account/Create
to my module path can any one help me.

My Controller code
Silk/Helloworld/Controller/Account/Create.php

<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Silk\Helloworld\Controller\Account;

use Magento\Framework\Exception\AlreadyExistsException;
use Magento\Framework\Exception\NoSuchEntityException;

class Create extends \Magento\Checkout\Controller\Account\Create
{
    /**
     * @var \Magento\Checkout\Model\Session
     */
    protected $checkoutSession;

    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $customerSession;

    /**
     * @var \Magento\Sales\Api\OrderCustomerManagementInterface
     */
    protected $orderCustomerService;

    /**
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Checkout\Model\Session $checkoutSession
     * @param \Magento\Customer\Model\Session $customerSession
     * @param \Magento\Sales\Api\OrderCustomerManagementInterface $orderCustomerService
     * @codeCoverageIgnore
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Sales\Api\OrderCustomerManagementInterface $orderCustomerService
    ) {
        $this->customerSession = $customerSession;
        $this->orderCustomerService = $orderCustomerService;
        parent::__construct($context, $checkoutSession);
    }

    /**
     * Execute request
     *
     * @throws AlreadyExistsException
     * @throws NoSuchEntityException
     * @throws \Exception
     * @return \Magento\Framework\Controller\Result\Json
     */
    public function execute()
    {
        /** @var \Magento\Framework\Controller\Result\Json $resultJson */
        $resultJson = $this->_objectManager->get(\Magento\Framework\Controller\Result\JsonFactory::class)->create();

        if ($this->customerSession->isLoggedIn()) {
            return $resultJson->setData(
                [
                    'errors' => true,
                    'message' => __('Customer is already registered')
                ]
            );
        }
        $orderId = $this->checkoutSession->getLastOrderId();
        if (!$orderId) {
            return $resultJson->setData(
                [
                    'errors' => true,
                    'message' => __('Your session has expired')
                ]
            );
        }
        try {
            $this->orderCustomerService->create($orderId);
            return $resultJson->setData(
                [
                    'errors' => false,
                    'message' => __('A letter with further instructions will be sent to your email.')
                ]
            );
        } catch (\Exception $e) {
            $this->messageManager->addException($e, $e->getMessage());
            throw $e;
        }
    }
}

thanks in advance


texts:
I need to show custom attributes for the products selected to compare in the same fashion I can show them on the Product View page.  The code that I have been using in the Compare List page to return the attributes is

<?php $attribute = Mage::getSingleton('eav/config')->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'blade_length'); ?>

<?php echo $attribute->getFrontend()->getLabel(); ?>

<?php echo$this->helper('catalog/output')->productAttribute($_item, $_item->getBladeLength(),'blade_length') ?>

Unfortunately, this does not provide me with the necessary access to all of the attributes for the selected products.  Any help would be much appreciated.

Cheers


texts: Trying to create new product type in magento, getting fatal error

texts:
I'm trying to create new product type in magento and it is showing up in admin panel create new product page's product type options, but when I select it and continue, i get fatal error:

Fatal error: Call to a member function setConfig() on a non-object in C:\xampp\htdocs\gift\app\code\core\Mage\Catalog\Model\Product\Type.php on line 80


texts:
i have few languages in my magento shop, but in checkout in last step button Place order always in all store without translate, in csv files present translation but not working, in file button.phtml in app/design/frontend/default/theme193k/template/checkout/onepage/review have code:

<button type="button" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" onclick="review.save()"><?php echo $this->__('Place Order') ?></button>

how make translate for this button? in developer mode - through Frontend translate inline - also - translate not allow, can you help me translate this button

Thanks


texts: Magento 2.1: Assigning existing simple products to an existing configurable product

texts:
I've imported a whole load of products into Magento, and as required they are set as configurable or simple.

All I need to do now is tie the simple products to their configurable "parent". I have the array mapped out, so it's not a matter of logic but rather how I actually achieve this.

I tried inserting a bunch of rows into "catalog_product_super_link" and that did work, temporarily. However, as soon as you save a product, the rows disappear from the database.

Can anybody point me in the right direction? I've found a few solutions through Google that don't work, I'm not sure if something has changed between 2.0 and 2.1...


texts: Custom Payment Gateway with external redirects in Magento 2

texts:
The customer selects a custom payment method
When 'Place Order' is clicked, the customer is redirected to the external payment page with some additional POST data
Payment page redirects on success/failure
back to a specified Magento controller, which processes the result


texts: send custom mail with variable via script

texts:
I want to send new register customer email with one variable generated by script.

I am trying using $customerObj->sendNewAccountEmail('confirmed'); Please tell

How I can send custom email template with variable?

I have created one custom email template 'new register email' in transactional emails with {{var myvar}}


texts: Template file not found after upgrade magento and theme

texts:
I've successfull update a magento from 1.7.2 to 1.9.2 and all work fine.
Then I've upgrade the theme and now not working fine, in homepage the error is:

  CRIT (2): Not valid template file:
  frontend/base/default/template/page/1column-wide.phtml

and other.

Really this file exist in installation, but there is in another directory, /app/design/frontend/buyshop/default/template/page/

I think that in DB or in some file there is a referement at this path, and with update magento this not working yet.


texts: Consume xml api from third party in magento2?

texts:
I have found an answer for magento 1 here
https://stackoverflow.com/questions/47789660/magento-third-api-integration
But the directions and example is for magento 1?


texts:
I have uploaded Magento2 source code on centos Rackspace server, and I have changed credentials whenever required, but when I run my website, I get an error like "Vendor autoload is not found. Please run 'composer install' under application root directory." after this, i have install composer but still, i get this error.

  Url : http://204.232.133.184/


texts: Logout customer when the browser is closed

texts:
In default Magento 2.0.7:

A customer is logged in, closes the browser, reopens the browser and he is still logged in.

But I would like to log out the customer when he closes the browser. He should be redirected to the login page if he reopens the browser.

Please suggest your ideas to implement this.


texts: Custom Magento Extension Enable and Disable by my custom admin module not working

texts:
I want to admin user can able to do module enable disable from back end,

Its reflecting but doesn't worked. Please help. below is my system.xml code

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="Satish" translate="label" sortOrder="10">
            Satish
        </tab>

            <class>separator-top</class>
            Social Share Footer
            <tab>Satish</tab>
            <resource>Satish_Socialshare::Socialshare_config</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                General Configuration
                <field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    Module Enable
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    Display Text
                    <comment>This text will display on the frontend.</comment>
                </field>
            </group>

    </system>
</config>


texts: how to create order programmatically logged in customer?

texts:
Currently I make php script to generate order not logged in customer but i want to use this script for logged in customer dynamically for logged in customer my code is

thanks

$quote = Mage::getModel('sales/quote')

->setStoreId(Mage::app()->getStore('default')->getId());

// for guest orders only:
$quote->setCustomerEmail('customer@email.com');
//}
// add product(s)
$product = Mage::getModel('catalog/product')->load(1307,1305);
$buyInfo = array(
'qty' => 1,
// custom option id => value id
// or
// configurable attribute id => value id
);
$quote->addProduct($product, new Varien_Object($buyInfo));
//$quote->addProduct($product2, new Varien_Object($buyInfo));
$addressData = array(
'firstname' => 'Test',
'lastname' => 'Test',
'street' => 'Sample Street 10',
'city' => 'Somewhere',
'postcode' => '123456',
'telephone' => '123456',
'country_id' => 'US',
'region_id' => 12, // id from directory_country_region table
);
$billingAddress = $quote->getBillingAddress()->addData($addressData);
$shippingAddress = $quote->getShippingAddress()->addData($addressData);
$shippingAddress->setCollectShippingRates(true)->collectShippingRates()
->setShippingMethod('flatrate_flatrate')
->setPaymentMethod('checkmo');
$quote->getPayment()->importData(array('method' => 'checkmo'));
$quote->collectTotals()->save();
echo "quote save";
$service = Mage::getModel('sales/service_quote', $quote);
$service->submitAll();
echo "order save";
$order = $service->getOrder();
printf("Created order %s\n", $order->getIncrementId());
}catch(Exception $e){

    print_r($e->getMessage());
}

this script is create order programaticaly for not loggedin customer


texts: getData() doesn't work, returns empty in magento 2

texts:
The code snippet below returns empty collection:

$categoryProducts = $category->getProductCollection()
    ->addAttributeToSelect('entity_id')
    ->load();


texts:
I need to make a header like attached any help will be appreciated

can some one guide me how to achiev that step by step because I am new in magento

Using Mangento 2.1.7
Thank you


texts: Tax displays even when customer is not logged in

texts:
We recently upgraded a client from 1.3 -> 1.8. The taxes are now showing the default rate even if the customer is not logged in. The correct display should be no tax until a customer is logged in.

State is Minnesota, I have set the tax setting to the recommended setting from the Magento Tax configuration page.


texts:
I am trying to install Fris Social share in my Magento 1.9.3 store.

I am getting the following error after installation:

  Fatal error: Class 'Fris_Socialbuttons_Helper_Data' not found in D:\xampp\htdocs\magento\app\Mage.php on line 547

I have disabled Compilation in admin>system>tool>compilation its working fine, but when I enable Compilation, it shows above error.

Following code in app\code\local\Fris\Socialbuttons\etc\config.xml

 <?xml version="1.0" encoding="UTF-8"?>

<config>
    <modules>
        <Fris_Socialbuttons>
            <version>1.0.2</version>
        </Fris_Socialbuttons>
    </modules>

    <global>
        <blocks>
            <fris_socialbuttons>
                <class>Fris_Socialbuttons_Block</class>
            </fris_socialbuttons>
        </blocks>
        <helpers>
            <fris_socialbuttons>
                <class>Fris_Socialbuttons_Helper</class>
            </fris_socialbuttons>
        </helpers>
    </global>

    <frontend>
        <layout>
            <updates>
                <socialbuttons module="Fris_Socialbuttons">
                    <file>fris/socialbuttons/socialbuttons.xml</file>
                </socialbuttons>
            </updates>
        </layout>
    </frontend>

    <default>
        <design>
            <socialbuttons module="fris_socialbuttons">
                <font_icon_facebook>fa fa-facebook</font_icon_facebook>
                <font_icon_google_plus>fa fa-google-plus</font_icon_google_plus>
                <font_icon_linkedin>fa fa-linkedin</font_icon_linkedin>
                <font_icon_pinterest>fa fa-pinterest</font_icon_pinterest>
                <font_icon_twitter>fa fa-twitter</font_icon_twitter>
                <font_icon_twitter_follow></font_icon_twitter_follow>
                <twitter_handle></twitter_handle>
                <button_container_style></button_container_style>
                <button_style></button_style>
            </socialbuttons>
        </design>
    </default>

</config>

app\code\local\Fris\Socialbuttons\Helper\Data.php

class Fris_Socialbuttons_Helper_Data extends Mage_Core_Helper_Abstract
{
}

How to fix this error?

Thanks in advance


texts: Where do i download patch for magento2 version

texts:
I see most recent patch realeased MAGENTO 2.2.3, 2.1.12 and 2.0.18 SECURITY UPDATE

I want to download for my Magento version 2.1.9. How and where do I download the patch file?


texts: The property $xxx is not a valid price specification in Magento1.9.3.2

texts: Can any one tell me please that how can i fix this issue.....


texts: How to get prices on category and product page via ajax

texts:
I am using the mageworx customer special price module.
But it messes up my cache by adding a unique user id to the cache generation. How can I hide prices and add them on load using ajax?


texts: Customer custom address attribute not save in Magento2

texts:
We are working on Magento Ver 2.1.8. We have created module for add additional information in customer address. The attribute (other_info) field is display on the the checkout page but not save and display in admin panel.

If we tried to save same attribute value in the admin panel the save it.

Please find the install script....

namespace KH\Newaddressattribute\Setup;

use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Customer\Model\Customer;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{

    private $customerSetupFactory;

    /**
     * Constructor
     *
     * @param \Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory
     */
    public function __construct(
        CustomerSetupFactory $customerSetupFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function install(
        ModuleDataSetupInterface $setup,
        ModuleContextInterface $context
    ) {
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerSetup->addAttribute('customer_address', 'other_info', [
            'label' => 'Other info',
            'input' => 'textarea',
            'type' => 'text',
            'source' => '',
            'required' => false,
            'position' => 333,
            'visible' => true,
            'system' => false,
            'is_used_in_grid' => false,
            'is_visible_in_grid' => false,
            'is_filterable_in_grid' => false,
            'is_searchable_in_grid' => false,
            'backend' => ''
        ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute('customer_address', 'other_info')
            ->addData(['used_in_forms' => [
                'adminhtml_customer_address',
                'customer_address_edit',
                'customer_register_address'
            ]]);
        $attribute->save();

    }
}


texts: Slider not showing on Magento Theme 'Minimo' by Modulesgarden

texts:
I'm currently working with a magento website on localhost, version 1.9.3.1 and I've just installed the theme in the title but I can't get the built in slider to show on the homepage.

Has anyone ever used this theme or if not, be willing to download it and help me resolve my issue?

I know normally themes come with some code you have to paste into the homepage to get various features etc to show but from what I can this has come with none and I think the issue lies there somewhere.

Thanks


texts: Magento 2 : cashondelivery.phtml file custom code not show

texts:
First I try to modify the code directly of core file.

vendor\magento\module-offline-payments\view\frontend\templates\form\cashondelivery.phtml

I added testing code like this.

<?php $instructions = $block->getInstructions(); ?>
<?php if ($instructions): ?>
    <?php echo "MY CUSTOM CODE HERE"; ?>
    <?php $methodCode = $block->escapeHtml($block->getMethodCode());?>
    <div class="items <?= /* @noEscape */ $methodCode ?> instructions agreement" id="payment_form_<?= /* @noEscape */ $methodCode ?>" style="display: none;">
        <?= /* @noEscape */ nl2br($block->escapeHtml($instructions)) ?>
    </div>
<?php endif; ?>

Here I have one question.

Where my custom message show? Currently it not showing my message any where on checkout???

Thanks in advance.


texts: how do disable/remove Zip Code for specific country in magento 2

texts:
How can i disable/remove Zip Code for specific country in magento 2

For example if some one select UAE than Zip Code field should remove or disable else it should visible.


texts: My magento 2 website is crashed: Unknown or bad timezone () error

texts:
When i am accessing my magento website i am getting errors

  DateTimeZone::__construct(): Unknown or bad timezone ()

on Block and CMS pages and all my product list pages on frontend shows 404 page not found error. Please check and help me out to fix this issue ASAP.
You can check this problem at here.
I solve this error by restoring my backup site.

But if you know why this error is coming then this question is still open


texts: Magento 2.2: How to display price block on product detail page in a custom theme

texts:
I want to display the price and SKU in the product detail page. I've set luma as a parent theme. I am getting SKU under product-info-price div on frontend but not getting price. here is my layout file catalog_product_view.xml

<referenceContainer name="product.info.price">
                <block class="Magento\Catalog\Pricing\Render" name="product.price.msrp" before="product.price.final">
                    <arguments>
                        <argument name="price_render" xsi:type="string">product.price.render.default</argument>
                        <argument name="price_type_code" xsi:type="string">msrp_price</argument>
                        <argument name="price_type_code" xsi:type="string">configured_price</argument>
                        <argument name="zone" xsi:type="string">item_view</argument>
                    </arguments>
                </block>

            </referenceContainer>

            <move element="product.price.final" destination="product.info.main" before="product.info.review" />

            <referenceContainer name="product.info.sku" remove="false" />


texts: How I can place a block anywhere in Store?

texts:
I want to place my best seller product list in the following places:

Home Page
Product Page
Category Page
Cart Page

I want the administrator to select any of them according to the administrator selection... How can I do this?


texts:
can any one make me understand meaning of this code or provide me reference to some site

<global>
    <models>
        <test>**what does this <test>(line 3) indicate (name of module or just reference to below class file)**
            <class>Excellence_Test_Model</class>
            <resourceModel>test_mysql4</resourceModel>
        </test>
        <test_mysql4>
            <class>Excellence_Test_Model_Mysql4</class>
            <entities>
                <test>

test_tablename

                </test>
            </entities>
        </test_mysql4>
    </models>
    <resources>
        <test_setup>
            <setup>
                <module>Excellence_Test</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </test_setup>
        <test_write>
            <connection>
                <use>core_write</use>
            </connection>
        </test_write>
        <test_read>
            <connection>
                <use>core_read</use>
            </connection>
        </test_read>
    </resources>
</global>


texts:
I am trying to create a CMS page which displays and paginates all the new products on a site. This first appears to be easy as there is a widget built in that lets you select if you want to use the pager, how many products you want per page and how many products you want in total. However in practise it doesn't work, it seems to ignore the pager and products per page options, however it does only return how many products total you have set.

Currently using the following code:

{{widget type="catalog/product_widget_new" display_type="new_products" show_pager="1" products_per_page="8" products_count="16" template="catalog/product/widget/new/content/new_grid.phtml"}}

This has been generated purely by Magento by selecting it from add widget in a CMS page.

Any ideas?


texts: how we can put restriction on the customer reviews on the Magento

texts:
How I can put restrictions for customers in the review section. Only those customers can put review who are bought our products.
Thank you


texts: Magento error when product added to cart Item (Mage_Catalog_Model_Product) with the same id "1698" already exist

texts:
We have upgraded the site to latest version 1.9.3.7.

After upgrade only some times we are getting the following error

  a:5:{i:0;s:71:"Item (Mage_Catalog_Model_Product) with the same id
  "1698" already exist";i:1;s:5317:"#0
  /home/bagatelleboutiqu/upgrade.bagatelleboutique.com/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(265):
  Varien_Data_Collection->addItem(Object(Mage_Catalog_Model_Product))

can anyone help me on this issue

thanks


texts: Magento error ERR_TOO_MANY_REDIRECTS, when sorting products

texts:
Some days ago I noticed a redirect loop on a Magento 1.9.2.4 installation I'm working on.

The issue is visible when ordering products in the front end, I can't say when it started.

You can take a look at the problem here: https://www.kirpalani.com/en/sale

If you order by any option you get stuck in an infinite redirect loop, for example, price: https://www.kirpalani.com/en/sale?dir=asc&order=price

I tried anything I could think of, including:

clear magento cache
clear browser cache
clear cookies
reindex rewrite rules
reset files permissions
checking db for corrupted tables
restoring db from a backup
...
I'm stuck on this issue for 4 days now and I don't have any other idea how to solve this. Any thought? Is there something trivial I'm missing?

PHP logs are clear, I'm running PHP 5.5 FPM with nginx on centos 7.

error ERR_TOO_MANY_REDIRECTS
Blog post : permission issue
Magento sort Categories & subcategory by Name when Display on Site ( multiple language site )

Thanks in advance.


texts: Configurable parent product display out of stock

texts: Configurable product shows out of stock whether child product still in stock. Can't figure out what to do to show in stock parent product if any child product have stock. Please help me .


texts: Call one module model from other module model

texts:
I have a design like below

I have two independent modules and one common module. That means independent module will pull information from common module.

I defined below in common module config.

<config>
    <global>
        <models>
            <services>
                <class>My_Common_Model</class>
            <services>
        <models>
    </global>
</config>

Then I tried to call a method in common module model from module_1 controller like below,

$stores = Mage::getModel('services/store')->getAvailableStore();

But is throws error like model undefined.

Then I included the common model configuration in Module_1 config.xml also. Its working now.

Is it the normal behavior? Cant we call any method in one modules model from other modules controller with defined tag in its native module itself?

I don't know how to ask this question better than this.

Module 1 Controller:

<?php
    class My_Module_UserController extends Mage_Core_Controller_Front_Action{

        function userAssignStoreAction(){

            $stores = Mage::getModel('stores/store')->getAvailableStore();

            echo $productModel;
            die;
        }
    }
?>

below is common module config file:

<config>
    <modules>
        <My_Common>
            <version>0.0.1</version>
        </My_Common>
    </modules>
    <global>
        <models>
            <stores>
                <class>My_Common_Model</class>
            </stores>
        </models
    </global>
</config>

below is module 1 config:

<global>
        <models>
            <services>
                <class>My_Module_Model</class>
            </services>
           <!-- WITHOUT BELOW DECLARATION UNABLE TO CALL COMMON MODEL METHOD FROM MODULE 1 CONTROLLER -->
            <stores>
                <class>My_Common_Model</class>
            </stores>
        </models>
    </global>


texts: Magento2 - accessing helper in controller

texts:
I have helper class that has constructor that takes following parameters: Context, Cart, Session, CollectionFactory. It derives from \Magento\Framework\App\Helper\AbstractHelper.

I would like to use this helper inside of my frontend controller but I don't know what to do to make my controller constructor called with extra parameters so that I could use them to initialize my helper class.

Point is - I would like to have access to Context, Cart, Session, CollectionFactory in controller that derives from \Magento\Framework\App\Action\Action.

Here is source code of my controller and part of the helper class:

<?php
namespace Something\Something\Controller\Index;

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

    public function execute()
    {

        echo $some_json_that_i_will_use_in_the_frontend;
    }
}

Helper:

<?php

namespace Something\Something\Helper;

use \Magento\Customer\Model\Session;
use \Magento\Checkout\Model\Cart;
use \Magento\Framework\App\Helper\Context;
use \Magento\Sales\Model\ResourceModel\Order\CollectionFactory;
use \Magento\Sales\Model\Order;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    private $cart;

    private $customerSession;

    private $orderCollectionFactory;

    public function __construct(
        Context $context, Cart $cart, Session $customerSession, CollectionFactory $orderCollectionFactory
    ) {
        $this->cart = $cart;
        $this->customerSession = $customerSession;
        $this->orderCollectionFactory = $orderCollectionFactory;

        parent::__construct($context);
    }

}


texts:
I'm getting an interesting issue. The frontend of my website loads fine, however when I try to navigate to:

domain.com/index.php/admin

I get a white page. I have enabled debugging mode and it displays this error:

Array
(
    [type] => 2
    [message] => include(): Failed opening '/var/www/vhosts/domain.co.uk/sub-domain.domain.co.uk/includes/src/__adminhtml.php' for inclusion (include_path='/var/www/vhosts/domain.co.uk/sub-domain.domain.co.uk/includes/src:.:')
    [file] => /var/www/vhosts/domain.co.uk/sub-domain.domain.co.uk/includes/src/Varien_Autoload.php
    [line] => 108
)

What's also interesting is that the file it's referencing (__adminhtml.php) doesn't exist in that directory:

Any suggestions here?

Much appreciated.


texts: getStoreCurrency VS getCurrentCurrency ( compare store currency & getCurrentCurrency)

texts:
My store default currency is USD . I have 2 currency in my website.USD and Riyal.  User can switch the currency by selecting the currency from the website header  drop down  .
So my aim is to display riyal currency for who is taking the website from saudi . So i write the following code
if($country=='saudi'){
  $currency = 'Riyal';
  $this->storeManager->getStore()->setCurrentCurrencyCode($currency);
}

Now the user is taking website from saudi they can see store in Riyal .
Now the problem  Even if the user select the USD currency then the page reloaded and show the value in Riyal currency. How can i solve this .


texts: Products now showing up in category overview in new store view

texts:
I'm trying out Magento 2 on my local machine (WAMP) to see if it's suitable for the webshop of a friend.

After installing the software and the sample data, I tried configuring 3 different storeviews with different languages.

This is a category in the default store view:

As soon as I switch to a none default store views, the category list is empty

The product detail pages do work in both store views.

Anyone any idea what I'm doing wrong?


texts: how to retrieve the request body parameters in magento 2.0

texts:
Client request url with some POST data. How can I retrieve that variable in magento?

I have to retrieve that in JSON format variable and do the operation using those variables.


texts: Configuring Magento Enterprise to Print UPS Return Labels

texts:
I've been working to get the Enterprise_Rma module configured to print return labels using UPS.

I've run into a handful of somewhat odd hiccups thus far.

The Mode parameter doesn't have to be set to Live in order to be in Live mode.  It seems to only affect whether or not CURLOPT_SSL_VERIFYPEER is used in the cURL request.
I've had to flip UPS Type back and forth a bit between United Parcel Service and United Parcel Service XML in order to get rates to show up when creating a shipping label.  At first, it didn't show any rates when using the latter.

But the main question I have right now is how to properly change the ShipAccept and ShipConfirm API endpoint URLs from their default sandbox (might also be called Customer Integration Environment by UPS) values to the production values.

The sandbox values are:

'ShipConfirm' => 'https://wwwcie.ups.com/ups.app/xml/ShipConfirm',
'ShipAccept'  => 'https://wwwcie.ups.com/ups.app/xml/ShipAccept',

And the production values need to be:

'ShipConfirm' => 'https://onlinetools.ups.com/ups.app/xml/ShipConfirm',
'ShipAccept'  => 'https://onlinetools.ups.com/ups.app/xml/ShipAccept',

The ShipConfirm endpoint can be configured with the config path carriers/ups/url but the ShipAccept doesn't seem possible to change in any way other than modifying Mage_Usa_Model_Shipping_Carrier_Ups directly.


texts: Magento Redirect to mobile website when on Smart Devices

texts:
so I have two websites example.com and example.com/mobile , when a user visits my site on a mobile device or tablets etc I would like for them to be redirected to the mobile.example.com.

I have tried editing my .htacess file but it doesn't seem to have any effect, I have also tried adding a JavaScript in the HTML head misc scripts but to no avail.

anybody have any ideas on how i can achieve this?


texts: Magento 1 and /errors folder permissions?

texts:
I noticed that /errors folder is accessible via the web. The folder contains:

404.php

503.php

process.php

reportor.php

Should this folder remain open or better restrict access to it?


texts: Magento 2 : Product Attribute Group Tab not open

texts:
I have used large number of option in product attribute ( approx 2L Option in one custom attribute ).
When I edit product and click on attribute tab then it will not open and page has stop to working because of this large data amount.

Is there any idea please share.


texts: Block > head.additional - What is the right way to implement

texts:
What is the right way to implement it via default.xml or via default_head_blocks.xml?
As I can see, the structure is different for modules from different providers.
As I understand it default_head_blocks should only be used for the pure header data (CSS, JS, Metatags - https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/xml-manage.html#layout_markup_meta) and not for referencing body data. Or are both ways correct?
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <referenceBlock name="head.additional">
        <block class="Magento\Framework\View\Element\Template" name="...." template="..." />
    </referenceBlock>
  </body>
</page>

I currently have the problem that we get the following error with some extensions:
[2020-08-01 08:35:13] main.INFO: Broken reference: the '{block_name}' element cannot be added as child to 'head.additional', because the latter doesn't exist [] []

I have created my own theme which is based on the Luma theme. There you will find the default.xml in the Magento_Theme>layout
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <referenceBlock name="head.additional">
        <block class="Magento\Framework\View\Element\Template" name="newtheme.header.data" template="Magento_Theme::html/header/newtheme_header.phtml" />
    </referenceBlock>
   </body>
</page>

The newly added block is also output in the frontend, so head.additional should also exist.
So I don't understand how such a error could happen.


texts: How can I add a tab to the Product Information, and then have an iframe in the tab

texts:
I'd like to add an iframe to the product tab for every magento product. I am building a magento plugin that allows users to integrate magento with our own analytics control panel, and it would be great if they could click a tab within the product information admin backend on a per product basis to preview the performance of that product.

I have been reading similar questions on the Magento stack exchange but have failed to find something that can answer this question. I essentially just need to know what search times to use to find the answers.

From what I can tell it might involve using the Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Main class. I can't really work out whether I need to add something to my config.xml to get that class working or where to start with this.

A kick in the right direction here would be very helpful.


texts: .csv tax file only uses the *last* line of the file for tax rates

texts:
Can someone look at a .csv tax file and tell me what I'm doing wrong with it? It is totally ignoring all the lines in the file, and only using the zip code in the last line of the file to produce tax estimates. Don't know how to upload file here...so here is the text..:

"Code","Country","State","Zip/Post Code","Rate","Zip/Post is Range","Range From","Range To","default","wonderbrella"
"GA","US","GA","30075","9.0000","","","","",""
"GA","US","GA","30067","7.0000","","","","",""


texts: Checkout redirects back to cart after selecting shipping method

texts:
Problem: Magento checkout redirects back to the cart after selecting shipping method

Environment: Magento 1.4.0.1, CentOS 5.5 (behind an nginx/0.8.53 proxy), Apache/2.2.3, Linux 2.6.18-194.26.1.el5xen x86_64

Steps to Reproduce:

Add a product and click Checkout
https://gentlemanjoe.com/index.php/checkout/cart/
PROCEED TO CHECKOUT
https://gentlemanjoe.com/index.php/checkout/onepage/
Express Checkout -> CONTINUE -> Fill out form -> Ship to this address -> CONTINUE -> Shipping Method -> Ground Shipping (the only choice) -> CONTINUE -> Redirects back to https://gentlemanjoe.com/index.php/checkout/cart/

Clues:

Using Firebug, I found that after clicking CONTINUE the last time to select the shipping method, an XHR request is made against https://gentlemanjoe.com/index.php/checkout/onepage/saveShippingMethod/, and this request fails with an HTTP 503 Error. Here are the error details:

There has been an error processing your request Notice: Undefined
index: SESSIIID  in
/var/www/gentlemanjoe.com/app/code/core/Mage/Payment
/Model/Method/Cc.php on line 388
Trace:
#0 /var/www/gentlemanjoe.com/app/code/core/Mage/Payment/Model/Method/Cc.php(388):
mageCoreErrorHandler (8, 'Undefined index...', '/var/www/gentle...',
388, Array)
#1 /var/www/gentlemanjoe.com/lib/Varien/Autoload.php(93): include('/var/www/gentle...')
#2 [internal function]: Varien_Autoload->autoload('Mage_Payment_Mo...')
#3 /var/www/gentlemanjoe.com/app/code/core/Mage/Payment/Model/Method/Ccsave.php(29):
spl_autoload_call ('Mage_Payment_Mo...')
#4 /var/www/gentlemanjoe.com/lib/Varien/Autoload.php(93): include('/var/www/gentle...')
#5 [internal function]: Varien_Autoload->autoload('Mage_Payment_Mo...')
#6 [internal function]: spl_autoload_call('Mage_Payment_Mo...')
#7 /var/www/gentlemanjoe.com/app/code/core/Mage/Core/Model/Config.php(1204):
class_exists('Mage_Payment_Mo ...')
#8 /var/www/gentlemanjoe.com/app/Mage.php(432): Mage_Core_Model_Config->getModelInstance('payment /method_...',
Array)
#9 /var/www/gentlemanjoe.com/app/code/core/Mage/Payment/Helper/Data.php(70):
Mage::getModel('payment /method_...')
#10 /var/www/gentlemanjoe.com/app/code/core/Mage/Payment/Block/Form/Container.php(117):
Mage_Payment_Helper_Data- >getStoreMethods('1',
Object(Mage_Sales_Model_Quote))
#11 /var/www/gentlemanjoe.com/app/code/core/Mage/Payment/Block/Form/Container.php(44):
Mage_Payment_Block_Form_Container- >getMethods()
#12 /var/www/gentlemanjoe.com/app/code/core/Mage/Core/Block/Abstract.php(211):
Mage_Payment_Block_Form_Container- >_prepareLayout()

... I cut it off for brevity. You can see the full stack trace at https://gentlemanjoe.com/errors/report.php?id=448265828398&skin=default

Background:

I am not the original developer of the site, just helping the owners troubleshoot this issue, which began on May 27 with seemingly no changes on their end. I have zero Magento knowledge and only basic PHP experience.

Any ideas?


texts: How to display all customer reviews in the product page?

texts:
Since I removed the review tab on product page, now I'd like to display all customer reviews in the product page itself (but outside of the tab).
How can I display them?
I'm running Magento 2.4.2.


texts: Is my XML code correct for adding a css and javascript file?

texts:
I want to add a css file and a javascript file to one of my magento pages:

<reference name="head">
<action method="addCss">
<stylesheet>css/styles2.css</stylesheet>
</action>
</reference>
<action method="addJs">
    <script>js/flickity.pkgd.js</script>
</action>

this is my code. The css file is loading but the js file isn't. Is there something wrong with it and when yes, could you help me with editing the code so it should work properly? Thank you!


texts: How user friendly & efficient Magento Upgrade?

texts: Magento update their version rapidly fast. we are using magento 1.9.2.3, we are moving our entire version from 1.9.2.3 to 2.1.7, after some months magento closed 2.1 series docs. Magento announce EoQ & EoS for  2.3 series. They update their versions quickly and without giving enough time to develop/upgrade own extensions. In our case we are using more than 15 custom modules, 25K products, 300 Categories and 50K customers. In future how magento stable their version?


texts: i am using m2epro extension in magento2 currently i am using water mark but its apply on all images i want to apply on just base image how can do that?.


texts: Working Magento 2.1 site broken on new server

texts:
I have built a new store based on Magento 2.1.6. It is working fine on Host 1.

I am in the process of moving this store from host 1 to host 2.
I used RSYNC to copy all the file system of the working site to the new server, then used RSYNC to check for any file inconsistencies between the two servers. Other than owner and group differences between servers, everything appears to be fine.

On Host 2, the admin is accessible, and working fine. However, the front end has broken with an error as follows:

1 exception(s):
Exception #0 (Exception): Warning: simplexml_load_string(): namespace error : Namespace prefix xmlns123 for xsi on handle is not defined in /var/www/vhosts/mysite/htdocs/vendor/magento/framework/View/Model/Layout/Merge.php on line 493

On host 1, the site was running on Apache, while on host 2, we are using NginX. The rest is much the same (PHP 7 and MySQL, although using the MariaDB engine on Host 2).

Nothing appears to be getting logged regarding this error in the server logs, or the magento logs.

The site is in "development" mode, but I have flushed and cleaned the cache, etc, but something is busted somewhere, and I am unsure where due to a lack of available information?

Any thoughts anyone?


texts: How to get maximal position of product in a category in Magento 1?

texts:
I want to get the maximal position assigned to a product in the category , so that whenever I create a new product then I can assign ($max+1) position to the product and it will be displayed in the end of the page in frontend.

Can anyone help me how to get maximal product position for a single category in Magento1?


texts: Remove class from body using Page Layout XML

texts:
I am overriding a page layout for the account page, and I need to remove the class account from the body because it is causing conflicting styles.

I am overriding the page layout customer_account.xml but what do I put in there to remove it.

It is originally added with:

<attribute name="class" value="account"/>

I initially tried:

<attribute name="class" value="account" remove="true"/>

But this doesn't work.


texts:
I am using Magento 2.3.1 which supports PSR-0, PSR-3 & PSR-4. And I want to integrate Elastic APM agent which is supporting PSR-17 & PSR-18.
I have tried to integrate APM in magento by following steps mentioned in the document, but it is giving error and I am not able to solve them.
Is someone have done similar kind of tasks before who can guide me to achieve my requirement?


texts: Magento 2 How to access built-in Google Analytics javascript object?

texts:
I want to add custom analytics events to my frontend in Magento 2.2.

I have a Magento 2.2 module with javascript that looks like this:

define([
        "jquery",
    ], function ($) {
        return function (config, element) {
            console.log(ga);
            debugger
}});

The client is using the built-in GA support.
I've tried just accessing ga as above, but it's null.
I've tried accessing window.ga as well but it is also null.
I've tried adding a 100 second timer to give it time to load, but ga and window.ga are both still null.

How do I access the js object to do things in real time?


texts:
I have to develop the functionality like Add Custom Model Grid Into Another Custom Model Edit Tab. I Have two table with grid generated. I successfully add the Tab In my custom grid.

But Bit confuse How to assign that another grid into this grid. Also I have to put the Ajax on this tab.

If anybody is Done Before this then please guide me.

Help will be Appropriated.


texts:
I got these errors.

Uncaught ReferenceError: Checkout is not defined
    at opcheckout.js:26
opcheckout_rwd.js:26 Uncaught ReferenceError: Checkout is not defined
    at opcheckout_rwd.js:26
(index):625 Uncaught ReferenceError: Billing is not defined
    at (index):625
(index):660 Uncaught ReferenceError: Payment is not defined
    at (index):660
(index):701 Uncaught TypeError: Cannot set property 'currentMethod' of undefined
    at (index):701
(index):723 Uncaught ReferenceError: Checkout is not defined
    at (index):723

My checkout isn't working.


texts: How to filter products by discount percentage on category page?

texts:
I want to add a new filter Discount on category page. It's values will be something like

0-10 %
11-20 %
21-30 %

I do not want to import the values of discount attribute with product import which is a manual process. Instead I want to make it dynamic.

Example:
If products base price is 100 and special price is 90, product should be shown in 0-10 % discount filter.

Can you please share your thoughts about how to achieve it?


texts: Magento 2.3 : "the error evolution"_from entity CustomerId= to index file Undefined

texts:
I have a problem with Magento 2.3, when I use X-debug on the checkout part, I have the following exception :

  Exception has occured.
   Magento\framework\Exception\NosuchEntityException: No such entity with customerId =

So far nothing that much surprising, basic so detail exception from Magento so looking for solution and hop a solution : https://magefan.com/blog/no-such-entity-fix-for-magento-2 (or more exactly as solution to see where is the problem)

So ok let add :

 foreach (debug_backtrace() as $_stack) {
        echo ($_stack["file"] ? $_stack["file"] : '') . ':' .
            ($_stack["line"] ? $_stack["line"] : '') . ' - ' .
            ($_stack["function"] ? $_stack["function"] : '');
     }
    exit();

And TaDa :

  Exception has occured.   Exception: Notice: Undefined index: file in
  /var/www/mywebsite/magento/framework/Exception/NoSuchEntityException.php
  on line 37

So of course this come from the file modified according to https://magefan.com/blog/no-such-entity-fix-for-magento-2 and line 37 is

        echo ($_stack["file"] ? $_stack["file"] : '') . ':' .

Appearing that file is not a defined index, but then what should I do instead ?
Someone has a solution to solve it ?

PS: in case of minus please let me know why so that I can improve my post


texts: Magento 2 notify shopper when reach $x to spend $y to get Z item for free

texts:
Is there any extension out there about a promo rule that if they reach $90 in their basket notify with a pop up or place banner etc... that if they spend $100 they'll get X item for free etc...?

Thanks


texts: Magento2 How to Add placed order Product Quantity in Sales order grid in Backend

texts:
I want add placed order quantity tab in sales order grid in magento2 backend . Please let me know the solution . I have already done maximum process but it not works what i did , i don't know where i am wrong .

Thanks for advance .


texts: Deployer.org - Recipe changes are not being applied on Magento deploying

texts:
I'm using this recipe to deploy Magento 2 with Deployer.org.

It's not getting my changes.

For example the writable_dirs are set this wait:

set('writable_dirs', [
    'var',
    'pub/static',
    'pub/media',
    'generated'
]);

All those folder are being created with no content, no images.

Also, I tried to add a new task to restart PHP-FPM after deployment:

task('reload:php-fpm', function () {
    run('sudo /usr/sbin/service php7-fpm reload');
});

after('deploy', 'reload:php-fpm');

Even defining the most simple custom task:

task('test', function () {
    writeln('Hello world');
});

Nothing happening. Deployer is not taking any custom changes.

Why?


texts:
I'm currently running a Magento store using USD as my default currency.
I want to import products from different providers into my store.
Half of those providers are giving me CAD prices and the other half, USD.

I've created an OpenOffice file for each of those provider for mass importing with Magmi but I can't figure out how to specify the currency.

So I want all those products to be on the same website and everything showing in USD, does anyone know how to accomplish this?

Thanks !


texts:
/** @var \Magento\Quote\Model\Quote $quote */
    $quote = $this->session->getQuote();
    /** @var \Magento\Quote\Model\Quote\Item[] $quoteItems */
    $quoteItems = $quote->getAllItems();
    foreach ($quoteItems as $quoteItem) {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/express.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info(100,print_r($quoteItems,true));
        if (in_array($quoteItem->getSku(), $this->disabledForSku)) {
            return false; // disable the method if we found product with specified sku
        }
    }

This is the code I am using for print_r but this is displaying blank page.


texts:
I want to create a custom newsletter subscription using Magento 1.9.1.0.

Currently, I have one newsletter subscription that captures emails and stores it in Newsletter -> Newsletter Subscribers.

I want to create another one that stores it in the same location. This time, when the users subscribe on the new one, it will popup a modal.

Is this possible or is there any other way around for this? Thank you.

EDIT:
If possible, is it possible to execute/submit the subscription via Ajax? I think this would solve my problem but I don't know how to write it in Ajax.


texts: Magento 2: Uncaught TypeError: Cannot read property 'autocomplete' of undefined

texts:
I got this error Uncaught TypeError: Cannot read property 'autocomplete' of undefined.

So I checked the file in /pub/static/frontend/Sm/himarket/nl_NL/Magento_Customer/js/view/authentication-popup.js and did not find a thing.

Does someone have an idea? It says line 26: autocomplete: window.checkout.autocomplete,

I don't have a checkout window.

/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
/*jshint browser:true jquery:true*/
/*global alert*/
define(
[
    'jquery',
    'ko',
    'Magento_Ui/js/form/form',
    'Magento_Customer/js/action/login',
    'Magento_Customer/js/customer-data',
    'Magento_Customer/js/model/authentication-popup',
    'mage/translate',
    'mage/url',
    'Magento_Ui/js/modal/alert',
    'mage/validation'
],
function ($, ko, Component, loginAction, customerData, authenticationPopup, $t, url, alert) {
    'use strict';

    return Component.extend({
        registerUrl: window.authenticationPopup.customerRegisterUrl,
        forgotPasswordUrl: window.authenticationPopup.customerForgotPasswordUrl,
        autocomplete: window.checkout.autocomplete,
        modalWindow: null,
        isLoading: ko.observable(false),

        defaults: {
            template: 'Magento_Customer/authentication-popup'
        },

        /**
         * Init
         */
        initialize: function () {
            var self = this;
            this._super();
            url.setBaseUrl(window.authenticationPopup.baseUrl);
            loginAction.registerLoginCallback(function () {
                self.isLoading(false);
            });
        },

        /** Init popup login window */
        setModalElement: function (element) {
            if (authenticationPopup.modalWindow == null) {
                authenticationPopup.createPopUp(element);
            }
        },

        /** Is login form enabled for current customer */
        isActive: function () {
            var customer = customerData.get('customer');

            return customer() == false;
        },

        /** Show login popup window */
        showModal: function () {
            if (this.modalWindow) {
                $(this.modalWindow).modal('openModal');
            } else {
                alert({
                    content: $t('Guest checkout is disabled.')
                });
            }
        },

        /** Provide login action */
        login: function (loginForm) {
            var loginData = {},
                formDataArray = $(loginForm).serializeArray();
            formDataArray.forEach(function (entry) {
                loginData[entry.name] = entry.value;
            });

            if ($(loginForm).validation() &&
                $(loginForm).validation('isValid')
            ) {
                this.isLoading(true);
                loginAction(loginData, null, false);
            }
        }
        });
    }
);


texts: gift-message attribute not appearing in REST API Orders response after setting it on Cart

texts:
I am developing a headless Magento backend using REST/Graphql on the frontend.
After enabling the Gift Message module in admin, I set correctly set the Cart gift-message like so:
http://localhost/index.php/rest/V1/carts/mine/gift-message

Request body:
`
{"giftMessage":{"sender": "person a","recipient": "person b","message": "hello to you"}}
And correctly, receive the response as:
true

I then place the order and the order is created. Yet, when I GET the full order with REST API, there is no gift-message in the response at all.
The only way to get a gift-message is to manually type it in on Admin Edit Order and hit save, which is unacceptable for various reasons.
Can anyone enlighten me to the flow on this please? Help much appreciated Thanks.


texts: Magento2 home page is loading css, js and image of other pages

texts:
When Home page is loading, it's also loading checkout page css, js and other page images. What could be the possible reasons?

for example : when we are loading home page, it loading css and js of payment gateway, images of other static page like privacy policy. Which eventually increases page loading time of home page.

Any help is highly appreciated.


texts: default.xml is loading in all pages of magento2

texts:
I'm trying to display some static content in home page using default.xml.

But that content is loading in all pages of magento2.

I want the static content on home page only.

Can anyone help me to solve this issue using default.xml?


texts: Magento 2 BlockRepository.php can't understand code

texts:
I'm newbie at Magento 2, and trying to study and research code to use all business logic for my future work.

I found method getList at BlockRepository.php at https://github.com/magento/magento2/blob/2.2/app/code/Magento/Cms/Model/BlockRepository.php

Which doing something strange, as I think.

Here is the code (without docBlock):

public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria)
{
    /** @var \Magento\Cms\Model\ResourceModel\Block\Collection $collection */
    $collection = $this->blockCollectionFactory->create();

    $this->collectionProcessor->process($criteria, $collection);

    /** @var Data\BlockSearchResultsInterface $searchResults */
    $searchResults = $this->searchResultsFactory->create();
    $searchResults->setSearchCriteria($criteria);
    $searchResults->setItems($collection->getItems());
    $searchResults->setTotalCount($collection->getSize());
    return $searchResults;
}

As you can see, we creating collection instance and processing it, getting the ready-to-use collection in "pager" or smth else.
Why then we need to create a new instance of SearchResults and returning it instead of returning collection?
I have checked, the processed collection has the same items that the searchResults instance.

Maybe I'm new at Magento and forgot something?


texts: how to use the addBlock method in templates?

texts:
having block declaration from layout , say:

    <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>

how can i use addblock in a template for displaying the block

       /* @var $this Mage_Core_Block_Template */
     echo $this->getLayout()->addBlock($block, $blockName)->toHtml() ;


texts:
I moved my store from one server to another server and now the home page is opening but when I click on any link I am getting the below error

Not Found

The requested URL /dental-chairs.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


texts: How to use big image from blog post in facebook share instead of logo?

texts:
I recently installed an extension module, but when we share at facebook it always use the website logo, I removed the tag from the xml I think so the logo it's not prioritised but keeps using it.
Any idea what could be?
Best regards,
Rui Silva


texts:
I want to log all 404 page in magento 1.9. we want if url contain a word,the page should redirected to specific page

I have rewrite Mage_Cms_IndexController noRoute Method,

But i dont know this correct or not and is it have event in observer ?


texts: Email Template Logo always using the LUMA

texts: I'm creating an email template, I already updated the transactional email logo. But still when I tested it always uses the default luma logo. I'm using Magento ver. 2.2.3


texts: I want Magento to save CVV. My system is internal and high security and we own our special hash to use  so there is no danger on this step. Can I know what SQL code to use and what is the file I need to edit?


texts:
How to use below query in magento2 format for getting collection.

SELECT ProductName
FROM Products
WHERE ProductID = ANY (SELECT ProductID FROM OrderDetails WHERE Quantity = 10);

If anyone knows please explain me...


texts: Get Categories of Products on Special Offer

texts:
How can I get the list of categories of all the products on special offers. It's a bit tricky. I'm able to get the list of products using:

        $collection
          ->addAttributeToFilter(
              array(
                  array('attribute' => 'news_from_date', 'is'=>new Zend_Db_Expr('not null')),
                  array('attribute' => 'news_to_date', 'is'=>new Zend_Db_Expr('not null'))
                  )
            )
          ->addAttributeToFilter('news_from_date', array('or'=> array(
              0 => array('date' => true, 'to' => $todayEndOfDayDate),
              1 => array('is' => new Zend_Db_Expr('null')))
          ), 'left')
          ->addAttributeToFilter('news_to_date', array('or'=> array(
              0 => array('date' => true, 'from' => $todayStartOfDayDate),
              1 => array('is' => new Zend_Db_Expr('null')))
          ), 'left')
          ->addAttributeToSort('news_from_date', 'desc');

But how can i get their categories (top level categories preferably).

Thanks.


texts: Magento shoping cart price rule in EE 1.14

texts:
I am working on magento shop having Enterprise 1.14, In my old shop which is based on magento CE 1.81, there is shopping cart price rule to buy x items and get y free.

After up gradation to EE 1.14, this rule applies only on first item of cart out of z items meeting the criteria. In my rule definition I have set stop further processing to Yes and rule's priority is 0 which mean this rule should run on each item of cart and stop to affect any other rule but it works only first item of cart and then nothing.

When I dig into code, I saw they have below code in foreach loop at line 317 of Mage_SalesRule_Model_Validator model.

if ($this->_stopFurtherRules) {
            break;
        }

In release notes of Magento CE 1.9 and EE 1.14, they have mentioned that

The setting Stop Further Rules Processing is honored.

so my question is, what does mean of **The setting Stop Further Rules Processing is honored. **?

Have they changed the meaning of Stop Further Rules Processing or is it bug in magento CE 1.9 and EE 1.14?


texts: How to set small image as default to product after import many products from CSV? - magento 1.8

texts:
I just import many products form CSV (about 9 000). On back-end i see imported product images but they aren't set as base, small and thumbnail image - default set is "no image"

Do you know how can I change it for all of my products? "Fixes" for Magento 1.7 dosen't work  - I'm using Magento 1.8 community
Regards


texts:
I have another post out there, but I am missing something in this code and it's not working. Need a PRO to look at my mickey-mouse script and help me execute it.
Site can be located at https://wbtfoundation.org - top bar has city geolocation (e.g. Rockwall, Texas | United States (this is the storeID)
Based on div storeID (geolocation populated)
CSS

.ACTIVE-CodeClass {display:none} //active banner
.DEFAULT-CodeClass {display:none} //default banner

HTML

      <picture class="" id="">

        <source srcset="2020/UAT/ACTIVE-BANNER-D.jpg?$staticlink$" media="(min-width: 768px)">

      </picture>

      <picture class="" id="">

        <source srcset="2020/UAT/DEFAULT-BANNER-D.jpg?$staticlink$" media="(min-width: 768px)">

      </picture>

JS

$( document ).ready(function() {
let storeID = itemStore ();

// find region
var itemStore=['Rockwall', 'Dallas', 'Travis', 'Hunt', 'Tarrant', 'Houston', 'Gainsville'];
$(itemStore).each(function(){
  if ($('#storeID').text().indexOf(this) != -1) {

// execute active region banner
var customerStore = itemStore;  // Test Store
var storeOcapiUrl = '/s/athome-sfra/dw/shop/v20_4/stores/' + customerStore;

$.ajax({
   url: storeOcapiUrl,
   data: {
     client_id: 'a9392000-57a9-46a4-bd86-78c5ff617795'
   },
   success: function(storeData){
   console.log(storeData);
   if ( storeData.c_enablePickup && storeData.c_enableDelivery ) {
     // show active storeBanner
     $('.ACTIVE-CodeClass').show();
   } else if (storeStatus && storeData == null) {
     // show a default storeBanner
     $('.DEFAULT-CodeClass').show();
   }
}
});


texts: Magento (1.9) Url rewrite to requested path

texts:
In Magento URL rewrite i create a custom redirection for login URL'customer/account/login' to login.html

But when i click the login link, its again redirect to the 'http://URLBASE/customer/account/login' page instead of 'http://URLBASE/login.html'.

so can you please explain how to redirect my custom URL to the request path.


texts: Magento 2 - Add XML Block inside product.info in Product Page

texts:
I'm trying to add a custom block as a child block to product.info (inside the form of the add to cart) so I add the following code to app/design/frontend/{Vendor}/{Theme}/Magento_Catalog/layout/catalog_product_view.xml:

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="product.info">
        <block class="Magento\Framework\View\Element\Template" name="testing" template="Magento_Cms::test.phtml" />
    </referenceBlock>
</body>
</page>

not working, no change.
Magento 2, developer mode is on, cleared cache, deployed files etc.

any Ideas?

thanks


texts:
Magento 2.1.6 custom theme page layouts broken

Hi, I have my theme set up and working correctly but now I want to add a custom homepage layout.
I have set it up like so:

Sulman

....Sulmantheme

........Magento_Theme

............page_layout

................custom_home.xml

............layouts.xml

layouts.xml:

<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="custom_home">
        <label translate="true">Custom Home</label>
    </layout>
</page_layouts>

custom_home.xml: (copied from 1column.xml)

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />
    </referenceContainer>
</layout>

The new custom page layout can now be selected in the CMS page:

I then clear cache and deploy static content.

But when I visit the page in the browser it is blank.
When I view source I see the bare bones html, which is coming from /vendor/magento/module-theme/view/base/templates/root.phtml

<!doctype html>
<html lang="en-GB">
    <head >
        <script>
    var require = {
        "baseUrl": "http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB"
    };
</script>
        <meta charset="utf-8"/>
<meta name="description" content="lorem ipsum"/>
<meta name="keywords" content="lorem ipsum"/>
<meta name="robots" content="NOINDEX,NOFOLLOW"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title></title>
<link  rel="stylesheet" type="text/css"  media="all" href="http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB/mage/calendar.css" />
<link  rel="stylesheet" type="text/css"  media="all" href="http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB/css/styles-m.css" />
<link  rel="stylesheet" type="text/css"  media="screen and (min-width: 768px)" href="http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB/css/styles-l.css" />
<link  rel="stylesheet" type="text/css"  media="print" href="http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB/css/print.css" />
<link  rel="icon" type="image/x-icon" href="http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB/Magento_Theme/favicon.ico" />
<link  rel="shortcut icon" type="image/x-icon" href="http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB/Magento_Theme/favicon.ico" />
<script  type="text/javascript"  src="http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB/requirejs/require.js"></script>
            </head>
    <body data-container="body" data-mage-init='{"loaderAjax": {}, "loader": { "icon": "http://sulman.local/pub/static/version1494324423/frontend/Sulman/Sulmantheme/en_GB/images/loader-2.gif"}}' class="cms-page-view page-layout-custom-home">
            </body>
</html>

It seems like no content is being loaded??
Any one have a clue? Thankyou.


texts: Magento 2 _extend.less in Adminhtml Theme

texts:
Magento 2 dev docs are very clear about best practices for extending module styles by placing a file named _extend.less in the <theme_dir>/<module_name>/web/css/source directory.

This works perfectly for our frontend theme, however this functionality does NOT work for our adminhtml theme.

I know my adminhtml theme is applied because layout updates are being processed and applied accordingly, e.g., changing the logo on the admin login screen via <my_vendor_dir>/<admin_theme_dir>/Magento_Backend/layout/admin_login.xml works perfectly.

I wish to change the background of the login screen according to best practices, so I create the file <my_vendor_dir>/<admin_theme_dir>/Magento_Backend/web/css/source/_extend.less with the appropriate CSS rule:

.page-layout-admin-login {
  background-color: #fff;
}

This file is not processed by Magento, nor are changes to this file are  noticed by Grunt's watcher in dev mode.

Furthermore, I am able to override CSS/LESS files by creating a file with the same name as the "original" file in my adminhtml theme. For example, if I create the file: <my_vendor_dir>/<admin_theme_dir>/Magento_Backend/web/css/source/_module.less its contents are processed. Of course in this case, I have to copy/paste the contents of the original file which is obviously not desirable as this mandates constantly monitoring the original file for changes i.e., the exact reason why _extend.less feature exists.

Am I missing something? Is this functionality just not supported for adminhtml themes?


texts: Construct full image URL as REST API Client (for products and categories)

texts:
I've looked at the following post and a few others, and the methods for constructing the image URL are failing for me:
Getting full image url for products via REST API

How can I construct the full image URL paths for the images returned for a category and a product?

For a category the image information is provided in the custom_attributes array like the following:

{
   "attribute_code": "image",
   "value": "look01_index.jpg"
}

For a product's description the image URL I'm after looks like the following:

  "id": 3717,
  "media_type": "image",
  "label": null,
  "position": 1,
  "disabled": false,
  "types": [
    "image",
    "small_image",
    "thumbnail"
  ],
  "file": "/l/o/look01_index_1.jpg"

I've tried to make the path with {IPADDRESS}/pub/media/catalog/product/{IMAGE FILE} and this fails for both the product and category.

Any Help?


texts:
can anyone tell me, which class I  have to extend if I want to use custom functions in list.phtml?

Thx, Christian