texts: How to check that customer is logged in or not using Js?

texts:
I want find the whether the customer is logged in or not using js. I got some links but it doesn't works and i not good at knockout js. Please give solution with brief explanation.
I can't get the correct answer for this and the solutions I got didn't work to me please help to find the solution.
Refered Link:Magento 2.3 How to check that customer is logged in using Js


texts: Add to cart button on category view template

texts:
i'm working on an heavy customised magento site and there is a catalog/product/view/list.phtml which shows 2 product categories on the same page. The combination of the 2 products should create a bundle product but adding it to the cart doesn't work as it options are not stored properly in the database.
I believe I need to add those 2 blocks

bundle/catalog/product/view/type/bundle.phtml

and

bundle/catalog/product/view/type/bundle/options.phtml

to generate the Json array with all options. I'm not able to load them because I'm working on the category_view block, while I need the product_view block so $this->getJsonConfig()  will work.
Tried to include

<block type="bundle/catalog_product_view_type_bundle" name="product.info.bundle" as="product_type_data" template="bundle/catalog/product/view/type/bundle.phtml">

but as soon as I insert it I got a fatal error.

Can anyone help, please?
thank you very much


texts: How to change header in Shipping Method of OnePage checkout

texts:
The header reads "shipping"

I'd like to change the text. Where can I find this?


texts: how to add social share icon on product page in magento2

texts:
I'm trying to add social share icon on product details page.

I already apply to do  this with making custom modules.

But not shows on product datails page.


texts: Magento 1.9.2.4 - Place Order not go success page

texts:
I have a problem about onepage checkout in my Magento 1.9.2.4. When i push on Place Order for send my order, Magento not go to success page but redirect to checkout page with the product again in the cart. Why this? What could be the solution?

P.S. I Update my Magento from 1.9.0.1 to 1.9.2.4.


texts: error on registration page and one page checkout after updating magento

texts: I updated my Magento store from version 1.6 to 1.9 everything is working fine except when i click on proceed to checkout and choose one option checkout as guest or register user after filling the form when I click continue a pop up message generate and "Storeowner" is a required value., "Storetype" is a required value. and after clicking ok on that nothing will be happen . so can anyone help me why I am getting this error as their is some Javascript file is missing or some important file is missing.


texts:
i want to increase my products price in magento

foreach ($prodCollection as $product) {
    echo $product->getName() .'
';
    echo "old: " . $product->getPrice() .'
';
    $newPrice = ($product->getPrice() * 1.3);
    $product->setPrice("price",$newPrice);
    $product->save();
    echo "new: " . $product->getPrice();
    echo '

';
}

and this is my code but icant update price and get this error

  Fatal error: Uncaught TypeError: Argument 3 passed to
  Mage_Catalog_Model_Resource_Abstract::_canUpdateAttribute() must be of
  the type array, null given


texts: Magento 2 create new Store email Address

texts: I want to create a new store email like Custom Email 3. As there are two emails already Magento has Custom 1 and Custom 2. I want to add new Custom 3. I have tried to find any solution but failed. Any solution / Suggestion will be helpful. Thanks


texts:
In magento 2, How to  get  available sales rules  value in the multiselect field in admin form

Expectation:


texts:
I want to import product images from external url in default import section (not in dataflow).
I have already tried http://www.blog.magepsycho.com/how-to-import-product-images-from-external-url-in-magento/


texts: Magento 2 - Is it allowed to override styles-m.css / styles-l.css?

texts: I read that these files are generated from .less files. So it is even allowed to override them?


texts: How to add custom JavaScripts to Adminhtml config page

texts:
I am working on a custom Magento extension.
I have created already a page in the admin panel where you can save some settings for the extension.

The url of the page where you can edit the module settings is looking like this:

http://mymagento.com/index.php/admin/system_config/edit/section/vivasparser/

Here is my config.xml file:

<config>
    <modules>
        <VivasIndustries_Smartparser>
            <version>0.1.0</version>
        </VivasIndustries_Smartparser>
    </modules>
    <global>
        <models>
            <smartparser>
                <class>VivasIndustries_Smartparser_Model</class>
            </smartparser>
        </models>
        <helpers>
            <smartparser>
                <class>VivasIndustries_Smartparser_Helper</class>
            </smartparser>
        </helpers>
     </global>
    <adminhtml>
        <acl>
            <resources>
                <all>
                    <title>Allow Everything</title>
                </all>
                <admin>
                    <children>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <vivasparser>
                                            <title>vivasparser - All</title>
                                        </vivasparser>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>
          <layout>
            <updates>
              <smartparser>
                <file>smartparser.xml</file>
              </smartparser>
            </updates>
          </layout>
    </adminhtml>
</config>

Here is my smartparser.xml file:

<layout>
  <adminhtml_catalog_product_edit
    <reference name="head">
      <action method="removeItem"><type>js</type><name>prototype/prototype.js</name></action>
      <action method="addJs"><script>my_extension/jquery.js</script></action>
      <action method="addJs"><script>my_extension/colorpicker.js</script></action>
      <action method="addJs"><script>prototype/prototype.js</script></action>
    </reference>
  </adminhtml_catalog_product_edit>
</layout>

Why the javascripts are not loaded ?
I am trying to find colorpicker.js in the output HTML source of the page but there is no such thing loaded anywhere.

Can you help me out load these javascripts into my admin panel config page ?

Thanks in advance!


texts: Special characters stripped off while saving data in DB through raw sql_query

texts:
I am importing a csv with some special characters in my CSV. and i am inserting the row values one by one through direct sql query in magento.

The raw query printed while debugging is

INSERT IGNORE INTO `custom_table` (parent_id, options_id, value, partsfinder_id) VALUES (0,1,'Motò 6.5 / Stark 650', '1')

and the code that i use to insert the data is :

$resource = Mage::getSingleton('core/resource');
$writeAdapter = $resource->getConnection('core_write');
$sql = "INSERT IGNORE INTO `custom_table` (parent_id, options_id, value, partsfinder_id) VALUES (0,1,'Motò 6.5 / Stark 650', '1')";
$writeAdapter->query($sql);

Now the issue i face is in DB, the value Motò 6.5 / Stark 650 is not stored properly.
Only the value Mot is stored in the field. i.e. all characters after the special characters are stripped off.

Can anyone tell me the solution for this.

Thanks in advance.


texts: Magento2 Expand Apply Coupon Code on Luma Checkout page

texts:
on Magento 2.3 I have edited the Apply Coupon text box in the file I moved to
luma_child/Magento_Checkout/templates/cart/coupon.phtml

I altered the above file so that the coupon code box would be expanded by default which works on the view cart page.
However when I go to the checkout page (I am using default Luma child theme) the Apply Discount code box is not expanded by default like it is on the view cart page.
What is the path to the file that controls this on the actual checkout page?


texts: I am trying to create a custom event and get it to fire in my custom module. How can I do this?


texts: Magento 1 : Sort Product Listing By New?

texts:
Working on magento 1 website.

I want to sort the product sorting by new in all product categories. So that when any new product is added that shows on first.

Can i be please guided how can same be done.


texts: Magento 1.x custom block with dynamic content

texts:
Is it possible to add a block to Magento page which has dynamic content.
Let's say I want to create a block in which a product is displayed. And after a certain period time 15 seconds for example the product changes and another one is displayed.


texts: How to log 404 or undefined url's path information in magento?

texts:
I want to log all urls which redirects to 404, for this I extended Mage_Cms_IndexController's noRoute action, here I can log all urls by

Mage::log(Mage::helper('core/url')->getCurrentUrl());

Now I want to log url if it is a category. but I can't filter it out.
If I use

  Mage::app()->getRequest()->getModuleName();
  Mage::app()->getRequest()->getControllerName();
  Mage::app()->getRequest()->getActionName();

Above code returns cms, index and no route.

$currentUrl = Mage::helper('core/url')->getCurrentUrl();
$url = Mage::getSingleton('core/url')->parseUrl($currentUrl);
$path = $url->getPath();

Here $path returns the uri i.e url-rewrites
and if i use getPathInfo() it returns nothing.


texts: How can i add custom multi option Attribute in sales order grid like select warehouse and able to edit on the grid itself

texts:
I need to add custom multi selection option for admin purpose, like the ordered products currently available in which location warehouse. Its display like both inside of the order page and Sales->order-> Grid

//custom code
$this->addColumn('warehouse ', array(
    'header'    => Mage::helper('sales')->__('warehouse'),
    'index'     => 'warehouse',
    'type'      => 'text',
    'width'     => '70px',
    'sortable'  => false,
    'filter'    => false,
     'renderer' => 'Mage_Adminhtml_Block_Sales_Order_Renderer_Productatt',
));

But It display only Column Name, how can i display with values,

Output:

Note: After placing the order the admin manually select the warehouse right after its display inside the object.


texts: Magento 2: Add Hyper link to store copyright text

texts:
Anybody have an idea, about how to add hyperlink text to store copy right text.

eg: Powered & Digital Marketing By [hyper link] Technologies.


texts: add custom image field for custom options in magento

texts:
I am working on magento 1.9 version.I want to add a custom image field in drop down of custom options.
I added a text field using following guide

http://magento.ikantam.com/qa/how-add-custom-attributes-custom-options

which is working fine.but when I add a file field then it shows in admin but not save image field value in database.

please help me to solve this.


texts: Before/After is not working in catalog_category_view_type_layered.xml inside sidebar.main?

texts:
I am trying to add a string at the top of the product details page navigation referenceContainer name="sidebar.main" but the string is coming after product Filters.

How can i change or move my block at the top of the filters section or sidebar main, as i have tried so many ways but no luck as i added below.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceContainer name="sidebar.main">
          <block class="I95dev\Categorysearch\Block\Index\Index" name="index_index" template="index/index.phtml" before="-">
            </block>
        </referenceContainer>
</page>

Can any one help me on this.


texts: Magento 2 - Product category not showing - "ERR_INVALID_RESPONSE"

texts:
There is a category on my website which does not work. If I try to open it:
https://example.com/insektenschutz/fenster/spannrahmen
then it shows:

The website is not accessible The website at
https://example.com/insektenschutz/fenster/spannrahmen may be
temporarily unavailable or has been permanently moved to a new web
address. ERR_INVALID_RESPONSE

I reindexed all manually with php bin/magento indexer:reindex and cleared the cache, but it does still not show. All other categories work.

Update: I found this error in the log:

[2020-06-25 10:35:33] report.DEBUG: cache_invalidate:
{"method":"GET","url":"https://example.com/insektenschutz/fenster/spannrahmen","invalidateInfo":{"tags":["amasty_fpc_activity"],"mode":"matchingAnyTag"}}
[]


texts: "Get Quotes" returns no Error if there are no rates avaliable

texts:
It's always a good approach to show any result (negative or positive) to the user.

In my case, when I click on the 'Get quotes' button on My Cart page and rates are available — it's OK.

But when there is NO rates available for that address, I need to show to customer something like 'Hey, no rates dude'.

As far as I understand, I need to dig in the estimatePostAction method and check the rates manually and set some flash-message.

But I'm just wondering about is there another Magento-way to have this approach?

Thanks for any suggestion or vision.


texts: How to set an uploaded image as 'Base Image', 'Small Image' or 'Thumbnail' with SOAP webservices?

texts:
I'm looking for a method in the API SOAP (v2) to set an uploaded image like 'Base Image', 'Small Image' or 'Thumbnail', but I can't find one.

I've checked the methods in http://www.magentocommerce.com/api/soap/catalog/catalogProductAttributeMedia/productImages.html
but none of them looks like doing what I want.

Suggestions?


texts: Rewrite product page URLs based on that product assigned attribute URLs in Magento 2.3

texts:
I want to achieve product URLs based on product attribute for product page only. I have product attribute manufacturer, having drop downs such as lg, samsung, motorola etc.

My store category structure looks like as below:

Currently my product page opens directily as - https://www.mywebsite.com/product-1.html

I'm not using Use Categories Path for Product URLs of System/Configuration/Catalog/Search Engine Optimization.
This is setted as false.

I wanted to rewrite or set product page URL in following way.

https://www.mywebsite.com/lg/product-1.html

https://www.mywebsite.com/samsung/product-2.html

Here, lg and samsung are having manufacturer options and it's value defined at product level.
Values will be unique.

Also, I have other categories in which this product already belongs. So can not use categories path for product URLs as this creates same product duplicate issue with different category.

SEO settings correctly for this:

Use Categories Path for Product URLs -> NO
Create Permanent Redirect for URLs if URL Key Changed -> Yes
Use Canonical Link Meta Tag For Categories -> Yes
Use Canonical Link Meta Tag For Products -> No

Having single Magento 2.3 single store with single website, offering 1000 simple products.


texts: Show value of product attribute of type file in magento2 backend

texts:
As Administrator I want to be able to upload files for each products in order to show link on frontend.

I created upgrade script to create attribute with this properties:

'type' => 'varchar',
'input' => 'file',
'label' => 'Datasheet',
'required' => false,
'visible_on_front' => true,
'backend' => 'My\Module\Model\Product\Attribute\Backend\Datasheet'

Here is my backend model:

namespace My\Module\Model\Product\Attribute\Backend;

use Magento\Framework\App\Filesystem\DirectoryList;

class Datasheet extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
{
    const MEDIA_SUBFOLDER = 'datasheet';

    protected $_uploaderFactory;
    protected $_filesystem;
    protected $_fileUploaderFactory;
    protected $_logger;

    /**
     * Construct
     *
     * @param \Psr\Log\LoggerInterface $logger
     * @param \Magento\Framework\Filesystem $filesystem
     * @param \Magento\Framework\File\UploaderFactory $uploaderFactory
     */
    public function __construct(
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Filesystem $filesystem,
        \Magento\Framework\File\UploaderFactory $uploaderFactory
    ) {
        $this->_filesystem = $filesystem;
        $this->_uploaderFactory = $uploaderFactory;
        $this->_logger = $logger;
    }

    public function afterSave($object)
    {
        $attributeName = $this->getAttribute()->getName();
        $fileName = $this->uploadFileAndGetName($attributeName, $this->_filesystem->getDirectoryWrite(DirectoryList::MEDIA)->getAbsolutePath(self::MEDIA_SUBFOLDER));

        if ($fileName) {
            $object->setData($attributeName, $fileName);
            $this->getAttribute()->getEntity()->saveAttribute($object, $attributeName);
        }

        return $this;
    }

    public function uploadFileAndGetName($input, $destinationFolder)
    {
        try {
            $uploader = $this->_uploaderFactory->create(array('fileId' => 'product['.$input.']'));
            $uploader->setAllowedExtensions(['pdf']);
            $uploader->setAllowRenameFiles(true);
            $uploader->setFilesDispersion(true);
            $uploader->setAllowCreateFolders(true);
            $uploader->save($destinationFolder);

            return $uploader->getUploadedFileName();
        } catch (\Exception $e) {
            if ($e->getCode() != \Magento\Framework\File\Uploader::TMP_NAME_EMPTY) {
                throw new \FrameworkException($e->getMessage());
            }
        }

        return '';
    }
}

Attribute is shown in backend and saves value in database.

PROBLEM

Attribute value is not shown in backend.

References:

https://stackoverflow.com/questions/37115850/how-to-add-custom-file-upload-function-in-magento-2
https://community.magento.com/t5/Programming-Questions/Product-custom-attribute-file-upload/td-p/29460
create product image attribute in magento2


texts: Why does my translate.csv and the translation files not work?

texts:
I'm trying out a new theme and it seems to not get the translations properly.
If I search for the English phrase in my files, I can find:

  "You have no items to compare.","Sie haben keine Artikel auf der Vergleichsliste."

within the file: Mage_Catalog.csv
app/design/frontend/MYTHEME/default/locale/de_DE/
basically that should already show the German sentence, right?

Additionally I added a translate.csv which seems to be not working as well.

Could this be an issue with my theme or some Magento settings?

In my app/design/frontend/MYTHEME/default/template/catalog/product/compare/sidebar.phtml I see this code:

    <?php else: ?>

<?php echo $this->__('You have no items to compare.') ?>

<?php endif; ?>

which looks fine to me as well!? (This file is being used - if I change something in the file, it displays immediately on the site).


texts:
Following the convention for value of the action attribute in menu.xml:

[router_name]/[controller_name]/[action_name]

I need to know how to give the value for my action attribute if my controller path is as:

\app\code\Magenshop\Recipe\Controller\Adminhtml\Recipe\Edit.php

<?php
namespace Magenshop\Recipe\Controller\Adminhtml\Recipe;

class Edit extends \Magento\Backend\App\Action
{

protected function _initAction()
{

    $this->loadLayout()
        ->_setActiveMenu('recipe/items')
        ->_addBreadcrumb(__('Items Manager'), __('Item Manager'));

    return $this;
}

public function indexAction() {
    $this->_initAction()
        ->renderLayout();
}

public function execute()
{

    //$this->_initAction()->renderLayout();
     $this->_view->loadLayout();
     $id     = $this->getRequest()->getParam('id');
    $model  = $this->recipeRecipeFactory->create()->load($id);

            /*Begin custom code */
    //Get the admin recipe approval status
    $approveStatus=$model->getStatus();
    $this->generic->setApproveStatus($approveStatus);
            /*End custom code */
    $hlp = $this->recipeHelper;

    if ($model->getId() || $id == 0) {
        /*Begin custom code */
        //getSingleton('adminhtml/session') changed to getSingleton('admin/session')
        $data = $this->backendAuthSession->getFormData(true);
        /*End custom code */
        if (!empty($data)) {
            $model->setData($data);
        }
        // $model->setFilename($hlp->getUploadHtml($model));
        $this->registry->register('recipe_data', $model);

        $this->loadLayout();
        $this->_setActiveMenu('recipe/items');

        $this->_addBreadcrumb(__('Item Manager'), __('Item Manager'));
        $this->_addBreadcrumb(__('Item News'), __('Item News'));
        $head = $this->getLayout()->getBlock('head');
        $head->setCanLoadExtJs(true);
        $head->setCanLoadTinyMce(true);
        // $head->setCanLoadTinyMce(true);
        $this->_addContent($this->getLayout()->createBlock('recipe/adminhtml_recipe_edit'))
            ->_addLeft($this->getLayout()->createBlock('recipe/adminhtml_recipe_edit_tabs'));

        $this->renderLayout();
    } else {
        $this->backendSession->addError(__('Item does not exist'));
        $this->_redirect('*/*/');
    }
}
     $this->_view->renderLayout();
}

/*public function editAction() {

 }*/

app\code\Magenshop\Recipe\etc\adminhtml\menu.xml

Is my action attribute value right here?

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<menu>
    <add id="Magenshop_Recipe::menu" title="Recipes" module="Magenshop_Recipe" sortOrder="71" resource="Magenshop_Recipe::create"/>
    <add id="Magenshop_Recipe::menu_recipe" title="Manage Recipes" module="Magenshop_Recipe" sortOrder="1" parent="Magenshop_Recipe::menu" action="recipe/recipe/edit" resource="Magenshop_Recipe::menu_item"/>

</menu>
</config>


texts: Two files upload is not working in same form in Magento product page

texts:
I have a default Magento 2.4.2.installed on my server. I have a page where there are 2 input types of file upload which is not working together. When I remove one input file type then it is working properly but when i add one more then I am not able to move forward.
The error log is also empty. Please help me in finding the issue.
Please see the attachment.


texts: Magento2: issue with quantity - inventory

texts:
Customers placed orders for product and I see salable quantity goes down. But quantity remains the same. What to do while these values were the same?
https://prnt.sc/zglw51


texts: Magento 2: How can I add sku under product name on minicart for each product?

texts:
I can't find the phtml template for the minicart in the header, I think actually that the information like name, price, quantity etc are rendered with knockout js.

I want to add brand attribute value and sku under the name of each product.

How can I do that? Where are the files that I should override

Thanks!


texts:
I have a product page /new with a product list sorting by "position" by default.
I don't like this sorting because the list never change...

Is there a mean to change this sort only to this page please?


texts: How can I get chosen shipping method in an email PDF using variables?

texts:
I am trying to query the shipping method chosen in order to display an image of shipping method logo i.e Royal Mail, DPD etc

The problem is that I am not very familiar with the way the shipping variable is being parsed to the template using {{var shipping}} so I'm not sure how I could do an IF

For example:

    <?php if('{{var shipping}}' === 'ROYAL MAIL') :?>

<?php echo $this->__("ROYAL MAIL:") ?>

    <?php else :?>

<?php echo $this->__("DPD") ?>

    <?php endif ?>

I know that this isn't the correct way so I wanted to ask how I could query using using these template variables?


texts: Magento Add to Cart Button Change to Add to Quote on some products

texts: Any information on adding "Add to Quote" option in Magento2 website .. for bulk order is highly appreciated.


texts:
I'm writing a maintenance script to tidy up unused customer group tiered prices. How can I programatically get either:
All products that have a tiered price for the selected customer group and then delete the tiered price for that group
OR
Check if a product has a tiered price for the selected customer group and then delete the tiered price for that group.

Bear in mind I don't know the quantity, only the group id so I can't use getTierPrice() as that needs a quantity.

How do I delete the tiered price? Can I just use setTierPrice() and set the price and quantity to 0?


texts: Magento 2.2: What is the definition.map.xml File?

texts:
Magento 2.2 introduced a new file, definition.map.xml.
What is the purpose and intent of this file?  It seems to be related to building the schemaMap property in Magento\Ui\Config\Converter, but none of the GitHub notes really explain the intent of this files or what it's contents are meant to convey.

Other than general curiosity, my main interest is in patching up a tutorial module that's broken in M2.2.


texts:
Salable Qty <> sum(sources)
No idea why. We are testing MSI and Backorders and have use the Ampersand extension to disable reservations. But nonetheless: how can salable qty be incorrect? and more importantly how can we force the system to recalculate it? ore reset it?
Question: Magento2 Salable Qty value is not correct how can we re-calculate this value? List inconsistencies? Fix it?

https://github.com/AmpersandHQ/magento2-disable-stock-reservation


texts: How to Update Customer Password using Magento SOAP API v2

texts:
I am using Magento SOAP API v2 for web services.
I want to update customer password API.

For this I have created a function as follows :

$complexFilter = array(
    'complex_filter' => array(
        array(
            'key' => 'email',
            'value' => array('key' => 'eq', 'value' => $customer_email)
        )
    )
);
$customerData = $soapClient->customerCustomerList($sessionId, $complexFilter);
$match = customerPasswordMatching($customer_old_pwd,$customerData[0]->password_hash);       //it return true if password match
if($match == TRUE)
{
    $customerInfo = array(
        'firstname' => $first_name,
        'password' => $customer_new_pwd,
        'website_id' => $customerData[0]->website_id,
        'store_id' => $customerData[0]->store_id,
        'group_id' => $customerData[0]->group_id);

    $result = $soapClient->customerCustomerUpdate($sessionId, $customer_id ,$customerInfo );
    return $result;
}
else
{
    return array('Success' => 0, 'Message' => 'Wrong Password');
}

This code update customer 'firstname' but not update customer password.

Any one can provide me details how can I update customer password in Magento soap API v2?


texts: How to add product grid in custom module tab

texts:
I want to add product grid in custom module tab in Magento 1.9.x..

How can I achieve this ?


texts:
I have custom module. I want add file my.js in folder app\code\Xanka\Slider\view\frontend\web\js\slider\my.js.
I used code in app\code\Xanka\Slider\view\frontend\layout\default.xml

<head>
    <title>My Slideshow</title>
    <script src="Xanka_Slider::js/slider/jquery.themepunch.plugins.min.js"/>
</head>

is not true.


texts: Can I change Admin Password directly from.... Please HELP!

texts:
Our website developer has not provided us the main Admin ID and Password. so hardly after reading some posts now, I found the admin_user file in the database.

Please find attached screenshot and advice me can I change the  Admin Password directly writing in the Password-Box?


texts: Magento 2.3 keep product / catalog image original size

texts:
When I upload a product image that is for example 2400px * 2400 px in admin. Magento automatically compress it to 1200px * 1200px. Is it possible to tell Magento not to compress my images?

When searching on google, some articles say in Magento 2.3, it is possible to config image quality in admin, but I couldn't find such settings in admin.

I'm using Magento 2.3.1

update:
I have looked in the view.xml, I can find image sizes for thumbnails etc,  but I can't find any values like 1200px.


texts: Buy X Product and Get Y another product free of same category

texts: How to implement and apply Buy X And Get Y another product of same category free in the shopping cart price rules in magento.


texts: Validation message does not go away when "validation-passed"

texts:
I am validating my address fields for numbers.
 In some countries house number is mandatory to make the delivery.
Since I don't care which field the number is written in, I want the validation to be stopped for both fields if one of the fields contains a number.

I came up with this:

var digvalenable = function(){
  var val1 = document.getElementById('street_1');
  var val2 = document.getElementById('street_2');

  if ((/\d/.test(val1.value))  || (/\d/.test(val2.value))) {
    val1.classList.remove("validate-digits");
    val2.classList.remove("validate-digits");

  } else {
    val1.classList.add("validate-digits");
    val2.classList.add("validate-digits");
  }
Validation.validate($('street_1'));
Validation.validate($('street_2'));
}

Which basically adds the validation class if a number is not present and removes it if there is a number.

It works great, except the message for my number validation does not disappear (I can save the value- validation-passed)

EDIT

Currently I am solving this by:

document.getElementById('advice-validate-digits-street_1').style = "display:none";

But this does not have the fade out effect...


texts: Filter Payment Method besed on Shipping Method

texts:
I develop observer method in Magento for filter payment methods based on shipping methods. This is my method:

class Devpassion_Paymentfilter_Model_Observer {

public function paymentMethodIsActive(Varien_Event_Observer $observer) {
$event           = $observer->getEvent();
$method          = $event->getMethodInstance();
$result          = $event->getResult();
$carriers = Mage::getSingleton('shipping/config')->getActiveCarriers();

    foreach ($carriers as $carrier) {
 //       $carrierCode = $carrier->getId();

        if ($carrier->getId() == 'flatrate' ){
                if($method->getCode() == 'checkmo' OR $method->getCode() == 'paypal_standard'){
                    $result->isAvailable = true;
                }else{
                    $result->isAvailable = false;
                }
            }

         }
    }
}

Results of this is that for all shipping method this filter is true. So for all shipping method paypal and money check shows up and all other not.

Please advice me how to set up this condition to filter just for one specific shipping method.


texts: How to add a mini log-in form in the left bar of home?

texts:
English is not my native language so apologies in advance for bad grammar.

I am building a Magento page, but I need a mini-login form showing at the left-bar if the user is not logged in. If it is, show the user's shopping cart.

Searching for an answer I ended up with this: https://stackoverflow.com/questions/2931195/magento-add-login-myaccount-widget-in-sidebar, but the answer does not give a proper way to do it.


texts:
I couldn't find how i could overwrite any model of order to create a new attribute like "qty" for every item_order .

Could anyone helps me?


texts: In Magento2, there were so many css and js files are missing after moving the site from local to live server. So I just deleted the pub/static/adminhtml folder. After that, adminhtml folder is not created yet. But in local, If I delete those folder, it is again regenerating. Why is it not happening in live server. Any permission problems? Please help here.


texts: override only specific part of catolog product save page

texts:
Any way to override(changing behaviour) catalog product save page only specific part ? or only way create new phtml and declare all attributes ?
for example i have custom attributes on catalog products, and i want change their behaviour (add some custom jquery just some of them), but did not want to override full page?


texts: how to add pagination on custom collection in Magento 2

texts: I am working on custom module. How can i use default magento pagination with my custom collection and also set custom limits on that?


texts: SSH commands stopped working after updating Magento to 2.4.0

texts:
After updating Magento to 2.4.0, When doing any SSH command, it shows Constant name is expected.
I found the issue is coming from the file vendor/magento/framework/Data/Argument/Interpreter/Constant.php.
So I added a line print_r($data);exit; in the following if condition
if (!isset($data['value']) || !defined($data['value']).
Then when I do Magento SSH commands, it showing the following error:
Array
(
  [name] => code
  [value] => Magento\Braintree\Model\Ui\ConfigProvider::CODE
)

Any help greatly appreciated.


texts: Redirect to Cart page instead of payment page while checkout in Magento

texts:
While checkout in Magento, after providing checkout method, Billing information, Shipping information,Shipping method, Payment information the site is redirecting to cart page.

That is in Payment information section we can select the payment gateway (here either paytm or ccavenue), after selecting any payment gateway option the site is redirect to cart page instead of payment page.

EDIT

When I click continue button after selecting the payment gate way(paytm or ccavenue) I got error in console:

...checkout/onepage/savePayment/  500 Internal Server Error


texts: Will the installed third party plugins upgrade when we upgrade Magento version via composer

texts:
Currently, our Magento store running with the version Magento 2.2.3. We have upgraded the Magento version to Magento 2.2.6 via composer.

We would like to know that the installed third-party plugins will upgrade automatically when we upgrade the Magento version via Composer?

Please reply with your sweet answer!


texts: I am having massive trouble setting up a cron job in Magento 2

texts:
Sorry if this has already been answered, but I have looked around and have been unable to find the help, I've followed countless tutorials etc, just can't get my head around it.

So I have a Magento 2.1.0 website running, but It needs the standard Magento cron jobs that do the The following tasks.

Catalog Price rules
Sending Newsletters
Generating Google Sitemaps
Customer Alerts/Notifications (product price change, product back to stock)
Automatic updating of currency rates
Scheduled DB logs cleanup

However, when I try via SSH I get permission error when entering this command, so am unable to progress further, despite using the system username that has the valid permissions:

*crontab -u magento_user -e*

So I have tried doing it via plesk, but I get a "No such file exists error" when using this command (using my details obviously):

* * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log

Apparently Magento.cron.log doesn't exist.

I'm stuck right now, and just really need to get this sorted. I have looked through the files through ftp, and I can't find the cron.php file everywhere seems to be referring too, so i'm completely baffled right now. Does anyone know what I am doing wrong, or what I can do to find out what the issue is.

Thank you for any help in advance.

Kind regards


texts: Magento 2 - Page Speed Insights / Lighthouse Audits vs webpagetest site performance

texts:
I noticed recently the Google page speed insights has improved somewhat, shows a lot more information however is harsh especially it seems for Magento 2 (I can get 98 so far from other non Magento 2 websites).

I am used to being able to getting Page Speed insights scores into the 80s and 90s with some light tweaks although felt this was just ticking check boxes (deferring resource, using optimised images, gzip and caching resources, avoiding redirects etc) and now it seems a bit more real based on performance of the site. Now however I am looking at scores of 30 ish.

I'm concerned as although testing my sites do not feel overly slow I have always thought Magento 2 seems a bit weighty especially on the JavaScript side with a lot going on client side on page load slowing the "time to interactive" that shows with 3G mobile audit to around 15 seconds.

I have recently took a few steps to improve including no longer merging JavaScript as this seems to make my page size considerable larger i think about 5MB down to 2MB was what I witnessed. Deferring loading of images. Further improvements . I am using already HTTP2 especially since dropping merging of JS there are a lot of separate resources this may help. Using WEBP for example instead of JPEG etc for catalog images.

I'm posting this question as want to know if everyone else is as bad and what measures you have taken to improve these poor scores?

I guess at the end of the day it is all relative and everyone will get worse scores I'm just slightly concerned Magento may be hit harder than other eCommerce platforms and not sure on the SEO side of this but would like to at least try and improve as this cannot be good... Further tests on competitor sites shows some sites still in the 60-70 range this seem to be on much lighter eCommerce platforms.

below are the screen for reference for performance screens comparing with webpage test and lighthouse (googlepagespeed insights)

below lighthouse

some one said like below after installing below link extension it increased but those link not working
 https://developers.google.com/speed/pagespeed/module/
any one give suggestion it will help for me


texts: Magento 2: Where are the Token-based authentication access token stored?

texts:
I have been following along with this guide: https://devdocs.magento.com/guides/v2.3/get-started/authentication/gs-authentication-token.html

This guide shows how a token can be requested and shows how a token can be used in a request. However, it does not show how a token can be revoked or removed. Do you guys know where the tokens are stored and how we can view/revoke them?

Thank you


texts:
I followed this article to how to add manually rich snippets in Magento. so i want to add the breadcrumbs part.

This is the breadscrumbs.phtml content:

<?php if($crumbs && is_array($crumbs)): ?>

        <?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
            <li class="<?php echo $_crumbName ?>" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
            <?php if($_crumbInfo['link']): ?>
                <a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>" itemprop="url"><?php echo $this->htmlEscape($_crumbInfo['label']) ?>
            <?php elseif($_crumbInfo['last']): ?>
                <?php echo $this->htmlEscape($_crumbInfo['label']) ?>
            <?php else: ?>
                <?php echo $this->htmlEscape($_crumbInfo['label']) ?>
            <?php endif; ?>
            <?php if(!$_crumbInfo['last']): ?>
                &rsaquo;
            <?php endif; ?>

        <?php endforeach; ?>

<?php endif; ?>

In the webmaster you can see that the breadcrumbs it is loaded. But it does not shown in the result. Any ideea what I am missing ?


texts: Magento translations problem, parts of the translation dont take effect

texts:
I have created and using Magento translations. Translations are placed under app/locale/language_LANGUAGE.csv

After the installation I figured out that some parts of translations dont work. CSV is perfectly fine, I have translated ALL fields that I need, and I have double checked that.

For some fields I had to use inline translations so I searched phtml and php files and edited translations manually. Its a weird thing, because I now have ie some phtml files with 8 fields that are translated from CSV, and one field that is translated manually.

Had someone this problem before? Why does not some parts of translations work?

Thanks


texts: Magento 2: de_DE language pack not applying to de_AT

texts:
I am new to the Magento world and certain things are a little bit complicated for me. For example I have language pack for german language (code de_DE) purchased and installed. However my shops primary country is set to austria (de_AT).

Now all the language parts appear in english, instead of falling back to the german language. I can however create my own translation (or copy the one I have) for de_AT and then it works, but this is not desired as it creates duplicates and makes the language strings not undateable via the web setup wizard.

How can I achieve my language pack to be used? Shouldn't the fallback be on the main language part and thus fallback to de_DE anyway?

Hope anybody can help.


texts: Magento color swatches add pictures one time

texts: I've just managed to get the default color swatche from Magento 1.9.1. working. Now I've noticed that for each product the swatches should be uploaded to the product images. Isn't it possible to upload them once foreach attribute value?


texts:
After having had some problems while trying to upgrade Magento 2, or when installing new modules, I often find the suggestion of "using Composer" to do it.

However, as a designer (not really a developer) when I search about it on the internet, I find articles that describe advanced stuff, all sort of details assuming I know what it's all about, which unfortunately is not the case.

Is Composer installed on my local machine? Or in the server? Will it help upgrading / installing new modules?

I do not fear the command lines but I just don't get the general picture yet.
Do I need to dig deep in the server to have it working?

Thanks,


texts: Zend_Mime_Part could not be converted to string magento 2

texts:
I am implemented functionality to change store info in email templates, for that I have created plugin

public function aroundSendMessage(\Magento\Framework\Mail\TransportInterface $subject, \Closure $proceed){

        $message = $subject->getMessage();
        $body= str_replace("post@example.com","hello@hello.com", $message->getBody());
        $message->setBody($body);
        $message->setReplyTo("heelo@heelo.hff");
        try {
            $proceed();
        } catch (\Exception $e) {
            throw new \Magento\Framework\Exception\MailException(new \Magento\Framework\Phrase($e->getMessage()), $e);
        }
}

But am getting below error

  Recoverable Error: Object of class Zend_Mime_Part could not be
  converted to string


texts: Module with cron job to fetch all products where custom attribute is true

texts:
I am brand new to Magento module development, and I need some help getting started. My goal is relatively simple: I'd like to create a module which fetches all products with a custom attribute 'amazon_ready' set to true, saves these out to a file, and then sets that attribute for all those products back to false. I'd like this to happen every 24 hours.

So far, I have set up a simple cron module using the example found here.

<?php
namespace SuttersMill\AmazonCron\Cron;
use \Psr\Log\LoggerInterface;

class Test {
    protected $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;
    }

    /**
       * Write to system.log
       *
       * @return void
       */
    public function execute()
    {
        $this->logger->info('Cron Works');
        // Code to pull in product entities from datastore.
    }
}

How do I get all products where the custom attribute is set to true? Any pointers in the right direction would be immensely helpful.


texts: Keeping Local Magento Plugins In Sync With Heroku Servers

texts:
Locally I have the Fishpig wordpress plugin installed so I can develop our theme and some of our custom modules.

When I push to our Heroku servers (that connect to an AWS RDS database) the plugin is not listed on the Magento Connect page.

How do I keep locally installed plugins in sync with the live version?


texts: Create custom option programatically in magento 1.7.0.1

texts:
I m creating custom optoin programatically on catalog_product_save_after event .but the problem is when observer run it will create 3 to 4 same option instead of just create one option on save.one another problem is when there is no custom option in product it will not create any option when i create just one option manualy and then save it will work.

Observer code

public function createMyCustomOption(Varien_Event_Observer $observer)
    {
        $product = $observer->getProduct();
        $options = $this->getOptions('test','drop_down',8,40,1);
        $product->setHasOptions(1);
        $option = Mage::getModel('catalog/product_option')
                  ->setProductId($product->getId())
                  ->setStoreId($product->getStoreId())
                  ->addData($options);
        try {
            $option->save();

        }catch (Exception $e){
            echo $e->getMessage();
            exit('error');
        }
        $product->addOption($option);

        //echo '<pre>';

        //print_r($options);
        //exit;
        //$productmo = Mage::getModel('catalog/product')->load($product->getId());
        //$productmo->setProductOptions($options);
        //$productmo->setCanSaveCustomOptions(true);
        //$productmo->setHasOptions(1)->save();
        //return;

    }

    protected  function getOptions($title = '',$type='',$for=NULL,$price=1,$isrequired = 1){

    $optionvalue = array();
        for($i=1;$i<=$for;$i++)
        {
            $optionvalue[$i]['title'] = $i;
            $optionvalue[$i]['price'] = $i*$price;
            $optionvalue[$i]['price_type'] = 'fixed';
            $optionvalue[$i]['sku'] = '';
            $optionvalue[$i]['sort_order'] = $i;
        }
        $option = array(
                'title' => (string)$title,
                'type' => $type, // could be drop_down ,checkbox , multiple
                'is_require' => $isrequired,
                'sort_order' => 0,
                'values' => $optionvalue
                );

        return $option;
    }


texts: magento 2.1 header is visible on checkout page

texts:
I am working on Magento 2.1.10. Header and footer are visible at my checkout page. I don't know where I am wrong.

One thing that I can confirm is I did't override any checkout layout file to display the header and footer on the checkout page.

Please guide to fix this.


texts: How to get Meta data in title.phtml on Magento2

texts:
I am trying to get the current pages meta data in title.phtml on Magento 2 so that I can have a sub title and slight description on the page.

But I cant find anything for how to retrieve this information, only how to set it.

I have tried things like:

$this->pageConfig->getTitle();

and

$this->getLayout()->getBlock('head')->getTitle();

and

$resultPage->getConfig()->getTitle()

But all without success. I know this is all quite new at the moment but can anyone tell me how to do this?


texts:
I have installed APC cache in my magento website. It has two website(For AU and NZ). After configuring apc with 512M , 4GB memory left. I have setup with this configuration.

apc.cache_by_default    1
apc.canonicalize    1
apc.coredump_unmap  0
apc.enable_cli  1
apc.enabled 1
apc.file_md5    0
apc.file_update_protection  2
apc.filters
apc.gc_ttl  3600
apc.include_once_override   0
apc.lazy_classes    0
apc.lazy_functions  0
apc.max_file_size   1M
apc.mmap_file_mask
apc.num_files_hint  1024
apc.preload_path
apc.report_autofilter   0
apc.rfc1867 0
apc.rfc1867_freq    0
apc.rfc1867_name    APC_UPLOAD_PROGRESS
apc.rfc1867_prefix  upload_
apc.rfc1867_ttl 3600
apc.shm_segments    1
apc.shm_size    512M
apc.shm_strings_buffer  4M
apc.slam_defense    1
apc.stat    1
apc.stat_ctime  0
apc.ttl 7200
apc.use_request_time    1
apc.user_entries_hint   4096
apc.user_ttl    7200
apc.write_lock  1

In app/etc/local.xml, I have put this code inside global tag

<cache>
     <backend>apc</backend>
     <slow_backend>database</slow_backend>
     <prefix>MYSTORE_</prefix>
</cache>

Problem is that, After configuring APC , site worked well for 2hr, then it stops working. then if we restart apache, it start working again but after 2 hour it stop again.

Is there is any wrong configuration we did or missed.

Please help


texts:
The Magento Luma theme has a functionality where you can zoom_in or zoom_out the product image in the pop-up gallery.

I would like to know how can I add or configure the same in a custom theme (Claue Magento 2 Theme), the theme does not have this functionality and doesn't use the Magento_blank theme as the parent theme.


texts: Magento 2: Google search index issue URL is not available to Google - Redirect error

texts:
I have installed the GeoIP Store Switcher module. When I enter my site's internal URL for example- xyz.com/women/tops
It redirects me to the specific store page which is fine but it shows
the error in Google Search Console showing URL is not available to  Google as shown in the screenshot.

By Request Indexing, it will show a below error,

In My Module, I have a post-dispatch observer that is redirecting to
the store page based on IP address. In the below code, that's how I'm redirecting to the store page.

$urlInterface = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Framework\UrlInterface');
$redirecturl = $urlInterface->getCurrentUrl();
$redirecturl = str_replace($this->storeManager->getStore()->getBaseUrl(), '', $redirecturl);
$redirecturl = explode('?', $redirecturl);
$observer->getControllerAction()->getResponse()->setRedirect($store->getBaseUrl().$redirecturl[0]."?geoipss_redirect=1&gipss_store_id=".$storeId);

NOTE:- After disabling the module, it will show no error in the
Google search console. I debugged the code and it was from the
observer code which I mentioned above. If I comment setRedirect()
then there is no error showing in google search

Let me know If anyone has any idea.


texts:
I'm trying to find the best practice in order to do a cart validation before an order is placed. if the cart meets my requirements the order should proceed. If not it should show a custom error message and prevent the order from being created.
Any good tips on how to achieve this?
I created a preference for Magento\Checkout\Model\PaymentInformationManagement and do the validation on the savePaymentInformationAndPlaceOrder method but I'm not feeling confortable with this solution and was hoping to do this via a plugin or an observer :)
Thanks in advance !


texts: Magento 1.9.0.1: product detail page showing white page for all the products?

texts:
Product detail page is showing white page for all the products in Magento 1.9.0.1?

Any help would be apppreciated


texts: Order Status : Pending Payment vs. Payment Review

texts:
I'm creating an integration for a Payment Service Provider / Payment Gateway, but I'm a bit stuck in the way how Magento handles stuff.

The payment method in question returns a "pending state" with a redirect URL to send the customer to. When the customer returns from that URL, a status update or asynchronous webhook can be send that can either result in a successful payment or in a failure. If the latter is the case, the order should be cancelled.

I'm sticking as much as possible to the default way on how to do this in Magento. This means that if I get the "pending state" from the gateway, I mark my payment transaction as "pending" meaning that some approval needs to take place at the payment gateway:

$redirect = $response->getBody()->getRedirect()->getUrl();

$paymentModel = $order->getPayment();
$paymentModel->setAdditionalInformation('redirect', $redirect);
$paymentModel->setAdditionalInformation('transaction_id', $response->getBody()->getTransaction()->getId());
$paymentModel->setIsTransactionPending(true);
$paymentModel->setTransactionId($response->getBody()->getTransaction()->getId());

By setting the "pending"-flag, the \Magento\Sales\Model\Order\Payment\Operations\CaptureOperation::capture()-operation will not mark the invoice as paid:

$message = $this->stateCommand->execute($payment, $amountToCapture, $order);
if ($payment->getIsTransactionPending()) {
    $invoice->setIsPaid(false);
} else {
    $invoice->setIsPaid(true);
    $this->updateTotals($payment, ['base_amount_paid_online' => $amountToCapture]);
}

The $message that is set also shows me I'm in the right direction:

\Magento\Sales\Model\Order\Payment\State\CaptureCommand::execute():

if ($payment->getIsTransactionPending()) {
    $state = Order::STATE_PAYMENT_REVIEW;
    $message = 'An amount of %1 will be captured after being approved at the payment gateway.';
}

So if I understand correctly, if some action is required by the gateway, the "payment review"-state is used.

Now later on, if the asynchronous event is received, I can simply get my invoice and mark it as being paid:

$invoice = $order->getInvoiceCollection()->getLastItem();
$invoice->pay();

So far, everything works perfectly. But: if my payment fails I want to cancel my order. I thought this would be as simple as just doing $order->cancel(), but the \Magento\Sales\Model\Order::canCancel()-method that is triggered, checks if the order is in the payment review-state, and if so, it does not allow cancellation. (please correct me if I'm wrong).

So now the question is: what to do? Should the order state be "pending payment" instead of "payment review"? If so: what is than the most friendly way to set this property using default Magento mechanics? Because if I look for usages of the "pending payment" state in the code, it doesn't look like this state is set by Magento itself (at least not using it's constant). The weird part is that if I tell Magento that a transaction is pending, the status becomes payment review. :-/

Is it even accepted in general to cancel an order that has the "payment review" state?


texts:
On the homepage I have a section where I load some products of a certain category. I want to display the review stars of a product below the title if the product has review. Normally I do this with the following code:

<?php if($_product->getRatingSummary()): ?>
    <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
<?php endif; ?>

But that doesn't display the stars, when I delete the IF statement around it, it will display the stars but also for the products that doesn't have reviews...

Did I do something wrong? Maybe a setting somewhere I don't know about?

Magento version: 1.9.3.4


texts: How to filter product collection by price after tax?

texts:
I am trying to filter product collection by price range:

$this->getLoadedProductCollection()->clear()
     ->addAttributeToFilter('price', array( 'lt' => 500 ) )
     ->addAttributeToFilter('price', array( 'gt' => 100 ) )
     ->load();

this works fine however Magento uses price before tax to select the range and I would like to select by price after tax.

Is there a filter property, like 'price_after_tax' that contains this value?
If not can somehow the current tax be calculated from the input range values? I could then calculate net price range.

Any other advice would be highly appreciated. Thanks!

The only option for me is to deal with this issue programmatically, from module's level. I would rather not change Magento's configuration(product's are already uploaded, other custom modules installed).


texts: Customer Login not working after data migration From Magento 1.4.1 to Magento 2.3.3

texts: I have migrated data from Magento 1.4.1  to Magento 2.3.3 using Magento Data Migration tool. Data has migrated successfully but Magento 1 customer login not working in Magento 2.3.3. I know there is a password_hash issue. I already tried the command php -f bin/magento customer:hash:upgrade. and I also truncate the table "customer_entity_var" still  no luck.


texts:
I have a custom module, which basically adds social media login in magento. However I am facing an issue with core/session which I dont know how to resolve.

I am adding my custom blocks in customer login page via my own layout xml file. Every block is loading successfully. One of my cusotm block is setting a variable in core/session through it's _construct() method as like this.

File : app\code\local\Mynamespace/Mymodule/Block/Entity/Someblock.php

<?php
class Mynamespace_Mymodule_Block_Entity_Someblock extends Mage_Core_Block_Template
{
     protected function _construct() {
        parent::_construct();

        // CSRF protection
        $csrf = md5(uniqid(rand(), true));
        Mage::getSingleton('core/session')->setGoogleCsrf($csrf);
        $this->client->setState($csrf);

    }

}

I ensured that, session variable is set when the page loads. Now in the next process/request, I need to validate google_csrf variable that is set in core/session. But the problem is Mage_Core_Model_Session appears to be empty in the next process. Suppose I need to validate session during the request of url www.domain.com/frontname/google/connect, then I checked core/session in the corresponding controller file like this.

File : app\code\local\Mynamespace/Mymodule/controllers/GoogleController.php

public function connectAction()
{
   print_r(Mage::getSingleton('core/session'));die();
}

But it outputs Mage_Core_Model_Session with no variable set in it. Why it happens like this?

More info: actually the block in question is used to show google button in frontend. When click on that button, it will force user to authenticate him with google account. I am checking core/session in the controller that processes the redirect url. I am getting the response successfully. But core/session that set before this action seems empty.

You have any thoughts about it ? Let me know.


texts: Product Attribute not showing on the Front End

texts:
I have been trying to get an option to appear, on the front end. I can see the attribute in the back end of Magento. It is a text field I have entered some default values in to the text field and saved it.

I have reindex the site and flushed the cache, and cleared my browser cache, but I cannot see my new attributes.


texts:
Here my code:

 public function getTime(){
       $store = $this->getStoreId();
       $mapping_time = $this->scopeConfig->getValue(self::XPATH_HOURMAX, ScopeInterface::SCOPE_STORE, $store);
       $postTime = unserialize($mapping_time);
       $time_array =array();
       foreach ($postTime as $key => $value) {
       $time_array[trim($value['field1'])] =
     [
        trim($value['field1']),
        trim($value['field2'])
    ];
     }
       return $time_array;
}

Actual result :

output:

my expection is:

   value                  option
9:30 AM - 2:30 AM : "9:30 AM - 2:30 AM "
6:30 AM - 9:30 AM : "6:30 AM - 9:30 AM "
3:30 AM - 9:30 AM : "3:30 AM - 9:30 AM "


texts: How i can change advance search url /catalogsearch/advanced/ to /catalogsearch/result/ in magento1


texts:
Every time I am getting the following message:

  Fatal error: Allowed memory size of 268435456 bytes exhausted (tried
  to allocate 81 bytes) in /public_html/lib/Varien/Object.php on line
  270

However, I already have php_value memory_limit 2048M in my .htaccess .which is kinda ridiculous.

Is there a way to see why its using loads of memory?


texts: Magento 2: How To Setup Multi Website with Subdomain

texts:
I want to setup multiwebsite in Magento 2.
I want to setup multiwebsite in that way, So another website open like this URL demo.mydomain.com.

Hope you all can understand.
Thanks in advance.


texts: How to Show Category Filter In Sidebar Magento2

texts:
Actually, I want to show Category Filter in Sidebar which Magento provide by default.

I also show category to Is Anchor "Yes" but still filter is not Displaying.
So anything missing from my side?
or is there any configuration remain?


texts: Magento 2 Ui Component Difference between  &  node

texts:
I am developing one custom module in Magento 2.2.2 where I have referenced some internet blog and Magento core extension like cms-page or cms-block. In their grid_listing.xml files wrote code something like below

<columns name="cms_page_columns">
<column name="title">
            <settings>
                <filter>text</filter>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">true</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
                <label translate="true">Title</label>
            </settings>
        </column>
</columns>

And some blog referenced in grid_listing.xml are like below

<columns name="cms_page_columns">
<column name="city">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">City</item>
                    <item name="sortOrder" xsi:type="number">30</item>
                </item>
            </argument>
        </column>
</columns>

So I want to know the difference between <settings> & <argument> node.
And which method I have to follow for future development.


texts:
We currently are using the api to update inventory via a vb.net service which works but appears that until we update the 'Stock Status' index manually the updated status doesn't show properly for products that had been changed.

Is there a way to change stock status index via the api?  Looks like we have to do something with cataloginventory_stock (code 8).

Here is my current code on how I update a product.

Dim myStock As New catalogInventoryStockItemUpdateEntity
myStock.qty = 10
myStock.is_in_stock = 1
myStock.is_in_stockSpecified = True
myStock.manage_stock = 1
myStock.manage_stockSpecified = True
Dim iRetVal As Integer = ws.catalogInventoryStockItemUpdate(sessionId, sMagentoSku, myStock)


texts: IMPORTING Products - error "Skipping import row, required field "weight" for new products is not defined."?

texts:
Hi Ive seen the error for "sku" but not for "weight"?

Skipping import row, required field "weight" for new products is not defined.

Its in my xml file but i keep getting that error any one KNOW why?

FOUND IT

Weight

The Weight field is mandatory. If you don’t know the weight for this product, just enter 1.

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/adding-a-new-product


texts: Magento2 - Is sale payment action of Paypal payment not work in test environment site?

texts:
I just changed payment action from authorisation to sale in the Paypal configuration in the Magento2.
But after this, the live transaction is not working.
It shows "Declined: 10626-Transaction refused due to risk model".
Earlier when the payment action is set as authorisation, the live transactions are worked in my dev site but sale payment action is not working.
Is the sale payment method will not work in the test site?


texts: After installing Magento 2.4.1 on windows machine using XAMPP I'm getting two error messages

texts:
Deprecated: Method ReflectionParameter::getClass() is deprecated in F:\xampp\htdocs\mag\vendor\magento\framework\Code\Reader\ClassReader.php on line 34
Parse error: syntax error, unexpected token "match", expecting identifier in F:\xampp\htdocs\mag\vendor\magento\module-elasticsearch\SearchAdapter\Query\Builder\Match.php on line 20
I have already install composer 1.10.19 and ElasticSearch 7.10.1 Not getting any error message during installation but when I open localhost in the browser just showing the above error message. Clean and flush command used but nothing is changing.


texts: Magento 2 : Customise Admin Dashboard Tabs using custom module

texts:
How can i customise the admin dashboard tabs, to add new tab here is a screenshot.

Please Suggest any solution.


texts: Magento 2: Multisite not linking correctly

texts:
I will have 3 websites (each with their own website/store/store view), but at the moment they are all on one test site example.com. I want a Spanish and French language, I have that working, but instead of going to example.com/es/ I have to go to example.com/es/es/.

I have set Add Store Code to Urls to yes because if I don't then the /es won't work. The base url of the Spanish site is set to example.com/es/. If I use {{config path="web/unsecure/base_url"}} then it will only link to example.com/es/ and that won't load the page.

I did create an es folder and symlink app, bin, dev, lib, pub, setup, update, var, vendor and copied the .htaccess and index.php file into that folder. The .htaccess is the default Magento 2 one and in the index.php I put in

Here is the index.php file:

$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'es';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication('Magento\Framework\App\Http');
$bootstrap->run($app);

Eventually the websites will be access via example.com, example.es, and example.fr. For testing purposes I need them to be accessible from example.com, example.com/es/, and example.com/fr/. I am unsure what is the issue with the url.

EDIT:

The following will return example.com/fr/fr/

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
$baseUrl = $storeManager->getStore()->getBaseUrl();

While:
{{config path="web/unsecure/base_url"}} will only return example.com/fr/.

Why does {{config path="web/unsecure/base_url"}} not return the same url as the php example?


texts: Product detailed page get 404 in one store view

texts:
I have 2 store views. One is in Chinese and another one is in English. After I import the product information programmatically. Only the store view in the Chinese could display the product detailed page. The store view in English gets 404. I found in url_rewrite table only Chinese store view have rewrite record like the following:

store_id = 1 is the Chinese store view. but there is no record for the English store view whose store_id = 2.


texts: Magento - Add customer email into Address Templates HTML

texts:
I need to show the customer email on my order confirmations in the Shipping Information section. I know it is called in:

System > Configuration > Customers > Customer Configuration > Address Templates

like so: (telephone number as example)

{{depend telephone}}Contact Number: {{var telephone}}

I have tried:

{{depend email}}Email Address: {{var email}}

and

Email Address: {{var order.getBillingAddress().getEmail()}}

but both come up empty. Is this possible?


texts: dockergento amasty elasticsearch can't find products

texts:
I thought it was a problem of elasticsearch version, updated it still same error, tried reindexes and so on... on admin page everything seems to be fine anchor->yes and so on.
used that link looked like a fix and solution but after modifying my code and saving new 'elasticsearch' from admin I had nginx 502 error (on a specific page where the products must be).
any suggestion? I also used some queries,

CREATE OR REPLACE VIEW inventory_stock_1 AS select distinct legacy_stock_status.product_id AS product_id, legacy_stock_status.website_id AS website_id, legacy_stock_status.stock_id AS stock_id, legacy_stock_status.qty AS quantity, legacy_stock_status.stock_status AS is_salable, product.sku AS sku from ( cataloginventory_stock_status legacy_stock_status join catalog_product_entity product on (( legacy_stock_status.product_id = product.entity_id )));

multiple reindexes. still nothing


texts: Local.xml file code to remove "Disc Coupon" & “Shipping/Tax” Blocks in Magento 1.9 not working?

texts:
I have created a local.xml file in folder:

/app/design/frontend/default/MAG090172/layout

Code:

<?xml version="1.0" encoding="UTF-8" ?>
<layout>
<checkout_cart_index>
   <remove name="checkout.cart.shipping" />
</checkout_cart_index>
<checkout_cart_index>
        <reference name="content">
            <block name="checkout.cart">
                <remove name="checkout.cart.coupon"/>
            </block>
        </reference>
    </checkout_cart_index>
</layout>

* Unfortunately, it's NOT removed the 2 blocks from Shopping Cart Page .

Is the file in correct folder ? Is syntax of code correct ?

Pls help.


texts:
I wish to wish split my cart according to the item. At a time I want to checkout with one product.For multiple products, cart will split into multiple carts and user at a time can checkout with one product.

Thanks in advance :)


texts: Why would the content area for a page say

texts: I inherited an account from someone. I went to make changes to a pages content and in the Content Area it is blank and simply says "in PhP file". And the page editor no longer works. What did the developer do to override the normal editor? Can I fix it back?


texts: Magento 2.3.2 custom Cron status is always missed or pending

texts:
Magento 2.3.2 custom Cron job won't run. Status is always missed or pending and next time it is not working
<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
    <job name="pending_ordersftp" instance="Epok\OrderManagementFtp\Cron\PendingOrders" method="execute">
        <schedule>*/5 * * * *</schedule>
    </job>
</group>
</config>


texts: I am using crontab for magento task and it providing this error

texts:
SQLSTATE[42S02]: Base table or view not found: 1146 Table
  'dilsebol2.wd_feed' doesn't exist

Zend_Db_Statement_Exception' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dilsebol2.wd_feed' doesn't exist, query was: DESCRIBE `wd_feed`' in /var/www/html/dilsebol2/lib/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /var/www/html/dilsebol2/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/html/dilsebol2/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/html/dilsebol2/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/html/dilsebol2/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DESCRIBE `wd_fe...', Array)
#4 /var/www/html/dilsebol2/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('DESCRIBE `wd_fe...', Array)
#5 /var/www/html/dilsebol2/lib/Zend/Db/Adapter/Pdo/Mysql.php(171): Varien_Db_Adapter_Pdo_Mysql->query('DESCRIBE `wd_fe...')
#6 /var/www/html/dilsebol2/lib/Varien/Db/Adapter/Pdo/Mysql.php(1596): Zend_Db_Adapter_Pdo_Mysql->describeTable('wd_feed', NULL)
#7 /var/www/html/dilsebol2/app/code/core/Mage/Core/Model/Resource/Abstract.php(212): Varien_Db_Adapter_Pdo_Mysql->describeTable('wd_feed')
#8 /var/www/html/dilsebol2/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(586): Mage_Core_Model_Resource_Abstract->_prepareDataForTable(Object(Whirl_Productrecommendation_Model_Wdfeed), 'wd_feed')
#9 /var/www/html/dilsebol2/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(449): Mage_Core_Model_Resource_Db_Abstract->_prepareDataForSave(Object(Whirl_Productrecommendation_Model_Wdfeed))
#10 /var/www/html/dilsebol2/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Whirl_Productrecommendation_Model_Wdfeed))
#11 /var/www/html/dilsebol2/app/code/community/Whirl/Productrecommendation/Model/Observer.php(60): Mage_Core_Model_Abstract->save()
#12 /var/www/html/dilsebol2/app/code/core/Mage/Core/Model/App.php(1338): Whirl_Productrecommendation_Model_Observer->addProductViewedEntry(Object(Varien_Event_Observer))
#13 /var/www/html/dilsebol2/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Whirl_Productrecommendation_Model_Observer), 'addProductViewe...', Object(Varien_Event_Observer))
#14 /var/www/html/dilsebol2/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('catalog_control...', Array)
#15 /var/www/html/dilsebol2/app/code/core/Mage/Catalog/Helper/Product.php(354): Mage::dispatchEvent('catalog_control...', Array)
#16 /var/www/html/dilsebol2/app/code/core/Mage/Catalog/Helper/Product/View.php(121): Mage_Catalog_Helper_Product->initProduct(83, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#17 /var/www/html/dilsebol2/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(83, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#18 /var/www/html/dilsebol2/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#19 /var/www/html/dilsebol2/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#20 /var/www/html/dilsebol2/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 /var/www/html/dilsebol2/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#22 /var/www/html/dilsebol2/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#23 /var/www/html/dilsebol2/index.php(87): Mage::run('', 'store')
#24 {main}


texts: move top link to header wrapper before mini-cart in header magento 2

texts:
I want to move top link to header wrapper before mini-cart.When I move
  Sing-in and Create an account missing in mobile. source in default.xml

<move element="top.links" destination="header-wrapper" />


texts: Magento2 : not able to unselect all option of custom multi select attribute

texts:
Magento2 - not able to unselect all option of custom multi select attribute. i searched and found that need to change value 1 of <can_be_select>0</<can_be_select> in system.xml  but dont know on what is the path.can you tell me complete exact path if i am right.

please don't tell me just this half path.

etc/adminhtml/system.xml

Because i know that but i want to know in which core modules's sitemap.xml i have to do change


texts: Not able to initialise the JS library on checkout page to utilize it on click of place order

texts:
I have a library in JS at this path in a module.

magento2\app\code\vendor_name\module_name\view\frontend\web\script.js

And it is initialised to the header with the following code:

checkout_index_index.xml

       <script src="Roman_hello::js/view/hello-init.js"/>
</head>

And require-config.js file in
vendor_name\module_name\view\frontend

with the following code:

var config = {
    map: {
        '*': {
            lazyloadScript:'vendorname_modelname::library/dist/libscript.min.js'
        }
    }
};

And on click i call the initialised library to the default.js at this path.

vendor_name\module_name\view\frontend\web\js\view\payment\default.js

but as always this gives error default.js:31

  Uncaught (in promise) ReferenceError: default_var is not defined at
  default.js:31

below is the default.js file.

define(
    [
        'uiComponent',
        'Magento_Checkout/js/model/payment/renderer-list'
    ],
    function (
        Component,
        rendererList
    ) {
        'use strict';
        rendererList.push(
            {
                type: 'payment',
                component: 'vendor_module/js/view/payment/method-renderer/iostpay-method'
            }
        );
        return Component.extend({});
    }
);
 function log(msg) {

      console.log( msg ) ;
    }
 var transfer;
    document.addEventListener("DOMContentLoaded", async function(event) {
      await new Promise(done => setTimeout(() => done(), 500));

      IWalletJS.enable().then(function(account) {
        if(!account) return;

    const iost = IWalletJS.newIOST(IOST);

        transfer = function() {

          const tx = iost.callABI("token.iost", "transfer", ["iost", account, 'account****', "10", "dapp test memo"]);
          tx.addApprove("iost", "10");

          console.log(tx.getApproveList());
          iost.signAndSend(tx)
            .on('pending', function(txid) {
              log("txid: " + txid);

            })
            .on('success', function(result) {
              log("res: " + JSON.stringify(result));

            })
            .on('failed', function(failed) {
              log("failed: " + JSON.stringify(failed));

            })
        }

      })
    })

what thing am I missing?


texts: Magento is giving a discount which applies in the total and another method which is applying the custom price. I don't want to change the price. I just want to change in the subtotal and total price. Does anyone have any solution for this?


texts: Inconsistent cart issues - "cannot remove the item" - Magento 1.9.2.1

texts:
On www.napitdirect.co.uk (running Magento 1.9.2.1 - which we are unable to update unfortunately) we are sometimes unable to remove products or even alter the quantity in the shopping cart. It's not a consistent issue so it's difficult to diagnose but does happen regularly.

The issue can occur after adding any product to the cart and results in the message "cannot remove the item" so my first thought was that it was related to the SUPEE 7405 patch issues (https://community.magento.com/t5/Security-Patches/SUPEE-7405-Cannot-remove-the-item-from-Cart/td-p/27126) but it doesn't seem to relate to form_key and it's not a consistent issue as indicated in everything else I can find (though happens regularly enough to be a problem!)

We've tried clearing local cache, web cache, tested server status, tested different devices and IPs, but there isn't an obvious cause or fix and I can't find anything about it online.

Anyone else experience anything like this? Any fixes or ideas?


texts: How to show the column from sales_order in the sales grid admin Magento 2.3

texts: I want to show the column and it's data from sales_order in the sales order admin panel magneto. How to show this.


texts: Magento 2 Media Gallery doesn't show any images in 2.4.1

texts:
I installed Magento 2.4.1. all is working fine but the newer feature that Media Gallery is does not show any images.Here is the Image
Is there any other configuration requires for seeing images?
I disable the old media gallery see configuraton
Can anyone knows about this ?


texts:
After having made a working "Hello World" module, I tried to make my first magento 2 real module. The goal is to add a new product type. Using several tutorials, I did :

Mine\Custproducttype\etc\module.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Mine_Custproducttype" schema_version="2.0.0">
        <sequence>
            <module name="Magento_Catalog"/>
        </sequence>
    </module>
</config>

Mine\Custproducttype\etc\product_types.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd">
    <type name="pcbproto" label="PCB Prototype" modelInstance="Mine\Custproducttype\Model\Product\Type\Pcbproto" indexPriority="10" sortOrder="25">
        <customAttributes>
            <attribute name="refundable" value="true"/>
            <attribute name="taxable" value="true"/>
        </customAttributes>
    </type>
    <composableTypes>
        <type name="pcbproto" />
    </composableTypes>
</config>

Mine\Custproducttype\Model\Product\Type\Pcbproto.php

<?php

namespace Mine\Custproducttype\Model\Product\Type;

class Pcbproto extends \Magento\Catalog\Model\Product\Type\AbstractType
{
    /**
     * Product type code
     */
    const TYPE_CODE = 'pcbproto';

    /**
     * Delete data specific for Simple product type
     *
     * @param \Magento\Catalog\Model\Product $product
     * @return void
     */
    public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $product)
    {
    }
}

Mine\Custproducttype\registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Mine_Custproducttype',
    __DIR__
);

When I add my module to the magento2 app/code directory all magento commands stop working (ex : php bin/magento module:status) and give an error :

  There are no commands defined in the "module" namespace.

Removing the module and is starts working again.

Thank you for your help,


texts: Issue with adding product to cart Magento2

texts:
When a user try to add a new product to cart it is working fine. The number of product in cart is getting updated as one. But when he try to add another product to cart, then it is not getting added as a second product.The quantity of the first product is getting incremented. So the cart count is still one.This is happening when he tries to add multiple products. Only the quantity of the first product added to cart is getting updated no new product is being added.This is for logedin users only. I am using custom ajax call to add product to cart.

    <?php

namespace V\Catalog\Controller\Index;

use Magento\Framework\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\Controller\Result\JsonFactory;

/**
 * Class DellPost
 * @package Magebay\Hello\Controller\Index
 */
class AddToCart extends \Magento\Framework\App\Action\Action
{
    /**
     * Result page factory
     *
     * @var \Magento\Framework\Controller\Result\JsonFactory;
     */
    protected $_resultJsonFactory;
    protected $formKey;
    protected $cart;
    protected $product;
    /**
     * @param Context $context
     * @param PageFactory $resultPageFactory
     */
    public function __construct(
        Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Framework\Data\Form\FormKey $formKey,
        \Magento\Checkout\Model\Cart $cart,
        \Magento\Catalog\Model\Product $product
    )
    {
        parent::__construct($context);
        $this->_resultJsonFactory = $resultJsonFactory;
        $this->formKey = $formKey;
        $this->cart = $cart;
        $this->product = $product;
    }
    public function execute()
    {
        $resultJson = $this->_resultJsonFactory->create();
        $response = [
            'status'=>'error',
            'message'=>'Error, Please try again'
        ];
        $params = $this->getRequest()->getParams();
        $productId = isset($params['product']) ? (int)$params['product'] : 0;
        if($productId > 0)
        {
            try {
                $params['form_key'] = $this->formKey->getFormKey();
                $_product = $this->product->load($productId);
                $this->cart->addProduct($_product, $params);
                $this->cart->save();
                $totalItems = $cart->getQuote()->getItemsCount();
                $response = [
                    'status'=>'success',
                    'message'=>'Product added to cart',
                    'total' => $totalItems
                ];
            }
            catch(\Exception $e) {
                $response['message'] = $e->getMessage();
            }
        }

        return $resultJson->setData($response);
    }
}

Please help


texts: Blocks are coming in other theme also magento2

texts:
I created a theme named (Inf) with some blocks. In this theme the blocks are coming fine.I'll attach a screenshot below. then,
I created one more theme named (Soll) with no blocks.Next, I want to switch the theme from Inf to Soll and did it perfectly from backend.
Now, the blocks are not coming fine in Soll theme. Ofcorse I dont want them in second theme . Can anybody plz help to remove those Blocks ??


texts:
How can I check if the current page is the checkout cart page?

I tried this, but that does not work. Then it is displayed on all pages.

<?php if(Mage::getSingleton('checkout/cart')): ?>

<?php endif; ?>


texts:
I was wondering whether the selecting one of the languages in the interface locale dropdown in the admin page should change anything ?

It didn't seem to do anything on my installation (clone from github running in ubuntu instance on AWS).


texts: Cart Price Rules and Downloadable Product Core Bug?

texts:
Ran into an interesting bug today and was wondering if anyone else has come across it.

I took a default Magento CE installation (1.7.0.2) and added in the dummy data.  Then created a new category called "Software" in the Computer > Electronics category and added a single Downloadable Product to it.

I then attempted to create a price rule where if you added a product that had a category of Furniture (category 22) to the cart along with a downloadable product (category 35), you would get a flat, $15 dollar discount on your order.

Just to start off, I created a coupon that would be applied if any item with category ID of 22 was added to the cart.

This works just fine if you add just, say, an Ottoman to your cart... but if you then also add a downloadable product to your cart, the rule fails to apply.

Success

Success

Fail

If I attempt to do anything with price rules when there's a downloadable product in the cart, the rule fails.

Any ideas?

ANSWER

Turns out this is simply a little bit of a complex rule.  Final settings to accomplish what I wanted looked like this...

Actions

Conditions


texts: What does tax/calculation/shipping_includes_tax mean?

texts:
In Mage_Tax_Model_Config I see this line:

const CONFIG_XML_PATH_SHIPPING_INCLUDES_TAX = 'tax/calculation/shipping_includes_tax';

We use Magento 1.4x.

I have searched for documentation on this but can't find any specifically and wonder if this means:

"The shipping price already includes tax, so don't add tax to it" (my guess), or
"We need to include tax on shipping as well?" (i.e. if shipping is $50 and tax is 10%, add $5.00 to the order for the shipping portion).

Which is the correct answer? Thanks


texts: Remove parent categories from subcategory URLs

texts:
I realise similar questions have been posed before, but I have an additional caveat when I ask the following question.

How can Magento URLs be rewritten such that:

http://www.example.com/category/subcategory.html

Becomes:

http://www.example.com/subcategory.html

...without accessing the Admin menu or installing additional modules, and purely by editing the .htaccess file? Is there a way?

(If the .html can be stripped off the end as well, that would be terrific!)

Thank you for your time. :)


texts:
I created a custom module to manage new entity. I developed for this module a REST API endpoint to get this entity by ID. My issue is when I'm sending the data I'm using json_encode but it does not send the data as the other default endpoints, how should I send back the data ?

    $attachmentData = [];
    if($attachment->getData()) {
        $attachmentData = [
            'id' => $attachment->getId(),
            'name' => $attachment->getName(),
            'description' => $attachment->getDescription()
        ];
    }

    return json_encode($attachmentData);

Thanks !


texts: locate customer signup code for register.phtml in magento 2

texts:
A little background for myself; I am not php background but have a bit clarity of how Magento works. I am trying locate code behind file where customer gets created so that I may put some confition on it.
The code I located in register.phtml is below:
<form class="form create account form-create-account" action="<?php /* @escapeNotVerified */ echo $block->getPostActionUrl() ?>" method="post" id="form-validate" enctype="multipart/form-data" autocomplete="off">

Here, I am completely clueless on $block->getPostActionUrl() ?> by this what code is getting called. So that I may intercept and condition the flow.
Can you guys give me some hint?


texts: how to generate and save unique value for customer attribute in magento

texts: I have created custom attribute "CustomerAccount".Customer does not have access to this field .When new customer account is created CustomerAccount field should get random unique value and should get save in customer module.


texts: Contact form going to different url and not sending

texts:
I'm trying to add attachment for magento's contact form to allow users to send artwork for their orders and having the follow problem.

The form is on the following url http://boxchilli.co/a3mdirect/final-upload

Once you fill in the information, upload your image and hit submit the form redirects to http://boxchilli.co/contacts/index/post it also doesn't send any email out.

http://www.magentocommerce.com/boards/viewthread/440759/ I followed this guide on adding upload to the form so my code looks like the following link.


texts:
I just had trouble to install the SUPEE-1533 and SUPEE-5344 on CE 1.7.0.0. I did it through the FTP method from Magentary.

Question is then : how can I make sure that my Magento install got all security patches properly installed?


texts:
I have installed magefan community extension with latest version but then after I change that extension version to old one but now when I am trying to open page it is throwing below error. Not sure where it is taking that class as that config class is not exist.
Impossible to process constructor argument Parameter #11 [ <required> Magefan\Community\Model\Config $config ] of Magefan\Community\Model\AdminNotificationFeed class
Exception #1 (ReflectionException): Class Magefan\Community\Model\Config does not exist

Please help me for the same.


texts: Registered customer's shopping cart shows incorrect currency symbol

texts: I have 3 stores configured in a magento website and set different currency for each store. The currency symbol displays correct in all areas except registered customer's shopping cart in admin page while the orders tab shows the correct symbol.In app\code\core\Mage\Adminhtml\Block\Customer\Edit\Tab\Cart.php around line no:110 'currency_code' => (string) Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE) gets the incorrect currency code. How to get the currency code for the customer registered store? Please help


texts:
I've added an image to my front page. It has no width or height defined in the image tag.

When I resize the browser window it is responsive until the window is mobile size and the menu disappears.

Then the image completely disappears and all you see is a white screen beneath the header.

I've tried various things like putting it into a div and applying a style of width 100% and height auto but same issue of having it disappear. Help!

I've tried
    div.sale img {
        float: left;
        max-width: 100%;
        width: 100%;
        height: auto;
    }

and various combinations of this including removing the float, tried display: block;


texts:
Call Phtml file in System configuration setting in both magento 1 and magento 2.

I need to call ajax for check customer is register or not.

check screen shot for better understand.


texts:
Hi i write valid queries for data insertion but not successeded.If i print that query and excute it on sql server it works.I didn't figure out why this not works.
This is my table structure.

CREATE TABLE `findyoursizevalues` (
                      `findyoursize_id` int(11) DEFAULT NULL,
                      `key_val` varchar(200) DEFAULT NULL,
                      `min_values` int(10) DEFAULT NULL,
                      `max_values` int(10) DEFAULT NULL
                    ) ENGINE=InnoDB DEFAULT CHARSET=latin1.

This is different queries i use for insertion but no output.

$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
        $tableName = $connectionWrite->getTableName('findyoursizevalues');
        $connectionWrite->beginTransaction();
        $data = array();
        $data['findyoursize_id']= $fid;
        $data['key_val']=$key;
        $data['min_values']=$min_val;
        $data['max_values']=$max_val;

        $connectionWrite->query("insert into ".$tableName." values ('1','bbb','2','3')"); //query 1
        $connectionWrite->query(" insert into $tableName set findyoursize_id =$fid,key_val='".$key."',min_values=$min_val,
            max_values=$max_val ");// query 2
        $connectionWrite->insert($tableName, $data); // query 3
        $connectionWrite->commit();


texts: Magento 2 : dynamically update product option price

texts:
I would like to be able to dynamically set a product option price to 0 (marketing offer).

Based on admin configuration.

But I can't find which function I need to override.


texts: How to start top menu by some specific category in magento 2

texts:
How to start top menu by some specific category ID in magento 2.

Something like this in topmenu.phtml

<?php
$categoryID = 6;
$_menu = $block->getHtml('level-top', 'submenu', $columnsLimit, $categoryID);
?>


texts: Magento 2 How to remove labels from checkout page fields and add placeholder instead?

texts:
Currently, I'm using the extension for one step checkout and I want to remove labels from all the fields and want to use placeholder instead of those labels.

So how can I find the knockout template which is rendering those fields and how can I change it to remove labels and add placeholder there.

Please help me for the same. Thanks in advance.


texts: convert store currency to another currency at the checkout end without using multi store

texts: What options do we have in current web site to show NZD amounts and then convert it to AUD at the checkout end... is it possible to do this?.. so we can handle the payments from  Australia using another payment service with AUD.Here is only one store for New Zealand


texts: Magento 2 Child theme of Luma change media query

texts:
I have a custom theme that is a child of Luma. I see the styles-l min-width is set at 768px. Up until then the styles-m is active. I know if it was in my custom theme I could set that in my default_head_blocks.xml to trigger. But its loading from Luma.

How can I force that to trigger at a higher screen width?


texts: How to Spilt Address in Customer grid CSV Export

texts:
While exporting customers by going to Customer->All Customers-> Export CSV from grid, billing & shipping addresses are shown as full address. Instead of full address, I need to have separate columns like billing_address_street,billing_address_city,shipping_address_street,shipping_address_city etc..,

I understandard these are coming from listing file module-customer\view\adminhtml\ui_component\customer_listing.xml and mapped to a table.

Is there a way to split the full billing & shipping address during the export operation instead of adding new columns to the listing or
how to add address columns to customer_grid_flat table and populate the data in csv file

Your ideas will be appreciated.


texts:
I am trying to hide some column as it has very long list of column so it display vertical scrollbar and it don't look nice.So is there any way to hide it on default grid load. it should be visible in columns list check boxes so whenever admin want hided column to show in grid can enable by checking that checkbox.
I have added below code but its not working.
<column name="gridcolumn1">
        <settings>
            <filter>text</filter>
            <label translate="true">Grid Column1</label>
            <controlVisibility>false</controlVisibility>
            <visible>false</visible>
        </settings>
    </column>


texts: Magento2: How can I create a link with dynamic content like 'Messages(5 new)' in customer dashboard left menu links made by customer_account.xml file?

texts:
I need to add the link Messages(3 new) in the customer Dashboard left menu where the (3 New) is the count being calculated some where in block etc.
Also How can I make font bold IF there is any unread messages.

The look is as follows with 'Notification (3 new)'.

What is the standard Magento2 recommended way?

More detail is that I am using a block to filter out against a customer group. the code is:

namespace Namespace\Module\Block\Customergroup;

class Link extends \Magento\Framework\View\Element\Html\Link\Current {

protected $_customerSession;

public function __construct(
\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\DefaultPathInterface $defaultPath, \Magento\Customer\Model\Session $customerSession, array $data = []
) {
    $this->_customerSession = $customerSession;
    parent::__construct($context, $defaultPath, $data);
}

protected function _toHtml() {

    $responseHtml = null;
    if ($this->_customerSession->isLoggedIn()) {

        $customerGroup = $this->_customerSession->getCustomer()->getGroupId();

        if ($customerGroup == '4') {
            $responseHtml = parent::_toHtml();
        }
    }
    return $responseHtml;
}

I am curently lost as to how I can integrate the custom Labeling and bold thing into this.


texts:
I am currently developing a new forum extension for my company on our Magento 2.1.8 web store.

I have made a few different extensions in the past, but they have all required only a single page;

www.mywebsite.com/extensionname

For this extension I will need to have more than one page for the different features of the forum, for example;

www.mywebsite.com/forum/username

www.mywebsite.com/forum/threadname

How would i go about implementing a system such as this?

Thanks


texts: Remove Website and Website Group from Order Grid

texts:
How can I remove "Main Website" and "Main Website Store" from admin order grid?

I need to have only Store Name example "Italia" or "Asia" etc


texts: Magento 2.1 get order grand total on success.phtml

texts:
I want to get the grand total on success.phtml page so I can use it with various tracking codes for third-party vendors.

I follow this guide but I couldn't get it to work:

Vendor/Module/Block/Checkout/Success.php

namespace Vendor\Module\Block\Checkout;

class Success extends \Magento\Checkout\Block\Onepage\Success
{
    /**
     * @return int
     */
    public function getGrandTotal()
    {
        /** @var \Magento\Sales\Model\Order $order */
        $order = $this->_orderFactory->create()->load($this->getLastOrderId());
        return $order->getGrandTotal();
    }
}

Vendor/themename/Magento_Checkout/templates/success.phtml

$grandTotal = $block->getGrandTotal();
$grandTotal = number_format($grandTotal, 2, '.', '');

I get this error in magento_dir/var/log/system.log:

[2017-07-02 20:37:22] main.CRITICAL: Invalid template file: 'button.phtml' in module: 'Vendor_Module' block's name: 'checkout.success.print.button' [] []
[2017-07-02 20:37:22] main.CRITICAL: Invalid template file: 'success.phtml' in module: 'Vendor_Module' block's name: 'checkout.success' [] []

Is there a way to actually see the PHP error? /var/log/nginx/error.log doesn't show anything and neither does magento_dir/var/report/