texts: Attribute value is not displaying when called inside static block

texts:
I am trying to show an attribute(Text area) in product page. My phtml file to call the attribute is description.phtml :

    <?php $_description = $this->getProduct()->getDescription(); ?>
<?php if ($_description): ?>

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

        <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description') ?>

<?php endif; ?>

And I create a static block with this code:

 {{block type="core/template" template="page/description.phtml"}

Then I called my static block in view.phtml like this:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('product_details_tab')->toHtml() ?>

where the identifier of the static block is product_details_tab.

Instead of displaying the value given in the attribute field, It is displaying error  like:

Fatal error: Call to a member function getDescription() on null.

Help me to resolve this. Where have I went wrong?


texts: How to enable my bugfix extension to run in a specific Magento 2 version?

texts:
I'm creating a module in order to fix a bug in Magento 2.3.0 that will be part of the next release. So, I would like to restrict via Composer the dependencies of that module.

How can I restrict my module to run just with the Magento 2.3.0?


texts: Multistore multi-store on separate hosting servers

texts:
I have an existing store with multiple storefronts for US,UK,Chinese versions.

Each storefront has a /en/, /uk/, /cn/.

Now we have a problem with the website showing in china, due to the firewall, it is very slow and often not loading at all. So we i am looking for a way to serve the Chinese market without compromising my US and europe markets.
the first option that comes to mind is using CDN, though i wonder if there is a proper service that serves both china and the rest of the world for a feasible fee.
The other option is to locally host the website in china, but then we compromise other markets.
The question is, if there is a way to split the hosting for each storefront, or have some kind on sync between 2 servers. So the chinese storefront will be hosted on a server in china, while the rest of the world will be served from a server in the US or some other place.
Our stock is very dynamic so updating separate installations manually is a big hassle.

Please advise


texts:
On product pages, you know how you have

  Set Product as New from Date

  Set Product as New to Date

Is there something like this for Stock? So I can go into products manually, put them out of stock then set the 'back in stock date' so the product becomes live again on the website on said date?

Thanks


texts: Ui layout disturbs in admin dashboard (magento2 backend)

texts:
Today when I woke up I see my admin layout seems to be disturbed in the dashboard. Did I by mistake turn off some layout option ? Why it does not seem like the previous layout after the fresh installation ? Is there any solution to fix it?

I want it to look like in this layout :


texts: Magento 1.9 multiple websites on different domains

texts:
I read and viewed all things related to multiple websites for Magento, but I still cannot setup properly to handle different domains with different Magento websites.
Could somebody let me know step by step, how to setup the virtual hosts properly and htaccess or/and index.php?
I know that setting multiple websites in subdomains/catalogs is easy, but I like it to work with different domains.
I have set up everything in Magento admin:
1st store:

domain: abc.com
website code: domain1

2nd store:

domain: xyz.com
website code: domain2

I have Apache configured in /etc/httpd/conf/httpd.conf with the following document roots:

/home/admin/domains/abc.com/public_html
/home/admin/domains/xyz.com/public_html

What should I put in the second domain directory (.htaccess, index.php? should I copy it from first one?)


texts: Magento 2: Image resize changes the orientation of image

texts:
I am facing problem with the resize,Image orientation get changed on resize (rotated left to right).
Original Image size: 2320px × 3088px,
Resize: 279px x 349px
Resize code:
        $imageFactory = $this->_imageFactory->create();
        $imageFactory->open($absolutePath);
        $imageFactory->quality(100);
        $imageFactory->constrainOnly('true');
        $imageFactory->keepAspectRatio('true');
        $imageFactory->keepFrame('true');
        $imageFactory->keepTransparency('true');
        $imageFactory->backgroundColor([255, 255, 255]);
        $imageFactory->resize($width, $height);
        $imageFactory->save($imageResized);

thanks


texts:
I have a block that displays a product grid with SKUs mention in admin system configuration and I have provided cache lifetime for that block as 3600 sec. It works perfectly fine.

Now when admin makes the changes in SKUs list in admin configuration it does not reflect the updated version immediately. How can I clear that particular block cache after admin saves the SKUs list?


texts: Performance of rendering page from data collection vs cms static page

texts:
I build a coupon page what lists all available coupons on the store.

Of course, I go to CMS -> Pages then create a page.

But, I'm considering about what to use, html content or layout update.

Option 1:

I write fully html code somewhere then put into content box, such as:

Coupons

...

Current Offers

Coupon Code

Coupon Description

CODE

Option 2:

I create a custom block what fetch all available coupons then apply into its template file. I use this block for the page with layout update, such as:

<reference name="root">
    <block type="my_sales/coupons" name="content" template="page/static/coupons.phtml"/>
</reference>

With option 2, I don't need to do anything afterwards, I just change the coupon in Catalog Shopping Cart Rules then the page automatically changes as well.

But in my website, there's a few coupon codes (1 or 2 at a time), and they don't change frequently. So option 1 is reasonable.

I know that both options, the system must load data from database, regardless getting coupon collection or cms page content.

But what considering me is which option costs me much loading time than the other? Assume that this coupon page is also a landing page for a marketing campaign, which option should I choose?


texts: What is the difference between getShippingAddress and getDefaultShippingAddress

texts:
I need to get the shipping address of logged in customer and guest customer on checkout page.

I am able to get shipping address from both the method if customer in logged in, but I am not sure which one should I use, basically difference between these two methods.

getShippingAddress() and getDefaultShippingAddress()


texts: Magento Search Results: Echo SKU list of products in header.phtml or head.phtml

texts:
How can I echo the SKU list of the items in the search results page, but in the header of Magento? Currently using M1. I'm using the code below to echo the list of SKUs of a specific category page to the header, but I don't know how to get the list of SKUs in the search results page.

if (Mage::registry('current_category'))
{

$category_id = Mage::getModel('catalog/layer')->getCurrentCategory()->getId();
$category = Mage::getModel('catalog/category')->load($category_id);
$products = Mage::getModel('catalog/product')
    ->getCollection()
    ->addAttributeToSelect('*')
    ->addCategoryFilter($category)
    ->setOrder('price', 'ASC')
    ->load();

$skuArray = array();
foreach ($products as $item) {
                        $skuArray[] = "\"" . $item->getSku() . "\"";
}

echo Mage::registry('current_category')->getID();

echo implode( ', ', $skuArray);

I tried the solution in this link, but it doesn't seem to work:
How to get Search result Product collection outside result.phtml

Any suggestion would be greatly appreciated. :D


texts: Custom JS is not include undefined error magento 2

texts:
requirejs-config.js file path isCodility/Customers/view/frontend/requirejs-config.js` and  code is

var config = {
    paths: {
        'customhighcharts': 'Codility_Dashboard/js/customhighcharts'
},
    shim: {
        'customhighcharts': {
            deps: ['jquery']
        }
}
};

my js file path is code/Codility/Customers/view/frontend/web/js/customhighcharts.js

customhighcharts file code taken from https://code.highcharts.com/highcharts.js link

My phtml file path is code/Codility/Customers/view/frontend/templates/Seller/navigation.phtml and code is

Graph is not shown and Error in console is

TypeError: customhighcharts is undefined


texts: I used this code {{block type="catalog/product_list_random" name="product_random" template="catalog/product/list.phtml" column_count="3"}}. Thats Works fine, but there is a Problem. If you open my CMS Webpage http://shop.blog-mvc-computertechnik.de you will see the format is wrong. if you call other articels the are formatted normal. Whats wrong?


texts: Multiple tables in single custom sql script magento

texts:
I need to create a single sql install script for all the tables.

Say i have 10 tables defined in config xml.

Need idea on how my Model class should look like and also an example to add more than 10 tables in my install script in magento.

I have tried in script as:

$installer = $this;

$installer->startSetup();
$table = $installer->getConnection()

//For 1st table

->newTable($installer->getTable('vendor_namespace/table1'))
->addColumn('table1Col1', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
    'nullable'  => false,
    ), 'Table 1');
$installer->getConnection()->createTable($table);

 //For 2nd table

->newTable($installer->getTable('vendor_namespace/table2'))
->addColumn('table2Col1', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
    'nullable'  => false,
    ), 'Table 1');
$installer->getConnection()->createTable($table);

//For 3rd table...

1) My doubt is :  If i have to change any Primary or foreign key relation, or add/delete any table, i just need to change the version number in both config and script with updated table name or should i create new script file with updated version number.

2) Basically for eg: can i keep reusing the same file mysql4-install-3.2.0.0.php as just mysql4-install-3.2.0.1.php, mysql4-install-3.2.0.2.php and so on.

3) If so, how to keep the record of the previous table structures?


texts: Hide a block in an override xml that doesn't have a name?

texts:
I have the following block that is added in a 3rd party SSO module.  I'm overriding part of the module, and I want to hide this block.

<referenceContainer name="content">
    <block class="Company\WebSSO\Block\LoginButton" ifconfig="company/websso/enabled_frontend" template="Company_WebSSO::default/button.phtml"/>
</referenceContainer>

I know how to use remove="true" in my xml override, but usually it requires that the block have a name, or be in its own container.  I don't have this luxury.  Is there another way to hide / delete the block from the layout?


texts:
Whenever i try to upload an image for product page it shows Upload HTTP Error.

I have cleared cache and also performed indexing and even proper permissions are given to the folder.


texts: Not get logged in chrome.302 status came

texts: I am not able to login in Chrome but able to login Firefox,Internet Explorer.I have added session time 24hrs from admin settings.Also tried with core varient.php file  session code commented, but no any success.And I have checked in network,it show login ajax status 302 , temporary moved. But same is working in Firefox without any issue.


texts: how I can create a secondary contact form with mangento2x, I want to customize a contact form for clients feedback, I saw a lot of extensions that do what I want but they are not free, is there an easy way to be able to do it?


texts: Magento 2 custom phtml file not calling to all products view pages

texts:
I have created custom phtml file, but that file is calling to all the products magento2

Please find the below code:

<referenceContainer name="product.info.form.content" >
            <block
                    class="Vendor\Module\Block\Product\View\RewardMesg"
                    name="reward_frontend_msg"
                    template="Vendor_Module::product/view/rewardMesg.phtml" before="product.info.addtocart"/>
</referenceContainer>

My block code is:

namespace Vendor\Module\Block\Product\View;

use Magento\Framework\View\Element\Template;
use Magento\Framework\Registry;

class RewardMesg extends Template
{
    /**
     * @var Registry
     */
    protected $registry;

    /**
     * @var \Magento\Catalog\Model\Product
     */
    protected $product;

    /**
     * ProductView constructor.
     * @param Template\Context $context
     * @param array $data
     * @param Registry $registry
     */
    public function __construct(
        Template\Context $context,
        array $data = [],
        Registry $registry
    )
    {
        $this->registry = $registry;
        parent::__construct($context, $data);
    }

    /**
     * @return \Magento\Catalog\Model\Product
     */
    public function getProduct()
    {
        if (is_null($this->product)) {
            $this->product = $this->registry->registry('product');
        }

        return $this->product;
    }
}

Help me appriciate.

Thanks


texts:
I have a pretty big problem with the dataflow import. I am now trying for days to import a CSV in my shop but i just can't get it to work. I guess that I'm using the wrong attributes.

These are my Attributes of the CSV:

  "SKU","Name","Hersteller","Packungsgröße","Geschmack","Gesamtgewicht (inkl. Verpackung)","Farbe","Größe","Produktmenge Netto","Referenz Menge","Referenz Einheit","Produkteinheit","Bild","Produkttyp","Listen-Einkaufspreis (Netto)","Listen-Verkaufspreis (Brutto)","Rabattklassen","Beschreibung","Steuerklasse","EAN-Nummer"

So if there is someone that could help me with this, that would be great. I have the Magento DE 1.9.0.1


texts: How to install a New theme in magento 2.0.2

texts:
I have worked in magento 1.8.Now I have installed magento 2.0.2 in localhost.I have one theme named Ultimo which i want to apply in magento 2.0.2.This theme is not from magentocommerce.com.

I cant see My theme name here.

Then How to select theme from here? What are the steps to apply a theme?

I have tried all the steps from http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-create.html more than one time.But still not working.

Here are all my files.

theme.xml

Path : D:/wamp/www/testsite/app/design/frontend/Magento/ultimo/theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Ultimo</title>
    <parent>Magento/ultimo</parent>
    <media>
        <preview_image>media/preview.jpg</preview_image>
    </media>
</theme>

composer.json

Path: D:/wamp/www/testsite/app/design/frontend/Magento/ultimo/composer.json

{
    "name": "magento/ultimo",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/theme-frontend-luma": "100.0.*",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

registration.php

Path : Path: D:/wamp/www/testsite/app/design/frontend/Magento/ultimo/registration.php

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Magento/ultimo',
    __DIR__
);?>

Can anyone help me ?


texts:
hoping you are well, I need your help with the following topic:

I want to make a report that extracts all the products in MAGENTO that does NOT have tax_class_id = '2' (taxable goods) and although I found the record in catalog_product_index_price, it only shows me the active products or with inventory greater than zero.
How can I get the tax_class_id of inactive products (with SQL)?


texts: Magento 2: Where can I edit the Minicart product image template (KnockoutJS template)?

texts:
I'm trying to edit the minicart product image template. I found the parent file:
/app/design/frontend/Smartwave/porto/Magento_Checkout/web/template/minicart/item/default.html
However it uses a knockout call to create the template:
<a data-bind="attr: {href: product_url, title: product_name}" tabindex="-1" class="product-item-photo">
<!-- ko foreach: $parent.getRegion('itemImage') -->
     <!-- ko template: {name: getTemplate(), data: item.product_image} --><!-- /ko -->
<!-- /ko -->
</a>

Where can I find this template/file so I can edit its output?
Thank you in advance for any help.


texts: Redirect all emails to a specific address

texts:
I 'm new to Magento, and we just did a migration from version 1 to Magento 2.
I would like to define 2 constants variables, one which is the address email for all email related to the backoffice and the second, the email address for all emails sent to clients.

This is for test purpose before the production.

I have no clue where to search. Do they have a general email function for email ?

Thanks


texts: Magento 2: How to validate the cart rules?

texts:
I need to develop a function in the cart rules.

Basically it is to check the amount that is added in the cart and apply a fixed price to the product.

I have in mind how to apply the logic. But I need to see the functionality of magento to observe the cart and be able to validate this rule.

I know it's the SalesRule extension but I can not find the correct classes.


texts:
I am trying to understand the virtual type with the help of existing blog and video tutorial. It's too hard to understand the concept and it's too confused
Here I'want some good understandable example to understand virtual type and that will guide me to use in my real time custom module.
Thanks in advance for your better support


texts: How to create new type of customer address like billing and shipping in Magento 2 (EX : xyz address)

texts: How to create new type of customer address like billing and shipping in Magento 2 EX : xyz address


texts: Redirect to login page if not login magento

texts:
I want to restrict the visitors for a single store in multistore website.
If they are not logged in, redirect them to login page.
They can also create account and login after they visit the website. If anyone have idea please let me know.


texts: migration from magento 1.9.0.1 to magento 2.0.7

texts:
I have to migrate from magento 1.9.0.1 to magento 2.0.7 with the help of magento data-migration-tool provided by magento, but i am stuck in that process.
I am facing following issue while migrating magento database.

[PDOException]
  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '10-Migration_Cell Phones' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'


texts: renaming email template file will effect the magento functionality

texts: i don't want to send the newsletter subscription success email and welcome new suer email with password. I want to ask rename the email template name is better or i have to override the Mage_Newsletter_Model_Subscriber.


texts: Magento 2 How to Change Estimate Shipping Default Country

texts:
I have Magento 2.2.5 installed.

General > Default Country is set to 'United Kingdom' however on the 'Estimate Shipping' part of the cart page, the default country shown is United States (we don't even ship there).

Can anyone please advise how to change that to United Kingdom?


texts: Disable/Readonly admin options Magento 1

texts:
How can I disable the size option for catalog products in Magento 1. I've searched Google and StackOverflow and I can't find a good solution.

Is there someone that can help me?

Thanks a lot!


texts: Magento2. fieldset.xml how does it work and when to use it

texts: How does fieldset.xml work and when to use it?


texts:
i'm magento 2 newbie, i want to remove some payment method from the admin Store -> Configuration screen

is there anyway to do it?
many thanks.


texts:
Facing issue when running the command php bin/magento setup:upgrade

 The XML in file "D:/wamp64/www/porto/vendor/magento/module-inventory-catalog/etc/communication.xml" is invalid:
Element 'topic', attribute 'is_synchronous': The attribute 'is_synchronous' is not allowed.
Line: 9

Element 'topic', attribute 'is_synchronous': The attribute 'is_synchronous' is not allowed.
Line: 12

Element 'topic', attribute 'is_synchronous': The attribute 'is_synchronous' is not allowed.
Line: 15

Verify the XML and try again.


texts: Module Configuration From Admin Menu as a Seperate page without side menu

texts:
Show custom module configuration in Admin Menu not in Store -> Setting -> Configuration

Can we display the configuration without side menu in a seperate page from admin menu.

And the configurations should not be a grid, need to display the fields one by one as the general configurations display.


texts: Product Options are not coming for the configurable products in magento

texts:
Product options for the configurable products are not coming at the product page.

echo $this->getJsonConfig()

did not return any value and the page breaks after var spConfig = new Product.Config(.
I cant see any error in the log files. When I am going to page source I can see

 var spConfig = new Product.Config(
and page ends. It could not load rest of the things after that script. Only select boxes are showing but no options are there.

I could not understand what is the issue. Please suggest some solutions. Thank you in advance.


texts:
$fieldset->addField('image', 'image', array(
          'label'     => Mage::helper('featuredsalons')->__('Image'),
          'required'  => true,

        //'multiple'  => true,
        //'multiple'  => 'multiple',
          'name'      => 'image',
          'after_element_html' => '
Image Dimension:
'
      ));

I have tried above mentiion to allow multple images , but failed.


texts: Advanced Search - Custom Attribute Range

texts:
I am sure others have encountered this problem before and I am wondering if anyone knows of a solution.

I would like my product to be searchable in the advanced search by a range of sizes.

For example, one parameter would be:

Width:  From (dropdown menu)' (dropdown menu)" x To (dropdown menu)' (dropdown menu)"

Height: From (dropdown menu)' (dropdown menu)" x To (dropdown menu)' (dropdown menu)"

In the backend, I would have four attributes:

Width-Feet
Width-Inches
Height-Feet
Height-Inches

Or, two attributes:

Width - Inches
Height - Inches

And I could convert the length in inches to a foot and inches format.

Any help would be greatly appreciated!

UPDATE:

I am still kind of lost on how to do something like this (add another parameter for the advanced search). I was assuming that many people would encounter this issue but I have not been able to find any tutorial(s) that I have helped.


texts: Turn on template path hits per user basis

texts:
Is there a way of turning the path hits per user basis? When few people are working on the same website and one switches the template path hits on it messes the websites for all the users.

Any ideas how to overcome this problem?

UPDATE:

Just to clarify, we are all working from the same IP.


texts: Google analytics restrictions for store owners

texts:
I'm doing freelancing for a client, he owns a Magento website. He has different stores, each store owned by a different owner. He wants to allow some stores to have access to gooogle analytics for their own shop only. And restrict others from using google analytics.

Is that feasible using some existing module? Or should I write a custom module for that?


texts: How can i create regular remainder mail to Regular Customer about Remainder Mail Automatically

texts:
I need to configure remainder messages to regular customer,

eg:: If a customer purchased every month, i need to send this remainder mail: This is the time for your order.


texts: customer session does not work except customer page - Magento 2

texts:
app/code/Vendore/Module/Block
<?php
namespace Vendor\Module\Block;
class CustomerLink extends \Magento\Framework\View\Element\Template
{
    protected $_customersession;
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Customer\Model\Session $session
    ) {
        parent::__construct($context);
        $this->_customersession=$session;
    }
    public function sessionCheck()
    {
        return $this->_customersession->isLoggedIn();
    }

}

app/code/Vendore/Module/view/frontend/template
<?php
if($block->sessionCheck())
{
    echo 'logged in';
}
else
{
    echo 'logged out';
}
?>

It works only in customer page and checkout/cart page, remaining page it return false even customer logged in.
so I decided to use \Magento\Framework\App\Http\Context $httpContext this return right boolean value in entire website but how to get customer details using httpContext.
why \Magento\Customer\Model\Session is only working in customer page?
note: all caches are in enable mode.


texts: How to crop square images in Magento 2 using view.xml

texts:
I am absolutely confused to hell with view.xml image cropping. I am just trying to take the images I have uploaded and crop them to a square size using the etc/view.xml file from my theme.

I have tried everything possible and the closest I can get to square cropped images is:

<image id="product_page_image_medium_no_frame" type="image">
    <width>886</width>
    <height>886</height>
    <constrain>false</constrain>
    <aspect_ratio>false</aspect_ratio>
    <frame>false</frame>
</image>

However, the image is just stretched into this square box, its not cropped from the centre. Any help would be greatly appreciated.


texts: Magmi not importing first media_gallery image

texts:
I'm using magmi 0.7.22 in a Magento 1.9.3.1

I need to import several images, and replace all the current images by the new ones.

I'm trying first with on single product and I see that it is working fine, except that the first media_gallery image is not imported.

The test csv is the following:

"sku","image","small_image","thumbnail","media_gallery"
"S1712400-10","+/S1712400-5-10.jpg","+/S1712400-5-10.jpg","+/S1712400-5-10.jpg","/S1712400-2-10.jpg;/S1712400-3-10.jpg;/S1712400-4-10.jpg"

The import finishes without any error, but the image S1712400-5-10.jpg is not showing anywhere, though the other 2 following images are in it's place.

I checked that the image name is correct, and that it is in the same place as the other ones, but still the same result.

I cleared all the magento's caches, including the "catalog images cache" but see no change.

The same happens to all the products, the first image of the media_gallery is completely ignored.


texts: How to sort full_name_english in magento 2 country directory.?

texts:
I need some help in the module Magento directory. Actually I am able to sort id,two_letter_abbreviation & three_letter_abbreviation by setOrder to the collection which is defined in the helper class which is calling from the model.
i.e below is a function in the model class
 public function getCountriesInfo()
    {
        $countriesInfo = [];

        /** @var \Magento\Store\Model\Store $store */
        $store = $this->storeManager->getStore();

        $storeLocale = $this->scopeConfig->getValue(
            'general/locale/code',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORES,
            $store->getCode()
        );

        $countries = $this->directoryHelper->getCountryCollection($store);
        $regions = $this->directoryHelper->getRegionData();
        foreach ($countries as $data) {
            $countryInfo = $this->setCountryInfo($data, $regions, $storeLocale);
            $countriesInfo[] = $countryInfo;
        }

        return $countriesInfo;
    }

Below is a function define in helper class.
public function getCountryCollection($store = null)
{
    if (!$this->_countryCollection->isLoaded()) {
        $this->_countryCollection->loadByStore($store);
    }
    return $this->_countryCollection;
}

I the above, i can sort by setOrder like $this->_countryCollection->setOrder('country_id,'ASC')
or by iso2_code & iso3_code. these three are the column of directory country table
My question is that how to sort full_name_english? please help me out. After that, I will override the file.
  [
        {
            "id": "AD",
            "two_letter_abbreviation": "AD",
            "three_letter_abbreviation": "AND",
            "full_name_locale": "Andorra",
            "full_name_english": "Andorra"
        },
        {
            "id": "AE",
            "two_letter_abbreviation": "AE",
            "three_letter_abbreviation": "ARE",
            "full_name_locale": "United Arab Emirates",
            "full_name_english": "United Arab Emirates"
        },
        {
            "id": "AF",
            "two_letter_abbreviation": "AF",
            "three_letter_abbreviation": "AFG",
            "full_name_locale": "Afghanistan",
            "full_name_english": "Afghanistan"
        },
        {
            "id": "AG",
            "two_letter_abbreviation": "AG",
            "three_letter_abbreviation": "ATG",
            "full_name_locale": "Antigua & Barbuda",
            "full_name_english": "Antigua & Barbuda"
        }]

Update 1:
Still did not get any solution
Update 2:
I will update the answer to this once I have done with that.


texts: Magento2 how to generate token for SOAP API

texts:
I tried to generate token for magento2 SOAP API but i am getting below error

Error:

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] SoapServer::SoapServer(): Invalid parameters in /var/www/html/magento2011/test.php:36 Stack trace: #0 /var/www/html/magento2011/test.php(36): SoapClient->__call('integrationAdmi...', Array) #1 {main} thrown in /var/www/html/magento2011/test.php on line 36

Script:

<?php
   ini_set('display_errors', 1);
   $params  = array('username' => 'soapadmin','password' => 'test@1234');
   $request = new SoapClient('http://127.0.0.1/magento2011/soap/default?wsdl&services=integrationAdminTokenServiceV1',array('soap_version' => SOAP_1_2));
   $token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken($params);
 ?>


texts: In etc/config.xml This element is not expected. Expected is one of ( default, stores, websites )

texts:
Magento version : 2.1.11
I am using a custom module at custom-module/etc/config.xml there is below file.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <checkDelivery>
            <config>
                <enable>0</enable>
                <postcodes><![CDATA[100000,100001,100002,100003,100004,100005,100006]]></postcodes>
                <success_message><![CDATA[Delivery available]]></success_message>
                <error_message><![CDATA[Item not available at this location, please try another pincode]]></error_message>
            </config>
        </checkDelivery>
    </default>
</config>

When I run :$ php bin/magento setup:upgrade

Element 'enable': This element is not expected. Expected is one of ( default, stores, websites ).
  Line: 6

I got above Exception, any idea is there any reserved keywords which this extension is using?

Is there any link from where I can learn about these files and allowed methods.

Update:
File : /etc/adminhtml/system.xml

 <group id="config" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
..............................

Thank You.


texts: Magento 2 - Pass data to checkout during runtime

texts:
I created a new carrier method for express shipping. I need to show a dynamic message which I am generating based on the products in the cart. There are some product categories which are not allowed with the new carrier method.
So I need to show a message like:

The following products are not compatible with the express shipping
method:

Product x
Product Y ...

I am generating the message in the code where I am creating the carrier. But I don't know how to pass the generated message to the view.
app/code/Company/Shipping/Model/Carrier/CompanyExpress.php
<?php
namespace Company\Shipping\Model\Carrier;

use Magento\Quote\Model\Quote\Address\RateRequest;
use Magento\Shipping\Model\Rate\Result;

class CompanyExpress extends \Magento\Shipping\Model\Carrier\AbstractCarrier
              implements \Magento\Shipping\Model\Carrier\CarrierInterface
{
    ...

    public function collectRates(RateRequest $request)
    {
        if (!$this->getConfigFlag('active')) {
            return false;
        }

        /** @var \Magento\Shipping\Model\Rate\Result $result */
        $result = $this->_rateResultFactory->create();

        /** @var \Magento\Catalog\Model\Category $categoryModel */
        $categoryModel = $this->_categoryFactory->create();

        /** @var \Magento\Checkout\Model\Cart $cart */
        $cart = $this->_cartFactory->create();

        /** @var \Magento\Quote\Model\Quote $quote */
        $quote = $cart->getQuote();

        $rule = $this->_carrierHelper->getShippingRule(
                     $quote
                    ,$this->_productRepository
                    ,$categoryModel
                    ,$this->_scopeConfig
                );
        if ( ! $rule) { return false; }

    // Add Express Shipping Method
        $expressRule = $rule["rules"]["express"];

        if ($expressRule["active"]) {

            /** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */
            $method = $this->_rateMethodFactory->create();

            $carrierTitle = $expressRule["carrierTitle"];
            $methodTitle = $expressRule["methodTitle"];
            $shippingCost = $expressRule["shippingCost"];

// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

            $note = $this->_generateNote($expressRule);     // <----- How can I pass this note to the view?

// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

            $method->setCarrier($this->_code);
            $method->setMethod($this->_code);
            $method->setMethodTitle($methodTitle);
            $method->setCarrierTitle($carrierTitle);
            $method->setPrice($shippingCost);
            $method->setCost($shippingCost);

            $result->append($method);
        }

        return $result;
    }

    private function _generateNote($expressRule)
    {
        $block = $this->_notAllowedCategoriesBlockFactory->create();
        $block->setExpressRule($expressRule);
        $html = str_replace(PHP_EOL, '', $block->toHtml());

        return $html;
    }

    ...

As you can see I am generating the Note with _generateNote() but I don't know how I can pass it to the view.
Any help is appreciated.


texts: Magento 2 order information: How to add links dynamically?

texts:
When a customer selects an order in his order history he is redirected to the order information page.

If the items have not yet been shipped there is only one tab available: Items ordered. If its shipped and invoiced two other tabs are available: Shipment and Invoice.

Where can I find the code responsible for showing and not showing the aforementioned tabs? I am asking because I want to create a custom tab and dynamically decide whether it should be shown or not.


texts:
I'm using the featured products tutorial here magento site but I'm finding that no matter how many items I add to my custom category, I'm limited to five items on the featured products block.

I've read around, I know this is due to a constant in the code block that generates the list, but I'm not sure how to find the generating code block.

I'm guessing the clue is in the line

{{block type="catalog/product_list" category_id="2" template="catalog/product/featured.phtml"}}

and that the type="catalog/product_list" is the giveaway.

Question is, how do I know where this code is...

Thanks


texts: Magento 2 - Update all images of the products

texts:
0
I would like to update ALL images of my products catalog.
The folder .../pub/media/catalog/product has the images of the products inside a folders with letters of alphabet of numbers:

If I inspect the code of html the path of the images is inside cache folder:

And also I have founded images in .../pub/media/import
I have confused. I think that the steps would be:
Upload new images in /pub/media/catalog/product.
Delete images cache from admin panel.
Magento create image thumbnail and image small too. If I delete the cache these images will create automatically?
In this environment I can not do a lot of test but It's a production environment.
Please Could you tell me how to change all images of my product catalog?
Thanks!


texts: Customers can't change item quantities on /checkout/cart/

texts:
Does anyone know why my /checkout/cart/ page will not let my customers change the quantity of an item in it please? Is there an easy fix?

I'm using Magento CE 1.9.


texts:
i am trying to delete record from database is there any opposite methode of setdata to delete record from DB

$postModel = Mage::getModel('brainvire_brand/post');
$image=$data['image'];
$bname=$data['bname'];
$content=$data['content'];
$is_active=$data['is_active'];

$postModel->setBname($bname);
if($data['imagedelete'])
{
      $postModel->setImage('');
}
else
{
      $postModel->setImage($image);
}
$postModel->setContent($content);
$postModel->setIs_active($is_active);


texts: Magento : Update Cart Grand Total and Subtotal

texts:
I have 4 main products in cart, Each item is having different price.
I want to update cart's total price as $40 without considering each line item price.
I want to show $40 as combined price for all 4 items.

I tried with below code, but this can update each line item price.

<events>
   <sales_quote_add_item>
       <observers>
          <Company_Module_Model_Observer>
             <type>singleton</type>
             <class>Company_Module_Model_Observer</class>
             <method>updatePrice</method>
          </Company_Module_Model_Observer>
      </observers>
   </sales_quote_add_item>
</events>

  <?php
  class Company_Module_Model_Observer
  {
      public function getNewPrice()
      {
          $quote = Mage::getSingleton('checkout/session')->getQuote();
          $cartItems = $quote->getAllVisibleItems();

          $custom_price = 40;

          foreach ($cartItems as $item) {
              $productId = $item->getProductId();
              $product = Mage::getModel('catalog/product')->load($productId);

              $actualPrice = $product->getPrice();

              $newprice = $custom_price;
          }

          return $newprice;
      }

      public function updatePrice($observer)
      {
          $event = $observer->getEvent();
          $product = $event->getProduct();
          $quote_item = $event->getQuoteItem();
          $new_price = $this->getNewPrice();
          $quote_item->setOriginalCustomPrice($new_price);
          //$quote_item->save();
          $quote_item->getQuote()->save();
          //Mage::getSingleton('checkout/cart')->save();
      }

  }


texts: steps to enable e-commerce in brochure website

texts:
I'm not very experienced with Magento.

I've received a client who is using Magento Community, and has existing Magento products, but the front end buttons all say "Enquire Now >", rather than "add to cart".

Also, the prices are not set yet.

Please correct my current understanding. I need to:

Export the products using something like this.
Add correct price.
Import products.
(Potentially install &) configure payment gateway.
Done.

Am I missing something?


texts:
I have a multiseller store. I'm creating a seperate seller invoice within series.
My table data is like below
id
seller_id
invoice_id
invoice_series
order_id

For example if a seller name is John, I need his first invoice_series like JOH000001 and next invoice_series will be like JOH000002. I have seller_id to differentiate the sellers. I couldn't find the logic to insert invoice_series in incremental value with prefix of seller code based on seller id.


texts: Show authentication only on shipping step of onepage checkout

texts:
I am trying to make the authentication section of the onepage checkout only show up on the first step (shipping step).
I don't know the best way to do this but my approach was to remove it from the checkout first and then add it to the shipping step:
my checkout_index_index looks like this:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="authentication" xsi:type="array">
                                    <item name="config" xsi:type="array">
                                        <item name="componentDisabled" xsi:type="boolean">true</item>
                                    </item>
                                </item>
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="authentication" xsi:type="array">
                                                    <item name="sortOrder" xsi:type="string">1</item>
                                                    <item name="component" xsi:type="string">Magento_Checkout/js/view/authentication</item>
                                                    <item name="displayArea" xsi:type="string">authentication</item>
                                                    <item name="children" xsi:type="array">

                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>

</page>

Now I tried to render it by moving this part of my template from onepage.html to design/frontend/Vendor/myTheme/Magento_Checkout/web/template/shipping.html

Some headline here

The headline does show up in the correct spot on the frontend now but the authentication section does not render, there is however still the authentication wrapper rendering above my headline but without any content, so I must be missing something.

How do I have to adjust my code?


texts: Standard & Digital product of the same article

texts:
I am setting up a book store with Magento. My client will be selling both e-books and printed books. I want to know if I can set up a product and the visitors will choose from the product's page what format they want it to buy: printed or digital.
So if a visitor will pick up the printed version, he will pay the price of X$, fill in the order form and the book will be delivered to him.
Instead if he will choose a digital book, after the payment he will be able to download the book. And no book will be delivered to him :)

Can Magento do this?


texts: How do i get my products to appear in a random order on the category page?

texts:
At the minute, my products are showing in alphabetical order from the part number. When clicking on a category, I would like this to show in completely random order. Can anybody help with this? This using Magneto 2 and the theme Porto

Thanks in advance


texts: Can you create a coupon code for collecting taxes only during checkout?

texts:
Is it possible, using native Magento functionality only, to use a coupon code that will reduce the grand total to a specific amount, and only charge them for taxes?

The use case is:

Customer buys something on a 3rd party site for a reduced price.
Let's say they pay $100 for a $200 product to use round numbers
They don't pay taxes there
They get a coupon code which they can use to redeem the purchase on our site
When they checkout on our site, they may have to pay taxes

It's easy to create a coupon code for the $200 value, but the problem then is that the grand total on the order becomes $0 instead of $100.


texts: How to implement this code to sort the grid in admin panel?

texts: I want to "naturally" sort skus in admin panel ("grid"?) and I found this code: https://magento.stackexchange.com/a/124324/51693 which would be exactly what I need, but I don't know where to call this class or how to implement it. If someone could, at least, point me in the right direction, that would me much appreciated.


texts: Contact/Transactional e-mail does not work

texts:
For Contact Us e-mails my yahoo e-mail address works  (xxxxx@yahoo.com) and receives the e-mails, but using my domain's e-mail (sales@mywebsite.com), they never arrive.  I've tested sales@mywebsite.com repeatedly and it works perfect.  My host, Nexcess, checked their e-mail log and said that Magento doesn't even attempt to send an e-mail when using sales@mywebsite.com.  My developer also used his e-mail address in Magento and it worked just like my Yahoo e-mail.

Any suggestions at all at what could be causing this?

Dave
CE 1.7.0.2


texts: How to get last number of page in category?

texts:
I want to show last number of page in pagination only.
The code of pagination comes from below path.
/var/www/html/magento/vendor/magento/module-theme/view/frontend/templates/html/pager.phtml

I'm using below code to get last category page.
<?php
$current_page =  $this->getRequest()->getParam("p");
$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
$categoryFactory = $objectManager->get('\Magento\Catalog\Model\CategoryFactory');
$categoryId = $this->getrequest()->getParam(3); // YOUR CATEGORY ID
$category = $categoryFactory->create()->load($categoryId);

$productCollectionFactory = $objectManager->get('\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
            $collection = $productCollectionFactory->create();

            $collection->addAttributeToSelect('*');
            $collection->addCategoryFilter($category);
            $collection->setCurPage($current_page)->setPageSize(12);

echo $collection->getLastPageNumber();
 ?>

I could not get last page from this.


texts:
In homepage "most viewed products", "new products", "featured products" are listing grid view products as 3column. Near that new products show the option  "VIEW ALL" to view all products. When i click that the page showing 3 column in products. I need 4 count, so i change as 4 count in catalog.xml.. But its not working. Please help.
  (I installed the TatavaSoft catalog extension)


texts: add postcode text field on Customer registration form in magento frontend

texts: add Postcode text field on customer registration form in magento front end.


texts:
I am trying to amend our shipment email template so it will show a list of items NOT YET DISPATCHED (if applicable) - call it a backorder list if you like.
Does anybody know how I can do this?
Thanks in advance!!
Josh


texts: Product repository - get methods' store id argument = null

texts:
If I do not provide $storeId argument for methods get() or getById what store id would be used? Default? Or current?

If I DO use this argument we can see that it will be set and data specific for data store will be obtained, but I don't see what will happen if no id is provided.

public function get($sku, $editMode = false, $storeId = null, $forceReload = false)
    {
        $cacheKey = $this->getCacheKey([$editMode, $storeId]);
        if (!isset($this->instances[$sku][$cacheKey]) || $forceReload) {
            $product = $this->productFactory->create();
            $productId = $this->resourceModel->getIdBySku($sku);
            if (!$productId) {
                throw new NoSuchEntityException(__('Requested product doesn\'t exist'));
            }
            if ($editMode) {
                $product->setData('_edit_mode', true);
            }
            if ($storeId !== null) {
                $product->setData('store_id', $storeId);
            }
            $product->load($productId);
            $this->instances[$sku][$cacheKey] = $product;
            $this->instancesById[$product->getId()][$cacheKey] = $product;
        }
        return $this->instances[$sku][$cacheKey];
    }


texts:
I have an page url of magento site.

my question is : how can i check the page url is category page or cms page or other page?

for example:

page URL is : http://example.com/craft.html(category page) or http://example.com/terms-policy(cms page)

i want to check page url is category page or cms page.

Thanks.


texts: How to find what collection used in particular section in magento 2

texts:
I want to get particular section collection which is already rendered in Magento 2 website

I need collection for my another phtml file, how to get the collection?


texts:
I use this API to fetch the visible products using the filter:

http://192.168.1.180/magento/index.php/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=name&searchCriteria[filter_groups][0][filters][0][value]=%Nike%&searchCriteria[filter_groups][0][filters][0][condition_type]=like

Is there a better way to search from the REST API ? This URL will become really big in case of increased search terms, for instance, If I query for 10 SKU names.


texts: Magento2 set multiple table rate using shipping suite extension

texts:
I need user to see table rate quote for SpeeDee service if order is shipping to the region
For that i have multiple range of zip code (53001-53299,etc..)
For each range i have different weight(e.g. 0,1 etc)
For each weight i have different price (4.8, 5.2, etc)

e.g.

Range, Weight, Price
1. 53001-53299, 0, 4.8
2. 53001-53299, 1, 5.2
3. 53300-53399, 0, 4.9
3. 53300-53399, 1, 5.3

I am using shipping suite module of mageworx


texts:
I am trying to fecth data form review and rating_option_vote.
i need all values of rating and all Rating count group by Rating Id.

public function getRatingSummeryByAttribute($currentProductId)
{
    $attributesValues = $this->ratingColFactory->create()
        ->addFieldToSelect('rating_id')
        ->addFieldToSelect('rating_code')
        ->getData();
    if ($attributesValues)
    {
        $totalRatingRecord = $this->_ratingFactory
            ->addFieldToFilter ('entity_pk_value', $currentProductId);
        $totalRatingRecord->getSelect()
            ->columns('SUM(value) as sum_vales')
            ->columns('count(rating_id) as total_rating')
            ->group('rating_id')->join(
                [
                    'review' => 'review'
                ],
                "main_table.review_id = review.review_id"
            )->where('status_id = 1')
        ;
echo $totalRatingRecord->getSelect()->__toString();

Query Printed

  SELECT main_table., SUM(value) AS sum_vales, count(rating_id) AS total_rating, review. FROM rating_option_vote AS main_table INNER JOIN review ON main_table.review_id = review.review_id WHERE (entity_pk_value = '14') AND (status_id = 1) GROUP BY rating_id

Result :


texts: I have create 4 group of customer and try to set group price for each group in product but i dont see any group price section in product and I want to add customer group wise price for particular product how can i do in magento version 2.0.7 ?


texts: How to add a color picker in magento 2.1.7 system config?

texts:
I am trying to add a color picker in magento 2.1.7 using below link but it's not going to work anyone tell me that how to add color picker in magento 2.1.7

https://webkul.com/blog/add-color-picker-magento2-system-config/


texts: I've created a form within my custom module that displays on the product page that calculates a price, based on the input how would I add this to the product price?


texts:
If i adjust a product attribute, i get an error:

Method "checkReservedAttributeCodes" is not defined in "Mage_Catalog_Model_Observer"

Using magento 1.9.2.4.


texts: Get Url of the custom module is getting wrong

texts:
i have a custom module called bookanappointment and its layout file is as follow with frontName as follows:-

<frontend>
    <routers>
        <bookanappointment>
            <use>standard</use>
            <args>
                <module>Neo_Bookanappointment</module>
                <frontName>bookanappointment</frontName>
            </args>
        </bookanappointment>
    </routers>
</frontend>
<admin>
    <routers>
        <bookanappointment>
            <use>admin</use>
            <args>
                <module>Neo_Bookanappointment</module>
                <frontName>admin_bookanappointment</frontName>
            </args>
        </bookanappointment>
    </routers>
</admin>

now i am trying to get the url of the indexController's list action.by using the following code

echo Mage::getUrl('bookanappointment/index/list');

i am getting url as follows

http://dev.ddecor.com/admin_bookanappointment/index/list/

which i dont want.

i need http://dev.ddecor.com/bookanappointment/index/list/

basically without admin_


texts:
I'm facing some problems with the frontend generation when I enable Redis cache. Basically, the path to some static contents is wrong, just like the example below for the logo image.

<img src="//skin/frontend">

My setup is:

Magento 1.9.1
NGINX + PHP7-FPM
Redis

It was running well for about 5 days, but broke today. When I disable Redis cache, the site runs well, without any problem.

Does anyone ever faced something like that?

Thanks.


texts: How to speed up of Displaying Messages (success,Error,Notice) in Magento2?

texts:
Currently in Magento2 site Success,Error or Notice Message taking too much time to display.

How to speed up?


texts: How to display subcategories on category page?

texts:
I have used this code in view.phtml to display subcategories on category page

<?php foreach ($this->getCurrentCategory()->getChildrenCategories() as $_subcat): ?>

<a href="<?php echo $_subcat->getUrl() ?>"><?php echo Mage::helper('catalog/output')->categoryAttribute($_subcat, $_subcat->getName(), 'name') ?>

<?php endforeach ?>

but this is obviously displaying only the list of subcategories, I want image and same view as products on category page

Desired Result

Getting this

Favorite community please help :)


texts: Turn template path hints off from command line

texts:
For whatever reason, I just did a mysqldump of our magento database, imported it into a new database, and suddenly template path hints are on, how can I turn these off from the command line? Or what table/column do I need to change in the database to turn these off?

Thank you!


texts: which file contain logic of tax calculaion based on customer group id at checkout?

texts:
I'm adding one extra attribute (customer group id as drop down field) in billing information at checkout .So based on this selection order review section should calculate tax.

Basically i'm using extension to add extra attributes in billing section.it will effect after order placed(we know all information saved in quote model temp.once order placed click it will store all information in db permanently)

In later time its calculating properly because customer information available in db.
So i enable path hints to find out file.but i'm not getting exact file contains logic of tax calculation based on customer group id.I hope i give proper information.thanks in advance.


texts:
I've been trying to add new sizes or save changes and impossible to do.

here is movie:
temporarily removed

I have add here new sizes and then "save" after refresh page still empty field.


texts: Insert Block in left sidebar of layered navigation

texts:
i wrote an extension for adding an block on the left sidebar of the catalog_category_layered , but I don't know why it's not rendered.

I've got an extra xml file for my extension (which is working because it also does some other stuff) which a part looking like this:

<catalog_category_layered>
    <reference name="left">
        <block type="categories/sidebar" name="categories.sidebar" template="foobar/categories/sidebar.phtml">
        </block>
    </reference>
</catalog_category_layered>

And I have a Class which looks like this:

class Foobar_Categories_Block_Sidebar extends Mage_Core_Block_Template {
    public function getFoo() {
        return 'foooooooo';
      }
    }

for the Block class I have another question: Which class should I inherit if I want to print out some categories based on the category I'm watching?

and a template which looks like this:

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

      <?php echo $this->getFoo();?>

My config.xml looks like this:

<config>
    <modules>
        <Foobar_Categories>
            <version>0.1.1</version>
        </Foobar_Categories>
    </modules>
    <global>
        <models>
            <foocategories>
                <class>Foobar_Categories_Model</class>
            </foocategories>
        </models>
        <helpers>
            <foocategories>
                <class>Foobar_Categories_Helper</class>
            </foocategories>
        </helpers>
        <blocks>
            <foocategories>
                <class>Foobar_Categories_Block</class>
            </foocategories>
        </blocks>

        <resources>
            <foocategories_setup>
                <setup>
                    <module>Foobar_Categories</module>
                    <class>Mage_Eav_Model_Entity_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </foocategories_setup>
        </resources>
    </global>
    <frontend>
        <layout>
            <updates>
                <foocategories module="Foobar_Categories">
                    <file>Foobar/categories.xml</file>
                </foocategories>
            </updates>
        </layout>
        <translate>
            <modules>
                <Foobar_Categories>
                    <files>
                        <foocategories>Foobar_Categories.csv</foocategories>
                    </files>
                </Foobar_Categories>
            </modules>
        </translate>
    </frontend>
</config>

I don't think that there are any problems in my config.xml because the extension is doing other stuff with layout and blocks which works perfectly.

The left sidebar with my filters is shown, but my block isn't rendered in the sidebar.
But where is my error?

cheers
bambamboole


texts: I can't translate position, name and price on sort by list

texts:
I have problem with translations.
I've tried translate it in translate.csv and mage_catalog.csv and it doesn't work.

position == Pozycja

name == Nazwa


texts:
When translating a line in, for example, this path to the file the line is in:

vendor/magento/module-checkout/view/fontend/web/template/shipping-information.html

This will be the translation line:

"Example String","Voorbeeld String","module","Magento_Checkout"

But what if this is the path:

vendor/tig/buckaroo/view/frontend/web/template/payment/tig_buckaroo_ideal.html

What is the translation string in that case?

In my case, I want to translate "Select your bank" to "Selecteer uw bank". Normally, the format would be like this:

vendor/STORE/TYPE-LOCATION/etc....

And it would be added to the translation file like this:

"Select your bank","Selecteer uw bank","TYPE","STORE_LOCATION"

But, in this case, it is very different, because the path is not the default format for translating.


texts:
I need display all approved reviews on one CMS page.

I tried below code but not working .

$collection = Mage::getModel('catalog/product')->getCollection();

foreach ($collection as $product){
    //var_dump($product);
    $storeId = Mage::app()->getStore()->getId();
    $summaryData = Mage::getModel('review/review_summary')->setStoreId($storeId)->load($product->getData('entity_id'));
}


texts: Set the if condition to true in PHPUnit test case

texts:
I have an if condition inside an observer as follows

public function execute(Observer $observer)
    {
        if ($observer->getData('status') == Status::REQUIRED) {
            //implementation
        }
    }

Now I want to write a PHPUnit test for above.

How can I do so? basically, I want to know how can I bypass the if a condition or set it to true in my unit test.

EDIT

//implementation looks something like below

if ($observer->getData('var_first') == 'var_first_value') {
            $data = $observer->getData('var2')->getData();
            ........
        }


texts: Security Patch SUPEE-10888 - Possible issues?

texts:
SUPEE-10888 is a new security patch for Magento 1 which addresses 12 security issues.

https://magento.com/security/patches/supee-10888

  SUPEE-10888, Magento Commerce 1.14.3.10 and Open Source 1.9.3.10 contain multiple security enhancements that help close cross-site scripting (XSS), cross-site request forgery (CSRF) and other vulnerabilities.

The patch can be found at https://magento.com/tech-resources/download#download2243

What common issues do you have to watch out for when applying this patch?


texts:
Trying to install M2 using Composer with the following:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition /var/www/m2

PHP:
PHP 7.4.12 (cli) (built: Oct 31 2020 17:04:09) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies

Composer:
Composer version 1.1.1 2016-05-17 12:25:44

This is the output:
Installing magento/project-community-edition (2.4.1)
Deprecation Notice: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in phar:///usr/bin/composer/src/Composer/Downloader/GitDownloader.php:238
Deprecation Notice: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in phar:///usr/bin/composer/src/Composer/Downloader/SvnDownloader.php:132
  - Installing magento/project-community-edition (2.4.1)
    Downloading: 100%

Created project in /var/www/m2
Loading composer repositories with package information
Warning from https://packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)

  [ErrorException]
  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]


texts: Increment product quantity stock on payment failure

texts:
Could anyone tell me how can I increment my product quantity stock when an order gets fails?
I'm using Magento 2.3.5 and using a customized payment gateway.
The scenario is when I'm placing an order and proceeding with the custom payment gateway and returns with a failed order. At this moment I need to increase the product quantity stock.
Is there any way of doing this? Please help!
Thanks in advance.


texts:
After digging around for the cause of a SimpleXMLElement::__construct() error in my logs, I found the culprit to be the module called Mgt_Base.xml in app/etc/modules/. When disabling this module, the errors go away, however I don't know if disabling this module will have any side effects so I'm trying to fix it instead.

I logged out the String it was trying to make the SimpleXMLElement from in Feed.php which got called when visiting the admin panel and it outputted this:

<title>301 Moved Permanently</title>

301 Moved Permanently

nginx

I'm not very familiar with XML, but from what I understand HTML is different than XML. When I tried to make this string into a SimpleXMLElement in a separate test script I got the same errors that appeared in the logs.

Now I'm pretty stuck as to how I can fix this error. I'm not sure if I can just disable this module or if I need to fix something within. Does anybody have any idea?

*Edit: After adding a closing
 tag in my test script there doesn't seem to be an error. I guess whatever is generating the html is doing a poor job at it. I'll try find the source of whatever is generating it and fix that.


texts: Is there need to clear cache for layout change if cache already disbabled in magento 2

texts:
I am changing some category view page layout and cache is disabled but wont affecting anything on fronted so i want know Do i need to clear cache?

Thanks in advance


texts: Magento 2: How to return a JSON object from the API?

texts:
I'm trying to return a JSON object from one of my REST Models, something like this:

{
    "settings": {
        "set1" : 2,
        "set2" : "key1"
    },
    "extra": {
        "e1'" : {
            "e2'": true
        }
    }
}

However, what seemingly looks trivial, is not that easy to implement. The problem is I'm not sure what the return type should be in the interface and model.

<?php

namespace AppFactory\Core\Api;

/**
 * @api
 */

interface SettingsInterface
{

    /**
     * @return object
     */
    public function get();
}

The object class will return

{
  "message": "Class object does not exist",

when calling the API. The primitive types available int, number, and array won't work for me. I don't want to create a class for each complex type is returning as well. How can I do this?

Thanks.


texts: How to customize date in Magento admin grid?

texts:
In my project I need to have only "day" and "month" to select no "year" or "h:m:s" required so I would like to set format to "d M" to bemore precise day (number) and month name as it is in "LONG" date format.
I already tried:

        $fieldset->addField('date_to', 'date', array(
            'label'     => Mage::helper('dingles')->__('Date to'),
            'name'      => 'date_to',
            'time'      => false,
            'image'     => $this->getSkinUrl('images/grid-cal.gif'),
            'format'    => 'd M'
        ));

but it won't work, also it gives me hour:minute:second anyway.
Is it possible to format it as I wanted ?


texts: Magento 2. How to create StoreView in System.xml

texts: How to create Store View in System.xml. I can explain it with image given below


texts: Magento 2: How to translate the minicart?

texts:
I'm building an online store using Magento version 2.1.8. I've created a Luma child-theme.

Magento offers CSV files for translating most of it. But the minicart uses JavaScript for the text strings within it.

How can I overwrite the default English text, for Romanian?


texts: Change minimum quantity in shopping cart for bundled products

texts:
I have a bundled product and the Ship Bundle Items option is on Together.

Every single product is put on a minimum quantity of 1.

But if I add the bundled product to the shopping cart it adds 8 items (witch is the default setting in the system -> configuration part) instead of 1


texts: client order detail page total due issue magento 1.9

texts:
i am using magento 1.9 i have created a rule for if order price is less then $5000 add shipping charges $10. its working fine but what i need is when the rule is applied than plus $10 into total due check attached image

above image i have attached is client order detail page
other pages like cart, invoices are working fine

as you can see above image is what i am getting. but how do i plus $10 into $3,570 total due?.

I am new in Magento but i know development stuff very well but i couldn't find any solution so i need help to achieve this.

i do some more research and find totals.php

totals.php

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    Mage
 * @package     Mage_Adminhtml
 * @copyright   Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

/**
 * Adminhtml order totals block
 *
 * @category    Mage
 * @package     Mage_Adminhtml
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Mage_Adminhtml_Block_Sales_Order_Totals extends Mage_Adminhtml_Block_Sales_Totals//Mage_Adminhtml_Block_Sales_Order_Abstract
{
    /**
     * Initialize order totals array
     *
     * @return Mage_Sales_Block_Order_Totals
     */
    protected function _initTotals()
    {
        parent::_initTotals();
        $this->_totals['paid'] = new Varien_Object(array(
            'code'      => 'paid',
            'strong'    => true,
            'value'     => $this->getSource()->getTotalPaid(),
            'base_value'=> $this->getSource()->getBaseTotalPaid(),
            'label'     => $this->helper('sales')->__('Total Paid'),
            'area'      => 'footer'
        ));
        $this->_totals['refunded'] = new Varien_Object(array(
            'code'      => 'refunded',
            'strong'    => true,
            'value'     => $this->getSource()->getTotalRefunded(),
            'base_value'=> $this->getSource()->getBaseTotalRefunded(),
            'label'     => $this->helper('sales')->__('Total Refunded'),
            'area'      => 'footer'
        ));
        $this->_totals['due'] = new Varien_Object(array(
            'code'      => 'due',
            'strong'    => true,
            'value'     => $this->getSource()->getTotalDue(),
            'base_value'=> $this->getSource()->getBaseTotalDue(),
            'label'     => $this->helper('sales')->__('Total Due'),
            'area'      => 'footer'
        ));
        return $this;
    }
}

i duplicated total paid code block and replace as it below:

   $this->_totals['charges'] = new Varien_Object(array(
        'code'      => 'charges',
        'strong'    => true,
        'value'     => $this->getSource()->getShippingCharges(),
        'base_value'=> $this->getSource()->getBaseShippingCharges(),
        'label'     => $this->helper('sales')->__('Shipping Charges'),
        'area'      => 'footer'
    ));

after added into totals.php i though this would work this maybe plus $10 into $3,570 but it work some way but showing value $0. maybe it does work if its get value
i need just right parameters or filename.


texts:
I want to configure USPS and Fedex shipping on a magento website. I have configured everything in the admin panel but nothing works for me.

For USPS :

When I change Show Method if Not Applicable to "No" it shows on frontend Please enter a valid value for Shipping method to complete this order.

And when it is set to "YES" it shows an error on the frontend :

Also for Fedex I have configured everything but it does not show anything on the frontend. No error nothing. Below are the screenshots of my settings in the admin panel.

Also i have enabled log in admin panel and added code in Fedex.php and set permission given here

Please help me where am I doing wrong?


texts: plugin create seo question attribute default title product

texts: I downloaded this plugin, and in default meta title product, I would select the attribute category. I do not know how to create it and how to set it. I wish in SEO product and the name and the name of the store that does not come out, I want to dump the category of product, here's a screenshot:


texts:
I have the customer activation module https://github.com/Vinai/customer-activation
on my site the email notification template calls {{var customer.getEmail()}} I would like to also get the company name

is there a way to do that i basically need to call

 Mage::getModel('customer/address')->load()->getCompany({{var customer.getDefaultBilling()}});

in the template is there a way to do this?
Thanks

as in

2016-02-12T18:09:55+00:00 DEBUG (7): Array
(
    [0] => Mage_Customer_Model_Address Object
        (
            ...
            [_data:protected] => Array
                (
                    ...
                    [company] => mycompany


texts:
So i follow this tutorial -> https://magento.marcelhauri.ch/blog/how-to-add-a-tinymce-plugin-to-the-magento2-wysiwyg-editor
And everything works so far if i remove this line of code
ed.contentCSS = [ed.settings.magentoPluginsOptions._object.Addfourcolumnbox.css];
But if i add it i get an error that say this
Failed to initialize plugin: Addfourcolumnbox TypeError: Cannot read property 'Addfourcolumnbox' of undefined
at t.<computed>.t.<computed>.init

So i have tried everything to fix it, but nothing works, so i hope somebody else have dealt with the same problem before me and found a answer to it.


texts: how to sort products by colour and then by manufacture on magento 2?

texts:
On a magento product page category page, i want to seperate the products by colour, then i want to show a manufacture first,
eg,

black
black

cyan
cyan

magenta
magenta

etc,

the first color in each I would want to show a manufacture first then anything else with the color.

How can I achieve this?


texts:
I've purchased wholesale packaged product extension to use it on my website.
I am not sure if it is because of this extension, but when a customer orders qty of 2 or up and go to cart, the qty shows up as 1 while the price is the amount of qty 2 or up.

For example, If i were to buy clothes quantity of 5 and press check out, when it brings me to the cart, the quantity is 1 while the price is the amount of quantity 5. It also shows the quantity of 1 in the backend.

Is there any solution to this?

Thank you


texts: Custom Attribute is not saving data in database

texts:
I'm trying to add custom text box named cashback in Magento 2 product add/edit page. I added the text box programmatically. But my below code doesn't add column in the table also not saving the value. I'm a beginner so I can't understand Magento 2 structure. I need clarification about which table does it stores and need to store data given in admin panel.

<?php

namespace Rk\Wallet\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    private $eavSetupFactory;
    public function __construct(
        EavSetupFactory $eavSetupFactory
    )
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
          "cashback",
          [
          'group' => "",
          'label' => "Cashback",
          'is_html_allowed_on_front' => true,
          'default' => '1',
          'note' => '',
          'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_STORE,
          'visible' => true,
          'required' => false,
          'user_defined' => true,
          'searchable' => true,
          'filterable' => true,
          'comparable' => false,
          'visible_on_front' => true,
          'visible_in_advanced_search' => false,
          'unique' => false,
          "frontend_class" => "cashbackclass",
          "used_in_product_listing" => true,
          "type"                    => "int",
          "input" => "text",
          "type" => "int",
          "source" => "Vendor\Module\Model\Config\Source\TimeSetup",
          'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend'
          ]
      );
    }
}


texts:
By the default Magento save the images to: www.domain.com/media folder

i would like to change the location of the saved images to subdomain: images.domain/media

I have made changes through the configuration: configuration -> web -> Base Media URL and have cleared the catch, but the images are not uploading. Also, i have made change the permission for the folder 777.

any idea what i'm doing wrong and how this can be done?

updated 12.09.2015.
i found the following, which is exacly what I did, but this is not working:

Create a Sub-domain named "media.mytestsite.com".
Copy the media folder to your sub-domain's root folder.
        Give the permission 777 to media folder. (Full permission).
        Go to you magento admin.
        Go to System -> Configuration -> Web -> Unsecure -> Base Media URL and put "http://media.mytestsite.com/media/".
        Go to System -> Configuration -> Web -> Secure -> Base Media URL and put "https://media.mytestsite.com/media/".
        Now save the configuration.
        Clear/Refresh magento cache.(It is very important)
        You have done it all... :) Enjoy..


texts: Error Upgrading from Magento 2.3.4 to Magento 2.4.1

texts:
I tried to upgrade from Magento 2.3.4 to Magento 2.4.1 using these commands:
composer require magento/product-community-edition=2.4.0 --no-update
composer update

then i got the following error like this:


texts: How to use if condition(knockout) in html template ? magento 2

texts: How to use if / else condition in html template file ?


texts: Magento 2: installation stuck at 65% "installing user configuration"

texts:
So I recently installed Ubuntu 16.04 on an old laptop.

Running PHP 7:

PHP 7.0.4-7ubuntu2.1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans

I'm trying to install Magento 2.0.7 but my installation is stuck at 65%

I've increased the memory allocated to PHP to 768M as suggested by the official doc but still stuck.

There's nothing in the Magento logs, nothing in the apache error logs.

In the firebug console tab, I can see that there are POST calls every few seconds to /setup/index.php/install/progress where the response is always the same and represents the progress listed in the console log.

There's also a POST call to /setup/index.php/session/prolong from time to time where the response is always:

{"success":false}

I don't usually post that kind of installation questions but to be honest, I'm running out of ideas regarding what it could be.

Let's assume I don't have access to command line and I absolutely want to install via the web setup wizard. I want to know what is causing this issue and how to fix it


texts: Custom Report: List customer's email address for a specific SKU

texts:
I have a new product arriving in 2 weeks that is very closely related to another I have been successfully selling for 4 months.

I want to be able to get a list of customer's email addresses for a specific SKU in any format that I can then import into Mailchimp.

I will then be able to alert the customers about the new exclusive product that will be a limited run in production.


texts: Is it possible to import decimal quantity while products imports for some of the products magento 2?

texts:
I am thinking to allow decimals quantity to some of the products while products import Magento 2.

If anyone have idea please guide me.


texts:
If I run the ./PATCH_SUPEE-6788_CE_1.7.0.2_v1-2015-10-27-12-00-16.sh no new files are created. For example app/code/core/Mage/Admin/Model/Resource/Block.php in the patch but does not exist after the patch. No error about this is shown.

I do have rw access and can create the file:

touch app/code/core/Mage/Admin/Model/Resource/Block.php

Any idea why the file is not created?

-bash-4.1$ ls -la app/code/core/Mage/Admin/Model/Resource/
total 124
drwxrwxrwx+ 8 myuser apacheuser  4096 Feb  1 12:41 .

-bash-4.1$ touch app/code/core/Mage/Admin/Model/Resource/Block.php
-bash-4.1$ ls -la app/code/core/Mage/Admin/Model/Resource/Block.php
-rw-rw-rw-+ 1 myuser apacheuser  0 Feb  1 12:41 app/code/core/Mage/Admin/Model/Resource/Block.php

-bash-4.1$ ./PATCH_SUPEE-6788_CE_1.7.0.2_v1-2015-10-27-12-00-16.sh
...
patching file app/code/core/Mage/Admin/Model/Resource/Block.php
patching file app/code/core/Mage/Admin/Model/Resource/Block/Collection.php
...

If I create one of the missing files the patch skips this file, so it is doing something:

The next patch would create the file app/code/core/Mage/Admin/Model/Block.php,
which already exists!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored


texts: How to display custom stock status based on source availability?

texts:
I have multi-source inventory and have set up one main source and other sources that are suppliers. I want to show message to call first if product is not available in main source. Or maybe even show "call us" if the source is enabled but not available. As some suppliers don't have inventory file yet.
Here is corrent code for product page:
<?php if ($block->displayProductStockStatus()): ?>
    <?php if ($_product->isAvailable()): ?>
        <div class="stock available" title="<?php /* @escapeNotVerified */ echo __('Availability') ?>">
            <?php /* @escapeNotVerified */ echo __('Availability') ?><?php /* @escapeNotVerified */ echo __('In stock') ?>

    <?php else: ?>
        <div class="stock unavailable" title="<?php /* @escapeNotVerified */ echo __('Availability') ?>">
            <?php /* @escapeNotVerified */ echo __('Availability') ?><?php /* @escapeNotVerified */ echo __('Out of stock') ?>

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


texts:
0
down vote
favorite

I am new in magento and I need your help with the following:

I have a Magento store installed that is working "Fine", but when I add new products or any content on my store, this can´t showed automaticly in the front of store, only in my admin display, then I have to run the command to index and after doing this, all is showing on front

  php bin/magento indexer:reindex

The problem is that the content manager from this website is not a developer, is a secretary and she does not know about programming

How to make that the content loaded on website , be automatically loaded on the front?


texts: How to setup cron job in Magento 2 to reindex indexers

texts: Please provide me a solution with a code.


texts: Button add to cart stays on adding... after i setParam('product', false)

texts:
I have a checkout_cart_product_add_after event that calls to a observer file in which i want to check a condition. If that condition is false i block the product from adding to the cart and want to return a error message to the frontend.

I'm using this code if the condition is true:

            $this->_messageManager->addError(__('your custom message'));
            //set false if you not want to add product to cart
            $observer->getRequest()->setParam('product', false);
            return $this;

but if i do that i get a console error 500 with an error: jQuery.parseJSON requires a valid JSON string.

And the add button to cart button stays on adding...

How can i block the product from adding to the cart but the button also refreshes?


texts: Magento 2 php bin/magento setup:install WITHOUT sample data

texts:
As the Title says I'm trying to run php bin/magento setup:install without the sample sample data (Products and all).

There is an option to this command --use-sample-data  I've tried it with --use-sample-data=no and I got --use-sample-data takes no arguments.

I've tried it without the --use-sample-data flag and still products were added.

To be more specific about what I'm trying to achieve here.

I have a magento installation with custom extensions as well.

I wish to achieve a clean db (as clean as it can be).

Any tips are highly appreciated. Thanks.


texts:
I would like to override

vendor/magento/module-checkout/view/frontend/web/template/estimation.html

so I've copied and edited it into:

app/design/frontend/Smartwave/porto/Magento_Checkout/web/template/estimation.html

Porto is my theme, but nothing is being overwritten, what's wrong?

I've already cleaned cache and magento setup:static-content:deploy -f


texts:
I keep getting this error when I view my form in Magento admin:

  Call to undefined function setUseContainer() in app\code\local\MasteringMagento\Example\Block\Adminhtml\Event\Edit\Form.php

Please tell me, what am I doing wrong?

class MasteringMagento_Example_Block_Adminhtml_Event_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
{
protected function _prepareForm()
{
    $form = new Varien_Data_Form(
        array('id' => 'edit_form',
              'action' => $this->getData('action'),
              'method' => 'post'
        )
    );

    $fieldset = $form->addFieldset(
        'base_fieldset',array('legend'=> Mage::helper('example')->__('General Information'),'class'=> 'fieldset-wide'));

    $fieldset->addField('name','text',array(
        'name'    => 'name',
        'label'   => Mage::helper('example')->__('Event Name'),
        'title'   => Mage::helper('example')->__('Event Name'),
        'required' => true
    ));

    $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);

    $fieldset->addField('start','date',array(
        'name'     => 'start',
        'format'   => $dateFormatIso,
        'image'    => $this->getSkinUrl('images/grid-cal.gif'),
        'label'   => Mage::helper('example')->__('Start Date'),
        'title'   => Mage::helper('example')->__('Start Date'),
        'required' => true
    ));

    $fieldset->addField('end','date',array(
        'name'     => 'end',
        'format'   => $dateFormatIso,
        'image'    => $this->getSkinUrl('images/grid-cal.gif'),
        'label'   => Mage::helper('example')->__('Start Date'),
        'title'   => Mage::helper('example')->__('Start Date'),
        'required' => true
    ));

    $form = setUseContainer(true);
    $this->setForm($form);

    return parent::_prepareForm();

}
}


texts: How can I start custom theme development from scratch in Magento 2?

texts:
I have installed Magento 2.1.1 version. I am familiar with the functions which are used in the admin panel of the magento2.1.1 but now i want to develop custom theme.

  What are the prerequisites to develop custom theme from scratch ?


texts: Custom comments extension 90% there. Sending from wrong address

texts:
The following is from a custom extension a previous developer wrote for our site. Customers can leave comments or questions when they place their order and it gets emailed to our customer service department. Currently the "Sender" address is set to our default transactional email address. I would like to have it sent from the customer's email address so that our customer service department can simply hit reply and send an email in response to the customer.

I attempted to include $customerEmail into the "$vars = array" but it seems I was way off. I tried Googling "Magento customer email field" and a few variations but I can't track down the correct reference. Any direction would be appreciated.

<?php

class Commentemail_Model_Observer {

    private function sendOrderCommentEmail($name, $orderNumber, $comment){
        $receiveEmail = Mage::getStoreConfig('contacts/email/order_comment_email');
        $templateId = "order_comment_email";
        $emailTemplate = Mage::getModel('core/email_template')->loadByCode($templateId);
        $vars = array('customerName' => $name, 'orderNumber' => $orderNumber, 'comment' => $comment);
        $emailTemplate->getProcessedTemplate($vars);
        $storeId = Mage::app()->getStore()->getId();

        $senderEmail = Mage::getStoreConfig('trans_email/ident_general/email', $storeId);
        $senderName = Mage::getStoreConfig('trans_email/ident_general/name', $storeId);

        $emailTemplate->setSenderEmail($senderEmail);
        $emailTemplate->setSenderName($senderName);
        $emailTemplate->send($receiveEmail, $senderName, $vars);
    }

    public function sendCommentEmail($observer){
        if(!Mage::getStoreConfig('contacts/email/enable_comment_sending'))
            return;
        $order = $observer->getOrder();
        $orderNumber = $order->getRealOrderId();
        $params = Mage::app()->getRequest()->getParams();
        if(isset($params['onestepcheckout_comments']) && $params['onestepcheckout_comments'] != ''){
            $this->sendOrderCommentEmail($order->getCustomerName(), $orderNumber, $params['onestepcheckout_comments']);
        }

    }

}


texts:
Configurable product and associated products are in stock. Associated products have quantity > 0, still showing Out of Stock in front end.

The products instock and qty values are updated programmatically over cron.

The settings from the magento backend seems to be correct:
a. Manage stock is set to yes
b. Configurable product and its associated products are set to 'In Stock'

Magento version: 1.9.2.4

General settings:

Configurable product:

Associated product:

What might be the issue?


texts: Why override select-payment-method.js in Magento 2?

texts: I need reason for why override Magento_Checkout/js/action/select-payment-method during add custom total item in Magento 2? Please explain it?


texts: How to add dynamic rows component in custom checkout page

texts:
I saw this in the docs: https://devdocs.magento.com/guides/v2.4/ui_comp_guide/components/ui-dynamicrows.html
I have a custom payment method and I want to add a dynamic row in one of the pages in that payment method, but I'm not sure if i can use this in my custom checkout page. All tutorials I see are how to customize admin page. I'm still a beginner: 2 weeks of magento and currently in our study period. Any help would be appreciated


texts: Shipping Rate Calculating for given Country,State,Postcode and Price

texts:
I am trying on module for shipping rate calculation like Estimate Shipping.

I have 4 text-boxes, One for country, one for state, one for postcode, last
one for Price. Here customer choose the state and country, enter the Postcode
and Price.

After submit form i need to calculate shipping rate price for that
provided data.

Here have only one shipping rate (Table rate) enabled.

Please any one help me

Thanks.


texts: Failed to load the "Magento_GiftMessage/js/view/gift-message" component in magento 2

texts:
On cart page I am getting this error in console:

Failed to load the "Magento_GiftMessage/js/view/gift-message" component

When I disable the module Magento_GiftMessage is working but it effect some where.
Please anyone help me.

Thanks


texts: Why does gallery.less include _theme.less?

texts:
I have a theme that extends luma using _theme.less. On product pages, another CSS file is included in addition to styles-m. The problem is that they both @import _theme.less which results in duplicate CSS rules.

This will mess up any background images because they are included using relative paths.
With styles-m.css the path to images is: "../images/image.svg"
but gallery.css is in another subfolder so the path would have to be: "../../images/image.svg"

I am probably missing something here.


texts: Is there way to configure magento to bcc an email in every mail send out on an order?

texts: I need to send a copy of the order email to a particular email address every time an success order was placed. Is there way to configure this in magento without modifying or rewriting the sales order class ?


texts: Created custom theme in magento 2.1 but parent name on backend is not showing up

texts:
I created one custome theme but parent name on backend is not showing up.
here is the code,

  Theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>m2-theme</title>
    <parent>Magento/blank</parent>
    <media>
        <preview_image>media/PorthosHome_Homepage.jpg</preview_image>
    </media>
</theme>

  Composer.json

{
    "name": "Iverve/m2-theme",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "Iverve/m2-theme": "100.0.*",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

  Registration.php

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Iverve/m2-theme',
    __DIR__
);

and added jpg file in the media folder.

I am getting this in the backend


texts: Displaying category thumbnail for child categories of a parent on homepage

texts:
I'm currently loading the child categories of a parent category by ID on the homepage:-

$preparednessCategoryId = 3;
$pcat = Mage::getModel('catalog/category')->load($preparednessCategoryId);
$psubcats = $pcat->getChildren();

foreach(explode(',',$psubcats) as $psubCatid):
$_category = Mage::getModel('catalog/category')->load($psubCatid);

    if($_category->getIsActive()):

        //markup here

    endif;

But I can't for the life of me display the category thumbnail and despite reading 400 odd other posts about the same difficulty, nothing I have tried has worked.

From what I can gather, it needs to be passed into the collection(?) but the following doesn't work for me:-

$_category = Mage::getModel('catalog/category')->load($psubCatid)->getThumbnail();


texts: URL key for specified store already exists Magento 2

texts: I know there are so many questions already asked related to this issue. But mine one is little difference. I created one custom module for import the products in Magento 2. In which  categories will be created automatically if not exists. Its working fine. When there is no category in store but when there is any category in store and I try to define it in csv file then I am getting "URL key for specified store already exists." error. I already checked so many answers and tried so many things but not get proper success.


texts: Magento 2.x Image roles not imported through import however displaying on all products and in admin how do you update through MYSQL?

texts:
On importing 8K products onto Magento 2.3.4 all images and products have been added, however no roles are assigned, the environment is multistore (2 stores)
The store ID is 2
How do I assign the roles using MYSQL. I am unfamilar with using custom controllers in modules and if this is the only way to do so please give an in depth instruction on how to do so.
I have tried using the code below:
UPDATE catalog_product_entity_media_gallery AS mg,
catalog_product_entity_media_gallery_value AS mgv,
catalog_product_entity_varchar AS ev
SET ev.value = mg.value
WHERE  mg.value_id = mgv.value_id
AND mgv.entity_id = ev.entity_id
AND ev.attribute_id IN (87, 88, 89)
AND mgv.position = 1;
However it does nothing which I am assuming is because no base image is set or something to do with the store id.
I'm sure other multistore users face this issue however there seems not to be a workaround.


texts: Magento 2: Can't access admin panel after changing user account

texts:
I get an error that the enter key 0 in admin_session is duplicated. So I just created a new user account and when I try to connect to panel admin with the new account I get this error

I am really dead if I do not resolve this today please help


texts: Magento 2 : Delete address from after login from address book

texts:
I want to delete the address which I have saved earlier from here but in vendor-> Magento_Customer\templates\address in addressbook file we have only edit address action but not delete action so please help me any help will be appreciated.

Here is the code for delete anchor tag->

       <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getUrl('customer/address/edit', ['id' => $_address->getId()]) ?>"><?php /* @escapeNotVerified */ echo __('Edit Address') ?><a class="action delete" href="#" role="delete-address" data-address="<?php /* @escapeNotVerified */ echo $_address->getId() ?>"><?php /* ## Heading ##@escapeNotVerified */ echo __('Delete Address') ?>


texts: how to Set up database values to crontab jobs in magento

texts:
in my config.xml file have crontab

.....
    <crontab>
            <jobs>
                <autoreplenish_test>
                    <schedule>
                        <config_path>how to set up here database values</config_path>
                    </schedule>
                    <run>
                        <model>autoreplenish/replenish::run</model>
                    </run>
                </autoreplenish_test>
            </jobs>
        </crontab>
...