texts: magento store url occurs twice on store 2 of 3

texts:
I am about to got nuts trying to figure this one out. I have 3 stores, camping, fishing and hunting all using the base URL with redirect to the store URL. i.e URL nilandtrading.com/fishing, but if I got to use any links on the page they turn into URL nilandtrading.com/fishing/fishing/some.html.

Also an exact duplicate of other BLOCKS:

Information

About Us

Conditions of Use

Privacy Policy

Security Policy

Shipping &amp; Delivery

FAQ

Affiliate Program

Coupon Codes

Customer Satisfaction

Satisfaction Guarantee

3 in 1 Guarantee

Testimonials

Shopper Approved

Loyalty Reward Points

.... and more

Works on the 1st and 3rd store but not the [fishing] store

I have nuked any cache in Reis and the database and deleted URL redirects and turned of Amasty full page cache and it make no difference. I have double checked the store URL's and compared them to working backups for magento 1.6.2.0. I am trying to do magento 1.9.3.4 and since I don't want to repurchase so many extensions I will not do magento 2.x any time soon. That any I hate having to beta test magento's new versions. I think that is why they have CE so they can use us to test for what the include in the EE versions, tried of it. Learned the hard way I could not update a 1.6.2.0 database to 1.8.x or greater with out numerous errors!!

My config looks like this:

So I am struggling and I don't know why?


texts: How to disable active filter in magento2 admin panel

texts: When I am login magento2 Admin panel it showing previous login search result. But I don't want this. I want to turn off or disable this function. How to do that?


texts: Magento 2 Update 2.0.3. note in Backend fail

texts:
When I login to my backend I get a white screen and an Update Message for 2.0.3.

The message can't be removed. Backend ist not working anymore. Magento 2 was in a password protected folder. I removed the password protection now. But it is still not working.


texts: Admin controller throws 404 page not found for my custom extension

texts:
I am creating a custom extension with Magento 1.9.0.1 but got stuck in admin controller as my admin controller throws 404 page not found error. Any help would be appreciated. Below is my code
:
config.xml

  app/code/local/Codifiedweb/SurveySource/etc/config.xml

<?xml version="1.0"?>

<config>
    <modules>
        <Codifiedweb_SurveySource>
            <version>1.0.0</version>
        </Codifiedweb_SurveySource>
    </modules>
    <admin>
    <routers>
      <surveysource>
        <use>standard</use>
        <args>
          <modules>
              <codifiedweb_surveysource before="Mage_Adminhtml">Codifiedweb_SurveySource_Adminhtml</codifiedweb_surveysource>
          </modules>
        </args>
      </surveysource>
    </routers>
  </admin>
    <global>
        <blocks>
            <surveysource>
                <class>Codifiedweb_SurveySource_Block</class>
            </surveysource>
            <adminhtml>
                <rewrite>   <sales_order_grid>Codifiedweb_SurveySource_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
                </rewrite>
            </adminhtml>
        </blocks>
         <helpers>
      <surveysource>
        <class>Codifiedweb_SurveySource_Helper</class>
      </surveysource>
    </helpers>
        <models>
            <surveysource>
                <class>Codifiedweb_SurveySource_Model</class>
            </surveysource>
        </models>
    </global>
</config>

adminhtml.xml

  app/code/local/Codifiedweb/SurveySource/etc/adminhtml.xml

I am creating submenu under CMS

<?xml version="1.0"?>
    <config>
        <menu>
            <cms>
                <children>
                    <surveysourcebackend module="surveysource">
                            <title>Survey Statics</title>
                            <sort_order>100</sort_order>
                            <action>adminhtml/surveysource</action>
                     </surveysourcebackend>
                </children>
            </cms>
        </menu>
    </config>

Controller

SurveySourceController.php

  app/code/local/Codifiedweb/SurveySource/controllers/Adminhtml

<?php
class CodifiedWeb_SurveySource_Adminhtml_SurveySourceController extends Mage_Adminhtml_Controller_Action
{
  public function indexAction()
  {

    // $this->loadLayout();
     //$this->_title($this->__("Survey Statics"));
     //$this->renderLayout();
     echo "Iam  in admin controller";
     exit;
  }
}

Where I am doing mistake?

Thanks


texts: Magento PWA: How to setup venia storefront theme in localhost?

texts:
I am trying to setup venia storefront theme with magento 2.3.3 instance. When i try to install the venia sample data according to magento pwa docs. It's not installing. Also i tried to run and build the pwa studio folder concent. But it gives me following error.

My os is windows 10. What is the best way to install venia storefront in windows?


texts: Cash On Delivery payment method not showing in checkout page in magento 2

texts:
Cash On delivery payment method not showing in the frontend.

I have enabled the offline payment methods in the backend, It shows all offline payment methods in frontend except COD. Please provide me a solution


texts: Magento2 how to get shipping method price in payment page?

texts:
Magento2 how to get shipping method price in payment page
In shipping methods details is coming from .html file.


texts: Migrate only orders in magento 2 from Magento 1.9 using mysqlworkbench

texts:
I mapped sales_flat_order table of magento 1.9 to sales_order table of magento 2 and push the csv from mysqlworkbench. and orders was migrated in the database. The orders are even displaying in the frontend.

The products and customer data migration was done before this. Is there any problem in this migration... Anyone have gone through the same order migration process ?


texts: how i can add text in magento 2 product page price

texts:
here I want to add

after MRP price:

Incl.Tax Rs:1,550.52

  in Magento 2 product page

any idea's

i tried this answer but it's showing text for both price(Incl.Tax and Excl.Tax)
https://magento.stackexchange.com/a/222750/73525


texts: Show final price (full price) of configurable products variations

texts:
I have a configurable product with 2 variations:

Variation I (Default): Dimension 4.5cm Price $1.81
Variation II: Dimension 7cm Price $1.81 + R$1.01 = $2.82

I need remove + $1.01 and show $2.82 on dropdown variations.

I need to show full price of all products variations.

How to?


texts:
i want add filter how this:
http://flodomo.de/cat/index/sCategory/28
or
http://flodomo.de/hochglanzlaminat
and etc.. because it is necessary that each category included a specific set of data filtering, let me know how i can to in magento, may be an appropriate extension that can be used.

thanks


texts:
I am trying to Translate this phrase: Search entire store here... that appears in the default Search Form.

So far I have tried adding it here:

staging/app/design/frontend/default/mytemplate/locale/pl_PL/translate.csv

I have also added it

here:/public_html/staging/app/locale/pl_PL/Mage_CatalogSearch.csv

But still no luck. Any suggestion will be greatly appreciated.


texts:
I have more then 5000+ product in my magento website. i will configure to my local system, then how to delete all product programaticall also how to delete product image also in media folder?

I am using magento 1.9 version


texts: Fetch all bestseller product with custom date range

texts:
I am working on a custom report for bestseller products, Following is a requirement,

Add Custom date range
Fetch all products max limit is 500

I am not able to set custom date range & limit, Following is a sample external script code
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $objectManager->create('Magento\Reports\Model\ResourceModel\Report\Collection\Factory');
$collection = $productCollection->create('Magento\Sales\Model\ResourceModel\Report\Bestsellers\Collection');
$productRepository = $objectManager->get('\Magento\Catalog\Model\ProductRepository');
$collection->setPeriod('year');

Any help appreciated,
Thanks


texts: Change "add to cart" button depending on customer group and attribute

texts:
A while ago, I asked this question and the code is working fine. I can change the "add to cart" button depending on the value of a yes/no attribute.

What I'm trying to achieve now is to create an if/elseif/elseif statement, in which the if condition is the yes/no attribute, the first elseif condition is a joined statement of the yes/no and customer group, and the last elseif condition is the default isSaleable() condition.

The code that I have is as follows but it throws the error that the variable $_myGroupId isn't defined:

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

<?php $_isLoggedIn = $this->helper('customer')->isLoggedIn();
if($_isLoggedIn === true){
    $_myGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
} ?>

<?php if ($_product->getFromRetailer()) {?>

        <button type="button" title="<?php echo $this->__('Find your nearest retailer') ?>" id="product-addtocart-button" class="button btn-cart v-center" onclick="setLocation('<?php echo $this->getUrl('distributors') ?>')"><?php echo $this->__('Find your nearest retailer') ?></button>

<?php }

elseif ($_product->getFromRetailer() && $_myGroupId == 3) { ?>

        <button type="button" title="<?php echo $this->__('Look at me') ?>" id="product-addtocart-button" class="button btn-cart v-center" onclick="setLocation('<?php echo $this->getUrl('distributors') ?>')"><?php echo $this->__('Look at me') ?></button>

<?php }

elseif ($_product->isSaleable()) { ?>

        <button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart v-center" onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>
        <?php if(!$_product->isGrouped()){ ?>

                <?php echo $this->__('Qty:') ?>
                <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />

        <?php } ?>

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

<?php } ?>

EDIT Just to make it clearer, I can get the customer group successfully and the problem that I have with the code is the statement elseif ($_product->getFromRetailer() && $_myGroupId == 3). It throws the error that $_myGroupId isn't defined.

What am I doing wrong?


texts: Install Magento SMTP Pro Email Extension in 2.04

texts:
I've tried to install the extension using these instructions but it doesn't appear to work.

  http://www.aschroder.com/2010/05/installing-a-magento-extension-manually-via-ftp-or-ssh/

GIT repo: https://github.com/aschroder/Magento-SMTP-Pro-Email-Extension

I've also read that magento connect is not exactly stable for magento 2.x. I myself can't even sync my purchases successfully. So I'm hoping you can point me to or provide some installation instructions for version 2.04.


texts: Create Product at Magento 2 Using REST in C#

texts:
I'm trying to create a simple Product by Rest API. Response.Status = Unauthorization
I wonder if the installation or configuration of something is missing
Here is my code

 public void CreateProduct()
    {
       // Token = this.GetAdminToken("admin", "1234567");
        var request = CreateRequest("/rest/V1/products", Method.POST, Token);
        var product = new M2Product();
        product.Sku = "BA3245";
        product.Name = "PRoductx";
        product.Price = 100;
        product.Status = 1;
        product.Visibility = 4;
        product.AttributeSetId = 4;
        product.TypeId = "simple";

        string json = JsonConvert.SerializeObject(product);
        request.AddParameter("application/json", json,
                   ParameterType.RequestBody);
        var response = Client.Execute(request);
        if (response.StatusCode == System.Net.HttpStatusCode.OK)
        {

        } else
        {

        }
    }

    private RestRequest CreateRequest(string endPoint, Method method,string token)
    {
        var request = new RestRequest(endPoint, method);
        request.RequestFormat = DataFormat.Json;
        request.AddHeader("Authorization", "Bearer " + token );
        request.AddHeader("Accept", "application/json");
        return request;
    }


texts: magento 2.4 setup is not displaying, showing the page isn't working, HTTP error 500

texts: magento 2.4 setup is not displaying, showing the page isn't working HTTP error 500, but i tried with simple php code.server is working fine. what may be the error, i am using php 7.3


texts: Magento2 Rest Api Search Criteria not working properly!

texts:
I  am trying to get the sales orders from magento2 REST API. I am using the below query to get the complete orders within entity_id range:

$ch = curl_init( Helper::getURL() . "orders?searchCriteria[filter_groups][0][filters][0][field]=status" .
         "&searchCriteria[filter_groups][0][filters][0][value]=" . $status .
         "&searchCriteria[filter_groups][0][filters][0][condition_type]=like" .
         "&searchCriteria[filter_groups][0][filters][0][field]=entity_id" .
         "&searchCriteria[filter_groups][0][filters][0][value]=" . $idMin .
         "&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq" .
         "&searchCriteria[filter_groups][0][filters][0][field]=entity_id" .
         "&searchCriteria[filter_groups][0][filters][0][value]=" . $idMax .
         "&searchCriteria[filter_groups][0][filters][0][condition_type]=lteq" .
         "&searchCriteria[pageSize]=500&fields=items[entity_id,customer_email,customer_firstname,customer_lastname,customer_is_guest," .
         "increment_id,status,created_at,subtotal,total_paid,total_due,grand_total,shipping_amount,payment[method,amount_paid]," .
         "billing_address[city,email,firstname,lastname,postcode,street,telephone,company,region],items[item_id,name,original_price,price," .
         "product_id,qty_canceled,qty_invoiced,qty_ordered,qty_refunded,qty_returned,qty_shipped,row_total,sku,discount_amount]]" );

Status filter and idMin filter are not working. Only idMax filer is working. The search returns all sales orders having entity_id less than idMax with different status and entity_id starting from zero.

What is the problem with the search criteria?


texts: Show Pop Up when click on Add to cart Magento 2

texts:
Is there any mistake in this code or file structure ?
link i followed

what i did

1)app/code/SomeName/AddCartPopUp/registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'SomeName_AddCartPopUp',
    __DIR__
);

2)app/code/SomeName/AddCartPopUp/view/frontend/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" layout="1column">
    <body>
        <referenceContainer name="content">
  <block class="Magento\Framework\View\Element\Template" name="minicart.autoopen" template="SomeName_AddCartPopUp::minicart_open.phtml"/>
</referenceContainer>
    </body>
</page>

3)app/code/SomeName/AddCartPopUp/view/frontend/template/minicart_open.phtml

 <script type="text/x-magento-init">
    {
         "[data-block='minicart']" : {
            "SomeName_AddCartPopUp/js/view/minicart_open" : {}
         }
    }
    </script>

4)app/code/SomeName/AddCartPopUp/view/frontend/web/js/view/minicart_open.js

define(["jquery/ui","jquery"], function(Component, $){
    return function(config, element){
        var minicart = $(element);
        minicart.on('contentLoading', function () {
            minicart.on('contentUpdated', function () {
                minicart.find('[data-role="dropdownDialog"]').dropdownDialog("open");
            });
        });
    }
});

5)app/code/SomeName/AddCartPopUp/etc/di.xml

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

</config>

6)app/code/SomeName/AddCartPopUp/etc/module.xml

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


texts: Multiple Inventory slots for Different warehouses

texts:
I have found a great script that allows for quick inventory updating via a php script, and it does work well. I am able to just go by SKU, quantity, and set each as is_in_stock.

My question then becomes, we have two main warehouses, call them Main and West, would it be possibly to add a secondary inventory slot to each product, and via the same script with few adjustments, be able to upload two different values for each warehouse?

Implementation of the display would be simple enough as currently it is just:

<?php
$qty = (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
if ($qty<=0) { ?>

//Backordered

<?php } else { ?>

//Echo Quantity
<?php echo $qty; } ?>

<?php endif; ?>

And adding another slot could turn into (what I assume) just $qty_secondary with similar loading format.

As a side note, I see the work it goes through with each product, is it as optimized as it could be? It was created back in 2010, and I imagine a lot of things have changed since then and it could be changed for the better I'm sure.

System: Magento 1.9.0.1 & PHP 5.6


texts: PHP Fatal error: Uncaught Error: Cannot re-assign $this in ../app/code/core/Mage/Core/Block/Template.php with PHP 7.1

texts:
I'm using magento C.E. 1.9.1.0 and PHP 7.1 and I get the following error when I visit a category page:

PHP Fatal error:  Uncaught Error: Cannot re-assign $this in /var/www/magento/app/code/core/Mage/Core/Block/Template.php Line 215

This error happens here (Line 215):

extract ($this->_viewVars, EXTR_SKIP);

This is due to dynamic calls being forbidden in PHP 7.1

Does anyone knows of a fix for this?


texts: Oops! Something went wrong on location map at contact us page

texts:
I am working on magento-1.9 version. When I am going to contact us page, I got the following error which is Oops! Something went wrong.

Please help me on this. Please let me know the requirements what I have to share here to get the solution.

Based on user SH Patel's suggestion, i ran the URL with my API key. Then i got following screen. Please find the attachment.


texts: When I use "echo" in vendor methods - products not showing, but work fine without it

texts:
I got the next code:

public function getProductCollection()
{
    if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
        $collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
    } else {
        $collection = $this->collectionProvider->getCollection($this->getCurrentCategory());
        $this->prepareProductCollection($collection);
        $this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
    }
    echo "Collection count".$collection->count();
    return $collection;
}

When I tried to echo collection count - it always equals 0, but when I delete this string - everything is okay count equals 16. How?


texts: What effect does the composableType node have on products

texts:
I am investigating adding new product types and a common argument in the product_types.xml is the composableType.

E.g.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd">
    <type name="simple" label="Simple Product" modelInstance="Magento\Catalog\Model\Product\Type\Simple" indexPriority="10" sortOrder="10">
        <customAttributes>
            <attribute name="refundable" value="true"/>
        </customAttributes>
    </type>
    <type name="virtual" label="Virtual Product" modelInstance="Magento\Catalog\Model\Product\Type\Virtual" indexPriority="20" sortOrder="40">
        <customAttributes>
            <attribute name="is_real_product" value="false"/>
            <attribute name="refundable" value="false"/>
        </customAttributes>
    </type>
    <composableTypes>
        <type name="simple" />
        <type name="virtual" />
    </composableTypes>
</config>

Does this refer to the products ability to be added to another product type like a configurable or a group? In the product type declarations for grouped and configurable there is no composableTypes node but the types are marked as composite="true" so that theory would make sense if it means what i think it means.

Thoughts?


texts: Varnish Latest Version Centos 6.1 Magento 2.2

texts:
Please can someone clarify this for me I'm very confused.

I want to install Varnish for Magento 2.2 Store - Linux CENTOS 6.10 [server] v80.0.22

Im using these instructions to install

For CentOS Users

yum install -y epel-release

yum update

yum install -y varnish

The output I get at the install stage is
Package varnish-2.1.5-6.el6.x86_64 already installed and latest version

Im checking the varnish website and see Latest Varnish version is 6.2.0

Can someone provide instruction to install via CLI SSH putty or provide a link to page with clear instructions - I want to install the latest version

I have checked online all day and found some very different answers but nothing to help me install the latest version or update my varnish to latest


texts: Magento 2 : How to insert Price inclusive Tax?

texts:
I didn't found the way to insert in Magento 2 in create product price inclusive Tax

In Magento 1 it was possible, how can I insert the same in Magento 2?


texts: Magento 2: Include static resources (JavaScript, CSS, fonts) before

texts:
How do i  Include static resources (JavaScript, CSS, fonts) before  in Magento 2?

i follow the docs magento 2 Include static resources (JavaScript, CSS, fonts)

i have copied the file from base theme to the extended theme

my_extended_theme_dir/Magento_Theme/layout/default_head_blocks.xml

and here is the code:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0" />
    <script id="mcjs">!function(dsds){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,"script","https://some script.js");    </script>
    </head>
</page>

but no changes, recreated static files, clear cache, reindex...
what am i missing?


texts:
I'm building a store responsively and for the top navigation on a mobile I have an option to "filter" which should only be shown on pages which are filterable, such as the search results page, the catalog pages.

This is just a link with an id which makes a siderbar slide in/out. But the link only needs to be shown if there's actually something to filter.

I've tried looking in to the Catalog_Block_Layer class and there are a couple of methods which I thought might work, but don't. Such as:

Mage::getSingleton('Mage_Catalog_Block_Layer')->canShowBlock()

and

Mage::getSingleton('Mage_Catalog_Block_Layer')->canShowOptions()

Any ideas how I can achieve this?


texts: Magento2 - How to add a product into cart programatically when checkout_cart_product_add_after is fired

texts:
Consider there are two product ie: Product A and Product B. Product B is a virual product which i need to add to cart when Product A is added to it.

To do so, I am trying to add Product B to cart by observing an event checkout_cart_product_add_after. Once Product A is added, i am retrieving the quantity of product added for Product A and based on it I am trying to add Product B programatically. To add product B, I have written below code:

<?php
namespace MyModule\Applicationcharges\Observer;

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

class AddCharges implements ObserverInterface
{
    protected $_productRepository;
    protected $_cart;

    public function __construct(\Magento\Catalog\Model\ProductRepository $productRepository, \Magento\Checkout\Model\Cart $cart){
        $this->_productRepository = $productRepository;
        $this->_cart = $cart;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $item=$observer->getEvent()->getData('quote_item');
        $product=$observer->getEvent()->getData('product');
        $item = ( $item->getParentItem() ? $item->getParentItem() : $item );
        $product->getQty();

        $params = array(
            'product' => 2056,
            'qty' => 1
        );

        $_product = $this->_productRepository->getById(2056);
        $this->_cart->addProduct($_product,$params);
        $this->_cart->save();
    }
}

However, trying to add product using $this->_cart->addProduct() doesn't work. Can anyone please guide how this can be done? Is there anything which I am missing.

Any guidance will be appreciated.


texts: how to show brand attribute on static block

texts:
I want to show all brand list on category page using static block.

i am using this on catalog/category/view.phtml

<?php $_productCollection=$this->getLoadedProductCollection() ?>
<?php foreach($_productCollection as $_product) {
    print $_product->getBrands();
} ?>


texts:
I am trying to associate orders and customer using the following code.

$order = $this->orderRepo->get($oid);
$order->setCustomerId($newCustomer->getId());
$order->setCustomerIsGuest(0);
$this->orderRepo->save($order);

Where orderRepo is Magento\Sales\Api\OrderRepositoryInterface

But save is not working as expected and I can’t see association in order details page/customer order section.

I have checked in the create method in \Magento\Sales\Model\Order\CustomerManagement and Magento is doing the same.


texts: Magento 2.3.2 - Very weird checkout cache issue

texts:
Hoping someone can help here.
We have a Magento 2.3.2 website. There's nothing particularly special, functionality wise about it. It uses cloudflare, which could be a cause, but the hosts assure us that the checkout is exempt from the system.
The website owners have reported that guest checkout customers are seeing random customer data values populating the shipping address form fields. We did some observation and experimentation and discovered that to be the case.
It seems to resolve itself when I clear the cache. However, if there's a guest using the checkout at that moment in time, then their details are then pre-populated on the checkout. It's the strangest thing and extremely frustrating.
I've gone through the entire codebase - disabled modules (including Amasty Checkout), reverted to the default theme. You name it.
Can anyone explain how this could happen? Has anyone seen it before?
Also, for the meantime, is there a way to ensure checkout form fields don't pre-populate? This shouldn't need to happen of course, but just for the time being while I figure this thing out.
Thanks :)


texts: Looking for information on dedicated SQL servers

texts:
I am working on a Magento website, and having a few difficulties with server load.  Our site receives around 2,500 pageviews/day on average. I have been working on optimizing the website, and I am sure there is more to do, however I need a quick solution as I am loosing sales.

Currently, the site is located on a HostGator dedicated server (Centos, Xeon 3.3 , 1Gbps Uplink, 16GB Ram, 1TB Raid 1, 25TB Bandwidth). It is running Apache, Varnish, Memcached, and Cloudflare over the top of everything. On low periods, the load averages stay low (0.29 0.22 0.19), at other times they will jump to 6,7,8,9s on the averages.

I had seen some suggestions about using a dedicated SQL server. I have searched and found different providers, however not sure when I need to look for when dealing with SQL servers. I am assuming a SSD would be a minimum, however do I need more RAM or better CPU, or both? The Magento database is 15GB+-. I am also worried about the communication between my web server and the SQL server affecting load speeds for customers, could this be a problem?


texts: Inserting Button in customer account navigation - Sorting order

texts:
I inserted a button in customer/account navigation with the following file in my own module:

MyCompany/CustomRouter/view/frontend/layout/customer_account.xml:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
      label="Customer My Account (All Pages)" design_abstraction="custom">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current"
                   name="customer-account-navigation-pricelist-configure">
                <arguments>
                    <argument name="label" xsi:type="string" translate="true">Download Pricelist (PDF)</argument>
                    <argument name="path" xsi:type="string">configurepricelist</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>

However, the button shows at the top of the list instead of the bottom. Is there any way I can make it show up at the bottom instead? (Or at least, below the core three links supplied by the customer module - among the other extensions.) I feel "Account Dashboard" really should be the top order.


texts:
I work for a company that is going to use Magento2 Cloud Enterprise Edition. ( e-commerce website currently on development)
Someone told me while deploying the source code, the database is locked and is on read only access. Is it true ?

I don't find any documentation about this on Magento docs. I found how to do a master / slave on EE ( not available on Cloud) but I really need to know if its true because it will change a lot for the architecture on AWS for me.

Thanks a lot for your reply.


texts: How to get same format of order data like we get from Observer

texts:
I have a module which generates the Xml file when a order is placed on my store. In that module I am using the observer to get order data and for creating the XML file. XML contains all the the data of that Order.

Now, I want to create that XML by using a custom PHP script which is placed in root of the website. By using that Custom script I am trying to fetch the orders and creating the XML for them.

So the problem is when I create XML from Observer data then It contains different fields in XML and When I create XML from That PHP script, It contains different XML fields.

For custom Script I am using below method to fetch order data:

$collection = Mage::getResourceModel('sales/order_collection')->addAttributeToSelect('*');

And for Observer I am using below method to fetch order data:

$collection = $observer->getEvent()->getOrder();

But Both collections are returning different format of Order data. Can anyone please help me out to get same data format?

Thanks


texts: Magento 2.3.1 installation error with composer

texts:
I have used PHP 7.2.31 and Magento version 2.3.1 but when Magento 2.3.1 installation with composer getting error like below,
=====================
Your requirements could not be resolved to an install-able set of packages
Problem 1
Your PHP version  (7.0.33) does not satisfy that requirement
Any solution on this.


texts: How to change item custom option in cart

texts:
I have products with custom options.
One of these products options must be updated just after product has been added to cart.

I then created an event launched just after checkout_cart_add_product_complete.

My observer is well called :

public function execute(\Magento\Framework\Event\Observer $observer) {

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $cart = $objectManager->get('\Magento\Checkout\Model\Cart');
    $items = $cart->getQuote()->getAllItems();

    foreach ($items as $item)
    {
        $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
        $customOptions = $options['options'];
        if (!empty($customOptions))
        {
            foreach ($customOptions as $key=>$option)
            {
                if ($option['label']=="foo")
                {
                    $customOptions[$key]['value']="bar";
                }
            }

            $item->setProductOptions($customOptions);
            $item->save();
        }
    }
}

But when Cart is displayed, the product option has not been changed.

Thank you for your help,


texts: I'm wondering if there is a fix/patch in Magento 2.3.3 for escaping URL's because it's still vulnerable for XSS attacks.


texts: How to push Magento 2 module from Composer to Github

texts:
I am working on payment gateway module Cybersource.

Our code on Github and we are using Amazon Web Services.

We have installed module using composer and it's working correctly but we need to add this module on github as well because after deployment in AWS the cybersource module is no present due to its accessing code from GIT.

Now we want to know how to push magento 2 module from composer to github ?

Does anyone have a work around for this.

Any help would be appreciated


texts: Magento2 Create extra column in eav_attribute and eav_attribute_option table

texts:
I have created one extra column in the eav_attribute and eav_attribute_option table. Now I want to store values in those tables when I will create new attributes.

Please suggest options.


texts: Magento 2, too many redirects. All browsers, frontend and backend

texts:
I've scoured through numerous threads on this subject and tried everything that was pertinent to my situation to no avail.

I have SSL enabled.  Everything was working fine until I edited one of the base_url's via command line.  However upon changing it back I now get the redirects error and have been battling with it for an entire day now.

Here are my core_config_value web values.

      1  | default |        0 | web/unsecure/base_url         | http://www.newmillsoutlet.co.uk/
      59 | default |        0 | web/default/cms_home_page     | home
     123 | default |        0 | web/unsecure/base_static_url  | NULL
     124 | default |        0 | web/unsecure/base_media_url   | NULL
     125 | default |        0 | web/secure/base_url           | https://www.newmillsoutlet.co.uk/
     126 | default |        0 | web/secure/base_static_url    | NULL
     127 | default |        0 | web/secure/base_media_url     | NULL
     128 | default |        0 | web/cookie/cookie_path        | NULL
     129 | default |        0 | web/cookie/cookie_domain      | https://www.newmillsoutlet.co.uk/
     130 | default |        0 | web/cookie/cookie_httponly    | 1
     426 | default |        0 | web/unsecure/base_link_url    | https://www.newmillsoutlet.co.uk/
     427 | default |        0 | web/secure/base_link_url      | https://www.newmillsoutlet.co.uk/
     428 | default |        0 | web/secure/use_in_frontend    | 1
     429 | default |        0 | web/cookie/cookie_restriction | 0
     487 | default |        0 | web/secure/use_in_adminhtml   | 1

I've cleared all the cache folders, restarted apache2.  But nothing seems to make any difference.  I just get the redirects error consistently.

Also using http://www.redirect-checker.org/ I can see that without the www. I get a 200 OK yet if I use www it is throwing the too many redirects error.

Does anyone know what might be causing this?

Thanks

* UPDATE 1 *

The frontend now loads fine, no issues there.  My problem now is that I cannot access the backend/admin page.  It gives the following error after throwing an exception:

Front Controller Reached 100 Router Match Iterations.

Again I've had a good look through SE for any information but cannot find anything which relates to me exact issue.


texts: PHP Fatal Error: Call to undefined method

texts:
I have installed this brazilian shipping module -
 https://bitbucket.org/igor_lm/igorludgero_correiosofflinem2 - then I got the error:

  PHP Fatal error:  Uncaught Error: Call to undefined method Igorludgero\Correios\Model\ResourceModel\Cotacoes::getCollection() in /magento221/vendor/igorludgero/correios/Helper/Data.php:276
  Stack trace:
  #0 /magento221/vendor/igorludgero/correios/Cron/UpdateTracks.php(24): Igorludgero\Correios\Helper\Data->updateOfflineTracks()
  #1 [internal function]: Igorludgero\Correios\Cron\UpdateTracks->execute(Object(Magento\Cron\Model\Schedule))
  #2 /magento221/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php(292): call_user_func_array(Array, Array)
  #3 /magento221/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php(228): Magento\Cron\Observer\ProcessCronQueueObserver->_runJob(1511677080, 1511677144, Array, Object(Magento\Cron\Model\Schedule), 'igorludgero_cor...')
  #4 /magento221/lib/internal/Magento/Framework/Event/Invoker/Invoker in /magento221/vendor/igorludgero/correios/Helper/Data.php on line 276

This does not seem to be a coding issue since it works for others, I also had opportunity to talk with its autor. So I was wondering it could be related to php config. I found out similar php fatal errors on google regarding short_open_tag set to off but that was not the case. It doesn't look like max_execution_time problem either.

Does anyone know which configuration could possibly cause such call to undefined method?

Magento 2.2.1
PHP 7.0.25
MySQL 5.6.33
Ubuntu 14.04.5 LTS

Thank you!


texts: String in the small description Luma Theme

texts: I noticed this string in the small description. This "nessuno" string is seen only in Italian view while for other views it does not go out. How can I remove it? What is this string?


texts: unexpected T_VARIABLE, expecting T_FUNCTION

texts:
I am following a tutorial from a book named Magento cookbook. But even though I followed all the codes, I keep on getting this error.

  Parse error: syntax error, unexpected 'constSTATUS_PENDING'
  (T_STRING), expecting function (T_FUNCTION) in
  C:\xampp\htdocs\magento\app\code\Packt\HelloWorld\Model\Subscription.php
  on line 7

namespace Packt\HelloWorld\Model;
class Subscription extends \Magento\Framework\Model\AbstractModel
{

    constSTATUS_PENDING = 'pending';
    constSTATUS_APPROVED = 'approved';
    constSTATUS_DECLINED = 'declined';

    public function __construct(
        \Magento\Framework\Model\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
        \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
        array $data = [])
    {

            parent::__construct($context,$registry, $resource, $resourceCollection, $data);
    }

    public function _construct()
    {
        $this->_init('Packt\HelloWorld\Model\ResourceModel\Subscription');
    }
}


texts: Create separate login with upload facility for merchants/sellers?

texts: Can someone tell me how to create separate login with product add/upload and a few other merchant related features for merchants? Please notice that merchants are those users who will be able to login from their accounts and can upload their products to sell on our website. Those uploaded products will first be visible to admin for review and if admin deems those uploaded products as appropriate he can make them available for selling. Is there any built in feature for this in Magento or is there any extension/module for this feature or a new customised extension will have to be developed? Any suggestions or help? Thanks.


texts: Magento 2 - Custom Column using CASE WHEN with filter via block in admin custom module grid

texts:
How to add custom column in custom module admin grid using CASE WHEN sql operator and how to filter on it?

Currently, I can able to fetch the column with correct result but, can not able to filter it.

I fetched custom column names "sign" and concated with another column and displayed in admin grid but, filter is not working on this.

protected function _prepareCollection(){
$collection = $this->_collectionFactory->create()->addFieldToFilter('ex_name', ['neq' => 0]);
$collection->getSelect()->columns('(CASE WHEN main_table.operation = 1 THEN "+" ELSE "-" END) AS sign');
$this->setCollection($collection);
        return parent::_prepareCollection();
}
protected function _prepareColumns()
    {
$this->addColumn(
            'ex_name',
            [
                'header' => __('Points'),
                'index' => array('sign', 'ex_name'),
                'sortable'     => true,
                'type'         => 'concat',
                'separator'    => ''
            ]
        );
}


texts: Set different page template for 'write review' page

texts:
Currently, the page template used for my 'write review' page is a 2-column template. But, this template is already filled with certain static blocks. I'd rather change this page to an 1-column template. How do I do this?

I was also wondering if there is a .phtml file that controls this page, since I couldn't find anything when turning on template hints.


texts: Public programmatic access to catalogs of foreign shops

texts:
I'm developing a solution that would benefit from access to public product catalog information of Magento shops in cases where my customers have those.

The APIs give me that information, public and private depending on permissions, but it would be a much greater benefit, especially for sales, if I wouldn't have to register my application with every shop to make that happen (I believe that's necessary with the apis, even for public information).

Crawling the shops' public web pages seems too complex as the markup is too different between the shops.

Is there another way, perhaps Magento exposes this information in yet another I don't yet know about?

I only need the general structure and the product names and images.


texts: Magento 2: getting Full Action name inside custom Model class?

texts: Would you please let me know best way to get the Full Action name inside custom Model class in Magento 2?


texts: Magento 1 taking too long to login in admin (sometimes)

texts:
I'm checking out a problem occurring in a Magento 1.9.2.2 instance for a client. Basically, the website becomes really slow sometimes, but the major problem is in Admin Page.

When the user logs in (or logs out) from Admin, it takes too long (about 3 minutes) and just ends up showing a Request Timeout, then when I try to reload the page, it just enters the admin (because the cookies have been created).

So far I have tried the following

Inspecting exception.log and system.log files
Deactivated ALL community and local modules
Changed redirections
Cleaned cache and sessions (files and database)
Changed PHP memory_size and timeout.

The only clue I have I saw in system.log. When logging, the system.log receives some XML paths, like these:

/home/nplplkrh/public_html/app/design/frontend/base/default/layout/core.xml
/home/nplplkrh/public_html/app/design/frontend/base/default/layout/page.xml

When the problem occurs, some part of this code just repeats without stopping, as if the code is loading the same XML files uninterruptedly.

The oddest fact is that this problem just occurs sometimes, really often, but not always. I had a whole week without any problem, but it started over again this week.

I appreciate if you guys could help me to debug this problem.

Thank you very much.


texts: I have one SKU I would like to exclude from all my price rules, so none of the price rules can be used on this specific SKU. But I have no idea how to do it. Can you please help?


texts: Magento 2: How to update custom attribute value in cart page

texts: Magento 2 How to update custom attribute value in cart page - Kindly find the below screen shot.


texts: How to get all SKU's of simple products?

texts:
I have too many child products. I would like to see all child product's sku.

Any one help me to get all simple product sku.


texts: How to resolve "Incorrect table definition" on Magento?

texts:
I want to restore my Magento database back up, but I get below error message:

ERROR 1293 (HY000) at line 68: Incorrect table definition;
there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

How can I resolve this problem?


texts: How to set root category for all stores in a website?

texts:
How do i set a new category for all the stores in a website?

I've created a new root category via my custom module, and need to make this as the root category for all the stores in a particular website?

I would like the newer stores created also to have the same root category.


texts: Magento Enterprise url rewrite in observer

texts:
We tried to implement this scenario in ee 1.13: we have a custom product attribute (new_edition_id), when a product is saved, if this attribute is set, we want to create a url rewrite from current product to the product with attribute id equals to new_edition_id.
We've implemented it in an observer using this snippet of code:

$rewrite = Mage::getModel('enterprise_urlrewrite/url_rewrite');
      $rewrite->setStoreId($storeId)
        ->setOptions('RP')
        ->setIdentifier($requestPath)
        ->setTargetPath($targetPath)
        ->setRequestPath($requestPath)
        ->setDescritpion('Nuova Edizione plugin')
        ->setProductId($product->getId())
        ->save();

The result is that some records are inserted in enterprise url rewrite tables, but from the front end redirections doesn't work.
Any suggestion?

Thanks
Ruggero


texts: Grouped products associate quantity cart magento 1.9

texts:
I have a Magento 1.9 installation. and in it I have grouped virtual simple products and it works very well. In the grouping I have two products, and I would like that in the shopping cart when choosing the grouped product the first and second product of the group have the same amount.
For example, if I have the quantity of 2 products in the first one, the second one is the same (2). and that the second one cannot be changed.

Thanks

D.Witoszek Arias


texts: how to define custom layout for different controller parameters passed

texts:
I have a controller and want to define or render custom layout for different parameters passed from user to it:

    public function myactionAction() {

            $this->loadLayout();

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

            if(array_key_exists('customaction', $params)){
                     // default layout
                    ...
            }
            elseif(array_key_exists('another_subaction', $params))
            {
                   // different layout
                    ...
            }

i tried some xml in layouts:

<mymodulerouter_mycontroller_myaction_customaction>
        <reference name="root">
        <action method="setTemplate"><template>customer/custom.phtml</template></action>
    </reference>
</mymodulerouter_mycontroller_myaction_customaction>

but no success, is it possible to to this is magento or i should register another controller?


texts: Custom price.phtml file for product view template

texts:
How do I create a custom price.phtml file and display it on the product view page?

Use case: I have updated the price.phtml file under product > view to add rich snippets / structured data. And, I would like to create a new price.phtml file so that I can use it for 'Related Products' which appear on the Product View page.

=== Update ===

I have updated catalog.xml as below,

<catalog_product_view>
    <reference name="right">
            <block type="enterprise_targetrule/catalog_product_list_related" name="catalog.product.related" as="relatedProducts" template="targetrule/catalog/product/list/related.phtml">
                <action method="setColumnCount"><columns>3</columns></action>
                <block type="enterprise_targetrule/catalog_product_item" name="catalog.product.related.item" template="targetrule/catalog/product/list/related/item.phtml">
                     <action method="addPriceBlockType">
                        <type>simple</type>
                        <block name="myprice">catalog/product_price</block>
                        <template>catalog/product/myprice.phtml</template>
                    </action>
                </block>
            </block>
        </reference>
</catalog_product_view>

Note that I have only added the simple price type block for now. And, the default related products block is being overridden by a module (as you can see in the above XML).

In myprice.phtml, I just have a simple echo statement.

As a follow up, can I call the custom price template in the related item block as below?

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


texts: Where should "Continue shopping" button link to?

texts:
There is a "Continue shopping" button in the checkout, which points to the homepage in default installation, if I am not mistaken.

The URL of "Continue shopping" button is set in checkout/cart template by function getContinueShoppingUrl() defined in checkout/cart block.

How to modify the URL of this button the most elegant way ?
Where in your opinion should this button link to ?


texts: how to save product grin in customer in magento 2 customer_index_edit.xml

texts:
How to save product grid in customer tab Add grid in customer_form but I can't save it

Go Through this link

How to save custom grid check box check data in magento 2


texts: Unable to edit CMS pages in magento 2.1.3

texts: I am unable to edit cms pages in magento 2.1.3. When clicked on edit, it shows blank page. What could be causing it.


texts: Error Shown on Front End of Magento 1.9 Please specify the product's option(s). While Add to Cart Configurable product

texts:
I am new to Magento and I am using Magento ver. 1.9.2.4 community edition. My website was working fine before some days. I have added one custom option of Gift Wrap Requirement for Customers. For this I used Radio Button as you can see in below Image

After that, If we add to cart any Configurable product after selecting Size, then it gives error Please specify the product's option(s).

Thanks in Advance.


texts:
I have a new Magento 1.9 CE site and am attempting to create the first catalog price rule - a 25% discount for a specific customer group.  I have created the group, created and activated the rule, reindexed prices, added a customer to the group and displayed the product logged in as that customer - I see the standard price, not discounted price.

I have tried the rule two ways - the first is quite specific, explicitly setting an 'Any of These' condition declaring all the categories and subcategories, with dates spanning from 2000 to 2099.  The second is as general as possible:  no conditions, no dates, only the customer group and discount.  Neither version is applied.  I'm sure there must be some step I'm missing - a global setting perhaps? Any help you can give will be much appreciated!


texts:
I'm trying to create auto generate coupons in magento 2 but its showing as below:

Message is added to queue, wait to get your coupons soon

Any help will be appreciated?


texts: What is replacement  function for getting the skinurl in magento-2. In magento-1 we use  $this->getSkinUrl() and  {{skin url=''}} to get skin url.


texts: Changing the layout & design for a specific set of products

texts:
On 3 of my products I wanted to change the look & feel along with the layout
As an example, I want to move the product title so I have created a new child theme like below
/app/design/frontend/[Vendor]/[Child_Theme_Name]/Magento_Catalog/layout/catalog_product_view.xml
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="page.main.title" destination="main" before="-"/>
    </body>
</page>

/app/design/frontend/[Vendor]/[Child_Theme_Name]/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/[Vendor]/[Child_Theme_Name]',
    __DIR__
);

/app/design/frontend/[Vendor]/[Child_Theme_Name]/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
     <title>Child Theme Name</title>
     <parent>[Vendor]/[Parent_Theme_Name]</parent>
     <media>
         <preview_image>media/preview.jpg</preview_image>
     </media>
 </theme>

In the admin, I have selected that child theme and then cleared all the cache

Unfortunately, the product detail page then doesn't change. If I make that change in the parent theme the product detail changes but it naturally affects all products which I don't want.
Can anyone advise on what I am doing wrong?


texts:
I am using following link for displaying validation error messages.

as I am using this : validate-length I am getting error message as :

Text length does not satisfy specified text range , but I want to change this message as:

"Zip code is not servicable"

<input placeholder="Enter your PIN Code" class="input-text
   <?php if ($this->isFieldRequired('postcode')):?>
      required-entry
   <?php endif;?>

   validate-length maximum-length-6 minimum-length-6 validate-digits"
   type="text"
   id="estimate_postcode"
   name="estimate[postcode]"
   value="<?php echo $this->htmlEscape($this->getFieldValue('postcode')) ?>"
   onkeydown="if (event.keyCode == 13) { return false;}"
/>


texts: How do I add a CMS Static Block Text Box To All Product Listings In Magento?

texts:
I would like to display a CMS Static Block text box at the bottom of all product listings in Magento, but I would need the code to put in CMS -> Static Blocks in the admin panel in order to do so.

Any help would be appreciated, thank you.


texts: How to send a transactional email manually?

texts:
I have created an email with a coupon for customers. It is now in the list of the transactional email in the admin as a new layout.

Is there a way to send that transactional email manually to those customers I would like to send?

Or do transactional emails need to be sent only in a programmatic way or with an extension?


texts: How to add a telephone number directly to the customer and not a billing address

texts:
Essentially, I want to be able to do something like the following:

$session = Mage::getSingleton('customer/session');
$customer = $session->getCustomer();
$customer->setTelephone($telephone);
$customer->save();

And such as this:

$session = Mage::getSingleton('customer/session');
$customer = $session->getCustomer();
$response["telephone"] = $customer->getTelephone();

Without having to add a default billing/shipping address, since the customer will need to enter his mobile number on registration, but not a billing/shipping address.

Is that possible?


texts:
Currently I have a plugin which has the following in the di.xml

<type name="Magento\Sales\Api\OrderRepositoryInterface">
    <plugin name="MyModule_OrderAfterSave" type="Company\MyModule\Plugin\OrderAfterSave" sortOrder="10" disabled="false" />
</type>

This enables me to call my custom class when an order is saved. However what I need to do is call my plugin any time an order is updated.

The reason for the question is that I have a payment gateway extension installed and it saves the order before taking payment and then updates the order based upon if payment was successful. So I need to call my plugin after the payment has been success or failed


texts:
I want to create order from quote id . I am using this code but order is not getting created

$quote = Mage::getModel('sales/quote')->load(94251);
$convertQuote = Mage::getSingleton('sales/convert_quote');
$order = $convertQuote->toOrder($quote);

I get error that Credit card number mismatch with credit card type. payment method already store in quote. payment method is authnetcim.


texts: Magento 1.9 - Password or admin only login store - not editing htaccess

texts:
Is there a way to make a store accessible (or maybe specific cms pages) by admin only or with a password?  Need to set it up so that clients can do this for future stores while in testing mode -without them having to dive into editing htaccess file.  Or can you recommend an extension (besides "Advanced Permissions").

Thanks for any guidance you can give on this.


texts: Internal Server Error (500) in ُshow site photo

texts: I uploaded all the files to the server but the site's photos are not showing


texts: How to add a custom field to Magento catalog_product_option_type_value table

texts:
I'm just wondering if there is an easier way?

What I was going to do is create my own custom table with a reference to the option_type_id from the catalog_product_option_type_value because I don't like altering the tables directly and then when the user saves their product option, save my field value with it.  I see a lot of EAV tables but I don't think I can use these with options.


texts:
I am using stripe payment method, I want to add billing zip filed in cc form.
How can I add this field??


texts: Can I create a "Mega Menu" by altering the CSS alone?

texts:
I wanna create a simple mega menu that removes the annoying hover ul's and have a full width container with all the links of each category visible.
Can I do this with just the CSS or will there be other factors I'll need to take into consideration.

I've found Magento2 has a pretty strict structure and changing one element can have a roll on effect on others. So I thought I'd ask first. Cheers.


texts: How to get list of all selected items of bundle product on detail page magento 2

texts: How to get list of all selected items of bundle product on detail page magento2


texts: Magento : How To Add an Attribute to Static Block

texts:
How to add attribute to static block. I am not looking for code, but also where put code.
Assume attribute is named test and static block name sttest.
I have search on this, but always get lost on where to add that code.

Thanks


texts: change breadcrumb css based upon pageview -- caching issue

texts:
when accessing a category page and a product page i'd like to change the breadcrumb css background attribute based upon the category that is being accessed.  So I added some logic within breadcrumbs.phtml that will check for the category title and it will reflect these changes.

Although due to the need for caching, this is not continuously changed and persists, for example, when I visit a product page that doesn't have the same category (or any category whatsoever).

the background image persists on the search page, product page, etc.

<?php if ($crumbs && is_array($crumbs)): ?>
<?php $key = array_keys($crumbs);
$category = $crumbs[$key[1]['label']];
$first = '<div id="grid-breadcrumbs"';
$mid = 'style="background:url(\'http://website.local/skin/frontend/website/web/images/category_header_';
$last = '.jpg\') no-repeat scroll center top #edf0f1">';
if ($category = 'category1') {
    echo $first . $mid . 'cat1' . $last;
} elseif ($category = 'category2') {
    echo $first . $mid . 'cat2' . $last;
} elseif ($category = 'category3') {
    echo $first . $mid . 'cat3' . $last;
} elseif ($category = 'category4') {
    echo $first . $mid . 'cat4' . $last;
} else {
    echo $first . '>';
}?>

The above code essentially generated a dynamic background for grid-breadcrumbs based upon the name of the category.

Is it possible to change the css of a breadcrumb from the category page itself?


texts: Magento 2 cart and checkout Array to string conversion error

texts: Cart and Checkout Page error due to street address becomes array.


texts: During an Import to Update Product prices, I made a mistake. I leave the value for the Product Link empty. After the Import all Product URL change and got the value from the Product name. To face this mistake I delete the table catalog_product_entity_varchar and after that, I create a new table with a SQL Backup. Now in the Product Backend Page for each product, there is the right URL but in the frontend, it doesn't found. Only with the wrong URL. What can I do? I think it depends on the URL Rewrites!


texts: Magento 2: Adding products to guest cart from external site via REST API

texts:
I am trying to build a simple tool that lets me add products directly to the shopping cart from an external CMS site using the REST API. Currently, I am trying to leverage the guest-carts to minimize security risk.

It looks like I need to first generate a new guest cart id:

POST /rest/default/V1/guest-carts

Then I add products to that cart:

POST /rest/default/V1/guest-carts/<generated cart id>/items {
    "cartItem": {
        "sku": "<item_sku>",
        "qty": 1
    }
}

Which returns:

{ "message": "No such entity with %fieldName = %fieldValue",
  "parameters": { "fieldName": "cartId", "fieldValue": null } }

If I add cartId to the first part I now get:

Next Exception: Message: Property "CartId" does not have corresponding setter in class "Magento\Quote\Api\Data\CartItemInterface". in <magento_root>/vendor/magento/framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 <magento_root>/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(LogicException))
#1 <magento_root>/vendor/magento/module-webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(LogicException))
#2 <magento_root>/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 <magento_root>/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 <magento_root>/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 <magento_root>/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []

What's going on? How do I use the guest cart REST API?


texts:
I'm building a Magento store with several type of products.
One of them has a specific payment method that is unapplicable to others.
Is it possibile to check if different type of products are in the cart and show an error message?
As an alternative, Is it possible to force one type of products to be bought alone?


texts: Is there a way to mark complete after manual shipping?

texts:
We have received orders in magento and shipped them manually. The problem is that magento wasn't consulted about the shipping and is now preventing us from setting the order status as complete. What is the best way to solve this problem?

magento 1.9 CE
I know this has already been addressed, im just looking for the best way besides canceling transactions or simply leaving them as processing or pending.


texts:
I want to download the Magento Community Edition from this page

http://www.magentocommerce.com/download

In the Full Release section I choose the zip version and click "Download".

It's open a window where I can login / register. I already have a user, so i'm logging in using my email and password and i'm redirected to "My Account" section.

On I once again click in the nav bar on Products -> Open Source / CE -> View available download -> choose zip version -> click "Download", it's opening again the login/register window.

I'm in loop... How can I download the Magento Community Edition?


texts:
Magento 2.3.2 upgrade after 2.2.6 having issue on product page. Images aren't appearing on product pages. The path coming is 404

/catalog/product/cache/50dd8aa5084eb9449e88d424223230cd/image/194413ea80/netgear-24-port-24-poe-4x-sfp-10-100-smart-switch-fs728tp-100eus-netfs728tpoer.jpg

However the correct path seems to be:

/catalog/product/cache/50dd8aa5084eb9449e88d424223230cd/n/e/netgear_ft728tp.jpg

Ran command catalog:image:resize, it recovered some product page images but not all.
Anybody faced same issue?


texts:
I am using Magento 1 to create a system configuration left menu is created successfully but when I click on that getting 404.
what I have tried

Re-logging into the dashboard.
Using ACL.
Clearing var/session/* and var/cache/*

  Code(system.xml):

  Code(adminhtml.xml):


texts: Sorting collection obtained from other object

texts:
I get categories collection from product object. I have to pick category with lowest level possible. To achieve this I want to sort collection by level and take first item. Although any method I know doesn't work. I have tried:

setOrder()
addAttributeToSort()
getSelect()->order()

Why is it like this and is there any way to achieve it?
Of course I can use getData() and than work with array but it doesn't seem to be good solution.


texts: How to remove exception message automatically after it appears from magento site(Updated)

texts:
I am building the magento site named www.bookslab.in. I want to remove the alert message "Above field is mandatory". It appears when users clicks on ADD TO CART button without checking the zipcode which is mandatory for every users. I want to remove this alert message because it does not need when user know that the Zipcode field is mandatory. I am attaching the screenshot for better understanding. I had added the cod.phtml code & updated my screenshot image to understand better.

cod.phtml

<?php

$msgData = Mage::helper('netgo_cod')->getConfigData();
if($msgData['zip_status'] == 1){
?>

        Zip Code : <input type="text" placeholder="Enter your pincode" value="" name="cod" class="product-custom-option required-entry" id="cod" size="29" style='color:black; font-size:12px'>
        <button type="button" onclick="checkCOD();" name="zip-check" title="Check" class="button" id="zip-check">Check</button>

<?php } ?>


texts: Multistore: removing __store when stores on different domain

texts:
we have a stor with multiple languages. They are on different domains.

In our endeavour to clean the URL, we want to remove __store and __from_store

step 1. __from_store is removed like so

Change the your page/switch/languages.phtml file
replace all code: $_lang->getCurrentUrl()
with $_lang->getCurrentUrl(false)

UPDATE $_lang->getCurrentUrl(false) also breaks th store id lookup. Hence the store specific URL is not returned. So adding false is NOT the solution.

step 2. Remove __store

Option 1. When all the stores are on the same domain. Go to System -> Configuration -> Web -> URL Options and set the 'Add Shop Code to URLs' option to Yes

My question: all stores are on a different domain. How do I now remove the __store element in our url? The solution under step 2 does of course not work.

thx ;P


texts: Can't create new column in sales order by using patch

texts:
I want to create a new column in sales_order by using patch. In patch list I can find the patch name but the column is not created. What's wrong here?
<?php

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;

    class AddViewedOrderAttribute implements DataPatchInterface {

        /**
         * @var ModuleDataSetupInterface
         */
        private $moduleDataSetup;
        /**
         * @var EavSetupFactory
         */
        private $eavSetupFactory;

        /**
         * Constructor
         *
         * @param ModuleDataSetupInterface $moduleDataSetup
         * @param EavSetupFactory $eavSetupFactory
         */
        public function __construct(
            ModuleDataSetupInterface $moduleDataSetup,
            EavSetupFactory $eavSetupFactory
        ) {
            $this->moduleDataSetup = $moduleDataSetup;
            $this->eavSetupFactory = $eavSetupFactory;
        }

        /**
         * {@inheritdoc}
         */
        public function apply()
        {
            $this->moduleDataSetup->getConnection()->startSetup();
            /** @var EavSetup $eavSetup */
            $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
            $eavSetup->addAttribute(
                \Magento\Sales\Model\Order::ENTITY,
                'viewed',
                [
                    'type' => 'boolean',
                    'label' => 'Viewed',
                    'default' => false,
                ]
            );

            $this->moduleDataSetup->getConnection()->endSetup();
        }

        public function revert()
        {
            $this->moduleDataSetup->getConnection()->startSetup();
            /** @var EavSetup $eavSetup */
            $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
            $eavSetup->removeAttribute(\Magento\Sales\Model\Order::ENTITY, 'viewed');

            $this->moduleDataSetup->getConnection()->endSetup();
        }

        /**
         * {@inheritdoc}
         */
        public function getAliases()
        {
            return [];
        }

        /**
         * {@inheritdoc}
         */
        public static function getDependencies()
        {
            return [];
        } }


texts:
I tried to develop a simple payment gateway extension for Magento 2.3.x and above. It required to support bank hosted method only. When user click place order leads to bank payment page and the card details enter only in the bank payment gateway page. How can I set up this with bank payment page URL and custom parameters to pass this gateway page?
In where I can set the third-party payment gateway URL, etc in Magento 2 gateway methods?


texts:
This is killing me.

When I run bin/magento setup:upgrade it throws this:

  Warning:
  include(/vendor/composer/../../generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php):
  failed to open stream: No such file or directory in
  /vendor/composer/ClassLoader.php on line 444

And when I run bin/magento setup:di:compile it throws this:

Class Magento\Framework\App\ResourceConnection\Proxy does not exist

Site was running perfectly. I had run setup:upgrade before without any problem. I had also ran di:compile.

But today, all of sudden this is happening.

Any idea?

UPDATE

I used to follow this every time when I compile:
https://devdocs.magento.com/guides/v2.3/performance-best-practices/deployment-flow.html

Could it be the reason now that I cannot run bin/magento setup:upgrade or bin/magento setup:di:compile?

I remember, at first running bin/magento setup:upgrade it threw error, after that I am stuck, couldn't run any CLI commands.

UPDATE 2

On first run setup:upgrade, it threw an error. Unfortunately I did not make a note of that and re-run the setup:upgrade again. Since then the above-mentioned error is thrown.

UPDATE 3

Alright, so in my local instance, I was able to reproduce a similar error. It's slightly different than what I was getting in my live server:

  Warning:
  include(/vendor/composer/../../generated/code/Magento/Framework/App/ResourceConnection/Proxy.php):
  failed to open stream: No such file or directory in
  /vendor/composer/ClassLoader.php on line 444

So, after I ran composer update It did allow me to run Magento CLI commands. And I was able to compile.

I still want to understand this. I am yet to perform this into my live server.


texts:
I found a bug in the mini-cart:

You add products to your cart - then in the mini-cart you click "Proceed to Checkout" - then immediately click on "View and Edit Cart".

The result is - a empty cart.

I've tested the issue with v2.2.3 till v2.2.6 - result is every time the same.

Uploaded a video to dropbox so that you can see the behavior:
https://www.dropbox.com/s/945yyoezh48h386/WhatsApp%20Video%202018-10-19%20at%2012.18.21.mp4?dl=0


texts: How to get customer email from javascript?

texts:
I need to get the customer email in homepage in a script.

Googling around I find mentions of window.customerData variable, but is always undefined (perhaps removed in latest versions?)

So at first I tried this:

require([
    'Magento_Customer/js/model/customer',
...

but it fails with error:TypeError: can't convert undefined to object somewhere in customer-addresses.js

Then I tried with:

require([
    'Magento_Customer/js/customer-data',
...

and then customerData.get('customer') but it gives me only first and last name or an empty object (even when the user is logged).

Is there a way to obtain the logged user email anywhere outside the checkout page?


texts: Magento 2 Can not cancel order through authorize.net payment method from admin

texts:
Order is placed through authorize payment gatway, on backend when i click on cancel order button it shows me error:

Transaction has been declined. Please try again later.

when i searched this error i got this error from following file:

vendor/magento/module-payment/Gateway/Command/GatewayCommand.php

on line 149

I am not able to cancel order my order status is pending then why i m getting this type of error.

Please any one have any idea about this please let me know.


texts: Magento 2: How to set module wise login permission access?

texts:
I have below files

\app\code\Custom\Module\Controller\MyModule\NewAction.php
\app\code\Custom\Module\Controller\MyModule\Edit.php
\app\code\Custom\Module\Controller\MyModule\Form.php

I would like to set module wise login permission.

If user is logged in then only they are able to access above pages otherwise redirected to homepage.

I have below code to check, but i have to put in each & every file.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->get('Magento\Customer\Model\Session');
if($customerSession->isLoggedIn()) {
   // customer login action
    $customerSession->getCustomerId();
    $customerSession->getCustomerGroupId();
    $customerSession->getCustomer();
    $customerSession->getCustomerData();
    $customerSession->getCustomer()->getEmail();
}

Can we manage this login permission through XML file or any better way?


texts: Importing Configurable products With color and size

texts:
Importing Configurable product with color and size but only size are visible on site.

What i followed here:

I exported all sample data of site.
Copy one configurable product with its associated products.
Changed All sku(to make this product unique)
Deleted: Url keys, images.
Checked with Sample-data as well.

This work well but only Size are displaying not Color.

  Whats working: If import product with one configurable option like
  Color or size then it works even with color-swatches.

Please help me to fix what I am missing.

Update: Same issue was here in magento version 1.7 and it was fixed: Magento Configurable Product Export, Multiple Super Attribute Error Fix. I hope its not issue in magento 2.1.2


texts:
I'm having an issue with the Add to Cart Button on my website. The error I am receiving is:

Uncaught TypeError: Cannot read property 'submit' of undefined

The link to the preview of this site is:

http://southeastsupfix.safetechhosting.co.uk/index.php/cp5000-429.html

Here is the fully list of errors that I get:

I am sensing a possible JQuery conflict but I can't quite see where.

In terms of the inclusion of files, I had added these in the head.phtml

<script type="text/javascript" src="/js/JQ/jquery-1.2.6.js"></script>
<script type="text/javascript" src="/js/JQ/prototype.js"></script>

I have also tried the latest version of JQuery but I get the same issues.

If anyone has experienced this before I'd be great if I could get some information.


texts: How to export and import categories from MySQL

texts:
I am trying to export categories and import them back to another Magento database. Therefor I exported every table related to catalog_category_... and imported them into the other database.

Now I am getting this error:

  #1005 - Can't create table `magento`.`catalog_category_entity` (errno: 150 "Foreign key constraint is incorrectly formed")

I don't understand this error, because I  deleted every catalog_category_ table from the other database, before importing the other dump.
Does anyone have an idea?


texts:
Getting this error. Please can anyone help us ?

  1 exception(s):
  Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value 'Ortho\Theme\Block\category\Leftcategory' is not accepted by the pattern '[A-Z][a-zA-Z\d](\[A-Z][a-zA-Z\d])*'.
  Line: 798

  Element 'block', attribute 'class': 'Ortho\Theme\Block\category\Leftcategory' is not a valid value of the atomic type 'blockClassType'.
  Line: 798


texts: Command line user does not have read and write permissions on generated directory. Magento ver 2.3 cloud environment

texts:
I am using Magento cloud.

When I try to run setup:di:compile command in one of my development branch. I am getting

  Command line user does not have read and write permissions on
  generated directory. Please address this issue before using Magento
  command line.

So I tried to give a folder & file permission for the generated folder in the root directory. I got this error

  chmod: changing permissions of 'generated': Read-only file system

How to solve this issue?


texts:
I have set up two shipping methods.

UPS
USPS

But USPS is not showing up on the checkout page.

Any idea? I use magento version 1.9.2.4.


texts: Website crash after updating the admin url

texts: After changing the admin url website crashed. Now i am trying to change the url back but i can not access my admin panel. What to do


texts: Magento 2 - 401 controller in magento admin

texts:
I currently have a module that adds a field to the admin cms page. I've written a controller and on input change I want to ajax this controller.

This is the simple controller I added to start testing:

namespace Vendor\Module\Controller\Adminhtml\Index;

use Magento\Framework\Controller\ResultFactory;

class Index extends \Magento\Framework\App\Action\Action
{
    /**
     * Save action
     *
     * @return void
     */
    public function execute()
    {
        die('Hello world');
    }

}

My Router is located in:

  Vendor\Module\etc\adminhtml\routes.xml

And looks like the following:

<router id="admin">
        <route frontName="namehere" id="namehere">
            <module name="Vendor_Module" before="Magento_Backend" />
        </route>
    </router>

I've added the following into a block to call in the admin cms page:

public function getFormAction()
    {
        return '/admin/namehere/index/index';
    }

And when I call this controller via the block in the ajax request or even access the controller I get either redirected to the dashboard with an error of key issue or via the ajax:

  Status Code: 401 Unauthorized

or

  Invalid security or form key. Please refresh the page.

Now I'm logged in as the admin so shouldn't have any permission issues. Why am I getting a 401? I'm pretty stumped. Any help always appreciated.


texts: Getting “Front controller reached 100 router match iterations” error in Magento 1

texts:
I am getting this error message, both on frontend and adminpanel. The error is from: app/code/core/Mage/Core/Controller/Varien/Front.php

This is the function where the error is thrown:

public function init()
    {
        Mage::dispatchEvent('controller_front_init_before', array('front'=>$this));
        $routersInfo = Mage::app()->getStore()->getConfig(self::XML_STORE_ROUTERS_PATH);
......

This self::XML_STORE_ROUTERS_PATH is null and $routersInfo too . Any idea why ?


texts: First Name Last Name in Login not compulsory

texts: I have made First Name & Last Name not compulsory in Magento. Now somehow on the cart page when I click on checkout button it goes to account info. Can I solve this somehow? Have never done such deep modifications in Magento and need an opinion on this.


texts: How do I get simple product name of configurable into checkout Order summary?

texts: I need to get the simple product name of configurable into checkout order summary. So I need to know how to do it?


texts: I am having an issue where when I try to select that the tax calculation should be based on "shipping address", The tax is not being shown. If I select "Shipping Origin" the tax shows. I need the tax to be calculated by shipping address. Can anyone help?


texts: Magento 2.2.4 : Add custom checkbox in product image details in admin

texts:
I added the custom checkbox in product image details page.

But, when I check it's not selected and not saved after saving records. I want to do like as Hide from Product Page checkbox working.


texts: Disable All Children of Disabled Category for Store View

texts:
I have a complicated category tree and a multi-store setup, with all categories currently enabled for all categories/subcategories.

For each store view, I'd like to disable specific categories and then automatically (possibly performed by script?) disable all of the children of the disabled categories -- and only for that particular view.

This is obviously achievable manually, going one-by-one, but there are too many subcategories and the tree is too complex to do this by hand. Any tips would be appreciated.


texts: failed to open stream no such file or directory site

texts:
<global>
         ...
        <models>
            <timer>
                <class>Apptha_Timer_Model</class>
                <resourceModel>apptha_timer_model_resource</resourceModel>
            </timer>
            <apptha_timer_model_resource>
                <class>Apptha_Timer_Model_Resource</class>
            </apptha_timer_model_resource>
        </models>
        <resources>
            <timer_setup>
                <setup>
                    <module>Apptha_Timer</module>
                    <class>Apptha_Timer_Model_Resource_Eav_Mysql4_Setup</class>
                </setup>

                <connection>
                    <use>core_setup</use>
                </connection>
            </timer_setup>
            <timer_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </timer_write>
            <timer_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </timer_read>
        </resources>
    </global>

The error says: Warning: include(Apptha/Timer/Model/Resource/Eav/Mysql4/Setup.php): failed to open stream: No such file or directory  in /var/www/html/lib/Varien/Autoload.php on line 94 but the file does exist in the right folder and class name.


texts: Get Dropdown value in Product Page Magento 2

texts:
I want one dropdown value in Product view page in Magento 2. For e.g, if I have select custom dropdown value in the product from the admin section. Now I want this value in view page as an option to display.

$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
$productRepository = $objectManager->get('\Magento\Catalog\Model\Product\Attribute\Repository');

$sizes = $productRepository->get('supply')->getOptions();
foreach ($sizes as $sizesOption) {
    if ($sizesOption->getValue() == '8') {
        echo    $sizesOption->getValue();
  echo  $sizesOption->getLabel();
}

}

But currently, they displayed all value in all product, not particular product value as per assing into products. I want this value filter by current product.


texts: Put another collection as the values of "WHERE ... IN (...)"

texts:
I have three collections and want to find out the mutually existing record between them according to one of the column. My current solution is to put another collection to "IN" in the query, like:

$second_collection = $model->getCollection()
                           ->addFieldToFilter("in"=>$another_collection);

However, the value returned by $another_collection->getData() is not an acceptable array to "addFieldToFilter" function. So I use "another_collection->getColumnValues('field')" to return an array. But 500 internal server error occurs. How can I do?

Code of getting collection:

$model = Mage::getModel('model/table');
$first_collection = $model->getCollection()
                         ->addFieldToSelect('target_field')
                         ->addFilter('filter_field', $filter_value1);
$second_collection = $model->getCollection()
                         ->addFieldToSelect('target_field')
                         ->addFilter('filter_field', $filter_value2)
                         ->addFieldToFilter('target_field', 'in'=>$first_collection->getColumnValues('target_field'));
$third_collection = $model->getCollection()
                          ->addFieldToSelect('target_field')
                          ->addFilter('filter_field', $filter_value3)
                          ->addFieldToFilter('target_field', 'in'=>$second_collection->getColumnValues('target_field'));

Thank you in advance.


texts:
When I purchase any product cart count not update when I refresh that page at that time cart count update. I want to need without refresh it's been update.

/app/design/frontend/theme/default/template/checkout/cart/minicart.phtml

<a href="<?php echo $this->getUrl('checkout/cart'); ?>" class="cart-link <?php if($_cartQty <= 0): ?> no-count<?php endif; ?>">

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

    (<?php echo $_cartQty; ?>)-
    <?php echo $this->__(''); ?>
    <?php echo Mage::helper('checkout')->formatPrice($this->getQuote()->getSubtotal()) ?>

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


texts: Magento 2.X: Customer custom attribute is not saving from admin or code

texts:
I have an issue I can't find why. I tried the issue on Magento 2.3.1 and 2.3.2.

I have created a module to add a new customer attribute. No issue for the moment. When I try to save the customer from the admin the value is not saved even when the field is in the admin form. Can you find my mistake?

namespace Vendor\Module\Setup;

use Magento\Customer\Model\Customer;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;

class UpgradeData implements \Magento\Framework\Setup\UpgradeDataInterface
{
    private $customerSetupFactory;
    protected $eavConfig;
    private $attributeSetFactory;

    public function __construct(
        CustomerSetupFactory $customerSetupFactory,
        \Magento\Eav\Model\Config $eavConfig,
        AttributeSetFactory $attributeSetFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
        $this->eavConfig = $eavConfig;
        $this->attributeSetFactory = $attributeSetFactory;

    }

    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {

        if (version_compare($context->getVersion(), '1.0.1') < 0) {
            $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
            $customerSetup->addAttribute(
                Customer::ENTITY,
                'exported_to_erp_at',
                [
                    'type' => 'varchar',
                    'label' => 'Exported to erp at',
                    'input' => 'text',
                    'required' => false,
                    'sort_order' => 88,
                    'visible' => true,
                    'system' => false,
                    'user_defined' => false,
                ]
            );

            $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
            $attributeSetId = $customerEntity->getDefaultAttributeSetId();

            /** @var $attributeSet AttributeSet */
            $attributeSet = $this->attributeSetFactory->create();
            $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

            $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'exported_to_erp_at')
                ->addData([
                    'attribute_set_id' => $attributeSetId,
                    'attribute_group_id' => $attributeGroupId,
                    'used_in_forms' => ['adminhtml_customer'],
                ]);

            $attribute->save();

        }
    }
}

As I said I tried to save with no success from the admin so I tried in Code. No success either.

$customer = $this->_customerFactory->create()->load(46431);
        $customer->setData("exported_to_erp_at", "toto");
        $customer->setCustomAttribute("exported_to_erp_at", "toto");
        $customer->save();

    //should work
    $customer = $this->_customerRepository->getById(46431);
    $customer->setCustomAttribute("exported_to_erp_at", "toto");
    $this->_customerRepository->save($customer);

Do you have an idea?

EDIT

If this help I have not a clean installation. This is a migration with the magento migration tool from 1.7.x to 2.3.x


texts: Get the Admin label of a configurable option value

texts:
Working in a product view template (.phtml) I am trying to get the Admin label for a configurable option value. I have managed to var_dump the front end values:

$productAttributeOptions = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);

$attributeOptions = array();

foreach ($productAttributeOptions as $productAttribute) {

    foreach ($productAttribute['values'] as $attribute) {

        $attributeOptions[$productAttribute['label']][$attribute['value_index']] = $attribute['store_label'];
    }
}

var_dump($attributeOptions);

This gives me an array:

array (size=1)
  'Configurable Option' =>
    array (size=2)
      378 => string 'Black' (length=5)
      379 => string 'Pink' (length=4)

Which is all fine and dandy. But how would I go about getting the "Admin" values for these options? The reason I would like to do this is because the admin values will contain hex colours that I can use to show a colour for a visitor to select instead of just having a drop down.

Any help is muchly appreciated.


texts: How to filter by color using XML-RPC and Python

texts:
I'm using "python-magento 0.3.3" to fetch products from Magento Enterprise 1.13.0.2 via XML-RPC. Getting an unfiltered list works. Filtering by 'sku' or 'description' works. However I cannot filter by color or by a custom attribute.

    # these are ok
    args = {'sku': {'like': '93%'}}
    args = {'sku': {'eq': '9365427'}}
    args = {'description': {'like': 'The%'}}

    # this returns []
    args = {'color': {'like': 'Bla%'}}

    # actual call
    return magento.catalog_product.list(args)

Can I filter by these? Is there a special format for the custom filter?


texts: Need to fetch custom customer attribute load via SOAP API 'customerCustomerRepositoryV1'

texts: I used SOAP API '{$baseUrl}soap/default?wsdl&services=customerCustomerRepositoryV1' to get customer attributes values. I am successfully getting these attributes values like name, email etc all default values but i have not able to get custom customer attributes


texts:
I am trying to get customer last logged in (last visited) date in front end but it returns null . For some users it returns the date which also doesn't seems to be the correct date .
this is what i am using to get last login date .

$collection = Mage::getModel('customer/customer')->getCollection();
 foreach ($collection as $customer) {
    $logCustomer = Mage::getModel('log/customer')->loadByCustomer($customer);
    $lastVisited = $logCustomer->getLoginAt();
 }

Also on back end it shows Last Logged In:   Never (Offline) for most of the users .


texts: Need to change terms and conditions html, used a plugin, but is not working

texts:
I need to change the Terms and Conditions HTML. The client wants to add HTML in the middle of the text. For that I need to change the  getAgreementsConfig function (Magento\CheckoutAgreements\Model\AgreementsConfigProvider).

I build a plugin to change the result of this function. I worked on this for the last 2 days, and no result until now. I don't know what else to do.
My code is:
My di.xml file is:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <type name="Magento\CheckoutAgreements\Model\AgreementsConfigProvider">
      <plugin name="agreementsHtmlText" type="VendorName\CheckoutAgreements\Model\Plugin\AgreementPlugin" sortOrder="10" disabled="false"/>
    </type>
</config>

And my Plugin is (VendorName\CheckoutAgreements\Model\Plugin\AgreementPlugin):

<?php

namespace VenderName\CheckoutAgreements\Model\Plugin;

use Magento\Checkout\Model\ConfigProviderInterface;
use Magento\Framework\App\ObjectManager;
use Magento\Store\Model\ScopeInterface;
use Magento\CheckoutAgreements\Model\Api\SearchCriteria\ActiveStoreAgreementsFilter;

class AgreementPlugin
{

    public function afterGetAgreementsConfig(\Magento\CheckoutAgreements\Model\AgreementsConfigProvider $subject, $result){

        foreach ($result['agreements'] as $key => $value) {
            $result[$key]['checkboxText'] ='ahahahhah'; // test if result changes
        }

        return 'qiweoqiwueioqwiueioquw'; //just to test if it changes the resukt
    }
}

I tried and change almost everything, and until now, no luck. Can anyone help me?

Thank you


texts: Magento 2 Change Billing Address format from select dropdown to box as the Shipping address format

texts:
I want to change the business address format shown in checkout page. By default it is select drop down.How can we change it to the format like shipping adddress is shown. I am new to knockout js.

This is the billing address

I need it to be formatted as above shipping address.


texts: how to create a form popup-modal in magento2

texts:
I am new to magento2. i'm trying to create a popup-modal for my new form. I have created a popup which works fine but unable to create a modal.

Following is the code for popup which loads on page load--

require([
        'jquery',
        'Magento_Ui/js/modal/alert'
    ],
    function($, alert) {
       alert({
            title: "Some title",
            content: "we can show popuop based on cookies later",
            autoOpen: true,
            clickableOverlay: false,
            focus: "",
            actions: {
                always: function(){
                    console.log("modal closed");
                }
            }
        });
    }
);

Please help me to create a modal. Any help is really appreciated.


texts: magento 2 how to redirect target path url?

texts:
how to redirect target path url?
target path =  http://www.test.com/catalog/product/view/id/1016/category/729
redirect to
orignal path =  http://www.test.com/product-url.html
i need to fix for all products.
Is there any solution to fix this problem with code.


texts: Call a custom phtml file to particular section Magento ver 1.6 to 1.9

texts:
I created a custom module (For Magento ver 1.6 to ver 1.9 ) in which i show custom phtml file and insert custom js and css as well, I included it to two pages only with particular section i.e footer section and right sidebar ( if enabled ).

<cms_index_index translate="label">

  <reference name="bottom.container">
              <block type="custommodule/bottomwidgethome" name="custommodule_bottomwidgethome" template="custommodule/bottomwidgethome.phtml" />
  </reference>

  <reference name="head">
      <action method="addItem">
          <type>skin_js</type>
          <name>custommodule/js/hb_popupforms.js</name>
          <params>defer</params>
      </action>
</reference>
 ....................

</cms_index_index>

I tried it in Magento ver 1.6.x to ver 1.9.x

All my template will go to base/default folder structure so that it will be available for all.

Issue: I tried and it works fine, unfortunately in one of the Magento theme there was no bottom.container in /var/www/html/newthme19/app/design/frontend/base/default/layout/page.xml

I am assuming

1) app/design/frontend/{CUSTOM-PACKAGE}/{MY-THEME}

2) app/design/frontend/{CUSTOM-PACKAGE}/{DEFAULT}

3) app/design/frontend/base/{DEFAULT}

that my custom template will be called at last from base/default

This is the structure block to which I am referring and any other module can also refer the same, this block by default is present in base/default.

   <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
       <label>Page Footer</label>
       <action method="setElementClass"><value>bottom-container</value></action>
</block>


texts: How to send discount coupon for those customers who didn't place any orders in Magento 2?

texts:
A solution I think it is to create a new customers group from

Stores -> Customer Groups

and create a cart price rule to this group only.

When you create a new Group you have to select a tax class. But there is only one in list: "retail customer".

How can I add a new tax class, that I have to select and that puts the customers automatically in this group based if the number of orders placed is 0 or not?

Or any other solution for creating coupons for those who didn't place any orders


texts: How to delete admin users from the database?

texts: Can I simply remove them from admin_users in the DB or is there anything else I need to do?


texts:
I'm trying to get the total weight of the items in checkout_submit_all_after

With this code:

$orderItems = $order->getAllItems();

         $weight = 0.0;
         $length = 0.0;
         $width = 0.0;
         $height = 0.0;
         $dimensions = array();

          foreach ($orderItems as $item) {

              $product = $item->getProduct();
              $weight += (float) ($product->getData('weight')*$item->getQtyOrdered());

              $length += (float) $product->getData('ts_dimensions_length');
              $width += (float) $product->getData('ts_dimensions_width');
              $height += (float) $product->getData('ts_dimensions_height');

          }

             $dimensions[] = [
                     'weigth' => $weight,
                     'length' => $length,
                     'width' => $width,
                     'height' => $height
                 ];

          $this->logger->info("Weight: ".$weight);
          $encodedData =  $this->_jsonHelper->jsonEncode($dimensions);
          $this->logger->info("Dimensiones: ".$encodedData);

When I print weight I get 0, I found that is because I'm getting 0 products, and another funny thing, is that my dimensions don't get summed if there are more than 1 product with same SKU. If I have 5 items with length 2, the result is 2, not 10. What I'm doing wrong here?

Please help.
Greetings!