texts:
First of my Guest controller code for a rest api call is as followed:

protected function _retrieveCollection()
{
    try
    {
        $email = $this->getRequest()->getParams('email');

         //check if email exists in db or not
         $customer = Mage::getModel("customer/customer");
         $customer->setWebsiteId(1);
         $customer->loadByEmail($email["email"]); //load customer by email i

         if($customer->getId()>0){

             //send forgot password link
             $body = "Your forgot password link:- http://dev02-aws-sg01.zooyo.net/index.php/customer/account/changeforgotten/";
             $mail = Mage::getModel('core/email');
             $mail->setToEmail($email["email"]);
             $mail->setBody($body);
             $mail->setSubject('Forgot Password');
             $mail->setFromEmail('');
             $mail->setFromName("Admin");
             $mail->setType('html');// You can use 'html' or 'text'
             $mail->send();

             $array = array("status" => "200", "error" => "Email sent successfully.");
             return json_encode($array);
         }else{

             $array = array("status" => "500", "error" => "Email does not exists.");
             return json_encode($array);
         }

    } catch (Exception $e) {
        $array = array("status" => "500", "error" => "Error in sending email");
        return json_encode($array);
    }
}

The route which I hit is:

http://localhost:81/magento/api/rest/forgetpass

The output is:

As you can see in the image the json string is coming inside xml which is wrong, I want fully the output in json format. But let me be clear i dont want to override any file in magento for application format type.


texts: Magento 2: New field in checkout page, find its input value store in which table of database

texts:
I created a new field example in the checkout shipping.

label example I  can check in the table eav_attribte  like the below images.

But in which table I can check it's Input value if I put a value Test for the field example


texts: How to duplicate Use Default Value checkbox functionality?

texts:
I want to set up on a product (admin editing form) whether or not an attribute should or should not be displayed on the product view page.
I was thinking of adding a checkbox (something like Use default value) next to each of the attributes.

Any ideas on how can I do that?

I'm opened for any other ideas for my problem, but it has to be administrable in product edit form.


texts: How do i delete products which are not in a category?

texts: our site has over 90,000 products which need to be deleted and are not in categories, but the products in the categories we want to keep, how do i solve this?


texts: Magento 2.3 How to include header/footer into admin notification emails?

texts:
I have Magento2.3 setup and all transactional emails are working fine.

In magento, there are several emails related to admin events like,'
new admin user created, admin user change password, forgot password for admin user, etc...

In this kind of emails, it will not include the header/footer. it is Magento's default feature I think.

I want to include header/footer into the emails fire after admin user add/update/forgot pass.

I want to use header/footer into
"vendor\magento\module-user\view\adminhtml\email\user_notification.html"
 and all emails regarding admin notifications.

If anyone has any idea please share.

How can I achieve this functionality?


texts: Magento Clears Session Data After Redirect

texts:
For some reason, magento clears session or customer session data after redirect? How will I save some data before it redirect to the next page into a session?

I tried adding session_write_close(); but this doesn't help.

Update:

Some actions do not retrieve Magento::getSingleton('core/session') whole data.


texts: For Magento 2.2.5 how to set preloader for all pages. Is there any default preloader? we already tried with custom preloader but jquery not working correctly. Themes we used BizKick Theme


texts: What are the requirements for a patch to get accepted and included into magento 1 and what is the best way to provide it.


texts: Magento 2: Cleaning up Unused Dependencies

texts:
Does anyone know of a code-cleaning/analysis tool that would inform a PHP Magento 2 programmer which DI arguments are not being used?

For example, a tool that would look at the following class

<?php
namespace Namespace\Module\Controller\V1;
class MyClass extends \Magento\Framework\App\Action\Action
{
    protected $resultJsonFactory;
    protected $metadataService;
    protected $urlModel;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
        \Namespace\Module\Helper\Api $apiHelper,
    ) {
        parent::__construct($context);
        $this->searchCriteriaBuilder      = $searchCriteriaBuilder;
        $this->metadataService            = $metadataServiceInterface;
    }

    public function execute()
    {
        $result = $this->resultJsonFactory->create();
        return $result->setData($items);
    }
}

and tell us that

The class does not use the $urlModel property
The class only uses the $metadataService property when assigning in the constructor

Given how much of Magento programming involves "try this class, no, well maybe this class", I'm finding I leave behind giant constructors with dependencies I'm not longer uses.  Having a tool to help clean this up would be great.


texts: How to Update Configuration product attribute set in magento 2.1

texts:
I am trying to update my configuration product by programmatically and i want to assign attribute set to configurable product.
I have also checked catalog_product_super_attribute table
after updated product but nothing changed

$attr_ids = array(12,13);
$savedConfigproduct->getTypeInstance()->setUsedProductAttributeIds($attr_ids,
$savedConfigproduct);

Any guide will be appreciated.


texts: How to setup the tax correctly? (we use the same tax percentage for everything)

texts:
It turns out the FedEx fees were being incorrectly calculated because the Shipping FROM settings were a ZIP code in California. I changed the shipping state and ZIP code to Colorado and a specific ZIP in Colorado. Now the tax is not being charged at all! I would guess it's because in the TAX Calculation Settings in Admin it says:

Tax Calculation Based On: Shipping Origin

What is the best way to set up tax charging everyone the same tax percentage?

When I change the:

Tax Calculation Based On: to either of the options (Shipping Address, Billing Address, Shipping origin) - it never charges tax anymore.

I remember in the old Magento I just put in the percentage somewhere (like 8.5%) and that took care of things...


texts: Skip import row, is not valid value "" for field "type"

texts: I know there are a few issues with this already, but I have tried some of the solutions.But they dont seem to work. Is there a default set of fields that the CSV must have. I have checked my CSV and all of the titles are in lower case, there are no spaces after each title, and the sku are unique.


texts: Magento 2 - Add category to beginning of a sub menu (in Top Menu)

texts:
I am trying to add a category menu node to the beginning of the category node tree created by the Magento plugin Magento\Catalog\Plugin\Block\Topmenu.

I have managed to add menu links to the menu using a custom class (plugin) that calls the same function beforeGetHtml() and adds a link to the relevant node using a specific parent node:
$parentNode->addChild($categoryNode); where $parentNode is an existing category node link.

The problem is that there is no way to add children to the front of the node collection. Magento\Framework\Data\Tree\Node does not offer such function.

Also you will notice that the function moveNodeTo() of Magento\Framework\Data\Tree\Node is not implemented:
https://github.com/magento/magento2/blob/2.1/lib/internal/Magento/Framework/Data/Tree.php#L111

Any idea?


texts:
I have a menu very similar to Prada's (www.prada.com). When the user clicks on the word 'MENU' I want the image to change from the lines to a cross. The cross stays until the menu is closed again. Any idea how to do this? I'm not sure if the lines are an image or...?

Here is my current code. I have the sliding feature working, I just need to work out the image / lines next to the word 'MENU'.

MENU

jquery:

jQuery(document).ready(function() {
jQuery('.skip-links').hide().before('Open/Close');
jQuery('a#toggle-skip-links').click(function() {
jQuery('.skip-links').slideToggle(200);
return false;
});
});

UPDATE:

I am using the following codepen:

http://codepen.io/anon/pen/PqGryp

Only it doesn't seem to be working on my end. The javascript isn't being triggered. Any ideas? I have placed the javascript into 'app.js'


texts: How can I contribute and add a new feature in Magento 2 via github?

texts:
I want the Magento 2 \Magento\Framework\HTTP\Client\Curl class to handle all http methods.

I have added as a feature request in magento/community-feature repo on github. How can I add the feature myself ?

https://github.com/magento/community-features/issues/101


texts: Does Magento have an Audit log for products?

texts: I am trying to figure out who created a product in my store and was wondering if there is an audit log that is a default feature within Magento. I've seen a few modules out there that do what I am looking for but I don't believe that will help with previous products.


texts: Magento 2: Display some colunms in the grid customer according to group

texts:
I have created a new menu so that when clicking on all customer, I have two sub menu:

  local and export

And I want to have in the local grid the list of customers that belong to group 1 and in the export grid the list of customers that belong to group2.

But I still don't know how to proceed. Another question I tried to override the grid customer_listing with this link

Magento 2. Remove column from customer grid (admin)

But with no result, So how to do that properly please and how to duplicate this customer_listing for local because the attributes in the grid 1 are not the same as in grid 2.

So please I am really lost i want to know what to do step by step.


texts: customer attribute taxvat value not saving to database (from frontend custom registration form)

texts:
We setup 2 website/store. When we tried to create customer from a store (i.e. not main store). By using customer/form_register type form submission. customer created successfully but taxvat field not saving with customer information. All other required customer attributes firstname, lastname, email saving correctly but only taxvat attribute not saving.

Code for Load layout with customer/form_register block type :

<reference name = "content">
   <block type = "customer/form_register" name = "customer_form_register" template = "seller/seller.phtml">
      <action method = "setShowAddressFields"><value>true</value></action>
        <block type = "page/html_wrapper" name = "customer.form.register.fields.before" as = "form_fields_before" translate = "label">
           Form Fields Before
        </block>
   </block>
</reference>

Template File :

<form name="test-form1" id="my-custom-form1" action="<?php echo $this->getPostActionUrl(); ?>" method="post">
    <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl(); ?>" />
    <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl(); ?>" />

            Email *
            <input type="text" name="email"/>

            First Name *
            <input type="text" name="firstname"/>

            Middle Name *
            <input type="text" name="middlename"/>

            Last Name *
            <input type="text" name="lastname"/>

            Tax/Vat Number *
            <input type="text" name="taxvat"/>

            <input type="submit" name="sub" value="Submit">

</form>

This problem also exist for middlename, prefix, suffix attribute.

All these attributes 'taxvat', 'middlename', 'prefix', 'suffix' are exist in default magento setup same like 'firstname', 'lastname', 'email' exist. the only difference is they are not required.

Can anyone please tell me why this is happened and how to resolve this problem?


texts: Custom Magento transactional email template file location

texts:
I'm currently in the process of creating a number of custom transactional email templates and was wondering if someone could recommend the best place to store the HTML for them within my theme?

I will be using the admin to override the default templates, allowing other users to make changes when needed. I was wondering if I should be putting them someone within my themes template folder instead?

I'm currently using Git and it would be good to ensure that the templates are in version control if required.


texts: Magento 2: the phpserver/router.php file

texts:
So according to the README, the purpose of this file is to implement the PHP built-in webserver.

However, when you open the file, you can see the following from line 35:

/**
 * Caution, this is very experimental stuff
 * no guarantee for working result
 * has tons of potential big security holes
 */

That comment is kind of super scary and assuming that the setup host point to / instead of /pub that file can easily be accessible by adding /phpserver/router.php

So here are my questions:

what are the risks of keeping that file unprotected ?
is there any evident security holes as stated in the comment ?
why would Magento ship a software with such a file if it's super experimental ?


texts: New module, why doesn't default.xml frontend layout apply blocks to index_index path? [SOLVED]

texts:
[SOLVED]Module's index_index.xml layout file was missing layout="[example#cols]" on the page node.

I've just made a module with a controller and routes, the page loads fine and some head elements are present... however they are no blocks on the page - is this normal? Why doesn't default.xml layout apply to this page (defined in other places)

I have no layout files in this module yet.

Visual of the question:


texts: Add new mass action in order grid in magento 1.9

texts:
I am using Magento 1.9.1 .

I will create new mass action same like Print Packingslips in order grid also download pdf for same as Print Packingslips but some customization in pdf as per requirement.any one create any module or else knowing step so please share.


texts:
Trying to install Magento 2 to my ISPCONFIG / UBUNTU 18
I'm getting an error saying:
Your PHP version is 7.2.24-0ubuntu0.18.04.6. The required PHP version is ~5.6.0|7.0.2|~7.0.6.

Any idea how can I fix this? Are there any tutorials on how to fix this issue?
Apologies if it seems easy this is my first time to set this up
Thanks


texts: using multiple themes for multiple products types

texts:
I am not a professional
I need to make business directories eg car dealers, restaurants and shops in the main page
From the main page when enter category i need to set different themes since each category have a different requirements
also I need a search engine for each category
please clarify for me how since I am searching for answer for weeks
thank you for your help


texts: Magento :: Shared Database and Shared Configuration

texts:
I have recently started working with the Backend team, which uses Magento 1.9.

Apart from seeing the beauty in design of the framework it does throw a challenge sometimes with its complexities.

Here each developer has its own database instance. And when a new person comes he/she is given some database instance which might be very old or if the person giving the database has maintained the database it might be sync to the current production one.

The current problem which I am facing is the database and configuration issue. Which I will address here separately.

Since magento is heavily dependent on the configurations,what happens sometimes is that the system configuration values are not correct. Which breaks the webapp unless, the reason of breaking is found and then fixed in their private database for each developer.
For ex : I was working on the Totals Tax calculations,but my webapp was not able to show tax during checkout due to some configuration issue. Even though for the same code, in production values are coming properly. Now, I will invest some time and say, fix it for my local configuration. When some other developer will work on the same thing, he/she has to go through the same process, which is unwanted waste of time.
In magento, we update our database using mysql scripts. There is a versioning system which checks the current version number, and if there are scripts which have higher version number in the code, it will run the script,update the database schema and new version number is updated. Problem I saw is, if in between my next pull of latest code 5 version changes have happened, and I jump from version 1.4 to 1.9, then I will only be running the scripts which came with version 1.9. Missing scripts from version 1.4-1.8.  This is what I observed in magento, in my case. I might be wrong also in this one.

Since magento has been used since long, I am sure there are ways teams handle this problem. As is slows down the development process significantly.
So, how can I tackle these problems.

And, as some prerequisites, I would tell that the company where I am working is a startup which has started growing in terms of team size recently only.


texts: how to create grid using ui component with multi table(JOIN) in magento2?

texts:
I have created a grid with UI component with one table now I want to join another table so how can I create??

i try but not working
in
Vendorname\Modulename\Model\ResourceModel\Quote\collection.php

protected function _initSelect()
    {
        parent::_initSelect();

        $this->getSelect()->joinLeft(
                ['secondTable' => $this->getTable('quote_customer')],
                'main_table.mcs_quote_id = secondTable.quote_request_id',
                array('*')
            );
    }

Thanks in advance.


texts: How to get list of all the groups of particular attribute set using Soap API?

texts:
My question is similar to this post :- https://stackoverflow.com/questions/28952325/magento-retrieve-a-list-of-groups-from-a-attribute-set but there is no answer so.

I have attribute set id - 4 - Default Attribute Set. I want the list of groups created in Default Attribute Set using Soap API.

I checked the API documentation but it seems we can add, remove & rename only.

Basically what I want is to remove the group but for that I need to have already created group's ID so how can I get that using SOAP API?

Thanks.


texts: Which tables are updated in data migration tool Map step

texts: In Magento data migration tool, we have a map step which migrates catalog and sales data. As I only want to migrate sales data, I need to ignore the unwanted tables in map.xml that are related to catalog and other data. I need the list of tables that are affected in map step.


texts:
i have a real strange one here. i have 3 environments a dev a stage and a production.
exact same codebase on all three.
on my dev and production boxes my categories on the left hand nav display exactly as they should.
showing only the current categories in the branch.
however on the stage box the left hand nav shows all the child categories as well.

Ive swapped the databases on stage and dev and the problem followed the database, so its a DB issue, but what? the level values in catalog_category_entity are correct i have checked.

where else should i look?

cheers


texts:
I am setting up a magento multistore.

I want to have one main child theme with layout and CSS changes, that every site should have.

From this theme my site-specific child themes should inherit.

I have already set up successfully simple child themes but the above constellation does not work. The changes from "main child theme" are not visible.

Can anybody tell me if this is possible?

Main-Child inherits from Luma
Site1-Child inherits from Main-Child

EDIT: Changes made in Site1-Child are visible on frontend (for example removing layout blocks). But changes made in Main-Child are not visible. Both Themes have static files.
It looks like Site1-Child does not correctly inherit from Main-Child.
If I assign Main-Child as actual theme for Site1, the changes are visible.


texts:
I have a single website, single store view Magento installation on, lets say, the domain example.com. Now I want to create a customer section "My Example.com" on my.example.com. So the whole customer module/section needs to go to my.example.com.

Does anyone have an idea on how to do this (in a neat upgrade safe manner)?


texts: m2epro - Amazon Variations Missing Attribute

texts:
Our variation listings on Amazon are failing due to a missing attribute "size".

size_name is a required attribute for the apparel category we are submitting to. Our variations use an attribute called "Waist" in the Admin & Default store view to specify a size. The m2epro Amazon listing uses the store view "Amazon" and the "Waist" attribute label for that store view is "Size".

When we attempt to list a configurable "Waist" product on Amazon it kicks back saying a size must be specified. Size is referring to the required specific "size_name". There is no "Size Name" specific available in our ASIN Template. "SizeName" is not in the database table "m2epro_amazon_dictionary_specific" either.

Would that normally be added by the label of the variation attribute "Waist"? IE, should my attribute be labeled "Size", "Size_Name", or "SizeName"? If so, does it have to be the admin value label? I've experiments with various labels for the associated store view without success.

We have already listed all of our items to ebay using the waist attribute so changing the admin value of "Waist" would require stopping every listing.

Here is an image showing some of the settings we have: http://imgur.com/KCDlGg0

Post on m2epro that did not make sense to me as we cannot specify a missing specific: http://support.m2epro.com/knowledgebase/articles/35919-i-got-listing-is-missing-required-item-specific

Anyone have any insight?


texts: English (GB) Language pack for Magento 1.9.1

texts:
I have been unable to find the GB English language pack for Magento 1.9.1 and have searched high and low, but it seems it has been removed since August 2014 (ref: http://www.magentocommerce.com/translations). I checked magento connect but nothing there either. I am hoping someone can confirm if I am doing the right thing to translate my store from US english to GB, I am relatively new to Magento but happy to work with system files, and I have done this:
I have set the default local to English GB in my back end (system-configuration-general-general-locale). I copied the contents of the folder app/locale/en_US to a new folder, app/locale/en_GB (which did not exist in my fresh install of Magento 1.9.1). Having found some of the necessary changes (cart=basket etc) I've amended it in there and it is working fine on the front end. The instructions on adding a language pack manually to Magento are far more complex, but does what I have done work for en_GB at least for such a common language? I assume since en_GB is listed in magento then all I need to do is create the necessary translation files in the app/loale/en_GB folder. Any help or advise on the correct way or an alternative resource for the language pack will help!


texts: Cronjobs Reporting Negative Execution Times?

texts:
I'm getting a fairly weird result trying to check the status of my Magento store's cron jobs.

I tried installing both AOE Scheduler and Noovias Cronjob Manager.  Both of them give me something like this:

"Scheduler is working. (Last execution: -239 minute(s) ago)"

My only guess is that it last ran 1 minute ago - I am in Eastern time, which due to Daylight Saving Time is UTC-4.  240 minutes would be 4 hours.  However, both my PHP configuration and MySQL database specify "America/New_York" as the timezone.  Why are the times showing in the negative?

And if I am correct in thinking it's just a time offset, is this fixable?


texts:
I'm a newbie at Magento and wanted to remove the USPS transit time.  I followed your suggestions below, but am not sure how to add appropriate translations into the Mage_Shipping.csv file.  Could you clarify?  Thanks.

override USPS shipping method name


texts: Fatal error: Uncaught Error: Undefined class constant 'TYPE_CONFIGURABLE' in magento 2

texts:
I have a piece of code that I am converting from magento 1 to magento 2. This is the code that has been converted

$productType = \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE;
    $bundleType = null;
    if (null !== $mainVariationIndex) {
        $isActive = isset($item['variations'][$mainVariationIndex]['isActive']) ? $item['variations'][$mainVariationIndex]['isActive'] : false;
        if (count($item['variations']) > 1) {
            $productType = \Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE;
        }
        if (isset($item['variations'][$mainVariationIndex]['bundleType'])) {
            $bundleType = $item['variations'][$mainVariationIndex]['bundleType'];
            $productType = $bundleType === \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE ?
                \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE : \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE;
        }
    }

I am having the issue in this line

$productType = \Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE;

The above line was like this in magento 1.9

$productType = Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE;

Now when I am using the constant TYPE_CONFIGURABLE in magento 2, I am getting an error Undefined class constant. So I checked for constant in file Type.php in catalog module for magento 2 but did not find it. There were only three constants defined

const TYPE_SIMPLE = 'simple';

const TYPE_BUNDLE = 'bundle';

const TYPE_VIRTUAL = 'virtual';

So I thought it must be defined in some other file but could not find it.
Now my question is should I use configurable as a string like below

$productType = 'configurable';

for my code in magento 2 or there is some other way.


texts: Grid Vs List Issue on Product Listing Page and Home Page

texts:
I am calling  a block of category on Homepage to show 5 product in a row. I have set the mode to "grid" for this block. But when I shift grid view to list view inside the site on Product listing page the home page also grid view is changing to the list view. I would like to restrict the block on homepage to "grid" view. Is there any solution for this? Please advise me.

Thanks


texts: Magento Importing categories from 1.8 to 1.9

texts:
We are trying to export/import categories from Magento 1.8 to 1.9.

We are facing the below error while importing categories:

Path provided is not a valid one.

Find the screenshot below:

We have uploaded the category csv file under var/import/category

Thanks....!


texts: Add to cart only stock availabel quantity Magento Shop

texts:
I am working on a Magento 2.2 Shop. May be can some one help me with my Problem. I have for example in Stock only 5 Items for specific product. At the page of product the costumer at the moment can add to Cart a quantity more that I have in Stock (In Stock=5 Items, Client can for example 20 Items). How can I limit the buy quantity (add to cart quantity) for this product at the available Stock quantity.

Stock= 5 items => Add to cart no possibility more than 5 Items for this Product or to notify the customer that the desired quantity is not in stock


texts: product url changed every time reindexed

texts: I have many products without url key specified. Use web server rewrites is turned on. Every time I re-index all, a product's url will change. Why? What's the correct way to configure url rewrites? I don't want a product's url keep changing.


texts: Magento2 - Short Description titled as "none" in Product view

texts:
The attribute "Short Description" is titled "none" in the product view. How can I change that title or remove it?

Thanks alot!


texts:
I'm trying to create a template file for a youtube video and some javascript. It should be added to the catalog/product/view/description block with the following PHP

 echo $this->getChildHtml('youtube')

This is the XML in my local.xml file that I'm using to try and get this to happen

<default>
    <catalog_product_view>
        <reference name="content">
            <reference name="product.info">
                <reference name="product.description">
                    <block type="core/template" name="product.youtube" as="product_youtube" template="catalog/product/view/youtube.phtml" />
                </reference>
            </reference>
        </reference>
    </catalog_product_view>
</default>

The template as of now just has a simple 'hello' but I don't get any output on my product page. What am I doing wrong?


texts:
How to get only level 0 menu in Magento 2?

<?php $columnsLimit = $block->getColumnsLimit() ?: 0; ?>
<?php $_menu = $block->getHtml('level-top', 'submenu', $columnsLimit) ?>

give all menu items including submenu. I want only level 0 menu. Please help me.


texts:
In Magento1, we use a username/ password in the SOAP call for authentication, what is the difference in Magento2?

For example, When i want to get an order info, I use
http://example.com/soap/en?services=salesOrderRepositoryV1

I got the WSDL request sample like this:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:en="http://k11.dev.cleargo.com/soap/en?services=salesOrderRepositoryV1">
   <soap:Header/>
   <soap:Body>
      <en:salesOrderRepositoryV1GetRequest>
         <id>1</id>
      </en:salesOrderRepositoryV1GetRequest>
   </soap:Body>
</soap:Envelope>

Where should I put the authentication information?


texts: Magento2: {"0":"Class argument is invalid:

texts:
we have issue with extension translate language MageCube on  our magento version latest 2.3.4 and when we try open catalog with products then get issue:

{"0":"Class argument is invalid: MageCubeTeam\\LanguageTranslatorMultilingual\\Ui\\Component\\ProductOptions","1":"#1 Magento\\Framework\\Data\\Argument\\InterpreterInterface\\Proxy->evaluate() called at [vendor\/magento\/framework\/Data\/Argument\/Interpreter\/Composite.php:61]\n#2 Magento\\Framework\\Data\\Argument\\Interpreter\\Composite->evaluate() called at [vendor\/magento\/module-ui\/Config\/Data.php:164]\n#3 Magento\\Ui\\Config\\Data->evaluateComponentArguments() called at [vendor\/magento\/module-ui\/Config\/Data.php:167]\n#4 Magento\\Ui\\Config\\Data->evaluateComponentArguments() called at [vendor\/magento\/module-ui\/Config\/Data.php:167]\n#5 Magento\\Ui\\Config\\Data->evaluateComponentArguments() called at [vendor\/magento\/module-ui\/Config\/Data.php:167]\n#6 Magento\\Ui\\Config\\Data->evaluateComponentArguments() called at [vendor\/magento\/module-ui\/Config\/Data.php:111]\n#7 Magento\\Ui\\Config\\Data->initData() called at [vendor\/magento\/module-ui\/Config\/Data.php:136]\n#8

Can anyone help how to solve?


texts: Magento display old images that are referenced in CSS

texts:
I am keep seeing the old images that are referenced in CSS file. This image was changed more than two months ago. The only way to refresh the images is to open the store via incognito mode.

I thought it might be related to .htaccess file, however in .htaccess file it is set to expire the css file after 7 days and png image after 30 days.

ExpiresActive On
  ExpiresByType image/png "access plus 2592000 seconds"
  ExpiresByType text/css "access plus 604800 seconds"

In my CSS file I have an image path as below:

background: url(../../images/newsletter.png)

The "newsletter.png" in css will never change. It's  the actual file on the server that get replaced with new png file.

Is there a way I could refresh this from the server side, so all the clients who are browsing the store get to see the latest visuals?


texts:
I've been observing this event but it appears that I could not override the value of the array:

Magento event:

Mage::dispatchEvent('catalog_product_attribute_update_before', array(
    'attributes_data' => &$attrData,
    'product_ids'   => &$productIds,
    'store_id'      => &$storeId
));

Here's my code (simplified):

public function overrideAttribute(Varien_Event_Observer $observer)
{
    $attributesData = $observer->getAttributesData();
    $attributesData['index_to_override'] = 'new_value;

    return $this;
}

index_to_override should have a new value but upon saving, it's still using the array value.


texts: How to get "product url" for multi website in sales email template

texts:
From my magento2 backend i created 2 website. 1st default website xxxx.com 2nd website is yyyy.com.
In my sales order email template, added

$_order = $_item->getOrder();
$_objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$product = $_objectManager->get('Magento\Catalog\Model\Product')->load($_item->getProductId());
echo $product->getProductUrl();

When i place order from 2nd website (i.e.,) yyyy.com, product Base URL getting xxxx.com

Please let me know how to get base URL for multiwebsite sales email template.


texts: changing default selection of ship to billing address to ship to different billing address

texts:
I would like to remove the Ship to this address from the onepage checkout and customer should type the billing address. When I browse solution for this I found few recommendation as below.

Nagivate to the function

public function isUseBillingAddressForShipping()
{
if (($this->getQuote()->getIsVirtual()) || !$this->getQuote()->getShippingAddress()->getSameAsBilling())
{
return false;
}
return true;
}

Swap around the returns “false” and “true”

public function isUseBillingAddressForShipping()
{
if (($this->getQuote()->getIsVirtual()) || !$this->getQuote()->getShippingAddress()->getSameAsBilling())
{
return true;
}
return false;
}

Is it right solution? Can I modify core file?


texts:
In a configurable product how do I get which simple product the option value belongs to? For example say if I had the following I want to know which simple product id is related to the option value 167

<select class="required-entry super-attribute-select" id="attribute164" name="super_attribute[164]">
    <option value="">Choose an Option...</option>
    <option value="168" price="0">1 x 400g</option>
    <option value="167" price="13.98">6 x 400g +€14.96</option>
</select>


texts: Invalid value for Attribute Set column (set does not exists?) in rows: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,


texts:
Im just trying to find a google reference source for Magento Custom layout updates done on category and product pages and would be really grateful to receive a few different links or books names.

I needs to be layout updates as I have very limited access to our template files etc.

Version: Magento community running both VU1.7 and 1.8 on different instances.


texts:
We have installed Improved sorting Module from Amasty.
Under configuration we get these error messages:
Enable improved-sorting-graphql module to activate GraphQl and Sorting. Please, run the following command in the SSH: composer require amasty/improved-sorting-graphql
And
Enable amasty/yotpo module to activate Yotpo and Sorting. Please, run the following command in the SSH: composer require amasty/yotpo
But these composer commands do not work, telling me to check the spelling.
Do anyone knows what this means, is graph-ql need to be enabled in Magento back-end? I can see under the var/magento/ has a folder called module-graph-ql.
Any help is appreciated.


texts: Magento 2.1: Disable title suffix just for home page

texts:
I've set up title suffix for all pages in Content > HTML Head > Title Suffix, so now every page has suffix | Pagename.tld

That's all good. But I would like to exclude my homepage from this rule.

I have found this solution, but it's not working for me.

When I edit the homepage in the CMS and set the Layout Update XML as follows:

<reference name="head">
    <action method="setData"><key>title</key><value>Home</value></action>
</reference>

...or...

<reference name="head">
    <action method="setTitle"><title>Home</title></action>
</reference>

...or...

<reference name="head">
    <action method="setForcedTitle"><title>Home</title></action>
</reference>

Nothing changes and my homepage still has the suffix.

I've used the Flush Magento Cache button - no change.


texts:
Update
I found this in Magento_Customer module:
authentication-popup.phtml
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var \Magento\Customer\Block\Account\AuthenticationPopup $block */
?>

I guess I could change this to be a button element instead of div?
But how can I do this only on onepage checkout?
Original question
I am missing the Log In Button on the Onepage Checkout.
When I look into the source code I see a
 which is set to display:none when I remove this in the Chrome DevTools it's still zero height.
When I change this as well to have 50px height now there's an empty block with the Text "Log In" and when I click on it it opens the popup.
So that seems to be the button I am looking for.
Now I want to change this to be visible of course and to be a <button> instead of a
, while still keeping all of the functionality (opening the popup)
Unfortunately however I wasn't able to locate the template for this in my Magento project.
Looking at the code in Chrome DevTools I wasn't even able to find the "Log In" text shown on the div. The HTML looks like this:

I know that there's something like uiComponents and Knockout.js that unfortunately I don't know too much about yet. And which obviously seems to be used here somehow.
But still I would have expected to find something helpful when searching my project in PHPStorm for "authenticationPopup"
How can I find the template and rewrite it in my own template/module to make this a (visible) <button> element?


texts: Magento 2.3.2 An abstract factory could not create an instance of magentoframeworkencryptionencryptor(alias: Magento\Framework\Encryption\Encryptor)

texts:
During the installation of Magento 2.3.2 an error appears when creating an admin account:

  An abstract factory could not create an instance of
  magentoframeworkencryptionencryptor(alias:
  Magento\Framework\Encryption\Encryptor).

The PHP version is 7.2.3

Please help


texts: _create function in custom require.js not called

texts:
I am creating a custom js for my module.

app/code/Namespace/Module/view/frontend/requirejs-config.js

var config = {
    map: {
        '*': {
            myjs:'Namespace_Module/js/myjs'
        }
    }
};

app/code/Namespace/Module/view/frontend/web/js/myjs.js

define([
    "jquery",
    "underscore",
    "jquery/ui"
],
    function($, _){
        console.log('1');
        $.widget('mage.myjs', {
            options: {
                divId: '',
                ajaxUrl: '',
                isNeedLast: false,
                autoSubmit: false,
            },
            selects: [],
        _create: function() {
            console.log('inside create'); // this log is not displayed
        }
    });

    return $.mage.myjs;

});

and calling it in the phtml like below :

require(['jquery', 'myjs'], function($) {
        var finderConfig = {"ajaxUrl":"<?php echo $block->getAjaxUrl() ?>","isNeedLast":1,"autoSubmit":1};
        finderConfig.divId = 'finder_<?php echo $finderID ?>';
        $("#finder").myjs(finderConfig);
    });

here the console.log('1') is displayed but the console.log('inside create') inside _create function is not displayed.

cany anyone point out what i am missing.Thanks.


texts: What does "SQLSTATE[HY000] [2002] No such file or directory" in error log mean?

texts:
This page just started coming up:

There has been an error processing your request

a:4:{i:0;s:48:"SQLSTATE[HY000] [2002] No such file or directory";i:1;s:2075:"#0 /home/dtacolle/public_html/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/dtacolle/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(313): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/dtacolle/public_html/lib/Zend/Db/Adapter/Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /home/dtacolle/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /home/dtacolle/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#8 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#9 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#10 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/Resource/Config.php(55): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#11 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/Config.php(354): Mage_Core_Model_Resource_Config->loadToXml(Object(Mage_Core_Model_Config))
#12 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/Config.php(260): Mage_Core_Model_Config->loadDb()
#13 /home/dtacolle/public_html/app/code/core/Mage/Core/Model/App.php(270): Mage_Core_Model_Config->init(Array)
#14 /home/dtacolle/public_html/app/Mage.php(640): Mage_Core_Model_App->init('dtacollectibles...', 'website', Array)
#15 /home/dtacolle/public_html/get.php(113): Mage::init('dtacollectibles...', 'website')
#16 {main}";s:3:"url";s:91:"/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/c/o/con-dc-0007_2.jpg";s:11:"script_name";s:8:"/get.php";}


texts: how to set custom design layout for custom attribute category in magento 2

texts:
I have created 3 attributes.
First for Design layout left or right custom category attribute.
Second for Enable disable custom category attribute.
Third attribute for product which is enable for custom category product.

Now I am looking for solution how to set custom design layout for custom category attribute for custom layered navigation. Else all product will display with default layered navigation.


texts:
Every time i try to upload product images on my Magento 2.3 website, i get the following error:

A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later.

The same problem occurred when trying to upload our logo. I had found an article online telling me to change 2 form elements set to "fileUploader". When changing this to "imageUploader" it fixed the logo problem. Im assuming this product image problem is occurring for the same reason the logo one was happening. In which file should I change this?


texts: How to change admin url in local server in Integrate WordPress into Magento

texts: i have setup e local mageto1 site from live which have magento WordPress integrate.So whenever i try to open local server admin of WordPress it automatically goes to live site how change setup that url for local site Thank you.


texts: How can I validate my custom checkbox on LayoutProcessor.php

texts:
I injected this code in LayoutPorcessor of checkout module :

    if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
            ['shippingAddress']['children']['shipping-address-fieldset']['children'])
        ) {
            $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
            ['shippingAddress']['children']['shipping-address-fieldset']['children']['subscribe'] = [
                'component' => 'Magento_Ui/js/form/element/abstract',
                'config' => [
                    'customScope' => 'shippingAddress',
                    'template' => 'ui/form/field',
                    'elementTmpl' => 'ui/form/element/checkbox',
                    'options' => [],
                    'id' => 'delivery-date',
                ],
                'dataScope' => 'shippingAddress.newsletter_subscribe',
                'label' => 'Sign Up for Newsletter',
                'provider' => 'checkoutProvider',
                'visible' => true,
                'checked' => true,
                'validation' => [],
                'sortOrder' => 250,
                'id' => 'newsletter-subscribe',
                'value' => 'subscription',
            ];
        }

I can see the Newsletter checkbox but how can I validate the information to get consumer email in newsletter_suscriber table ?

I modified too : Model/Shipping-save-processor/default.js

saveShippingInformation: function () {
        var payload;

        if (!quote.billingAddress() && quote.shippingAddress().canUseForBilling()) {
            selectBillingAddressAction(quote.shippingAddress());
        }

        var subscribe = $('[name="newsletter_subscribe"]').is(':checked') ? 1 : 0

        payload = {
            addressInformation: {
                'shipping_address': quote.shippingAddress(),
                'billing_address': quote.billingAddress(),
                'shipping_method_code': quote.shippingMethod()['method_code'],
                'shipping_carrier_code': quote.shippingMethod()['carrier_code']
                 extension_attributes:{
                        subscribe: subscribe
                        }
            }
        };

I need your help please!
Best regards!


texts: Difference between core_abstract_delete_after and core_abstract_delete_commit_after events in magento 2

texts:
Can anyone please explain to me what is the use of core_abstract_delete_after and core_abstract_delete_commit_after events in magento 2.

For your information, it is declared in (Magento\Framework\Model\AbstractModel) this abstract class.

If it is possible so please let me know how can I test it.


texts: Empty the Cart and Add the Product Via Link

texts:
Situation:
I have this single product cart as rules on my cart page. What I did was I detect the other product being added by the user and display it on the top of the cart. See this photo:

I want that when you click the continue button the Product on the Cart will be Empty and Replace by the Product Listed on the Notification.
Can a link like /checkout/cart//?id= do that?
If not what would be the possible thing to do?
Note: This is on the Shopping Cart Page.


texts: Magento 2: why contributers can't use the Web Setup Wizard?

texts:
So earlier today I was looking for my update/cron.php folder and I ended up finding that:

  If you cloned the GitHub repository you don’t have an update directory
  and errors result if you run magento setup:cron:run. These cron jobs
  work in the Web Setup Wizard, which contributing developers cannot use
  for installing or updating the Magento application or components.

So my questions are simple:

is there a technical reason why people installing M2 from GitHub can't use the Web Setup Wizard ?
why didn't Magento team include the update folder in the GitHub repo ?
is there any way one can switch to the Web Setup Wizard after installing via GitHub ?

Regarding my last point, Peter O'Callaghan suggested:

  Maybe grab the update folder from the meta package but that might
  now work without the composer dependencies of the core packages.

I don't see the point of limiting users of using one or another way of updating.


texts: I have create a contact us custom module. It is working fine. But I don't know how to include that in a block of cms page. Can some help me here?


texts: Magmi - negative inventory updating issue

texts:
So, I'm using Magmi's ingest functionality to run my own instance of Magmi to import product stocks.

I'm setting an array:

array("sku"=>$sku, "stock_id"=>$key, "qty"=>$qty)

Then ingesting that array. Inventory with positive numbers get imported just fine and updates the old number with the new number.

However, when the new number is negative, instead of setting the inventory amount to that negative number, Magmi subtracts the new inventory from the old inventory.

Example: old inventory is 5, new inventory is -3 and after ingesting the -3, the new inventory number is 2 (where it should just be set to -3).

This effect is cumulative. Ingesting the same negative multiple times keeps driving the negative inventory lower.


texts: is it possible to sort products vertically in grid?(list.phtml)

texts:
I have products which they will be shown horizontally in Grid page,however I want them to be sorted vertically and I have 4 coulmns
if we had a simple array
the out put is

1  2 3 4
5  6 7 8
9 10 11 12

I want the output to be

1 4 7 10
2 5 8 11
3 6 9 12

I wrote a test page without magento a simple array, I want to do this on array of products but I really don't know how to do it? because I have array of products that will be loaded and I should change the order of them. do you have any other idea?

thanks in advance

<?php
$array1=array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25);
$column=4;
$count=count($array1);
$arr=array();
$k=intval($count/4);
$r=($count%4);
$num=0;
for($m=0; $m<4;$m++)
    for($n=0;$n<$k;$n++)
    {
        $arr[$m][$n]=$array1[$num];
    $num++;
    }
    /*
     * build the remainders
     */
    for($i=0;$i<$r;$i++)
    {
        $arr[4][$i]=$array1[$num];
        $num++;
    }
        //print the result
echo "
";
for($j=0;$j<$k;$j++)
{
echo "
";

    for($i=0;$i<=4;$i++)
    {

    if($i==4 && $j<$r)
        {
            echo "".$arr[$i][$j]."	";
        }
        else if($i!=4)
        echo "".$arr[$i][$j]."	";
    }
        echo "
";
}
echo "
";
echo "arraysize is ".$count."
";
echo "division answer is".$k."
";;
echo "remainder is".$r;
?>

here is the list.phtml part

$_productCollection=$this->getLoadedProductCollection();

        <?php foreach ($_productCollection as $_product):

so the $_product array should be displayed vertically

                <?php // Product Image ?>
                <a href="<?php echo $_product->getProductUrl() ?>"
//some other code


texts: how to override Proceed to Checkout button in cart page in Magento 2

texts:
i want to override

<block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.bottom" template="Magento_Checkout::onepage/link.phtml" />

this block i am using thish code in
checkout_cart_index.xml page

<?xml version="1.0"?>

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.cart.methods.onepage.bottom">
            <block class="Namespace\Modulename\Block\Checkoutbutton" name="test" template="Namespace_Modulename::namespace_modulename/checkoutbutton.phtml" cacheable="false" />
        </referenceBlock>

    </body>
</page>


texts: Magento remove prices from Downloadable products

texts:
We have downloadable products without price (0.00€) and added the mysterious price.phtml. Everything works fine, except that the price isn't showed.

I checked with xdebug and the price is printed, but removed through JavaScript. So I dug deeper and found this:

//varien/product.js:728
if (price > 0 || this.displayZeroPrice) {
    formattedPrice = this.formatPrice(price);
} else {
    formattedPrice = '';
}

displayZeroPrice is set to false and I didn't know why, because it is set to true in the beginning of the file.

dig... dig...

/app/design/frontend/base/default/template/downloadable/catalog/product/links.phtml:89
 optionsPrice.displayZeroPrice = false;

Ok problem found, template copied and problem solved, BUT...

Is this intended? Is there maybe a configuration setting I didn't found and don't understand who it is injected into the JS configuration?


texts: I need a video gallery page in Magento Community 1.7 and found the plugin Youtube Video Gallery from magentocommerce.com.  And I have a problem with this plugin. When I access the configuration page of the plugin I get 404 error. Any ideas how to make it  work?


texts: How to create 2 payments for the same Order in Magento?

texts:
Service company has a magento shop.

User can choose specific defect for specific device and make an order.
After several days service company can change an order. Service company manager should be able to do changes in backend and charge user with additional payment.
User should be able to pay an additional payment from his account.

For example:

User orders Change display in iPhone 5 for 200 EUR.
After 6 days service checks device and says that it should be Change CPU in iPhone 5 for 300 EUR.
User should be notified and been able to login to his account and pay additionally 100 EUR and fix his iPhone.

Is it possible in Magento to change existing Order and create additional payment?


texts: Create custom FAQ module in magento 2.3.2

texts:
I want to create custom FAQ module in magento 2.3.2. with no customer involvement.
in backend admin will add questions and ans. and in frontend, it should display on product details page next to descriptions tab https://prnt.sc/tfa9rm
How should i start with this. Please help.


texts:
I have installed a theme on Magento 2.3.3 and it is working fine with all categories and product pages except one category which is showing the Luma theme while the products of that category loading installed theme.
I have compared the setting of the category with other categories and found no difference but still not loading the theme.
I have cleaned and flushed cache also deployed static content.


texts: Magento 2 CMS block and CMS page store change programmatically

texts:
I had migrated data into magento 1.X to 2.X.

In the migrated website I have around 2000 pages+blocks so I have to set all CMS blocks and CMS pages in all stores.

Give me a better solution .


texts: Best approach the load differentiated prices for products per customer?

texts:
I would like to have suggestions what a good approach might be for below scenario.

Our client has:

an external system with product prices in it
the catalog has ~ 50k products
product prices differ from client to client
there is almost no overlap in prices (so each product price is unique for each customer)
prices are managed in the external system
prices can change daily
customers are managed from the external system (and are allready synced with Magento 2)
the products are already present in Magento 2

What is the best way to load prices in to Magento? Normally I would say a cronjob which syncs prices into the system. But the problem is Magento doesn't support different product prices for each customer.

What would be a good way to solve this issue in terms of design/architecture.


texts: Magento Apply percent discount only on one matching items

texts:
Can anyone help me find the products in current shopping cart matching the applied coupon criteria?

Actually I need to set the custom discount (50% on highest one) amount on any one matching products, By default Magento applied the 50% discount in all the matching products buy I need to apply discount on only one item.

I have make some Google and get some links on http://stackoverflow.com and http://www.magentocommerce.com, but not able to get any solution or suggestion.

e.g. I have four items in the cart in those two items matching the coupon criteria (Whatever we have set in condition), So by default Magento apply 50% discount (set in coupon) on these two items, but I want to give the discount only on one(highest price) out of these 2.

"Maximum Qty Discount is Applied To" is work only for same item not for multiple items


texts: How to get Featured products display using attributes

texts: I want to create featured products attribute for that I created an attribute and selected catalog input type as yes/no and then selected used for sorting in product listing but the featured products are not being displayed instead all the products are being displayed


texts:
I am using the below on my 2columns-left.phtml template to detect whether the page is a category page or a product page.

  <?php $_catDetails = Mage::registry('current_category') ?>

  <?php echo Mage::registry('current_category')->getName();?>
  <?php echo Mage::registry('current_category')->getParentId();?>

        <?php if(Mage::registry('current_category')){ ?>
            <?php echo 'I am a category page'; ?>
        <?php } else { ?>
            <?php echo 'I am not a category page'; ?>
        <?php } ; ?>

However this appears to be also echoing on a product page!

Can anyone explain what i am doing wrong, as i thought the first line would detect the Mage page type registration.

Thanks
Kirsty

Update I have also tried the below:

<?php if($this->getCategoryPage()) {
            echo 'This is a category page';
        }else {
            echo 'this is not a category page';
        } ?>


texts: Magento2: breadcrumbs are not shown in checkout page

texts:
After adding this code in checkout_index_index.xml  breadcrumbs are not shown.

<referenceBlock name="breadcrumbs">
        <action method="addCrumb">
            <argument name="crumbName" xsi:type="string">Home</argument>
            <argument name="crumbInfo" xsi:type="array">
                <item name="title" xsi:type="string">Home</item>
                <item name="label" xsi:type="string">Home</item>
                <item name="link" xsi:type="string">/</item>
            </argument>
        </action>
        <action method="addCrumb">
            <argument name="crumbName" xsi:type="string">Checkout</argument>
            <argument name="crumbInfo" xsi:type="array">
                <item name="title" xsi:type="string">Checkout</item>
                <item name="label" xsi:type="string">Checkout</item>
            </argument>
        </action>
    </referenceBlock>

Note:same works for checkout cart page but not for checkout page


texts:
If I use the module:enable or module:disable command to enable or disable a module,

php bin/magento module:enable Pulsestorm_TutorialObjectManager1
php bin/magento module:enable Pulsestorm_TutorialObjectManager1

The output will include the following contents

  Alert: Generated static view files were not cleared. You can clear them using the --clear-static-content option. Failure to clear static view files might cause display issues in the Admin and storefront.

What exactly is a static generated view file?

Where do these files live?

If I include the --clear-static-content option am I just deleting files, or will this reset other things in the system as well?


texts: Magento2.1 ui grid, remove or clear filter issue (after removing filter, result row apply to whole collection)

texts:
I created ui grid in magento 2.1.0 and facing issue while removing filters or clear all filters from ui grid. My filtered result occupies whole grid means same row repeated in the whole grid after removing filter.

I figure out why this issue arise, but unable to fix this issue.

Issue arise due to mui/index/render get request does not fire while removing filter or clear all filter.

In fact it worked when 2 or more filters are applied and I remove them but not in case of last filtered applied.


texts: My field Zip still stay unrequired in my customer form

texts:
I try to put a required-entry to my field "zip" but the  * still shows as display:none.

If someone can help me it would be great =)

        *<?php echo $this->__('Zip/Postal Code') ?>

            <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text required-entry validate-zip <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />

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

            <?php echo $this->getCountryHtmlSelect() ?>

As you can see they are: *

and <input [...] class="input-text validate-zip">

even if i set required-entry in my code, the class required-entry is not apply


texts: How can i get the status of product in magento cart by customer id and product id?

texts: I want to get the status of customer cart for a particular products that is products added in his cart or removed. I have loop of products and each products have customer and i have customer_id , product_id now i want to check that is this products added in customer cart or not.


texts:
2013-12-18T12:48:28+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '373-0-1' for key 'PRIMARY' Trace: #0 /html/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /html/magento/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /html/magento/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /html/magento/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php(564): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...')
#6 /html/magento/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php(122): Mage_Catalog_Model_Resource_Product_Indexer_Price_Default->_movePriceDataToIndexTable()
#7 /html/magento/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(385): Mage_Catalog_Model_Resource_Product_Indexer_Price_Default->reindexAll()
#8 /html/magento/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
#9 /html/magento/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /html/magento/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#11 /html/magento/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#12 /html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#13 /html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#14 /html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#16 /html/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#17 /html/magento/index.php(86): Mage::run('', 'store')


texts:
I have a Contact Us page within the main menu in my site:

https://staging.propmasters.net/

The main menu links to https://staging.propmasters.net/contactus.html

Where can I edit this content? I've looked everywhere but can't find it in Pages, Widgets or Blocks

I'm using the Ultimo Theme, thanks!


texts: Magento2 custom admin menu link is redirecting back to admin dashboard

texts:
I have created a menu in admin page and its showing properly and its having a link http://localhost/magento2/admin/asw_advanced/sales/index/key/17910c3f00de5194db7f0a418e9f9d38a487af1c29bdfb16fc1dd406eac24101/

when i clicked on this its redirecting to admin dashboard itself.
The error showin on the magento system log is..

[2016-04-04 06:57:59] main.CRITICAL: Broken reference: the 'header' tries to reorder itself towards 'global.notices', but their parents are different: 'page.wrapper' and 'notices.wrapper' respectively. [] []
[2016-04-04 06:57:59] main.CRITICAL: Broken reference: the 'page.breadcrumbs' tries to reorder itself towards 'notifications', but their parents are different: 'page.wrapper' and 'notices.wrapper' respectively. [] []
[2016-04-04 06:57:59] main.CRITICAL: Broken reference: the 'global.search' tries to reorder itself towards 'notification.messages', but their parents are different: 'header.inner.right' and 'header' respectively. [] []

when i disable the security key to url in store > advanced > admin the page works fine. How to make it work with security key enabled.?

Asw/Sample/etc/adminhtml/menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Backend/etc/menu.xsd">
    <menu>
        <add id="Asw_Sample::advanced" title="Advanced Reports" module="Asw_Sample" sortOrder="30" resource="Asw_Sample::advanced"/>
        <add id="Asw_Sample::advanced_sales" title="Sales order" module="Asw_Sample" parent="Asw_Sample::advanced" sortOrder="1" action="asw_advanved/sales" resource="Asw_Sample::advanced_sales"/>
    </menu>
</config>

Asw/Sample/etc/acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Asw_Sample::admin">
                <resource id="Asw_Sample::advanced" title="Advanced Reports" sortOrder="10" >
                    <resource id="Asw_Sample::advanced_sales" title="Sales Order" sortOrder="40"/>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

Asw/Sample/etc/adminhtml/routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="admin">
        <route id="Asw_Sample_advanced" frontName="asw_advanved">
            <module name="Asw_Sample" before="Magento_Backend"/>
        </route>
    </router>
</config>

Asw/Sample/Controller/Sales/Index.php

<?php
namespace Asw\Sample\Controller\Adminhtml\Sales;

use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;

class Index extends \Magento\Backend\App\Action
{
    /**
     * @var PageFactory
     */
    protected $resultPageFactory;

    /**
     * @param Context $context
     * @param PageFactory $resultPageFactory
     */
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }

    /**
     * say admin text
     */
    public function execute()
    {
        print("ssss");
    }
}


texts: Magento 2 multiple websites but same product catalog

texts:
In Magento 2, it's possible to create multiple websites and share the same product catalog once the product is posted? (Not by doing manually) So far I'm able to do it with multi-stores and different domains but not with multiple websites. Multiple websites do share the same root category but the products posted on website A doesn't show in website B.

Products must keep same description, photos, price, stock, etc.


texts:
I am using the Ultimo theme.  As per its documents it says to make a child theme and then add any custom css in the provided less file.

I have done this but it is difficult to get it to generate the LESS.  If I update the LESS file and then deploy static content the css file is not updated.

The only way I have found to get it to generate the file is if I switch into developer mode and then switch back to production mode.

In developer mode the site wont even load, it just hangs halfway finished but switching back makes the LESS compile.

I have all caches disabled.  Why doesn't the LESS compile with deploy static content?  Is there a different command to compile the LESS?


texts: Add parent filter to category collection

texts:
Is the more native way of adding parent filter on a category collection other than a direct where showcased below?

/** @var Mage_Catalog_Model_Resource_Category_Collection $categoryCollection */
$categoryCollection = Mage::getResourceModel('catalog/category_collection');
$categoryCollection->getSelect()->where('e.parent_id = ' . $parentId);


texts: Magento 2.3.3 - Programmatically shipment email sent in the wrong language

texts:
I am trying to programmatically create the shipment and I succeeded in this operation.
To do this I create a new CLI Command which I obviously run by command line.

I have only 1 storeview and the default locale is Italian.

The problem is about sending the email to the customer because it is always sent in English.

I try different ways to send the shipment email and the last is using the class

Magento\Sales\Model\Order\Email\Sender\ShipmentSender

in this way

$this->shipmentSender->send($shipment);

after had set

$this->state->setAreaCode(\Magento\Framework\App\Area::AREA_FRONTEND);

I also tried the class

Magento\Shipping\Model\ShipmentNotifier

in this way

$this->shipmentNotifier->notify($shipment);

I also try to embed the code inside a statement of EnvironmentEmulation using

Magento\Store\Model\App\Emulation

using the following code

$this->emulation->startEnvironmentEmulation($order->getStoreId());

// send shipping confirmation e-mail to customer
$this->shipmentNotifier->notify($shipment);

$this->emulation->stopEnvironmentEmulation();

I don't know if this is a bug, as many other I found or if I'm wrong.

Note: if i create and send the shipment from backend the email is in the correct language.

EDIT:

I try executing the code by external php script using ObjectManager with the following code:

<?php
use Magento\Framework\App\Bootstrap;

require __DIR__ . '/../app/bootstrap.php';

$params = $_SERVER;

$bootstrap = Bootstrap::create(BP, $params);

$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$orderId = "000000009";

$order = $obj->get('Magento\Sales\Model\OrderRepository')->get($orderId);

$notifier = $obj->get('Magento\Sales\Model\Order\Shipment\NotifierInterface');

foreach($order->getShipmentsCollection() as $ship) {

    $notifier->notify($order,$ship);

}

?>

...but I get the same result: the shipment email is sent in english and not i italian.

Please, help me!

Thank you.


texts: Magento 2.3.5 : Path "/theme/origin" cannot be used with directory "/var/www/html/m235/pub/media"

texts:
I am upgrading Magento 2.3.3 store to Magento 2.3.5
I go to Themes tab in admin (Content > Design > Themes) and try to save my theme.
But it returns this error

Path "/theme/origin" cannot be used with directory "/var/www/html/m235/pub/media"

How to solve it?
Thanks.


texts: Extra fee or premium in checkout (optional to choose)

texts:
Good evening,

I'm trying to achieve the following: customers can choose in the checkout (either at shipping method or payment information) between two options. First option is one in which 4% of fee is added as we simply collect the order for them from the different suppliers. In the second option we not only collect, but we also make sure that the order is being optimized with regard to transportation (as different suppliers will send in boxes which are half full). In this case we charge 10%, as the customer (picking it up themselves) has less boxes to transport.

The solution I came up with/found is to set up a negative discount in "shopping cart price rules" (not optimal as core modification is required) for both options. Then link these to two flate rate shipping options. However, I'm using the Matrix Rates module in order to calculate the shippings costs dependend on the weight. As a result I can only link one option, which is clearly not what I'm looking for.

Hope my explanation is clear enough. Is there anyone who might ran into something alike, or can give me some direction/ideas what other options are available?

Thanks to you all for your responses, we have decided (as advised by one of you as well) to simplify the process itself. As we think we run into too much inflexible modifications.


texts: How do you give estimates for Magento upgrade?

texts:
Overview:

This question was originally asked and later closed on StackOverflow. We stated in meta, that here is the right place for this question.

This question is in favor to help to many people to find the proper way to estimate the Magento upgrades.

The question:

I am interested to know how do you measure the needed time for Magento upgrade?
I guess, that most of you had hard time to answer on the client's question: "How long it will take to upgrade my Magento store?"

Usually the client needs to hear just a number for e.g.:
"It will take X hours and it will cost Y bucks."

The main idea behind the question is about the technical side
and what do you check as developer to make your own calculations for Magento upgrades.

I created the next check list, just for my own calculations:

Is the Magento core touched?
Is the Magento DB schema touched?
Do we have inconsistent data in the DB?
How many custom extensions are installed in local and community code pool?
Are the custom extension compatible with the latest version of Magento?
Did the theme developer used local.xml file for the the layout directives,
or just copied xml files from the base/default/layout to the layout directory
of the custom theme?
Do we have deprecated layout directives / block methods in the layout xml files?
Have I developed this Magento shop?

Do you think, that I am missing something and if yes, would you like to share with me and the community your additional points for the check list?


texts:
I have many pages which has different url key for different stores.

Can I get current URL on basis of store ID. function I am using right now is getCurrentUrl().

I mean let suppose i have two stores en and fr. Now I have a page with 2 url

(page-en.html, page-fr.html).

Right now let suppose i am at

page-en.html

so if I write something like getCurrentURL(fr) then I should get

site_url/page-fr.html.


texts:
Magento 2 | Product Details API rest/V1/products/:SKU, getting multiple datatype in response so when I am parsing using retro-fit library getting error.

Please suggest what best way to to sort out with retro-fit library.

Response:

"custom_attributes": [
    {
      "attribute_code": "description",
      "value": "
Product Features:
\r\n
\r\n
100% cotton
\r\n
Interlock jersey
\r\n
"
    },
    {
      "attribute_code": "short_description",
      "value": "
100% cotton, interlock jersey zip up hoodie with hand palm print at chest and Body Glove print on right sleeve.
"
    },

    {
      "attribute_code": "category_ids",
      "value": [
        "3",
        "128"
      ]
    },

In response category_ids value in array and other attribute value in string.


texts: Magento2: Add custom template to product details page below add to cart section

texts:
I'm trying to add custom template to product page under social sharing section. In my module I've following code in layout file default.xml

 <referenceContainer name="product.info.social">
  <block class="Magento\Framework\View\Element\Template" name="product.info.custom" template="Lapisbard_Product::social.phtml" after="product.info.addtocart">
  </block>
 </referenceContainer>

social.phtml content

Hey there !

<?php //$_product = $block->getProduct();

It is working fine and showing template content on product page. When I'm using block class Magento\Catalog\Block\Product\View instead of Magento\Framework\View\Element\Template so that I can get product object in my template using $block->getProduct();, it's showing a blank page.
 1. What mistake I'm doing here?
2. What is the best way to modify product page?
3. Is there a reference layout file which I can use to add new templates to any section of product page writing layout code in my module?


texts: Magento 2 : the JS messages do not translated!

texts:
I use magento 2.0 and I have a problem.

The JS messages of fields control do not translated (like Please enter a valid email address (Ex: johndoe@domain.com). or Please enter 6 or more characters. Leading or trailing spaces will be ignored.)

This is a sample:


texts: Need fix for the codesniffer warning "The use of function sleep() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged)"

texts:
When I run PHP Code sniffer on my code, I see the below warning.

WARNING | The use of function sleep() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged)

Which class method provides an alternative for the sleep() method in Magento 2 framework that fixes the above warning and follows the magento best practice.


texts: Append dynamically generated HTML to product description tab (2.1)

texts:
Currently I'm working on a Magento 2.1 webshop which deals in car parts. Each part should should a list of car models that can use this part. This list is generated dynamically based on a set of filters attached to the products.

Generating the list items is no problem, but now I want to show these items in a list below the description. The content has to be appended to the contents of the product.info.description block.

So far I've managed to add the list as a separate tab using the following code:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.details">
            <block class="MyModule\CarLabels"
                   name="carlabels.tab"
                   as="carlabels"
                   template="MyModule::carlabels.phtml"
                   group="detailed_info">
            </block>
        </referenceBlock>
    </body>
</page>

Since I don't want an extra tab, I've also tried to add the block after the description block. The code below did not work:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.details">
            <block class="MyModule\CarLabels"
                   name="product.info.carlabels"
                   template="MyModule::carlabels.phtml"
                   after="product.info.description">
            </block>
        </referenceBlock>
    </body>
</page>

In /vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml you can see that the description block calls a method called getDescription(), so I'm thinking one might be able to overwrite this method and append to it without destroying the original content?

Reference (taken from Magento source code):

<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.details" template="product/view/details.phtml" after="product.info.media">
    <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" template="product/view/attribute.phtml" group="detailed_info">
        <arguments>
            <argument name="at_call" xsi:type="string">getDescription</argument>
            <argument name="at_code" xsi:type="string">description</argument>
            <argument name="css_class" xsi:type="string">description</argument>
            <argument name="at_label" xsi:type="string">none</argument>
            <argument name="title" translate="true" xsi:type="string">Details</argument>
        </arguments>
    </block>
    <block class="Magento\Catalog\Block\Product\View\Attributes" name="product.attributes" as="additional" template="product/view/attributes.phtml" group="detailed_info">
        <arguments>
            <argument translate="true" name="title" xsi:type="string">More Information</argument>
        </arguments>
    </block>
</block>

I'm hoping someone can point me in the right direction here. Does anyone know how to append to the product description?

PS In case you didn't notice yet, I'm a Magento-newb. Googling this issue always seems to lead back to articles about creating a new tab, which is not the goal in this case (and something that I already created as a working test case).


texts:
Hello Magento Community,
i´m setting up a shop/reseller platform, where sellers first send the package to the shopowner, who will retransfer the item to the buyer. Therefore each party (seller & buyer) have to pay for the shipping costs.

So the seller pays shipping by himself, but needs to define shipping while entering the product to the shop. Because buyer needs to pay the same shipping. So that ther will be no shippingcosts for the shopowner.

I thought about a form/dropdown where the seller can choose from 5 predefines shippign methods, while he inserts an item. Therefore a price will be added to the selling price. I want to use DHL only, but i thing using the DHL Extension woul be too much probably.

How would you solve this ? I´d appeciate some hints and tips very much.
Thank you in advance


texts: Can we use "paypal payment method" for indian shopping website

texts:
We are planning to use "paypal payment method" as payment option for indian shopping site.

Assume Indian customers (buyers of products) have paypal account & Owner/admin of the site have paypal account.

Is it possible to use"paypal" in indian shopping sites?

If so, is it possible to pay use "online net banking through paypal" for all banks?

Please guide me.


texts: magento running even after deleting core modules files

texts: I have developed magento theme now. i wanted to add some custom function now when i change on core modules or die dump delete nothing would happen my code still gets parsed


texts: Update description for product with csv for one store only magento 2

texts:
I want to update some fields of product only in one store  (magento2), but all stores are updated

Any ideas ?


texts: Magento 2 How to send order email copy to custom email address with custom module when order placed, by custom observer and events.xml?

texts:
I have one module where i can set email address in back end. When order placed i want to send that order email copy to my custom email address which is set in backend.
I want to add an observer when order placed and send email copy to my custom email address.
how can i achieve this functionality with custom module?
Thanks.


texts: when i upload CSV, it is display 0 error. but while import, it gives error as Cannot add or update a child row: a foreign key constraint fails

texts:
When I upload CSV file it gives 0 error. After this I click on import button. It gives following error:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
  update a child row: a foreign key constraint fails
  (magentostore_dbname.catalog_product_entity_media_gallery,
  CONSTRAINT FK_CAT_PRD_ENTT_MDA_GLR_ATTR_ID_EAV_ATTR_ATTR_ID FOREIGN
  KEY (attribute_id) REFERENCES eav_attribute (attribut), query
  was: INSERT INTOcatalog_product_entity_media_gallery
  (attribute_id,entity_id,value) VALUES (?, ?, ?) ON DUPLICATE KEY
  UPDATEentity_id= VALUES(entity_id`)

Does anyone know, how to solve it?


texts: How to save multiple check box value in custom module and show selected in grid and edit in magento admin

texts:
I need to selected checkbox value in Admin Grid and edit are of admin I need to know

that what way i need to save that in database...

and how to get and show selected in grid and edit form in admin ..

my save way

$checkString = serialize($this->getRequest()->getPost('ecommerce_sites'));

and the whole array is saved in data base..

i need to know that how to get and show check box in edit in admin of magento


texts: Need help to display custom message in Magento Shipping Module

texts:
I am creating shipping module. Which is working fine. But in addition I want to show custom message with each shipping method I have used.

For example In this below code I have used $rate->setMethodTitle('Standard delivery'); to set title of the method, with this method I want to display a description too. Please guide how I can define a description of this method.

$rate = Mage::getModel('shipping/rate_result_method');
$rate->setCarrier($this->_code);
$rate->setCarrierTitle($this->getConfigData('title'));
$rate->setMethod('large');
$rate->setMethodTitle('Standard delivery');
$rate->setPrice($price);
$rate->setCost(0);


texts:
as far as I understand when you have a <source_model> in your system.xml, it searches through the specified module for the function of getOptionArray(), right now I need to show all the attribute set names in a multi-select in the system configuration and was wondering why getoptionarray does not exist for the eav/entity_attribute_set?  does it exist somewhere else which I am not aware of?

<show_attributesetname translate="label">
<label>show_attributesetname</label>
<frontend_type>multiselect</frontend_type>
<source_model>eav/entity_attribute_set?????</source_model>
<sort_order>21</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</show_attributesetname>

I was wondering if it exists and I just could not find it. if it doesn't exist then I should go ahead and add a tooptionarray to my module.

wanted to know if it really does not exist?? since doesn't seem right to me.


texts: How to redirect user after an amount of time?

texts:
We need to show a page in case users come from a specific URL therefore we can achieve it with the following:

$refererSite = Mage::helper('core/http')->getHttpReferer();

however if user is not active for 30 minuets, the page should automatically be redirected to homepage.

We can create a session for the user by

Mage::getSingleton("core/session")

and give some time to it

$myValue = time();
Mage::getSingleton('core/session')->setLoggedTime($myValue);

I know the PHP way that is

header("refresh:1800;url=homepagexxx.php");

but is that what I should do?

Now one question is do I need to create a session at all or whoever comes already has a session and I need to set a time limit for it? if yes how to set a time limit and use it for refresh?

I am not sure how to tell that if session is not active for 30 minuets then redirect them to the homepage.

based on my experience even if you are not active, nothing will happen to the frontend webpage, Then I have to do something to force the page to refresh again.


texts: Why does "Magento Commerce" appear in place of my logo when I try to change it?

texts:
I've created a new logo for the index page of my Magento Commerce 1.8.1 installation and after I refresh the page, the logo doesn't show up.

Instead, there is a link to the index page with the title "Magento Commerce".

Why does this happen?


texts:
Can anyone advise how to list categories in a CMS page? For example, we have a category for each brand in our shop. I would like to list them all in a single CMS page. I realise I could do this using HTML but I want it to be automated, so if I disable a category it is removed from the list on the CMS page.

I wonder if there's an extension that achieves this or whether it can be done using something built into Magento?

Thank you.


texts: Magento 2 : Custom grid cannot export to csv or XML

texts:
I've created custom grid block using UI component but I can not export it to csv file.

I'm getting the error:

Undefined index: attributes in vendor\magento\framework\View\Element\UiComponentFactory.php on line 166

My module is here: https://github.com/helmsmantest/M2-Custom-grid


texts: Overwrite template of sales_email_order_items?

texts:
I am always confused by Magento's template hierarchy. Within my email template, I can find this path:

{{layout handle="sales_email_order_items" order=$order}}

I navigate to my themes folder in app/design/frontend/default/ves_fashion/layout and cannot find the sales.xml. Thats why I go to app/design/frontend/base/default/layout and see the sales.xml. Inside this xml file I look for "sales_email_order_items".

   <sales_email_order_items>
        <block type="sales/order_email_items" name="items" template="email/order/items.phtml">
            <action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/order/default.phtml</template></action>
            <block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">

I can find the template files in the folder app/design/frontend/base/default/template/sales/order/

I read that I just have to copy the default.phtml and the totals.phtml in the same path for my theme which is app/design/frontend/default/ves_fashion/layout but when I do this nothing changes. Why? Do I have to copy the sales.xml to my themes folder?


texts: Magento 2.3.XX unable to serialize value. error: malformed utf-8 characters, possibly incorrectly encoded

texts: How can this be solved after upgrading magento 2.2.X to 2.3.X :


texts: How to products disable using attributes name with mysql in magento 1.9?

texts: Magento have 26500 products are available and I want to disable all this product using MySQL because via Magento take lots of time. all products attributes set name is Diamond and Diamond id is 9. Please help me in this case.


texts:
I am quite new to magento. I can work with simple tasks on there and i know quite a lot of html but there is one thing im wanting to do that i cannot find how to do. I am using magento 1.9.

my current website is this :http://www.suffolkfasteners.com/
it still needs a lot of work but i would love to change the layout of how the products are listed. I have found a website idea id love to do but i am not sure how or where to input it into magento.
The website is : https://shop4fasteners.co.uk/fasteners/washers/repair-washers/repair-penny-washers-stainless-steel-a2.html

They list all the products relating to that listing on one page making it easier and more tidy.

How do i do this? ive been looking everywhere and asking everyone to help me but no one seems to know much about Magento.

Thankyou


texts: How to filter products as per custom attribute value in Magento 2

texts:
I am trying to sort products as per the custom attribute value "new_sort_by" but unfortunately I could not filter.  please check my code

Create a product attribute "new_sort_by"

add the below code for filter products.
 $productCollection = $block->getProductCollection();
 $productCollectionnewproducts = $productCollection->addAttributeToSort("new_sort_by","ASC")
                                 ->addAttributeToSort('name', 'ASC');
 echo $productCollectionnewproducts->getSelect()->__toString();
 $itemsnewproducts = $productCollectionnewproducts->getItems();

Used for Sorting in Product Listing = Yes

save the attribute and clear the cache.
also re-index the data.
I am saving products with attribute (new_sort_by) value in number (1,2,3,4,5) and want to sort products with the attribute value in ASC order.


texts: How can I get only the downloadable product URL in email template?

texts:
As the title suggest and as screeshot show, how can I get only the downloadable product URL of every product ordered and show it in email template?

I want to highlight the link(s) in the email sent.


texts: Sort By option not working properly when using ascending or descending button

texts:
So the problem is as follows:
I have the Sort By option set to "Price", but once i try to change the order from descending to ascending or vice versa, the Sort By" turns back to Relevance (Which is the one i have by default)... Is there any way i can use the order button and keep the sort on price?.
I upload images of the Code and the Sort By bar.

And the code goes as follow:
This is the sorter.phtml

An this is toolbar.phtml (which contains the sorter)


texts: Override a parent theme in vendor with a child theme in app Magento 2.3

texts:
I have made a theme that is a child to a customized theme that is a child of Luma.

My theme lives in:

app/design/frontend/{mycompany}/{mythemename}/

My themes parent lives in:

vendor/{vendorcompany}/{vendorthemedirectory}/

The parent is overriding:

Magento_Catalog/templates/product/view/gallery.phtml among other files, like so:

vendor/{vendorcompany}/{vendorthemedirectory}/Magento_Catalog/templates/product/view/gallery.phtml

I want to override this override but I can't seem get the directory structure of my child theme right or maybe I'm missing something else.

My first thought is to create it like so:

app/design/frontend/{mycompany}/{mythemename}/{vendorcompany}_{vendorthemedirectory}/Magento_Catalog/templates/product/view/gallery.phtml

But that doesn't seem to work.  gallery.phtml is still loading from the parent.  I've tried a few combinations of directory structure without luck.  How do I override the override?


texts: How Display Category name in magento menu in two lines?

texts:
I am working with magento 1.7 and i have many long categories name in my site. I wish to split every long category name in two line in menu because i would like to display my menu in one row and not two. Any idea ???
Thanks


texts: Magento 2 - get current tax clas in custom module

texts:
I'm trying to solve a Magento 2.1.2 bug (Tier price percentage incorrect if special price set - https://github.com/magento/magento2/issues/6923) by creating a custom module.

My code so far:

<?php

namespace Namespace\TierPricingFix\Pricing\Price;

use Magento\Catalog\Model\Product;
use Magento\Customer\Api\GroupManagementInterface;
use Magento\Customer\Model\Session;
use Magento\Framework\Pricing\Adjustment\CalculatorInterface;
use Magento\Framework\Pricing\Amount\AmountInterface;
use Magento\Framework\Pricing\Price\AbstractPrice;
use Magento\Framework\Pricing\Price\BasePriceProviderInterface;
use Magento\Framework\Pricing\PriceInfoInterface;

//Added
use Magento\Catalog\Pricing\Price\FinalPrice;

 class TierPriceFix extends \Magento\Catalog\Pricing\Price\TierPrice
 {
   const TAXNL = 1.21; // Multiply base amound with NL tax 21%
   /**
    *  TODO: make TAXNL dynamic.
    */

   // Fix for https://github.com/magento/magento2/issues/6923
   public function getSavePercent(AmountInterface $amount)
   {
       return ceil(
           100 - ((100 / $this->priceInfo->getPrice(FinalPrice::PRICE_CODE)->getValue())
               * ($amount->getBaseAmount()*self::TAXNL))
       );
   }
 }

The module works as expected, the tier pricing discount percentage are generated correctly. However I want to make the constant TAXNL variable, so that it also works with other European tax percentages.

What is the best way to get the current tax percentage on a Magento 2 product page with tier pricing?

I've tried addding Magento\Tax\Model\TaxCalculation to the __construct method but this didn't work.


texts: Adding custom product attributes to layered navigation

texts:
I've added a product attribute by adding the following to InstallData.php within my module.

 $eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'allergens',
        [
            'type' => 'int',
            'label' => 'Free from the following allergens',
            'input' => 'multiselect',
            'required' => false,
            'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
            'global' => Attribute::SCOPE_GLOBAL,
            'visible' => true,
            'user_defined' => false,
            'searchable' => false,
            'filterable' => true,
            'filterable_in_search' => true,
            'comparable' => false,
            'visible_on_front' => false,
            'unique' => false,
            'group' => 'General',
            'is_used_in_grid' => true,
            'is_visible_in_grid' => false,
            'is_filterable_in_grid' => true,
            'label' => [
                'values' => [
                    'Gluten',
                    'Soy',
                    'Eggs',
                    'Shellfish',
                    'Dairy',
                    'Fish',
                    'Nuts',
                    'Yeast'
                ]
            ]
        ]
    );

I've checked this attribute in the CMS, and i can see it's marked as filterable with results, and use in layered navigation is set to true. The issue is that it's not appearing alongside the other filters in my custom layered navigation.

$block->getFilters() is retrieving the filter,

but when i echo the results echo $filter->getItemsCount() it's showing 0 results? Even though i have products with this attribute assigned.

The product deffinately has the attribute saved correctly, so i'm not sure what's happening here.

Any help would be appreciated.

Thanks


texts: Changes to a .php file not getting compiled

texts:
I made some changes to the file app/code/core/Mage/Checkout/Model/Observer.php.
However those changes are not reflecting in includes/src/__checkout.php in the Mage_Checkout_Model_Observer class.(After flushing all the magento caches)

In fact, I put some obvious errors in the app/code/core/Mage/Checkout/Model/Observer.php file (removed the closing bracket of the class), still did not get any error anywhere from the website.

Why is magento ignoring changes I make to a php file?


texts: Get order data by product id Magento 1.9

texts:
i want to get all data (order_id , Bill to Name , ship to Name , BaseGrandTotal , GrandTotal ,Status ) about order with the known of product ids

Here is the sample of my code

    $ids=array();
    foreach ($collection as $product) {
        $ids[]=$product->getId();
    }
    $collection = Mage::getResourceModel('sales/order_item_collection')
                ->addAttributeToFilter('product_id', array('in' => $ids))
                ->load();