texts: Magento 1 productpage 404 in developer mode

texts:
When we enable the developer mode on our Magento 1.9 store, for some reason all our productpages gets a 404 status. But the page shows all content of the product, but it only gets the body class cms-index-noroute noroute-404.

When we disable the developermode again, it works all fine.

Is this normal and how can we solve this?

We enable the developer mode with:

ini_set('display_errors', 1);
error_reporting(E_ALL);

$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;


texts: Where do scalar extension attributes save to?

texts:
Been reading the doc from Magento and i have been using extension attributes for more complex data structures but i'm basically wanting to add a simple scalar attribute
  <extension_attributes for="Magento\Sales\Api\Data\ShipmentTrackInterface">
    <attribute code="track_url" type="string"/>
  </extension_attributes>

And i thought for scalar attributes, i pretty much don't need to do anything else such as adding plugins, just need to set the value correctly and use repository to save
        $shipment = $this->shipmentRepository->get($shipmentId);

        $track = $this->trackFactory->create()
            ->setTrackNumber('123')
            ->setCarrierCode('abc')
            ->setTitle('super delivery');

        $extensionAttributes = $track->getExtensionAttributes()->setTrackUrl(
            'http://www.trackme.com/abcdef'
        );
        $track->setExtensionAttributes($extensionAttributes);

        $shipment->addTrack($track);
        $this->shipmentRepository->save($shipment);

Codes are generated correctly, no errors, but when i try to retrieve it, it doesn't actually return anything
$track->getExtensionAttributes()->getTrackUrl()

Am i misunderstanding extension attributes then? Does it mean i will always need to add something new to the database, even for scalar types?


texts: Magento 2.2.5: how to query in observer best practice

texts:
I'm looking for best practice on how to query to database in observer.

Ok so this is the idea, i use observer to catch event catalog_product_save_after (which will be fired after product is saved in admin page), after that, i get product id, and query to database to get data. Then after some code, i will update data to database.

I've searched a lot, but what i found is just some direct sql solution (which i don't think is good practice for this). Here is what i've found:

Magento 2 direct sql query for insert not working
magento 2 , write custom query in customer_address_entity, We can't save the address
Magento 2: join custom table with product collection while sql query is running fine

(i was not try the third one)

Ok so here is what i do so far:

  events.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_model_service_quote_submit_success">
        <observer name="sendEmailCustom" instance="Synergy\Butility\Observer\Quote\Webapi\SubmitObserver" />
    </event>
     <event name="catalog_product_save_after">
        <observer name="saveProduct" instance="Synergy\Butility\Observer\ProductSaveObserver" />
    </event>
</config>

  ProductSaveObserver.php

<?php

namespace Synergy\Butility\Observer;

use Magento\Framework\Event\ObserverInterface;

class ProductSaveObserver implements ObserverInterface
{
    public function __construct(
        \Magento\Framework\App\ResourceConnection $resource
    ) {
        $this->_resource = $resource;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $productId = $observer->getProduct()->getId();

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $resource = $objectManager->get('\Magento\Framework\App\ResourceConnection');
        $connection = $resource->getConnection();
        $tableName = $resource->getTableName('catalog_product_flat_32');

        $product_query = "SELECT * FROM " . $tableName . " WHERE entity_id = " . $productId;

        $product = $connection->query($product_query);
        foreach ($product as $data) {
            var_dump($product->getData());
        }
        exit;
        // $sql = "UPDATE " . $tableName . " SET customer_type = '" . $this->getCustomerType() . "'  WHERE entity_id = " . $this->getEntityId($observer);
        // $connection->query($sql);
    }
}

Thanks for reading :)


texts:
I recently downloaded Magmi for my Magento installation.
Put Magmi folder in Magento root directory
As soon as I refresh my site it shows Service Temporarily
Unavailable.
Downloaded full Magento installation and searched for maintenance
flag in local copy.
Found nothing.

Please help I cannot get my site out of this state.

site: truesupplement.com


texts: Magento : How to get cart info by using cartId

texts:
i want to retrieve details of items in cart created , i have a cart id , how can i retrieve the cart info(details).
i am using this code but it gives no results , please help

<?php

if(isset($_POST["cartId"])){
  require_once('../app/Mage.php'); //Path to Magento umask(0);
  $cartId=$_POST["cartId"];
  Mage::app();
  $quote = Mage::helper('checkout/cart')->getCart()->getQuote();
  $result[]=array();

  foreach ($quote->getAllItems() as $item) {
    $product = Mage::getModel('catalog/product')->load($item->getProduct()->getId());
    $productMediaConfig = Mage::getModel('catalog/product_media_config');
    $baseImageUrl = $productMediaConfig->getMediaUrl($product->getImage());
    $price=0;
    $price=$product->getFinalPrice();
    $result[]=array(
      "productId"=>$item->getProduct()->getId(),
      "price"=>$price,
      "imageUrl"=>$baseImageUrl
      );
  }

    //return array of products

  echo print_r($result);
  exit();

}else{
    echo "error";
    exit();
}


texts: Class Mage_Facebookilike_Helper_Data not found

texts:
When i click magento adminpenal's system>configuration The Error will caused.....

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


texts:
Using Magento 2.3.2.
Following on from my other question about changing the product description to another attribute, I would also like to display a new attribute - 'website name' as the product name on the product page rather than the default 'name'.
Because we sell on ebay our existing product names are stuffed with keywords. We would like 'website name' to be simpler and cleaner.
Any help would be gratefully received.


texts: Set select option default value as first one in Magento 2

texts:
Today I am working with select controller, I have tried different ways to set the default value as the first one but can't. For this stuff, I tried below code.

Array

$colorProductId = array('2' => 'Black','3' => 'Blue');
<span class="select_span">Select Color: </span>
<select id="color_drop_down_options" data-role="color_drop_down_options" class="color_drop_down_options" onChange="check();">
   <?php foreach($colorProductId as $key => $value): ?>
        <option value="<?php /* @escapeNotVerified */ echo $value ?>"<?php if ($value): ?> selected="selected"<?php endif ?>>
            <?php /* @escapeNotVerified */ echo $key ?>
        </option>
   <?php endforeach; ?>
 </select>

Above code is selected last one see image.

please suggest me how to set first one as default selected.


texts:
I have created an event observer in a module.

Observer is called after checkout_card_add event.

I want to call a cms page from the module if a certain condition is met.

My observer.php file

<?php
class Rohan_Module2_Model_Observer
{

            public function changeUserGroup(Varien_Event_Observer $observer)
            {

              Mage::log('function entered:');
              $customer1 = Mage::getModel('customer/customer')->load($customerId);
              $attr = $customer1->getCustomattribute();

                 if(some if conditon about $attr)
                 {
                     //if true redirect to cms page about-us url(http://127.0.0.1/magento1-test/index.php/about-magento-demo-store)
                 }

             }
}

How can i call a CMS Page from this observer.php file?


texts: Magento 2.0 - There is no framework like bootstrap included right?

texts:
I have to installe magento 2.0.7 and I was asked what framework it will use. I have read magento 2 should use zend framework though I don't really see that it is something like bootstrap for easy creation of responsive websites.

So did I miss something or is the best way to include bootstrap to create a proper responsive shop that can be used for own designed landingpages and such things too?


texts: Display specified variations of a configurable product in category display page, all linking to configurable PDP

texts:
This is less of a coding question and more of community knowledge. We would like to include product filters on our site, specifically for size and width. However, at the moment, for products with multiple attributes, such as colour, size, and width, we choose one variation from each colour to be displayed in catalog view, and disable the parent configurable from being displayed at all. This ensures that customers are exposed to all colours of a configurable in the catalog view, while they all are linked to the configurable PDP.
We would like to implement size and width filters, however this is impossible with the current configuration as the filters would use the information from the individual simple products we have enabled for catalog view, so if we had enabled the width:medium size:5 for all colours of a configurable, if you were to filter by width:wide, then nothing would show.
Is anyone aware of any custom modifications to Magento 2.3 commerce back-end, or any modules that have implemented a work around for this? Any help would be greatly appreciated!


texts: M2 | How to Get Logged in customer ID in Model class?

texts:
I need customer ID in Model class as I am creating custom API.

I can get customer ID in Controller as well as in Block class by all below ways:

Injecting in constructor

\Magento\Customer\Model\Session $session

and using as

public function getCustomerId()
    {
        return $this->_session->getCustomer()->getId();
    }

Also by Object manager:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

        $customerSession = $objectManager->create("Magento\Customer\Model\Session");

        if($customerSession->isLoggedIn()){
        echo $customerSession->getCustomerId();
        }

Also I tried using this class:

\Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer,

It gives output in controller and block but no output in Model.
The problem is all above code works fine in Controller and block but when I use in Model class it did not show any result. Model class is working fine for other features and I debugged using die() exit; it works. Cache is also disabled.

Edit:
I think I need to do something like this to access logged in customer ID

<route url="/V1/customers/updateProfileDetails" method="PUT">
        <service class="Vendor\Module\Api\CustomerRegInterface" method="updateProfileDetails"/>
        <resources>
            <resource ref="self"/>
        </resources>
          <data>
            <parameter name="customerId" force="true">%customer_id%</parameter>
        </data>
    </route>

Still looking how to do it


texts: Huge gap in Magento dashboard vs Google Analytics revenue

texts:
I am running Magento 1.7.0.2. There seems to be a huge difference in what the Magento dashboard reports and Google Analytics reports in terms of revenue.

Google Analytics is showing that the revenue is about 33% higher than what it says on Magento. There doesn't seem to be duplicate orders coming up in Google Analytics. Even if I subtract tax and shipping from Google's revenue - it is still much higher than Magento's reporting. Has anyone noticed/experienced this issue?


texts: Admin Product Catalog Search not working

texts:
Mangento Version 1.9.2.1

The Product Catalog Search in the Admin Panel does not update the product list no matter what attribute I use for the filter. However the search is working correctly in the front-end. Everything else in the page seems to be ok like the number of results per page updates the product list but for the search, all it does is show the spinner and when the spinner disappears, the product list is still not updated.

Does anyone have any idea or suggestion?

*Update
Same for Manage Customer as well, the search shows the spinner, but the customer list is not updated and I noticed the filter is cleared as well.


texts: Set Update Time in Custom module on Grid

texts:
I am Created one Custom Module called : Sigmasolve/Recipe.
But Problem is that on Grid Page only Display Updated Time Column But not Display any Data in That Column. And also in Database only create column like updated_time but not store any "data" in that Field.
I am Using Magento Version:1.9.2.3 .
Any Kind of help will  appreciated.


texts:
I've got a question. I am changing the following function from the Magento API V2: catalogProductAttributeSetAttributeAdd().

In the WSDL I defined I want the ID back, and not a boolean.

My problem is: I have to change core templates: app/code/core/Mage/Catalog/etc/wsdl.xml like this:

<!-- <message name="catalogProductAttributeSetAttributeAddResponse">
    <part name="isAdded" type="xsd:boolean" />
</message> -->

but I don't want to do that.

How can I overwrite this line in the wsdl.xml? My new WSDL looks like:

<message name="catalogProductAttributeSetAttributeAddResponse">
    <part name="attributeId" type="xsd:int" />
</message>


texts: How i can integrate 3rd party tax engine in magento2?

texts:
I have a 3rd party tax engine and i want to create a module in Magento2 that collect the data that the tax engine need(ie shipping address, amount, etc). and send it to the tax engine. This is the easy part for me..however the hard part, or at least the part that i can not understand fully is the integration part, i mean; how Magento works regarding the integration of third-party tax calculation engines, should i implement some kind of interface in my Magento module in order to Magento can be able to recognize it as a tax calculation module?

Thanks!!


texts: "Price slider " extension not working on iphone

texts:
I installed "Price slider " extension. Its working fine. But its not working on Iphone. Any idea?
extension link - http://www.magentocommerce.com/magento-connect/magehouse-free-ajax-layered-navigation-toolbar-with-price-slider-2-2-0.html


texts:
In /template/checkout/cart.phtml the code $this->getChildHtml('totals') returns nothing.

Any idea what the problem could be?

Thanks,
Klevis


texts: Change 1.9 rwd new order e-mail template item tabel

texts:
How or where can i change the rwd item tabel, from the order e-mail template? At the bottom of the e-mail. It don't look good at the moment. It looks like there are missing some styles? See attachment.

-------UPDATE--------

Ok now i try to get it back like non-rwd versions before (overriding some files from /base/). I am almost there have a look at the image below. The [footer] is outside of the table and the totals are not aligned to the right?

What am i missing?


texts: Invalid Form Key, Please refresh the page - Admin Panel

texts:
My issue is that I can't login to the admin panel, I know that this is already asked, and I have tried:

Clear cache and sessions,browser cookies.
web/cookie/cookie_domain and web/cookie/cookie_path clear in the table core_config_data
i will check the session path its correct

but still same error.


texts: Add Dependent Custom Product Attribute and ToolTip in Magento 2

texts:
I am caught up in a situation.

I want to create some custom product attributes which I have created using $eavSetup->addAttribute in my module's InstallData. I have created 5 of them but I want 4 of these to be dependent on specific value of 1st attribute i.e If 1st attribute is selected as Yes only then rest attributes are to be shown else hidden.
I also want to show ToolTips next to these attributes.


texts:
I need to setup a discount for one specific category products , but need to show discount only on that category page. So in case if the same product is assign to any other category, it should not display the discounted price.
I tried all the way but it seem impossible with Default Magento.
Can anyone suggest me the way to achieve this type of functionality?
Thanks


texts:
I am creating a custom theme and the page always renders without the css formatting for about 10 seconds before loading properly.

Is this a configuration issue?


texts: Magento 2.1.6 pages only partially fetched in Google Webmaster tools - Not blocked by robots.txt

texts:
I am trying to understand why when I 'Fetch as Google' for any page on my Magento 2.1.6 site in Webmaster tools I always get a 'partial' rendered page.

Google consistently reports various .js and .css files as being 'Temporarily unreachable', the main product page image is also always flagged up in this way.

However, I can click any one of the files it says are unreachable and successfully open then in the browser.

I do not believe that my robots.txt file is blocking these. Can anyone offer any advice?

  Googlebot couldn't get all resources for this page. Here's a list:
  URL   Type    Reason  Severity
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/knockoutjs/knockout.js  Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/knockoutjs/knockout-es5.js  Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/mage/validation.js  Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/matchMedia.js   Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/jquery/jquery-ui.js Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/jquery/jquery.storageapi.min.js Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/mage/apply/scripts.js   Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/Magento_Ui/js/lib/knockout/template/engine.js   Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/Magento_Ui/js/lib/knockout/bindings/bootstrap.js    Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/Magento_Ui/js/lib/knockout/extender/observable_array.js Script  Temporarily
  unreachable   --
  https://www.millsmeyer.com/pub/static/frontend/meyer/millsmeyer/en_GB/Magento_Ui/js/lib/knockout/extender/bound-nodes.js  Script  Temporarily
  unreachable   --


texts: How can I fix "Not Allowed" error on Add All to Wishlist?

texts:
If I click "add all to wishlist", I get a blank white page with the error "Not Allowed" and nothing else on screen, I am using Magento CE 1.9.1.1,

I have tried removing my theme and I have made sure all my folders are set to 755 and files to 644 (suphp) but I cant think of how to fix.

Could it be a corrupt core file, if so, which or where should I start looking? Or maybe an issue in htaccess?


texts: How do you make Magento CE include virtual products in the related product list?

texts:
I am trying to create a relation between a bundled product and a virtual product. So I thought: "Let's just add the virtual product as related product."

However it was not showing in the related product list. After some trial and error (i.e. adding all products as related and see which were omitted) I found that it was only omitting virtual products from the related product list.

My question is:

Is this normal Magento (CE 1.9.0.1) behaviour? (I am editing an already active Magento installation)
If so, why are virtual products omitted by default?
How do I include them in the related products list?


texts: Change store attribute option value to display in product edit magento 1

texts:
I added my attribute, but it can not display another store view option value (ex: below picture) in product edit. It always display default value.

Please help me find a solution to this problem. Thank.


texts: What is the use of Patch? Why we want to apply the patches? how to apply the patches?

texts:
Can anyone explain me briefly

Use of Patch?
Why do we want to apply the patches?

Thanks,


texts: I can't enable my module with di.xml in magento

texts:
My 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">
    <preference for="Mageplaza\BannerSlider\Block\Slider" type="Movistar\BannerSlider\Block\Slider\Slider"/>
</config>

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

Mi layout
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="banner.slider">
            <arguments>
                <argument name="template" xsi:type="string">Movistar_BannerSlider::bannerslider/bannerslider.phtml</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

I cannot disable the vendor module, Mageplaza and use the custom module that I create myself in magento 2. Which when using template hints in the front of my store the banner and slider point me to the vendor directory and not to my own.


texts: Magento 2: Problem Creating the custom Search REST API URL?

texts:
I want achieve this kind of url in my custom REST API, Any Suggestion?

http://localhost/rest/V1/products?name=mujassam&value=5

Before Also I asked same question

Magento2: creating custom search REST API


texts: Magento 2.3: How to capture event after paypal payment

texts:
I have tried sales_order_save_after and sales_order_save_after but I cannot capture the order event after paying with paypal.

How can I capture this type of payment?


texts: Magento 242 bin/magento deploy:mode:set production deploy all languages

texts:
Whenever i run command bin/magento deploy:mode:set production, it always auto deploy all languages, takes a long time, makes high CPU and RAM usages.
I would like it to generate files for en_US instead
How do i achieve this?
I used bin/magento setup:static-content:deploy -f en_US, it is fine but Magento App does not switch to production mode


texts: Product not Showing in category page when enabel grouped product in magento2

texts:
Added one grouped product in the category. In the home page product list it showing that grouped product, but when I redirect to the category page, none of product showing. when I disabled that grouped product, In category page show all products.
Some of them prefer do Reindex and cache clean. I did the all stuff. but no luck.


texts: A custom attribute is specified with missing attributes code in magento 2.3.1

texts: I am facing a problem when i add customer field in checkout page, Magento 2.3.1 I am receiving this error when A custom attribute is specified without attribute code.


texts:
Can I upgrade from 1.8.1.0 to 2.4?
Two questions:

Is it possible to jump upgrades, therefore upgrade from Magento 1.8.1.0 directly to Magento 2.4?

Are there any detailed instructions on how to get this done?

I am currently using Fastcomet shared Hosting.


texts:
Magento2 EXCL/INCL VAT switcher
I need to create a VAT switcher in Magento2 where on click of the button product prices in the entire site get changed.

When clicked on EXCL VAT all product prices VAT gets removed
When clicked on INCL VAT all product prices VAT gets added

Also, what ever is the price of product at that time EXCL or INCL VAT, same also goes to add to cart
Any suggestions will be appricated.


texts: How to set page size/default zoom in Magento 2.1.5

texts:
I bought a theme and I was wondering if there is any way that I could change/modify the theme default page zoom/size ? If I scale it down in my browser to 80% it looks way better and I would like it to be the default view for visitors. Is there any way that I could do this ? Im using Magento 2.1.5. Help would be much appreciated.

Thanks, Denis A.


texts: Magento2 InstallSchema add new column to existing table

texts:
I'm trying to add new column to existing table in magento2

<?php

namespace Vendor\Module\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;

/**
 * @codeCoverageIgnore
 */
class InstallSchema implements InstallSchemaInterface
{

    /**
     * {@inheritdoc}
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $installer = $setup;

        $installer->startSetup();

        $eavTable = $installer->getTable('eav_attribute');

        $columns = [
            'my_column' => [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
                'length' => '1',
                'nullable' => false,
                'comment' => 'Description of my column',
            ],
        ];

        $connection = $installer->getConnection();
        foreach ($columns as $name => $definition) {
            $connection->addColumn($eavTable, $name, $definition);
        }

        $installer->endSetup();
    }
}

  php bin/magento setup:upgrade

Nothing happens

Upd 1.

If I clearly understand the goal, InstallSchema executes only when there no any values in setup table. If your module is already installed in system - you need make any changes in UpgradeSchema. That because my file didn't execute. When I renamed it to upgrade and make necessary changes - everything started working properly


texts:
I have an issue with orders, to be specific with shipping method description.

I've noticed that sometimes shipping description in 'Shipping and Handling Information' tab appends as: 'No shipping information available'.

It doesn't happen in all orders, and I haven't found any pattern yet.

I've tried to track down where the problem is, but all I've found is that some orders have an empty shipping_description column in 'sales_flat_quote_address' table, whereas shipping_method column is always correct.

I've tried to find getShippingDescription() or setShippingMethod()  methods implementation, but I got lost and it did not result in anything.

I'm using SolvingMagento OneStepCheckout module.

In:  app/code/local/Solvingmagento/OneStepCheckout/controllers/OnestepController.php in submitOrderAction() method:

$results[] = $this->saveShippingMethodData($shippingMethod, false);

Then we have:

protected function saveShippingMethodData($shippingMethod, $response = true)
{
    $result = $this->getOnestep()->saveShippingMethod($shippingMethod);

    if (isset($result['error'])) {
        if ($response) {
            $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
            return false;
        }
    }
    $this->getOnestep()->getQuote()->getShippingAddress()->setCollectShippingRates(true);

    return $result;
}

then in app/code/core/Mage/Checkout/Model/Type/Onepage.php we have:

    public function saveShippingMethod($shippingMethod)
{
    if (empty($shippingMethod)) {
        return array('error' => -1, 'message' => Mage::helper('checkout')->__('Invalid shipping method.'));
    }
    $rate = $this->getQuote()->getShippingAddress()->getShippingRateByCode($shippingMethod);
    if (!$rate) {
        return array('error' => -1, 'message' => Mage::helper('checkout')->__('Invalid shipping method.'));
    }
    $this->getQuote()->getShippingAddress()
        ->setShippingMethod($shippingMethod);

    $this->getCheckout()
        ->setStepData('shipping_method', 'complete', true)
        ->setStepData('payment', 'allow', true);

    return array();
}

And now I have no clue where it is going, I can not find any saveShippingMethod() implementation.

Could anyone help me to get back on tracks with solving this issue?
What could be wrong or where should I be looking?

I'd appreciate any help.

Possible fix:

I belive the problem was caused by my own modification of OneStepCheckout module. I tried to load each sections (billing info, shipping, payment etc.) automatically (without the need to click on anything) and that seemed to be the problem. Sometimes new record in sales_flat_quote_address just did not appear, so I've added the following line into my js file:

shippingMethod.getStepUpdate.bindAsEventListener(this, false);

That line forces the script to create a new row filled with default data. And now it works fine.

Take that in mind, my solution might be diffrent than yours, as it was caused by me and not faulty module.

I'd advice you to take a closer look at _sales_flat_quote_address (especially shipping_method and shipping_description column), becouse I belive it is connected to this problem.


texts: After upgrade Magento 2 : JS-translation.json file not Generating on Production Mode

texts:
When  run setup:static-content:deploy command then js-translation.json not generating.

So it is creating an issue in admin to load order, customer and product grid.
File Path is

  pub/static/adminhtml/Magento/backend/en_US/js-translation.json

And same file not generating on the frontend.

  /pub/static/frontend/vendor/theme/en_US


texts: Custom Cron job is not working in magento 2

texts:
Custom Cron job is not working in Magento 2 when the schedule set like below:

<schedule>30 17 * * 0</schedule>

Only working when <schedule>* * * * *</schedule> in magento 2.2.5


texts: How to make sure that changes in base_url of mg_core_config_data is changed immediately

texts: I tried changing their values, but it is taking ages to reflect the changes made, It took nearly 4 hours for my last change. Any ways to speed up this ?


texts: Magento 2: Checkout page getting some error

texts:
I am using Magento 2.1.9 when I got checkout page getting this error. if anyone know this error reply me

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/XXX/public_html/XXXX/XXXX/vendor/magento/module-authorizenet/Model/Directpost/Response.php on line 77


texts:
How to change base url from https://www.example.sg/  from https://www.example.sg/aaa?
I would like to permanently append "aaa" next to https://www.example.sg/. Usually, when I click, for example, "test" category, the base url is  https://www.example.sg/ and the url for "Test" category will be https://www.example.sg/test. What I would like to be right now is that the base url is https://www.example.sg/aaa and the url for "Test" category will be https://www.example.sg/aaa/test.


texts: Module development workflow with GIT and modman

texts:
This question is a follow up of this one: Magento 1: improving my module development workflow (Modman, composer, git)

Reminder:

  I am using a bunch of extensions that me and the team I'm working with
  have developped (here we're talking 50+ extensions) and the code for
  those extensions is stored on Bitbucket

I've changed my development workflow to the following:

At the moment, when I want to add a feature/fix a bug for one of those extensions, here's my workflow:

Install the last version of the extension on one of the website via Modman with symlinks
Fix the bug/add a feature/test by modifying the files in .modman module folder
Go the .modman module folder and commit/push my module changes (thus the bitbucket repo for this extension will be updated)
Go back to my root folder and commit and push via GIT to the website repo

My problem now is that Assembla does not seem to recognize the symlinks from that last commit/push step.

It gives me a weird icon (like it doesn't know if it's a file or a folder):

If I check the commit here's what I see:

I'm not exactly sure what I'm missing here but when my team mates pull the repo on their side, their .modman folder ends up being empty.

NB: something I noticed when I pushed my changes to the website repo is that I tend to get a GIT error: "fatal: git cat-file: couldn not get object info" but the commit is still pushed. I'm not sure if it's related though


texts: call static block in view.phtml insted of phtml file

texts:
we are displaying text field in view page to check COD availability.

view.phtml

echo $this->getLayout()->createBlock('core/template')->setTemplate('checkdelivery/checkdelivery.phtml')->toHtml();

in view.phtml we are calling below file . but i want to call static block identifier  [identifier code - check] instead of below file.

template/checkdelivery/checkdelivery.phtml

        <?php $blockLabel = Mage::getStoreConfig('checkdelivery/general/block_title'); ?>
        <?php echo $this->__($blockLabel) ?>

            <input name="zipcode" size="17" type="text" id="zipcode" value="<?php echo Mage::getModel('core/cookie')->get('zip'); ?>" maxlength="10" class="input-text" placeholder="<?php echo $this->__('Enter ZIP Code'); ?>"/>
            <button type="button" name="zip-check" title="Check" class="button" id="zip-check" ><?php echo $this->__('Check'); ?></button>

            <?php $defaultHtml = Mage::getStoreConfig('checkdelivery/general/default_html'); ?>

<?php if(Mage::getModel('core/cookie')->get('message')){
    echo Mage::getModel('core/cookie')->get('message');
}
else{
    $defaultHtml; } ?>

static block code :

{{block type ="core/template" template = "checkdelivery/checkdelivery.phtml"}}


texts: Show form results/submissions on Magento Admin Panel

texts:
What is the best way to have form results come in row by row into Magento's Admin Panel?

The form results are currently being saved to Magento's database under table name: "my_forms"; the results are also being emailed to me.

Image #2 shows what my end result ideally would look like.  Where the data is being pulled from the database table "my_forms". "my_forms" table has 10 columns:

I assume the steps would be:
Step 1: Use php to record form submissions to a new table (my_form) in Magento's database
Step 2: Create a new module or modify the "Customers" module?
Step 3: Add column names to the module and pull data from the "my_form" table

I've done step 1 successfully but I'm lost on Step 2 and Step 3, or if those are even the right steps to take.  Any advice or direction would be much appreciated!


texts: Magento 2.4 installation on local returning elasticsearch error

texts:
I have installed elasticsearch on local (xampp) and on http://localhost:9200/ is showing it is running.
But when I trying to install magento 2.4 getting elasticsearch error.
Magento installation command -
php bin/magento setup:install --base-url="http://127.0.0.1/magento2" --db-host="localhost" --db-name="magento2" --db-user="root" --db-password="" --admin-firstname="Test" --admin-lastname="Test" --admin-email="test@gamil.com" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="INR" --timezone="Asia/Kolkata" --use-rewrites="1" --backend-frontname="admin" --elasticsearch-host=elasticsearch --elasticsearch-port=9200

And getting below error -
Installing search configuration...

In SearchConfig.php line 81:

  Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

What should I try to install magento 2.4?


texts: ImageOptimizer - jpegtran is not executable

texts:
I installed the extension ImageOptimizer. I noticed that it is not working, progress is still at 0% so I activated error logging in the extension and get this:

  jpegtran is not executable.

I executed which jpegtran but there is no output.

The lib folder has all necessary permissions:

mycompany@s64:/var/customers/webs/mycompany/test/lib/Apptrian/ImageOptimizer$ ls -lah
insgesamt 24K
drwxr-xr-x 2 mycompany mycompany 4,0K Feb  4 18:23 .
drwxr-xr-x 3 mycompany mycompany 4,0K Feb  4 18:23 ..
lrwxrwxrwx 1 mycompany mycompany   75 Feb  4 18:23 elf32 -> ../../../.modman/apptrian-image-optimizer/lib/Apptrian/ImageOptimizer/elf32
lrwxrwxrwx 1 mycompany mycompany   75 Feb  4 18:23 elf64 -> ../../../.modman/apptrian-image-optimizer/lib/Apptrian/ImageOptimizer/elf64
lrwxrwxrwx 1 mycompany mycompany   75 Feb  4 18:23 win32 -> ../../../.modman/apptrian-image-optimizer/lib/Apptrian/ImageOptimizer/win32
lrwxrwxrwx 1 mycompany mycompany   75 Feb  4 18:23 win64 -> ../../../.modman/apptrian-image-optimizer/lib/Apptrian/ImageOptimizer/win64

So I installed the binary and it still gives me the same error that it does not have permission jpegtran is not executable., even though this are the set permission -rwxr-xr-x 1 root root 31K Okt 20 2016 jpegtran


texts:
I have Magento 2 with two store views: one with code "a" and one with code "b".

I have set up two domains mydomain.a and mydomain.b,  with public folders

/a/public_html/

/b/public_html/

now

/a/public_html/index.php looks like

<?php
$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'a';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
$app = $bootstrap->createApplication('Magento\Framework\App\Http');
$bootstrap->run($app);

and /b/public_html/index.php looks the same except that I have 'b' in the 3rd line.

in /b/public_html/ I have set up symbolic links to all folders in /a/public_html/ (app, bin, dev, pub,...).

the "base URL" properties for store view "a" is "http://www.mydomain.a" and for "b" "http://www.mydomain.b".

But when I go to mysite.a it looks fine, but when I go to mysite.b it redirects to mysite.a and language is a, not b.And when I go to either mysite.b/admin or mysite.a/admin it starts to loop from a to b and I get "This website has a redirect loop".

Isn't this super weird? Perhaps if I have two full installations of Meganto 2 and just a common database, would this work?


texts: Magento 2 : new class not able to add in override construct method

texts:
i have override this class Magento\Checkout\Controller\Cart\Add
but i need to add additional class in construct method like below

public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator,
        CustomerCart $cart,
        ProductRepositoryInterface $productRepository,
    \Magento\ConfigurableProduct\Model\Product\Type\Configurable $configurableProduct
    ) {

        parent::__construct(
            $context,
            $scopeConfig,
            $checkoutSession,
            $storeManager,
            $formKeyValidator,
            $cart
        );
    $this->configurableProduct = $configurableProduct;
    }

I have use this class additionally Magento\ConfigurableProduct\Model\Product\Type\Configurable

but still showing below error:

{"0":"Missing required argument $context of Dynamic\\Checkout\\Controller\\Index\\Cart.","1":"<pre>#1 Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->_resolveArguments('Dynamic\\Checkout...', array(array('context', NULL, true, NULL),

i have already tried to upgrade. deploy, compile command but no luck.


texts: Js not work for form ui component in magento 2

texts:
I created JS for submit ajax to search for product names, it didn't work, I think because when reloading the page, the form was not created yet. and no input[name$='general[product_id]']

My js

require(['jquery', 'jquery/ui'],function($) {

jQuery("document").ready(function(){
    jQuery("input[name$='general[product_id]']").change(function() {
        var productId = jQuery("input[name$='general[product_id]']").val();
        jQuery.ajax({
            url: "/index/index/searchnameproduct",
            dataType: 'json',
            type : 'post',
            data: {productId: productId},
            showLoader: true,
            success: function(data) {
                // var returnedData = JSON.parse(data);
                console.log(data);
            }
        });
    });
});

});


texts: How to allow static blocks in product description?

texts:
I'd like to add static blocks like

{{block type="cms/block" block_id="this_is_the_block_id"}}

in the product description (and/or short description).

We currently have an Magento CE 1.9 installation with the "Static Blocks Everywhere" extension (https://www.magentocommerce.com/magento-connect/catalog/product/view/id/13663/) which should be migrated to a Magento CE 2.1 installation. There is no similar Magento 2 extension. Many of our current product desriptions are containing static blocks.


texts:
I want to edit the class button on /checkout/cart/ that says "Go to Checkout". I know that section can be edited in "totals.phtml" but the button itself is embedded in a function called "renderTotals()" which I can't find.

I'm having issues with Google Tag Manager because I can't change the class of the button.

Thanks


texts: Magento 2.3.2 Add custom button on customer Dashboard but button not linked

texts:
Custom tab added on customer Dashboard but button not linked to my controller and not load my phtml file please check the code below and let me know if i made some mistake. Thanks

Customtab/ImportOrders/Controller/Customer/Index.php

<?php
namespace Customtab\ImportOrders\Controller\Customer;
class Index extends \Magento\Framework\App\Action\Action{
public function execute()
{
$this->_view->loadLayout();
$this->_view->renderLayout();
 }
}

Customtab/ImportOrders/etc/frontend/routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
   <!--Use router 'standard' for frontend route-->
   <router id="standard">
        <!--Define a custom route with id and frontName-->
        <route frontName="importorder" id="import">
            <!--The module which this route match to-->
            <module name="Customtab_ImportOrders"/>
        </route>
       <route id="customer">
           <module name="Customtab_ImportOrders" before="Magento_Customer" />
       </route>
   </router>
</config>

Customtab/ImportOrders/etc/module.xml

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

Customtab/ImportOrders/view/frontend/layout/customer_account.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
      <referenceBlock name="customer_account_navigation">
         <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-customer">
            <arguments>
               <argument name="path" xsi:type="string">importorder/customer/index</argument>
               <argument name="label" xsi:type="string">Import Orders</argument>
            </arguments>
         </block>
      </referenceBlock>
   </body>
</page>

Customtab/ImportOrders/view/frontend/layout/importorder_customer_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
<body>
    <referenceBlock name="page.main.title">
            <action method="setPageTitle">
                <argument translate="true" name="title" xsi:type="string">Import Orders</argument>
            </action>
     </referenceBlock>
     <referenceContainer name="content">
        <block class="Magento\Framework\View\Element\Template" name="my_tab" template="Customtab_ImportOrders::mytab.phtml"/>
    </referenceContainer>
</body>
</page>

Customtab/ImportOrders/view/frontend/templates/mytab.phtml

<?php
//' Add Some Code Here for design'
    echo '<span> My Custom Tab.. </span>';

?>


texts: How to raise the amount of product price digits?

texts: I'm using Magento2. When I add a new product with a price of 416000000 the price is reset to 100000000 after save. How can I fix it?


texts: How to take care of products that are out of stock?

texts:
We are currently using the extension of Ext4Mage which does a neat job. However, sometimes products aren't redirected, when they are ouf of stock.

We are now trying to create an extension, that observers the products and when they are out of stock, redirect them to their first maintained category.

For example:

Product 1 has Stock 1. A customer checks out with this product, now it has Qty 0.

The Product is bound to Category 1, 2 and somewhat else. I want my observer to create a new redirect for Product 1's slug to the URL of Category 1, since its the first category maintained in the product settings.

If Product 1 is in stock again, I want my product to be available again, and removing the further created 301 redirect.

What I'm thinking about:

I guess I need a observer, which checks a specific event, right now I'm not sure which event. The observer gets a few functions to deal with the aboves requirements and if the conditions match (i.e. product's out of stock) it should trigger the functions.

How can I do that?


texts: migrate magento 2 github to download magento 2 website

texts:
Previous freelance developer installed magento2 using GitHub.
and this website is in live now.
Now we come to know we need to install magento2 from the magento website.
how to migrate?

Present: 2.2.7 community github repo.
What we want: 2.3.1 from the magento2 website.


texts: Magento2: How to display product attributes table from TAB in custom block

texts:
To file:
app/design/frontend/MageBig/martfury/layout01/Magento_Catalog/templates/product/view-info.phtml

I add code:

<?= $this->getChildHtml('product.info.sellerattributes') ?>

Now I called  in .xml file:  app/design/frontend/MageBig/martfury/layout01/Magento_Catalog/layout/catalog_product_view.xml
layout:
<block class="Magento\Catalog\Block\Product\View" name="product.info.sellerattributes" template="Magento_Catalog::product/view/attributes.phtml" after="-" />

I called this file: app/design/frontend/MageBig/martfury/layout01/Magento_Catalog/templates/product/view/attributes.phtml
Now you see is correct called:
[![enter image description here][1]][1]

But no display product attributes here.
(If I enable  TAB "more information" then the attributes are displayed in this TAB. But when we do it that above way then they don't appear.
Code: attributes.pthml
<?php
/**
 * Copyright © magebig.com - All rights reserved.
 * See LICENSE.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * Product additional attributes template
 *
 * @var $block \Magento\Catalog\Block\Product\View\Attributes
 */
?>
<?php
    $_helper = $this->helper('Magento\Catalog\Helper\Output');
    $_product = $block->getProduct();
?>

Parametry

<?php if ($_additional = $block->getAdditionalData()): ?>

            <?php foreach ($_additional as $_data): ?>
                <?php //if ($_helper->productAttribute($_product, $_data['value'], $_data['code']) != __('N/A')) : ?>

                    <?= $block->escapeHtml(__($_data['label'])) ?>
                    <td class="data" data-th="<?= $block->escapeHtml(__($_data['label'])) ?>"><?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

                <?php //endif; ?>
            <?php endforeach; ?>

<?php endif;?>

I think this is any issue example with: IF
  <?php if ($_additional = $block->getAdditionalData()): ?>

But im not sure.


texts: Magento2: Custom email template from Admin

texts:
I am trying to send an email to the customer once it saves from the Admin.
I have called my observer adminhtml_customer_save_after. Observer called but email template not working.
my code is below.

$templateOptions = array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $this->_storeManager->getStore()->getId());

$templateVars = array(
    'store' => $this->_storeManager->getStore(),
    'customer_name' => 'John Doe',
    'message'   => 'Hello World!!.'
);

$from = array('email' => "ravi@examle.com", 'name' => 'Ravi');
$to = array('email' => "ravi@gmail.com", 'name' => 'Ravi');

$this->_inlineTranslation->suspend();
$transport = $this->_transportBuilder->setTemplateIdentifier('hello_template')
    ->setTemplateOptions($templateOptions)
    ->setTemplateVars($templateVars)
    ->setFrom($from)
    ->addTo($to)
    ->getTransport();

$transport->sendMessage();

$this->_inlineTranslation->resume();

Can anyone please look and tell me what I miss?


texts: Security Patch SUPEE-10975 - Possible issues?

texts:
Magento has released a new security patch for M1, and updates for M1 and M2.

What issues should I look out for when upgrading or applying this patch?

SUPEE-10975

  SUPEE-10975, Magento Commerce 1.14.4.0 and Open Source 1.9.4.0 contain multiple security enhancements that help close remote code execution (RCE), cross-site scripting (XSS), cross-site request forgery (CSRF) and other vulnerabilities.

Magento 2.3.0, 2.2.7 and 2.1.16

  Magento Commerce and Open Source 2.3.0, 2.2.7 and 2.1.16 contain multiple security enhancements that help close Remote Code Execution (RCE), Cross-Site Scripting (XSS) and other vulnerabilities.


texts: How to add custom attribute in magento2.1 customer panel wishlist section?

texts:
I want to add guaranty (custom product attribute) to customers wish-list page that is in customer dashboard in my Wishlist tab. Means that I wanted to show price, qty, name, guaranty, and add to basket into the products section in customers Wishlist tab.

I am using Magento 2.1.

How can I do that?


texts:
pls help me, install module in hosting, I upload module on hosting using filezilla but module cant not run, because i dont know  run cmd bin/magento setup:upgrade
on host server. My english isn't good, hope everyone understands.


texts: Magento 2.4.2 How to hide duplicate pictures when the product color is switched

texts:
When the product is configurable, the default picture will be displayed repeatedly when switching colors. How to hide duplicate pictures when the product color is switched.

--------------------------------------------------------------------------------------------------------------------------------
Hi everyboby,
I found a solution, modify your magento2.4.2 view.xml
app/design/frontend/yourtheme/yourtheme/etc/view.xml
<vars module="Magento_ConfigurableProduct"> <var name="gallery_switch_strategy">prepend</var> </vars>

change into
<vars module="Magento_ConfigurableProduct"> <var name="gallery_switch_strategy">replace</var> </vars>

It works fine.


texts: how to display the Salable Quantity section in Magento2

texts: I encountered this after reinstalling something in the admin of magento2. How can the Salable Quantity section be displayed, please help me to solve it. thank you.


texts: How to override phtml file of a custom module in magento 2

texts: What is the way to override a phtml of a custom module from another custom module.


texts: url_rewrite duplicates during migration. How it solve?

texts:
I started to do migration from magento 1. And i faced with some very weird issue. Namely during  Url Rewrite Step. This error looks:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'footwear/sneakers/slip-on.html-2' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID'

For several few days i liking for solution, i found issue on github. There i found recommendation

  With auto_resolve_urlrewrite_duplicates=1 migration completed without
  errors

I added this to my configuration file of migration. This looks like:

<config xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="../../config.xsd">
    <options>
 <auto_resolve_urlrewrite_duplicates>1</auto_resolve_urlrewrite_duplicates>
    </options>
</config>

But this error it stays.

What is my mistake?  How i can solve this ?

Migration tool version - 2.3.1
Magento destination version - 2.3.1
Magento source version - 1.14.0.1.


texts: Add A Custom CSS Class To Main Menu Link

texts:
Is their a way to add a custom class to one link within the main navigation?

For example I would like the category "SALE" to be coloured red and be bold.

Is this possible?

Many Thanks


texts: Magento 2 In which database table is the attribute Position stored?

texts:
I need to write my own MySQL query, where I need to use the attribute Position in the query. But I can not see which table attributes Position stored in. In my *eav_attribute* table, the attribute Position has attribute_id 56. I have tried to look at the table catalog_product_entity_int, but no attribute_id equals 56. I wonder which table else could contain the product Position value?
And the position attribute I'm talking about is as in this screenshot.


texts:
Hi is there any way to do pagination in widget block . For example  have a category with id 355 . I want to display that category product in a page . So I am using widget(following code)

{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" show_pager="0" products_count="160" template="Magento_CatalogWidget::product/widget/content/grid.phtml" conditions_encoded="^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`category_ids`,`operator`:`==`,`value`:`355`^]^]"}}

But there are up to 155 product in that category the product are displaying in the page  . But for 155 product the page load time is too high . So If there will be pagination for that then its easy to load the products .


texts: Create a SET product from simple product on the cart

texts:
Is there a way to add a simple product to a set of products in the cart?

For example, I want to make a beverage containing 4 bottles of wine. From the product page, I will add these bottles to a set. This Set will be a custom product.

Add another example:
I have a custom product A, I want to add products b1, b2, c1, c2 ... as an attribute or child product of product A. In Magento 1 is there a way to do this? Please advise me.

Thanks.


texts: magento 2 custom module grid form need smart tags

texts:
I need to add admin grid form list out all category like this

Any one guide me


texts: Writing php unit test in magento 2 issue

texts:
This is my class:
class BillingAddress extends Template {
    public function __construct(
        Context $context,
        array $data = [],
        SessionFactory $customerSessionFactory
    ) {
        $this->customerSessionFactory = $customerSessionFactory;
        parent::__construct($context, $data);
    }

    /**
     * @return Customer
     */
    public function getCustomerFromSession()
    {
        $customerSession = $this->customerSessionFactory->create();
        return $customerSession->getCustomer();
    }
}

and this is my test class:
class BillingAddressTest extends TestCase
{
    /**
     * @var BillingAddress
     */
    protected $model;

    private function getSimpleMock($originalClassName)
    {
        return $this->getMockBuilder($originalClassName)
            ->disableOriginalConstructor()
            ->getMock();
    }

    public function setUp()
    {
        $context = $this->getSimpleMock(Context::class);
        $sessionFactory = $this->getSimpleMock(SessionFactory::class);
        //$this->objectManager = new ObjectManager($this);

        $this->model = new BillingAddress(
            $context,
            [],
            $sessionFactory
        );
    }

    public function testGetCustomerFromSession()
    {
        $this->assertInstanceOf(Customer::class, $this->model->getCustomerFromSession());

    }

When I run the test, I got this error message:
Error: Call to a member function getCustomer() on null

So how I can write a test for my method getCustomerFromSession to see, to check after the instanceof ?


texts: Magento 2: Trying to change fonts. Changes not being affected on live site

texts:
I am trying to change the font on a Magento 2 site from MarkWebPro to Bitner. I have uploaded the Bitner files to the fonts folder and made the following changes:

mytheme/web/scss/source/_typography.less

.lib-font-face(
    @family-name: 'Bitner',
    @font-path: '@{baseDir}fonts/Bitner/Bitner-Regular',
    @font-weight: 400,
    @font-style: normal
)

.lib-font-face(
    @family-name: 'Bitner',
    @font-path: '@{baseDir}fonts/Bitner/Bitner-Italic',
    @font-weight: 400,
    @font-style: italic
)

.lib-font-face(
    @family-name: 'Bitner',
    @font-path: '@{baseDir}fonts/Bitner/Bitner-Bold',
    @font-weight: bold,
    @font-style: normal
)

.lib-font-face(
    @family-name: 'Bitner',
    @font-path: '@{baseDir}fonts/Bitner/Bitner-BoldItalic',
    @font-weight: bold,
    @font-style: italic
)

.lib-font-face(
    @family-name: 'Bitner',
    @font-path: '@{baseDir}fonts/Bitner/Bitner-Medium',
    @font-weight: 500,
    @font-style: normal
)

.lib-font-face(
    @family-name: 'Bitner',
    @font-path: '@{baseDir}fonts/Bitner/Bitner-MediumItalic',
    @font-weight: 500,
    @font-style: italic
)
etc..

mytheme/web/scss/source/_variables.less

//changed from "@font-family-name__base: 'MarkWebPro';"
@font-family-name__base: 'Bitner';
@font-family__base: @font-family-name__base, @font-family__sans-serif;
etc..

I removed the pub/static folder then deployed by running the command "./magento setup:static-content:deploy", it ran a while and everything was successful. I then went into the Magento dashboard and flushed the Magento cache and also cleared my browser's cache.

Unfortunately, the font change is not showing. I have gone to the website in incognito mode and in a different browser and every page is still using the original MarkWebPro font for all text. Any help would be deeply appreciated, thanks!


texts: Problem with Magento Multi-Website + Multi-Shop

texts:
We got a problem with our Magento Store and the Multi Domain System + Stores.

We created 3 domains like:

domain1.com
domain2.com
domain3.com

All domains have own stores and storeviews.

In the Configuration Tab of the Admin Panel we set the Base URLs for secure and unsecure to the URL of each domain.

Our domains pointing into the root dir of the magento installation.

We tried to edit the .htaccess file of the Magento like in this tutorail :

http://www.ecommercegorilla.com/how-to-set-up-multiple-store-fronts-with-magento/

Without any success.

We tried to edit the index.php but after we did this and uploaded the new index.php we got an empty browser tab which is pointing into our root dir of magento.

This is our code from the index.php:

<?php
/**

if (version_compare(phpversion(), '5.2.0', '<')===true) {
    echo  '

Whoops, it looks like you have an invalid PHP version.

Magento supports PHP 5.2.0 or newer. Find out how to install Magento using PHP-CGI as a work-around.

';
    exit;
}

/**
 * Error reporting
 */
error_reporting(E_ALL | E_STRICT);

/**
 * Compilation includes configuration file
 */
$compilerConfig = 'includes/config.php';
if (file_exists($compilerConfig)) {
    include $compilerConfig;
}

$mageFilename = 'app/Mage.php';

if (!file_exists($mageFilename)) {
    if (is_dir('downloader')) {
        header("Location: downloader");
    } else {
        echo $mageFilename." was not found";
    }
    exit;
}

require_once $mageFilename;

#Varien_Profiler::enable();

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}

#ini_set('display_errors', 1);

umask(0);

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

if(!isset($_SERVER['MAGE_RUN_CODE']) || !isset($_SERVER['MAGE_RUN_TYPE'])) {
    switch($_SERVER['HTTP_HOST'] {

  case 'domain3.com':
  case 'www.domain3.com':
$mageRunCode = 'domain3_de';
$mageRundType ='website';
break;

  case 'domain2.com':
  case 'www.domain2.com':
$mageRunCode = 'domain2_de';
$mageRundType ='website';
break;

case 'domain1.com':
case 'www.domain1.com':
default:
$mageRunCode = 'base';
$mageRundType ='website';
break;

}

}

Mage::run($mageRunCode, $mageRunType);

is there a problem with our index.php ?!?
We are glad for any help.

Kind regards


texts: Magento 2.3 upgrade breaks HTTP POST requests to custom module endpoint

texts:
I have a custom module with a defined route as:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="custom_module" frontName="custom-module">
            <module name="Custom_Module" />
        </route>
    </router>
</config>

With previous versions of Magento both GET and POST requests would work fine to http://mywebsite.com/custom-module/controllername

After upgrading to Magento 2.3.0, GET requests still work as before, however POST requests now do not call the execute() method of the controller. Instead, they respond with a 200 OK and a response body that is the homepage html of the website.

Does this have to do with some Csrf security feature and form keys that was added in v2.3?


texts: The requested URL was not found on this server

texts:
I installed Magento 1.9.2.0 with the sample data.
Now when I open any page of the site is returned to me an error like this:

  not Found
  The requested URL / magento / customer / account / was not found on this server.

For all links on the homepage of the site.

How can I fix the problem?


texts: How to another root categories product to default categories product in magento?

texts: Here As you can see in screen shot I have to auction categories Which is in default category and product add in another root category auction.how to show product of another root category to my own default root categories store on click auction in default navigation menu.


texts:
I want to change luma logo but cannot upload the logo ?

I tried to upload through admin panel. But, Not working.


texts:
I have this controller:

...
public function insertAction() {
    $something = 'testcase';
    $this->loadLayout();
    $this->_title($this->__("the title"));
    $this->renderLayout();
}
...

I would like to access $something in my .phtml document, how do I do this? (or to put it in another way: how can I access $something in my .phtml file)


texts:
How to display all Product Information in particular Attribute set  like Product name , sku , attributes etc..

It shows Attribute Name & Id but i want all details like Product name , sku , attributes etc..

<?php
      require_once('app/Mage.php');
      umask(0);
      Mage::app();//->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
      $entityType = Mage::getModel('catalog/product')->getResource()->getTypeId();
      $collection = Mage::getResourceModel('eav/entity_attribute_set_collection')->setEntityTypeFilter($entityType);
      $allSet = array();
      foreach($collection as $coll){
         $attributeSet['name'] = $coll->getAttributeSetName();
         $attributeSet['id'] = $coll->getAttributeSetId();
         $allSet[] = $attributeSet;
      }
      echo "<pre>";
      print_r($allSet);
      echo "</pre>";
?>


texts: How to Show Out Of Stock Products at the end of product list in any sorting condition in magento 1.9

texts:
I am using Magento 1.9 , to display out of stock products at the end of product list i have replaced the code

<?php
    $this->_productCollection = $layer->getProductCollection();
?>

With

<?php
    $this->_productCollection = $layer->getProductCollection()->joinField('inventory_in_stock', 'cataloginventory_stock_item', 'is_in_stock', 'product_id=entity_id','is_in_stock>=0', 'left')->setOrder('inventory_in_stock','desc');
?>

in  app/code/core/Mage/catelog/Block/product/list.php
 now products sorting for position and name the out of stock products are last. But when sorting for price, the out of stock products are in a normal order not last.

How can i make that the out of stock products to be last even in the sort after price ?Please help me find out this solution.


texts:
I use Magento 1.7. The sorting by position dont work in both directions. The url-parameter switch from asc to desc but nothing change in the sorting.

Where could be the problem an in which are the files where Magento sort by position?

Thanks


texts: Magento 2 Product Detailed Page(PDP) Varnish PageCache Test Failed

texts:
I've created some Magento2 Extension, I've uploaded those code into the Magento2 Market place.
In that market place, there has some kind of code validation procedure, and I've written my code as per the Market place policy.

After the marketplace team tested my code, they have raised some test reports. I've attached the report screen for your further reference.

As per the test report, I've Installed the varnish cache and tested the module to adaptable for the varnish So that I've followed the below link to accomplish that into my local.

Magento 2 : Expected HIT on the second page load after product price update

X-Magento-Cache-Debug: MISS

Even If I test the varnish cache using this command "curl -I http://127.0.0.1:8080/workspace/mage233data/olivia-1-4-zip-light-jacket.html" the issue is not fixed

My custom form code added to the product detailed page

<body>
        <referenceBlock name="product.info.details">
            <block class="Magesen\ProductQA\Block\Product\View\AskQuestion" ifconfig="productqa_tab/productqa_setting/productqa_active" name="product.question" template="product/view/ask_question.phtml" group="detailed_info" cacheable="false">
                <container name="form.additional.info" label="Form Additional Info">
                    <block class="Magento\Captcha\Block\Captcha" name="captcha" after="-" cacheable="false">
                        <action method="setFormId">
                            <argument name="formId" xsi:type="string">product_qa</argument>
                        </action>
                        <action method="setImgWidth">
                            <argument name="width" xsi:type="string">230</argument>
                        </action>
                        <action method="setImgHeight">
                            <argument name="width" xsi:type="string">50</argument>
                        </action>
                    </block>
                </container>

                <arguments>
                    <argument translate="true" name="title" xsi:type="string">Question And Answer</argument>
                </arguments>
                <block class="Magesen\ProductQA\Block\Product\View\AnswersList" name="answerslist"
           template="product/view/answerslist.phtml"/>
          </block>
        </referenceBlock>

          <referenceBlock name="head.components">
            <block class="Magento\Framework\View\Element\Js\Components" name="captcha_page_head_components" template="Magento_Captcha::js/components.phtml"/>
          </referenceBlock>
    </body>

I've removed the "cacheable="false" from the below XML also, but still, I am facing the problem.

I am looking forward to some help from your end to fix the problem.

My Extension short view:

In my custom module customer can able ask a question from the product detailed page. Then the admin reviews the question and reply to that question & can make it visible.


texts: Magento 2.3 - Changed attribute media_gallery to scope "Store View", but want to revert it to "Global" error

texts:
We changed the scope of the attribute media_gallery to scope "Store View", but we want to revert it back to "Global", like the default setting.
But when we revert it, we get the following error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'attribute_id' in 'where clause', query was: DELETE FROM `catalog_product_entity` WHERE (attribute_id = '90') AND (store_id IN(1))

How can we solve this?


texts:
If this question has been answered elsewhere I will delete this one. From a good look around, there doesn't seem to be a solid answer.

When I am developing an extension for Magento 2(.1), do I have to run php magento setup:di:compile every time a change is made to the di.xml?

Also, when is the appropriate time to run this command?


texts: Magento 2 API vs. Web Interface vs. Web API

texts:
Just as a basic question in Magento 2.
In Magento U tutorials, it says:

  In Magento 2 Modules only communicate through API

  One module in not aware of the internals of another, so the
  implementation can change.

  Modules can be disabled or deployed on separate servers.

I don't get what it means by "Magento 2 modules only communicate through API" ? If I want to load products, how we are using APIs without knowing?

I need a little bit explanation about interface vs. API interface vs. Web API. Is there any difference ? How?


texts: Magento: Adding block from observer programmatically

texts:
I hope someone can help me.

I need to create an observer with creating a block on the cart table, which allows the customer to choose from radio button the options I will provide in each item separately in the product table, within the cart page and save it into the database to let the merchant see the options that his clients chose.

To achieve this I use quote item options and events.
Here's what I have done till now:

My config.xml

<sales_quote_collect_totals_before>
    <observers>
        <shippingoptions>
            <type>singleton</type>
            <class>shippingoptions/observer</class>
            <method>test</method>
        </shippingoptions>
    </observers>
</sales_quote_collect_totals_before>

My observer method

public function test($observer)
{
    $quote = $observer->getQuote();
    $quote_items = $quote->getItemsCollection();
    foreach ($quote_items as $item)
    {
        $additionalOptions = array(
            array(
                'title' => 'custom option title',
                'type' => 'radio', // could be drop_down ,checkbox , multiple
                'is_require' => 1,
                'sort_order' => 0,
                'values' => $this->getOptions()
                )
        );
        $item->addOption(
            array(
                'code'  => 'additional_options',
                'value' => serialize($additionalOptions),
                )
            );
     }
}

Let's say that the getOptions return an array. So I can't, actually render the radio button in the cart table. It just adds the option like this output under each item:

custom option title

    radio

    1

    0

    Array

So I figure that I need to use a block to do the rendering thing, I try to do that but it didn't go well from my side. So could you help me to do that with from the observer side without overwriting the cart.phtml or any checkout file (And of course for a good reason)?

Here is a screenshot just to clarify things up:


texts: magento 2: remove trailing 0 from checkout item price

texts:
I am trying to remove trailing 0s for all price outputs on the checkout page. ex. $125.00 outputs as $125

Inside one of the templates for the checkout page vendor/magento/module-weee/view/frontend/templates/item/price/row.phtml there is a function $block->formatPrice() which is located in Magento\Tax\Block\Item\Price\Renderer

public function formatPrice($price)
{
    $item = $this->getItem();
    if ($item instanceof QuoteItem) {
        return $this->priceCurrency->format(
            $price,
            true,
            PriceCurrencyInterface::DEFAULT_PRECISION,
            $item->getStore()
        );
    } elseif ($item instanceof OrderItem) {
        return $item->getOrder()->formatPrice($price);
    } else {
        return $item->getOrderItem()->getOrder()->formatPrice($price);
    }
}

Here the constant PriceCurrencyInterface::DEFAULT_PRECISION is set to 2 by default which causes the price to output with two trailing 0s.

I want to remove all trailing 0s after the decimal point from the price but am not sure what is the best strategy to do so.  I attempted to create a plugin via di to strip the 0s using afterFormatPrice()

public function afterFormatPrice(\Magento\Weee\Block\Item\Price\Renderer $block, $price)
{
    return $this->stripTrailingZero($price);
}

however the return value includes html markup, making it messy to format the number.  I could overwrite the class, but want to avoid doing so.

Does anyone know a better approach?


texts:
How can I make the order of magento categories permanent so it doesn't change every time I import with magmi?

I was thinking of reassigning each category with the position value but I can't seem to find it.

Another way might be to write a script that moves the first category to the desired category to put it first and so on until it's done, but how do I move categories in a script?

Is there a way to fix this with magmi?


texts: I need to share magento product link on Instagram like facebook and twitter. Can anyone provide some idea How to share the product link on Instagram?


texts:
Magento2.3 - How to display image inside custom option dropdown in product details page, Can anyone suggest me how can i achieve this?

Any help would be appreciate.
Thanks In Advance..!


texts: Magento2: JStree Style CSS is not loaded properly

texts:
JStree Style CSS is not loaded properly

404 error:

  pub/static/version1580100386/adminhtml/Magento/backend/en_US/jquery/jstree/themes/default/style.css

Please help.


texts: Magento 1.9 - Hide Module/Script from mobile version

texts:
There is a method for hide modules or other scripts from Magento backend when the site goes mobile version?

For example, I have a slideshow on the site that I would hide when it goes on the mobile version. I wish that the code of the slideshow is not found at the site load when is in the mobile version. How can I do?

Thanks for the help.


texts: How to add the sku to the url key? Magento 2

texts:
The products we sell are unique, but share the same name. So when we add two different products with the same name, it throws back the error that that URL already exists.

What I wanted to do was add the SKU to the URL key. That way it would always have a unique value. But I don't want to have to manually add it each time.

Is there a way to add this in the back end? Similar to the Configuration/Catalog/Catalog section allows for adding the {{sku}} to the meta tags etc?


texts: Duplicate Street Address: Line 1 Label : Magento 2.3.2

texts:
I am using Magento  2.3.2

  On checkout page there is double label about "Street Address: Line 1"

Is it a bug on my Magento ?

I can not translate as well

How can I remove it?

Any idea?

  Screen

  https://ibb.co/N157KcX


texts: How to pass value of the variable $sku from a form to template via ajax?

texts:
I have the form that generate value of the variable $sku. Depending on how the form is filled the variable can take several values: $sku = 'product1', $sku = 'product2', $sku = 'product3' etc.
How can I pass this value to my phtml template which contains the following code?:

<?php
$sku = ?????
$model = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToSelect(array('price','name','description', 'thumbnail'))
    ->addAttributeToFilter('sku', '$sku')
    ->getFirstItem();

$price = $model->getPrice();
$name = $model->getName();
$image = $model->getThumbnail();
$description = $model->getDescription();
?>

My javascript:

 $j("#wizard-start").show();
    if ($j("#choice1").click(function () {
            $j("#wizard-start").hide();
            $j("#step-2-basic").fadeIn(1e3);
            $j("#dyn-wizard").submit(function(event) {
                var sku = "product1";
            });
            return false
        }));
    if ($j("#choice2").click(function () {
            $j("#wizard-start").hide();
            $j("#step-2-standart").fadeIn(1e3);
            $j("#dyn-wizard").submit(function(event) {
                var sku = "product2";
            });
            return false
        }));
    if ($j("#choice3").click(function () {
            $j("#wizard-start").hide();
            $j("#step-2-advanced").fadeIn(1e3);
            $j("#dyn-wizard").submit(function(event) {
                var sku = "product3";
            });
            return false
        }));


texts: CMS Image preview not working an internal demo site

texts:
I have a local demo website which is protected by a .htaccess to showcase to the customer. Anyways, in this installation the image preview in the CMS WYSIWYG editor is not working.

In the system.log there is an entry:

ERR (3): Warning: getimagesize(http://example.com/skin/adminhtml/default/
  test/images/wysiwyg/skin_image.png):
  failed to open stream:
  HTTP request failed! HTTP/1.1 401 Authorization Required
  in /var/www/public/lib/Varien/Image/Adapter/Gd2.php on line 71


texts: Customer custome attribute value get by customer id in magento 1.9

texts:
Hi I have custom customer attribute for customer in my magento 1.9.
I want that custom attribute value by customer id.


texts: Magento 2: Properly access an external js variable in the checkout

texts:
Pure HTML Example

I'm trying to do something as simple as the following html code:

<button onclick="MyExtVar.run();">Run</button>
<script type="text/javascript">
    window.MyExtApiKey = "test";
</script>
<script type="text/javascript" src="https://my.external.script.url.js"></script>

Just to explain, the MyExtVar is generated by the external script url which uses the window.MyExtApiKey variable. When you click the button, it runs. Simple as that.

Magento 2 simple test

Just for testing purpose, I know this is not the right way of dealing with JS, I just want to test so I've added a block via a module in view/frontend/layout/checkout_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="before.body.end">
            <block class="Magento\Framework\View\Element\Template" name="myextjs.init" template="DigitalPianism_MyExtJs::init.phtml" />
        </referenceContainer>
    </body>
</page>

And then, in my view/frontend/templates/init.phtml I use the exact same code as the HTML example :

<button onclick="MyExtVar.run();">Run</button>
<script type="text/javascript">
    window.MyExtApiKey = "test";
</script>
<script type="text/javascript" src="https://my.external.script.url.js"></script>

BUT, when I click the button I get a MyExtVar is not defined error.

Note that the external JS is properly loaded, I can see it from the Network tab in the console.

So two questions:

First, why is that behaving differently that the pure HTML example?
Second, how can I fix that ?


texts: Does Magento 2 actually support MD5? It doesn't seem to

texts:
I have migrated customers from M1 to M2, everything came across fine however, the passwords have the following appended to the end:

:0

This is the code signifying that the hash is in MD5 format which is expected as this is standard for M1:

/**
 * Key of md5 algorithm
 */
const HASH_VERSION_MD5 = 0;

/**
 * Key of sha256 algorithm
 */
const HASH_VERSION_SHA256 = 1;

However, no passwords work. Oddly when I remove the code on the end of the password it does work.

I could just remove it from all passwords but it feels hacky and I'm not sure why it wouldn't just work based on the code.

Any ideas?


texts:
I am using Payments Pro (Includes Express Checkout) extension in my magento store. Currently am testing the store in sandbox mode. I have configured merchant account details (merchant email, username, password and signature). But when I try to place an order in my store with Credit card purchase, the system says "Unable to communicate with the PayPal". I googled and found that SSL should be disabled, if we run the site in local server or not SSL in our live server. I disabled and tested the site, again I am seeing the same error.
How can I fix this?
Any assistance will be helpful.


texts: Magento 2: What is difference between Cache Clean & Cache Refresh?

texts: What is difference between cache refresh (when we select something and click refresh) and Cache clean?


texts: I am trying to set the AheadWorks blog module as homepage of Magento 2 for a site. So user gets directly to domain.com/blog instead of domain.com. Is it possible in the admin or Nginx somehow?


texts: Magento 2 variable @mobile-cart-padding is undefined (Porto Theme)

texts:
I Cloned Magento 2 project from GitHub without any error. After I configured env files with DB details. when I deploy the project getting variable @mobile-cart-padding is an undefined error. I am using the Porto theme. In the Porto theme, I got an error The contents from the /home/server/pub/static/frontend/Smartwave/porto_child/en_US/css/styles-l.css file can't be read.

  Warning!file_get_contents(/home/server/pub/static/frontend/Smartwave/porto_child/en_US/css/sty
  les-l.css): failed to open stream: No such file or directory


texts: magento 2: \Magento\Theme\Block\Html\Topmenu $this->_menu

texts:
I am currently working on a custom block class that extends \Magento\Theme\Block\Html\Topmenu

I have the following in my template file that uses my custom block class:

<?php $menuTree1 = $block->getMenu()->getChildren() ?>
<?php $counter1 = 1; foreach ($menuTree1 as $item1): ?>
//run foreach statement...

In Magento 2.0.7 this worked fine, however after upgrading to 2.1.3 the menu collection seems to return 0 child menu items.  A Zend_Debug on $block->getMenu()->getChildren() dump shows this

object(Magento\Framework\Data\Tree\Node\Collection)#2778 (2) {
  ["_nodes":"Magento\Framework\Data\Tree\Node\Collection":private] => array(0) {
  }
  ["_container":"Magento\Framework\Data\Tree\Node\Collection":private] => object(Magento\Framework\Data\Tree\Node)#2934 (5) {
    ["_parent":protected] => NULL
    ["_tree":protected] => object(Magento\Framework\Data\Tree)#2932 (1) {
      ["_nodes":protected] => object(Magento\Framework\Data\Tree\Node\Collection)#2933 (2) {
        ["_nodes":"Magento\Framework\Data\Tree\Node\Collection":private] => array(0) {
        }
        ["_container":"Magento\Framework\Data\Tree\Node\Collection":private] => *RECURSION*
      }
    }
    ["_childNodes":protected] => *RECURSION*
    ["_idField":protected] => string(4) "root"
    ["_data":protected] => array(2) {
      ["outermost_class"] => string(9) "level-top"
      ["children_wrap_class"] => string(7) "submenu"
    }
  }
}

The strange part is part is if I overwrite getHtml() in my class as:

public function getHtml($outermostClass = '', $childrenWrapClass = '', $limit = 0)
{
    return $this->getMenu()->getChildren();
}

My foreach then works properly:

<?php $menuTree1 = $block->getHtml() ?>
<?php $counter1 = 1; foreach ($menuTree1 as $item1): ?>
//works properly...

This however does not work if I create a custom function the same way I did getHtml()

Block:

public function getMyMenuItems()
{
    return $this->getMenu()->getChildren();
}

Template:

<?php $menuTree1 = $block->getMyMenuItems() ?>
<?php $counter1 = 1; foreach ($menuTree1 as $item1): ?>
//does not work properly

Ideally I would like retrieve the _menu object after all the child items have been set.  Does anybody know how to do this or why the collection is only set when calling getHtml()?


texts: Magento2 - How can possible Reorder Product wise?

texts:
I need All order Product Items in User My account section.

  How I can get All order items with selected options.


texts: Magento 2.3.2 sort collection by stock availability

texts:
I want every collection with 0 stock to get moved to the bottom (last position)

I've tried using a plugin.
My di.xml

<type name="Magento\Catalog\Model\Layer">
        <plugin name="Vendor_Module_Plugin"
                type="Vendor\Module\Plugin\CollectionPlugin"
                sortOrder="10"
                disabled="false"/>
</type>

My file name CollectionPlugin.php

class CollectionPlugin
{
   public function aroundgetProductCollection(
        Layer $subject,
        callable $proceed
    ) {
        $collection = $proceed();
        $collection->setOrder('is_salable DESC');
        return $collection;
    }
}

For some reason, It removes every product from the collection.


texts: Magento 2.2.5 Unable to Upgrade Database

texts:
We just upgraded out Magento to version 2.2.5, and when going to the website we are confronted with this error:

https://pastebin.com/LkjaGxC6

Upon running the command, in the CLI we are then greeted with this error and are unsure where to move from here, thanks.

https://i.imgur.com/IBFIirh.png

UPDATE: Failing MySQL Query: https://pastebin.com/ANixuM9N


texts: Compare Magento Go and X-Cart by specific requirements. What is more suitable?

texts:
company where I'm work decided to change current online store and use existing eCommerce solutions. We are looking on 3 options: Magento Go, X-Cart or build it by ourselves. The problem is that some functionality and further extensions are quite unique and we not sure that existing eCommerce can handle it. Magento Enterprise cost $15,550/year and it's what we can not offer, so option only is Go version.

As no one in our company ever work with Magento or X-Cart, we can not make right decision based on our knowledge. I'm asking your expert opinion about what we can or can't do in Magento Go or X-Cart. Please answer if you really have good experience with one or both of that systems.

Here are some requirements:

Users must be pre-authorized before enter the site (like CMS, asking login and password)
Users should have their profile page with info about purchased items
Integration with external DB where we store our products and prices (grab data from external source)
Stock availability and tracking (update shipping info)
Support multy user categories with different prices for each group
Users should be linked with country and see prices for their country (I think that it's part of DB integration)
Products may be combined in a group when purchase selected amount and apply discount
Make sales for specific user category
SKU must be generated by specific rules (for example: Shirt-S-Yellow, Shirt-M-Green)
Keep order opened for a day even after you logged out and then send order to proceed
Customized pages
Support Credit Cards (looks like it's supported by both systems)
SSL (the same, looks like supported)
Easy to manage from back-end

If something is impossible to do, then probably we have to build that system by ourselves.
Maybe some of requirements are sound stupid, but as I said, we don't have any experience with Magento and X-Cart. Any help would be highly appreciated.


texts:
Can someone suggest me a script or the correct way to update products prices trought a csv file? I use Magento 1.9.1 and i have simples and configurables products

I have found the prices is stored in catalog_product_entity_decimal

Thank you very much


texts:
I have try to doing override minicart.php block but unfortunately not getting success of override.

you can see below code what i have implemented :

    <blocks>
        <test>
            <class>ABC_Test_Block</class>
        </test>
        <minicart_head>
            <rewrite>
                <minicart_heads>ABC_Test_Block_Cart_Minicart</minicart_heads>
            </rewrite>
        </minicart_head>
    </blocks>

can you please guide for resolve the issue.


texts: Magento 1.9 Colour Swatch handling code -

texts:
Please can someone help me with some PHP code:

Our magento server hosts have identified this section of code as being very resource hungry, is there an alternative route we can take? a module that handles it better? or is it a problem with magento 1.9?

cheers
Russell


texts: Magento-2 Custom payment method is not display in fornt side when JS is Merged

texts:
I have created a new custom payment method, it's working fine without Merge Js file.

When, I merge JS than it's not working in front-side.

I tried static-content-deploy & cache clean & clean browser cache.

But it does not work.

Please help me.

Thanks


texts: MySQL Query filtered by attribute_set_id

texts:
I'm missing one piece to my puzzle here.. I want to get entity_id, product name, and filter it by the products being configurable, websiteid being 2 and by excluding a specific attribute set name.

Problem: what table to join to, in order to exclude attribute_set_id=22(in my case)

SELECT e.entity_id AS product_id, var.value AS product_name,var.store_id,e.type_id,c.website_id
FROM catalog_product_entity e, eav_attribute eav, catalog_product_entity_varchar var,catalog_product_website c
WHERE
   e.entity_type_id = eav.entity_type_id
   AND eav.attribute_code = 'name'
   AND eav.attribute_id = var.attribute_id
   AND var.entity_id = e.entity_id
   AND var.entity_id=c.product_id
   AND e.type_id='configurable'
   AND c.website_id=2


texts: Magento2 Admin Side Custom configuration page with a menu

texts: I created an admin menu in magento2 which is linked to a new admin page. I would like to have my own configuration fields (some text fields) in this new page with a save button.


texts: Magento 2 (Rest api): Get all products based on update_at criteria

texts:
How to get the products from magento 2 using REST API based on the updated_at criteria, so I can able to get products created/updated on particular date. how to achieve this task. please help me.

Thanks in advance...


texts: How do I get price value with currency, also size and color attribute value instead of id?

texts:
public function productDataToJson(Varien_Event_Observer $observer)
{
  $category = Mage::getModel('catalog/category');
  $tree = $category->getTreeModel();
  $tree->load();
  $ids = $tree->getCollection()->getAllIds();
  $jsonFilePath = Mage::getBaseDir().'/jsondata';
  foreach ($ids as $id) {
    $array = array();
    $products = $category->load($id)
        ->getProductCollection()
         ->addAttributeToSelect('*')
         ->addStoreFilter(Mage::app()->getStore()->getId());
    foreach ($products as $_product) {
        $array[] = array_merge($_product->getData(), array('category_ids' => $_product->getCategoryIds()));
    }
    $jsonData = Mage::helper('core')->jsonEncode($array);
    file_put_contents($jsonFilePath.'/c_' . $id . '_node.json', $jsonData);
  }
}

I am getting all this data in json file, but need price with currency, and size, color with its value lable eg. black, red. Now I am getting only ids of this 2 atttributes


texts:
I have Magento 2 default Luma theme installed.

I noticed the home page doesn't look well on some mobile devices, especially on new iPhones. The user has to scroll right and left to see the rest of the page.

Has anyone solved this issue?
Any tips really appreciated.


texts: continuous duplicate of same error report on my site as pasted below

texts:
my site keep giving me same report as paste below, please how do solved this issue?

a:5:{i:0;s:52:"Front controller reached 100 router match iterations";i:1;s:409:"#0 /home/thewa2m2/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(179): Mage::throwException('Front controlle...')


texts: I have Chinese chars in the contents of my session files. Have I been hacked?

texts:
I've noticed that my /var/session/ folder has been filling up really quickly lately so I decided to open a few of the files up to see where they were being generated from. Most of them were bots such as SEMRush or Bing generating files such as the below:

sess_v82855nfidfk780quho1fpkto7:

  _secure_cookie_check|s:32:"9f01d3ce7854010140a04e28e8ea1ff2";core|a:4:{s:23:"_session_validator_data";a:5:{s:11:"remote_addr";s:12:"207.46.13.75";s:8:"http_via";s:0:"";s:20:"http_x_forwarded_for";s:0:"";s:15:"http_user_agent";s:71:"Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)";s:24:"session_expire_timestamp";i:1532950280;}s:8:"messages";O:34:"Mage_Core_Model_Message_Collection":2:{s:12:" * _messages";a:0:{}s:20:" * _lastAddedMessage";N;}s:12:"visitor_data";a:15:{s:0:"";N;s:11:"server_addr";s:4:"mËsš";s:11:"remote_addr";s:4:"Ï.
  K";s:11:"http_secure";b:1;s:9:"http_host";s:23:"www.removedforsecuritypurposes.com";s:15:"http_user_agent";s:71:"Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)";s:20:"http_accept_language";s:0:"";s:19:"http_accept_charset";s:0:"";s:11:"request_uri";s:29:"/catalog/category/view/id/421";s:10:"session_id";s:26:"temfgjqqf4o0miijgedvcf7nq6";s:12:"http_referer";s:0:"";s:14:"first_visit_at";s:19:"2018-07-30

But I've noticed there are loads of Chinese looking files being generated such as below.

sess_vo5835i0cr06lm7loi27ins2a5:

  獟捥牵彥潣歯敩损敨正獼㌺㨲㌢挲慢戳攸㕥㙦づ㡢㠷敦㘰ㄳ㙢攸挶∴挻牯籥㩡㨳獻㈺㨳弢敳獳潩彮慶楬慤潴彲慤慴㬢㩡㨵獻ㄺ㨱爢浥瑯彥摡牤㬢㩳㌱∺㘶㈮㤴㜮⸶ㄱ∲猻㠺∺瑨灴癟慩㬢㩳㨰∢猻㈺㨰栢瑴彰彸潦睲牡敤彤潦≲猻〺∺㬢㩳㔱∺瑨灴畟敳彲条湥≴猻㜺㨲䴢穯汩慬㔯〮⠠潣灭瑡扩敬※潇杯敬潢⽴⸲㬱⬠瑨灴⼺眯睷朮潯汧⹥潣⽭潢⹴瑨汭∩猻㈺㨴猢獥楳湯敟灸物彥楴敭瑳浡≰椻ㄺ㌵㤲〵㠱㬷獽㠺∺敭獳条獥㬢㩏㐳∺慍敧䍟牯彥潍敤彬敍獳条彥潃汬捥楴湯㨢㨲獻ㄺ㨲"*浟獥慳敧≳愻〺笺獽㈺㨰"*江獡䅴摤摥敍獳条≥主紻㩳㨸氢獡彴牵≬猻㔺㨷栢瑴獰⼺眯睷攮敤⵮潭楢楬祴挮⹯歵猯潴敲潬慣潴⽲湩敤⽸湩敤⽸㬢捽獵潴敭彲慢敳慼ㄺ笺㩳㌲∺獟獥楳湯癟污摩瑡牯摟瑡≡愻㔺笺㩳ㄱ∺敲潭整慟摤≲猻ㄺ㨳㘢⸶㐲⸹㘷ㄮ㈱㬢㩳㨸栢瑴彰楶≡猻〺∺㬢㩳〲∺瑨灴硟晟牯慷摲摥晟牯㬢㩳㨰∢猻ㄺ㨵栢瑴彰獵牥慟敧瑮㬢㩳㈷∺潍楺汬⽡⸵‰挨浯慰楴汢㭥䜠潯汧扥瑯㈯ㄮ※栫瑴㩰⼯睷⹷潧杯敬挮浯戯瑯栮浴⥬㬢㩳㐲∺敳獳潩彮硥楰敲瑟浩獥慴灭㬢㩩㔱㈳㔹㄰㜸紻捽敨正畯籴㩡㨱獻㈺㨳弢敳獳潩彮慶楬慤潴彲慤慴㬢㩡㨵獻ㄺ㨱爢浥瑯彥摡牤㬢㩳㌱∺㘶㈮㤴㜮⸶ㄱ∲猻㠺∺瑨灴癟慩㬢㩳㨰∢猻㈺㨰栢瑴彰彸潦睲牡敤彤潦≲猻〺∺㬢㩳㔱∺瑨灴畟敳彲条湥≴猻㜺㨲䴢穯汩慬㔯〮⠠潣灭瑡扩敬※潇杯敬潢⽴⸲㬱⬠瑨灴⼺眯睷朮潯汧⹥潣⽭潢⹴瑨汭∩猻㈺㨴猢獥楳湯敟灸物彥楴敭瑳浡≰椻ㄺ㌵㤲〵㠱㬷絽

Is it possible the session folder is somehow being hacked, or could something else be generating these files? Would Chinese/Japanese browsers generate their own language into these files? We have a very secure server and always make sure our website is using the latest patches so it's all a little strange!


texts: Magento writing to tmp/magento directory

texts:
The site started throwing exceptions on both the front & backend. After disabling redis, memcached & the full page cache and reverting to using files for sessions, the site seems to function correctly. However, when running the following code:

$var_dir = Mage::getModel('core/config')->getVarDir();
echo $var_dir;

Magento prints out

/tmp/magento/var

I believe this is what was causing the original issue. I read the following article -
Stop Magento Writing to /tmp - which mentions:

  Magento itself chooses to try /tmp/magento/ if the var/ folder is not writable.

I checked the permissions on the folder & they are set correctly to 755 (I even tried changing this to 2755) & the owner is also correctly set. Even though that is the case, Magento still doesn't see said directory as writeable. (For interest sake, nor does it see the app/etc/modules directory as writeable.

I've spoken with the host & we attempted to stop PHP & restart apache after removing the /tmp/magento directory, but Magento just created it again.

Has anybody seen this behaviour before? How can I correct it so that Magento starts writing to the correct webroot var/ directory?


texts:
The fotarama is broken and the images are coming down by down, I don't which has affected.
The fotorama comes like as shown below.


texts:
this is a rather custom request.

Is it possible to use the layered navigation (attribute filter for products) for backend reports and if yes: how?

I need this for a custom report site. I managed to add a site with grid layout and wire it to a custom database table, link it with the products and display the information needed. Also filtering for the known attributes works.

Problem is: I do not know which and how many attributes will appear in the future. I could add a column to the grid each time a new attribute is defined, but that way the grid will get very long over time an thus will be rendered unsusable. Another problem are multiselect attributes.

Same goes for categories, since a product can appear in several categories the row for that product would have to appear multiple times in the grid.

I already tried to add the block for the layered navigation to my report site without success uo to now. Also I have searched for that topic for quite a while now without result.

Where should I start looking? Anyone had a similar requirement? Maybe anyone even has a solution?


texts: Translation of product stock alert email

texts:
I have added translation in my locale folders and even loaded templates and assigned them in system config. Nothing seems to translate this email. When i look in the table product_alert_stock i also see only the website is saved, but my locales are different on storeview level.

So when i go to my french storeview and click the link to subscribe, put the product back in stock and run the catalog_product_alert cron, i keep getting the english mail.

Any ideas on what might went wrong or if it is a bug?