texts:
I'm using a custom theme on my Magento 2.3.2.
I would like to add a custom font that is on my folder.
Since the official guide that i found on magento's site wasn't working for me, I've tracked down where the font in .body was set.
I've found the file lib/web/css/source/lib/variables/_typography.less
This is the piece of code that decides the font
@font-family__sans-serif: 'Helvetica Neue', Helvetica, Arial, sans-serif;

Now, I've tried to change those names and I can see changes happening on the site, problem is I can't figure out how to set the path to my custom font. I've tried a few things but nothing worked.


texts: how form_key is forcefully required in the Magento 2.3?

texts: form_key was always the required in the Magento, but in Magento 2.3 they made the form_key forcefully required. So, I want to know, how Magento is validating the form_key in every post request.


texts: How to add third part php library that doesn't follow Magento standards?

texts:
I would like to use an external library (PayPal SDK to be specific) in /lib of Magento.  I will use it in a new module.

I've put lib/PayPal folder inside a new folder /lib/PayPal, but the class names doesn't follow Zend standards (i.e.: the classes has single names, like "class Address extends... instead of PayPal_Api_Address", so Magento doesn't autoload them.

I see I can use set_include_path to add the new path for being used in Magento, but I'm not sure this is the best approach.

If it is, what would be the best place to do it without having to add it inside each class of my new module?

Any help is appreciated.
Thank you very much.


texts: Magento 2 - What should repository methods return?

texts:
This question has been on my mind for some time. I'm currently writing a repository with the usual methods: save, getById, getList, delete and deleteById. What is the correct return for each method?

Repository::save($dto)
- should the method return **$this**, **$dto** or (true || false)?

Repository::getById(int $id)
- for this one I'm pretty sure that it should return the corresponding DTO

Repository::getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
- should the method (always) return \Magento\Framework\Api\SearchResults $searchResult

Repository::delete($dto)
- should the method return **$this** or (true or false)?

Repository::deleteById(int $id)
- should the method return **$this** or (true or false)?


texts: Upgrade Magento 2.2.6 to 2.3.0 Resolving dependencies through SAT

texts:
I am trying to update my Magento CE 2.2.6 to CE 2.3 with composer but am getting the following.

Reading C:/Users/garry/AppData/Local/Composer/repo/https---repo.packagist.org/provider-php-cs-fixer$diff.json from cache

Resolving dependencies through SAT
Looking at all rules.
Something's changed, looking at all rules again (pass #1800)

The pass counter keeps counting up and I have left it overnight but it does not finish, now it's been going for over an hour.

I have followed the instructions here.

I think it has something to do with friendsofphp/php-cs-fixer:~2.10.1. I have tried installing it separately but with no luck.

My composer.json

{
    "name": "magento/magento2ce",
    "description": "Magento 2 (Open Source)",
    "type": "project",
    "version": "2.2.4",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
        "magento/data-migration-tool": "2.2.4",
        "magento/product-community-edition": "2.3.0",
        "msp/recaptcha": "2.0.0",
        "faonni/module-indexer-url-rewrite": "^2.0"
    },
    "require-dev": {
        "phpmd/phpmd": "@stable",
        "phpunit/phpunit": "~6.2.0",
        "friendsofphp/php-cs-fixer": "~2.10.1",
        "lusitanian/oauth": "~0.8.10",
        "pdepend/pdepend": "2.5.2",
        "sebastian/phpcpd": "~3.0.0",
        "squizlabs/php_codesniffer": "3.2.2"
    },
    "extra": {
        "component_paths": {
            "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js",
            "components/jquery": [
                "lib/web/jquery.js",
                "lib/web/jquery/jquery.min.js",
                "lib/web/jquery/jquery-migrate.js"
            ],
            "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader",
            "components/jqueryui": [
                "lib/web/jquery/jquery-ui.js"
            ],
            "twbs/bootstrap": [
                "lib/web/jquery/jquery.tabs.js"
            ],
            "tinymce/tinymce": "lib/web/tiny_mce"
        }
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        },
        "psr-0": {
            "": [
                "app/code/"
            ]
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "stable",
    "repositories": {
        "magento": {
            "type": "composer",
            "url": "https://repo.magento.com"
        },
        "data-migration-tool": {
            "type": "git",
            "url": "https://github.com/magento/data-migration-tool"
        }
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true
    },
    "prefer-stable": true
}

Does anyone know how to resolve this?

Many thanks in advance.


texts: Is it possible for customers to login with a customer number instead of a email address

texts:
I want to create a login page that uses a assigned customer number instead of their email address. The way my business is setup, on a separate eComms platform, they access their account with a customer number because their are multiple account managers for one account. I create accounts for them and then assign a customer number, which they then use to login, with a  password.

Any help would be greatly appreciated.


texts:
I have two identical configurable products ( name and photoes are little bit different).
from admin everything is the same but one configurable product is visible other is not. Skus are not identical so that is not a problem.


texts: Magento 2 Visible Google Recaptcha validation for Newsletter

texts:
I have downloaded mageplaza's free recaptcha module from here:

https://github.com/mageplaza/magento-2-google-recaptcha

However I want to show "I am not a robot" Visible recaptcha for my newsletter at footer.

The issue is if I select Invisible from admin the "Invisible Recatpcha" is working fine without any error. But I am unable to validating the "Visible Recaptcha" like "I am not a robot". If I click directly on subscribe button with email, it reloads the page without validating the captcha.

Thank You.


texts:
i need to make that bar have the same margin as the whole page and be responsive. Im not being able to do so. Im new to css html and stuff, i've tried adding padding, margins, float and was unssucesful, could someone give me a hand?

Webpage


texts: Magento2.1 payment method and shipping method on my orders of buyer panel

texts: I want to show shipping method and payment method of my orders in my orders on customer panel. i'm using magento 2.1


texts: show only these products in search result whose category is active in Magento 1.9

texts:
In Magento 1.9, if user search "watch" in search box then only these product should show whose category is active.
Please suggest me how can i do this.
Thank you


texts: Show list of Brands (manufacturers) on CMS page

texts:
How would I list all brands and images on a CMS page? I am using an attribute named 'brands' and would like to call each one and display the image. I am using the following code to display on product page and it works great. All my brand images are located in /media/wysiwyg/brands/.

<div class="brandImage"
<?php $_product = $this->getProduct(); $manufacturerName = $_product->getAttributeText('brands'); $manufacturerId = $_product->getManufacturer(); echo '' ?> <img src="../media/wysiwyg/brands/<?php echo str_replace(' ', '-',strtolower($manufacturerName)); ?>.png" alt="<?php echo $manufacturerName; ?>" title="<?php echo $this->__('to see more from') ?>&nbsp;<?php echo $manufacturerName; ?>&nbsp;<?php echo $this->__('click here') ?>" />

I have also read that I should create a custom module, and used this page as an example, but can't figure out how to put the php code in.


texts: creating a new attribute to default to another attributes value

texts:
I am creating a new custom product attribute and I would like it should by default be populated with the product name value that I can change it to something else later.
Can I do this in magentos admin panel?
If not how do i execute a script to do this for me.
thanks!!


texts: Magento 2 : How to get swatch attribute label

texts:
I have an attribute "brand" with type Swatch.

I have created many brands as an option in this attribute.

I want to filter brands label which are starts with a particular letter (ex. A or B or C).


texts: New Order Confirmation Email Not Being Sent

texts:
We have a fresh Magento installation 1.9.2.4. Confirmation emails for new orders are not being sent. After reading this thread, it's clear that Magento now queues all new order emails. That thread has many people suggesting to just override the queue - not a good solution. Queueing emails was done for performance. Nevertheless, our order emails are not sending.

Considerations:

We are using SendGrid for SMTP. This works ok, see point 3.
Cron is set up, and is running successfully.
Invoice Emails, which are sent instantly do send, and are received OK.

Emails are being added to the queue, as can be seen in the table...

SELECT message_id, created_at, processed_at FROM core_email_queue ORDER BY message_id DESC LIMIT 2;
+------------+---------------------+--------------+
| message_id | created_at          | processed_at |
+------------+---------------------+--------------+
|         42 | 2017-01-08 12:04:49 | NULL         |
|         41 | 2017-01-08 12:04:48 | NULL         |
+------------+---------------------+--------------+

And they're seemingly being processed:

mysql> SELECT message_id, created_at, processed_at FROM core_email_queue ORDER BY message_id DESC LIMIT 2;
+------------+---------------------+---------------------+
| message_id | created_at          | processed_at        |
+------------+---------------------+---------------------+
|         42 | 2017-01-08 12:04:49 | 2017-01-08 12:05:02 |
|         41 | 2017-01-08 12:04:48 | 2017-01-08 12:05:02 |
+------------+---------------------+---------------------+

However, in the SendGrid log, there's no email had been sent.

So the logic to add it to the queue is seemingly working, and the cron logic that processes and presumably sends the email is also seemingly working, but no email is being sent or received.

Another thread here appears to be describing a similar (possibly identical) problem.

--
EDIT

Interestingly, I tried to run the cron.php manually, and getting this message:

vagrant$ /usr/bin/php cron.php
sh: 1: /usr/sbin/sendmail: not found
sh: 1: /usr/sbin/sendmail: not found

Which is very strange as we have it setup to use SendGrid SMTP.


texts: Magento 2.2.6, Configurable Products: Blank Image-Area after deselecting "visual swatch" on product-page

texts:
Preconditions

1. Update from Magento 2.2.4 to 2.2.6

Steps to reproduce

1. Add Product in the Backend
2. Create Configurations
4. Use Attributes with the input type "Visual Swatch"
3. Save Product
4. Open Product-page in the frontend
5. Select Attribute/Swatch --> Images-Gallery of the simple product appears
6. Deselect Attribute/Swatch

Expected result

1. Image-Gallery of the configurable product appears again

Actual result

1. Product page with a blank image-area

Does anyone have a solution/fix to this issue?
The only similar problem we found in web was a request without a solution, but 6 Month ago. Maybe it is not only a Magento 2.2.6 Bug: When I deselect the swatch once after selected, the product image is not displaying in magento 2

Another issue: In the past the swatch-images were saved and reloaded after changing to dropdown and back to visual-swatch. Since Mangento 2.2.6 the values are deleted and we need to reselect and upload them. In the filespace this leads to copies of the same image in the same folder.

Thanks for help.


texts: Set and get block arguments programatically

texts:
In layout when I create a block I can set custom arguments, for example:

<block class="Company\Module\Block\Hello" name="block_name" template="test.phtml">
    <arguments>
        <argument name="my_arg" xsi:type="string">testvalue</argument>
    </arguments>
</block>

I can later retrieve the argument like this inside the block:

$arg = $this->getMyArg();

When I create a block programatically (according to this method: link) I can set custom arguments like this:

$block = $this->frameworkViewLayout
    ->createBlock(
        "Company\Module\Block\Hello",
        "block_name",
        ['my_arg' => 'testvalue']
    )
    ->setData('area', 'frontend')
    ->setTemplate($template)
    ->toHtml();

The block is correctly created and it works perfectly. But I'm not sure how I can later retrieve the argument inside block's class. I tried to do it like this:

$arg = $this->getMyArg();

or

$arg = $this->getData('my_arg');

But it returns nothing. What did I miss?


texts: Add new tab in custom module admin side after custom account in Magento 1.9.2.4?

texts:
Can you Please guide how can I add new tab in admin side customer module with some custom attribute?

I create below files, But still not get anything, No tab added, Please check and correct me if anything goes wrong.

1) app/code/local/Customtab/CustomerAccount/etc/config.xml

<?xml version="1.0"?>
<config>
   <modules>
       <Customtab_CustomerAccount>
           <version>0.1.0</version>
       </Customtab_CustomerAccount>
   </modules>
 <adminhtml>
    <layout>
           <updates>
               <customeraccount>
                  <file>customeraccount.xml</file>
               </customeraccount>
           </updates>
       </layout>
   </adminhtml>
   <global>
       <blocks>
           <customeraccount>
               <class>Customtab_CustomerAccount_Block</class>
           </customeraccount>
       </blocks>
 </global>
</config>

2.) app/etc/modules/Customtab_Customeraccount.xml

<?xml version="1.0"?>
  <config>
   <module>
  <Customtab_CustomerAccount>
      <active>true</active>
      <codePool>local</codePool>
  </Customtab_CustomerAccount>
  </module>
  </config>

3.) app/code/local/Customtab/CustomerAccount/Block/Adminhtml/Customer/Edit/Tab/Action.php

<?php

    /**
     * Adminhtml customer insurance tab
     *
     */
    class Customtab_CustomerAccount_Block_Adminhtml_Customer_Edit_Tab_Action
     extends Mage_Adminhtml_Block_Template
        implements Mage_Adminhtml_Block_Widget_Tab_Interface
    {

        public function __construct()
        {
            $this->setTemplate('customeraccount/action.phtml');

        }

        public function getCustomtabInfo(){

            $customer = Mage::registry('current_customer');
            $customtab='Custom tab insurance settings is here';
            return $customtab;
            }

        /**
         * Return Tab label
         *
         * @return string
         */
        public function getTabLabel()
        {
            return $this->__('Insurance Settings');
        }

        /**
         * Return Tab title
         *
         * @return string
         */
        public function getTabTitle()
        {
            return $this->__('Insurance Tab');
        }

        /**
         * Can show tab in tabs
         *
         * @return boolean
         */
        public function canShowTab()
        {
            $customer = Mage::registry('current_customer');
            return (bool)$customer->getId();
        }

        /**
         * Tab is hidden
         *
         * @return boolean
         */
        public function isHidden()
        {
            return false;
        }

         /**
         * Defines after which tab, this tab should be rendered
         *
         * @return string
         */
        public function getAfter()
        {
            return 'tags';
        }

    }
    ?>

4.) app/design/adminhtml/default/default/template/customeraccount/action.phtml

<div>
New Custom Tab
</div>

5.) app/design/adminhtml/default/default/layout/customeraccount.xml

            customer_edit_tab_action
        customeraccount/adminhtml_customer_edit_tab_action


texts: Change Copyright text on Mobile or Tablet view

texts:
I have to write long info on 'Footer - Copyright' for only PC view

but I want to show short info for Mobile or Tablet view

How can I setup what 'Copyright' text show up only on Mobile or Tablet view?


texts: Setup:static-content:deploy issue with locale

texts:
I have enabled Production mode, and when I run  setup:static-content:deploy, it creates two folders - en_AU and en_US.

In pub/static/frontend/mytheme/, en_US folder has all nessesary files generated, and en_AU folder has only one .js file generated.

When I refresh my front-end, I can see all files including css and js are loaded from en_AU folder, but since this folder is emtpy, so my front-end is not displaying correctly. Then I need to manually copy everything from en_US to en_AU to make front-end working.

Why does system creates two folders with one has all contents, and another empty, but front-end is reading from the empty folder.

How can I fixed this issue ?


texts:
I need to import categories on magento 2 that I exported from magento 1,
Is it without issue, I mean is it risky for magento 2 store.
Help me please if you have any proposition?


texts: Magento 2: On product page HTTP ERROR 500

texts:
System: Magento 2.1

Everything was running fine 5 minuts ago. I had 3 Products in my Catalog (all using the same Attribute Set). Then I simply  deleted 2 Attributes from my (currently in use) Attribute Set via Admin Panel. Then via Magento CLI I did cache:clean , cache:flush, indexer:reindex  -> then Deleted Browser Cache.

In Browser I reloaded my webshop (everithyng looks fine). When I click on a Product -> Product Page https://myshop.de/product1-300x200.html  loads and gives
 HTTP ERROR 500.

Everything else on my Webshop works fine, just all my Product Pages give me the same HTTP ERROR 500 error.


texts: SQLSTATE[HY000] [2002] No such file or directory error

texts:
There has been an error processing your request

SQLSTATE[HY000] [2002] No such file or directory

Getting the above error please someone provide me solution to solve this.


texts: Is there a magento utility method available which can help me to create a force content download action ?


texts: Problem Setting Production Mode - Deploying Static Content - Command returned non-zero exit code:

texts:
I have a Magento 2 store which throws an error when entering production mode.

bin/magento deploy:mode:set production

Runs most the way until hitting deploy static content:

Something went wrong while deploying static content. See the error log for details.

Command returned non-zero exit code:
`/usr/bin/php7.0 -f /var/www/mage2/public_html/bin/magento setup:static-content:deploy -f en_GB en_US`

I can however run deploy static content without an error it seems.

In my logs i am getting a few errors for the theme with theme_dir not passed.

[InvalidArgumentException]
Required parameter 'theme_dir' was not passed

I am unsure why these are set to en_US however as would like them en_GB. I have all the themes set in the correct folders however i believe and am unsure how to resolve this error.


texts:
Hoping someone can help, I am guessing I am missing something simple.

When I currently search on the site it shows a dropdown with the product and image beside.

I have recently added new products to the site but they dont show with an image in the search

I have tried a reindex but no joy

Any suggestions?


texts: Configurable Product Price is 0 in API Response

texts:
Dears, Why Configurable products price is always displayed as 0 in rest API response like (sku related to magento 2 sample data):

http://domain.com/index.php/rest/V1/products/MH01

Although it is displayed as a real price 52.00$ in the web?


texts: get customer info based on email address using rest API in Magento 2

texts:
I have a requirement that I need to migrate users from a remote RMS to existing magento 2 website using Rest API. Migration will either create new user if it doesn't exists or will update the existing user. For both cases I need to find if a particular user having an email address already exists in the magento system or not. If the user exists then I need th customerId (PK) so that I can send the customerID with updated customer details in the api.

So is there any way to find user details using customer email address in magento 2 using REST API? Please let me know.

Thanks
Jawed


texts: Dynamically Set the Category Page Title and Meta Description

texts:
I am using Algolia Instant Search for the category to show quick results on the category page the same as on the search result page. I have many categories on the website, and 90% of them missing the meta description. It only shows if I do set them manually from the backend.

I am trying to set the general rule for Magento categories for example

shop your favorite products in {{category}} and get he best price.

Above General rule will apply to all categories that does not have meta description set in magento backend and have no meta description tag in source of category page.

Here is code i am trying to use to see if i can use this code and edit it so it can do what i did explained above.

Event

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="catalog_category_load_after">
    <observer instance="StackExchange\Magento\Observer\Frontend\Catalog\CategoryLoadAfter"
              name="stackexchange_magento_observer_frontend_catalog_category_load_after"
    />
</event>

Observer

class CategoryLoadAfter implements \Magento\Framework\Event\ObserverInterface {

/**
 * @var \Psr\Log\LoggerInterface
 */
private $logger;

public function __construct(
 \Psr\Log\LoggerInterface $logger
) {

    $this->logger = $logger;
}
/**
 * Execute observer
 *
 * @param \Magento\Framework\Event\Observer $observer
 * @return void
 */
public function execute(
    \Magento\Framework\Event\Observer $observer
) {
    $this->logger->debug(__METHOD__);
    $category = $observer->getEvent()->getCategory();
    $metadesc = "shop your favorite products in".$category."and get he best price.";
    if ($category instanceof \Magento\Catalog\Model\Category) {
        $oldMetaDesc = $category->getMetaDescription();
        $category->setMetaTitle($metadesc);
    }
}

}


texts: Failed checkout with CC fire event sales_order_place_after. This is problem for me

texts:
I have create functionality on event "sales_order_place_after".
I have to Send "COUPON CODE" for an order placed with this event "sales_order_place_after". If someone does fail credit card transaction then also this "COUPON CODE" was sent. This is wrong.

And also order created with "Canceled" on

  admin->sales->orders

.
Can you suggest me any event for success order only?


texts: Show attribute filter in layered navigation only after another filter is selected

texts:
I'm trying to create a catalog with Magento that will list a lot of products which are made of different materials (over 15000 accross the entire catalogue) but they can be grouped like

metal -> iron, steel, copper, zinc, aluminum etc
ceramic -> clay, titanium trioxide, porcelain etc
amorphus -> glass, silicon etc

So I thought of creating a multi select attribute that will be filterable via layered navigation. However I'm encountering two problems related with that.

I can create an atttibute called

material_group

with let's say 200 groups and a multi select attribute called

materials

with 15.000 materials and the following problems arise.

In layered navigation at the catalog category page this would make
magento load 15.000 materials and slow it down quite a bit as well
as making the page extend way too much to the bottom so the user
would scroll a lot.
In the admin page it's going to be really hard to sort the attribute values as new values are added so when creating a new product the person that has to select the materials would have to look for them in an unsorted multi-select list of 15.000 items.

In the frontpage:

currently if a user clicks on a material_group, the layered navigation will filter the products and less materials will show up in the next filter but I would like to force magento to not load the materials attribute values until a material_group has been selected and I have no clue how to achieve that.

In the admin page:

Ideally I would want the attribute values to be filtered by the grouping attribute so that in the multi select the options would be limited.

Any ideas what I should look into to make this happen? Or do you know of a magento extension that will allow parent/child relationship between attributes?


texts: Allowed memory size exhausted error when create block and set template

texts:
Hello I am using magmodule rich snippet where this code block add some snippet to catalogue page:

$snip_html = $block->getLayout()
                     ->createBlock('snippets/products')
                     ->setTemplate('magmodules/snippets/widget.phtml')
                     ->toHtml();

But this is generating error as follow:

  Allowed memory size of 805306368 bytes exhausted (tried to allocate
  53660871 bytes) in ob_get_clean called at
  app/code/core/Mage/Core/Block/Template.php (263)

Even if I emptied the 'magmodules/snippets/widget.phtml' then also error persist there but if I do exit at the end of phtml file then there is no error.

So what is the issue here and how to debug this issue.

Thanks


texts: magento 2 what is quote_shipping_rate table

texts:
What is quote_shipping_rate table and how we can add item?

I know by getShippingRatesCollection i can get the collection of saved rate into the table but I can not find how Magento or another Module add an item into this table


texts: On Import, why did Magento delete products?

texts:
I did a product import with behaviour REPLACE using the backend.

The original reason to do this is, that we get duplicated images when importing a CSV file with same products again.

If I understand the documentation correctly, this does replace the full data of an SKU which is in the import file. But it leaves products with SKUs which are not in the import file untouched.

  If a SKU in the import data matches the SKU of an existing entity, all
  fields, including the SKU are deleted, and a new record is created using the CSV data. An error occurs if the CSV file references a SKU that does not exist in the database. You can Check Data to display error.

In as test with only two products, this turned out to be true -- not all other products were lost.

But on my recent - real - import it showed:


texts: Magento Migration and Login Page Cookie Errors

texts:
I recently migrated from a VPS to a dedicated server, and the migration, while a little bumpy, went smoother than I ever imagined. However, there has been one lingering issue. The dreaded customer login, page refreshes, customer still not logged in.

Now I have read dozens and dozens of related errors, all seemingly a list to troubleshoot through with file edits and the like. I feel like this is not at all necessary in my particular situation (I could be wrong).

The way to escape this login refresh bug, on our end, is to simply delete your cookies. Magento will reissue new cookies correctly and you are able to carry on and login like normal. Seemingly, before the migration, my cookies were set to last a very long time, and it is my fear that customers in the future will be unable to login without refreshing and deleting their cookies.

Is there any way to determine how long these cookies could last and are there any solutions to getting rid of this erroneous cookies on the customer's local machine?


texts: How to handle orders that are not paid in full?

texts:
I'd like to deduct items already paid and generate an invoice for the still outstanding sum.
Whats the proper way to do that?

thank in advance
Milan


texts: add google map under contact us page in magento

texts:
How to add google map under contact us page after submit button

this is the code for contact us page -form.phtml = > http://pastebin.com/rSYMpu5X


texts: magento2 admin panel product edit page Quantity text field is disabled for bundle product

texts:
Magento2 admin panel product edit page Quantity text field is disabled for bundle product..

Please tell me how can i make enable this text box.


texts: style-m.css not found error for custom theme in magento 2

texts:
I have created a custom theme that extends Blank theme.This is my default_head_blocks.xml of custom-theme.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <css src="css/custom-style.css" />
</head>
</page>

I followed official document to change theme color so created _theme.less in source folder .
Then I deleted var/view_preprocessed and pub/static/frontend & then executed this command :

php magento setup:static-content:deploy

Now am getting error on frontend for style-l.css,print.css,style-m.css though I have extended Blank theme.

While deployment , it gives message like Successful :1000files error : 38


texts: magento 2.3.2 EE how to hide specific product in summary page checkout

texts: In Magento 2.3.2 how can I hide specific product in summary page checkout.I'm able to hide name and price but not the image.


texts: Magento 2 custom module configuration settings not display in admin

texts:
I have created custom module configuration in admin panel to Enable in frontend and Modify Heading title. But the settings are not visible in the admin Store > Settings > Configuration.

I am following the below tutorial steps:

http://www.mage-world.com/blog/how-to-create-the-configuration-via-backend-for-a-custom-module.html

I have run the command setup:upgrade and cache:flush already and also it's not showing any error. I am using Magento ver. 2.1.3.

Please see the attached screenshot.

My system.xml file code is:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="tutorial" translate="label" sortOrder="1">
            Tutorial
        </tab>

            Simple News
            <tab>tutorial</tab>
            <resource>Tutorial_SimpleNews::config</resource>
            <group id="general" translate="label" type="text" sortOrder="1" showInDefault="1"
showInWebsite="1" showInStore="1">
                General Settings
                <field id="enable_in_frontend" translate="label" type="select" sortOrder="1"
showInDefault="1" showInWebsite="1" showInStore="1">
                    Enable in frontend
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="head_title" translate="label comment" type="text" sortOrder="2"
showInDefault="1" showInWebsite="1" showInStore="1">
                    Head title
                    <comment>Fill head title of news list page at here</comment>
                    <validate>required-entry</validate>
                </field>
                <field id="lastest_news_block_position" translate="label" type="select"
sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
                    Lastest news block position
                    <source_model>
                        Tutorial\SimpleNews\Model\System\Config\LastestNews\Position
                    </source_model>
                </field>
            </group>

    </system>
</config>

Below is \Tutorial\SimpleNews\Model\System\Config\LastestNews\Position.php file code:

<?php

namespace Tutorial\SimpleNews\Model\System\Config\LastestNews;

use Magento\Framework\Option\ArrayInterface;

class Position implements ArrayInterface
{
    const LEFT      = 1;
    const RIGHT     = 2;
    const DISABLED  = 0;

    /**
     * Get positions of lastest news block
     *
     * @return array
     */
    public function toOptionArray()
    {
        return [
            self::LEFT => __('Left'),
            self::RIGHT => __('Right'),
            self::DISABLED => __('Disabled')
        ];
    }
}


texts: Undefined offset & Uninitialized string offset log errors

texts:
I am getting below log errors in custom module

a.Notice: Undefined offset: 2 in line if($commodity_name[2] != "") {

b.Notice: Undefined offset: 3 & Notice: Uninitialized string offset: 2 in line if($commodity_name[3] != "") {

c.Notice: Undefined offset: 1 & Notice: Uninitialized string offset: 3  in if($commodity_name[1] != "") {

<?php
    if($CommodityDetail1 == "") {
        if($commodity_name[1] != "") {
            $CommodityDetail1 = $commodity_name[1];
            $Commoditypid1 = $commodity_id_change[1];
        }
    }
?>

Cmdty Detail 1<input class="removenamebypid_<?php echo $Commoditypid1 ?>" style="width:100px" type="text" id="service_cmdtydetail1" name="service_cmdtydetail1" value="product1" maxlength="3000" />
<input type="hidden" value="product" id="addnamebypid_<?php echo $Commoditypid1 ?>" />

<?php
    if($CommodityDetail2 == "") {
        if($commodity_name[2] != "") {
            $CommodityDetail2 = $commodity_name[2];
            $Commoditypid2 = $commodity_id_change[2];
        }
    }
?>
Cmdty Detail 2<input class="removenamebypid_<?php echo $Commoditypid2 ?>" style="width:100px" type="text" id="service_cmdtydetail2" name="service_cmdtydetail2" value="product2" maxlength="3000"/>
<input type="hidden" value="<?php echo $CommodityDetail2; ?>" id="addnamebypid_<?php echo $Commoditypid2 ?>" />

<?php
    if($CommodityDetail3 == "") {
        if($commodity_name[3] != "") {
            $CommodityDetail3 = $commodity_name[3];
            $Commoditypid3 = $commodity_id_change[3];
        }
    }
?>


texts: Does Magento have an image gallery like wordpress?

texts: I want to bulk upload images to be used later.  Is that default in Magento?


texts: Get products belonging to multiple categories from set of products in another category

texts:
I am having problem apply filters based on categories. The situation is I load all products belonging to a category and and then based on few parameter apply further category filtering like the query might be to fetch all products belonging to "flags" and "skulls" category from all products in clothing category. (category == "clothing" && (category == "flags" || category == "skulls"))

1. $collection = Mage::getModel('catalog/category')->load($categoryId)->getProductCollection(); //load all products in category with id $categoryID

2. $collection->addCategoryFilter(Mage::getModel('catalog/category')->load(array(implode(',', $category_filters_ids))), true);

The problem with line no 2 is that it brings out all categories belonging to ids given in $category_filter_ids without enforcing $categoryId from line 1.

3. $collection->addAttributeToFilter('category_ids',array('in'=>$category_filters_ids));

this gives "Call to a member function getBackend() on a non-object" error.
My goal is to load only products belonging to id $category and then further those which belong any of the ids in $category_filter_id array. Please help me


texts:
We are upgrading Magento from 1.9.2.4 to Magento 1.9.3.4 through the downloader but downloader is not showing Upgrade Available.

Please find the screenshot below:

Please help us on this issue. Thanks


texts: How do I change CSS priority on magento1?

texts:
The button on this page along with other objects are not receiving its module parameters, instead they are receiving from (index):275 which I was not able to discover where it comes from. How do I track back this to remove them? or change the order?

Thank you!


texts: how to add magento2 checkout shipping form add validate-digits-range

texts:
I am trying to override checkout_index_index.xml using below code for minimum digits :

<item name="telephone" xsi:type="array">
    <item name="validation" xsi:type="array">
        <item name="min-digits" xsi:type="number">8</item>
    </item>
    <item name="config" xsi:type="array">
        <item name="tooltip" xsi:type="array">
            <item name="description" xsi:type="string" translate="true">For delivery questions.</item>
        </item>
    </item>
</item>

But when I run all the Magento command the rule is not goes performed.
Even also I developed a plugin for this :

public function afterMerge(\Magento\Checkout\Block\Checkout\AttributeMerger $subject, $result)
{
    if (array_key_exists('telephone', $result)) {
        $result['telephone']['config']['additionalClasses'] = 'validate-digits';
        $result['telephone']['config']['additionalClasses'] = 'min-digits-8';
        $result['telephone']['additionalClasses'] = 'validate-digits';
        $result['telephone']['additionalClasses'] = 'min-digits-8';
        $result['telephone']['validation']['validate-digits'] = true;
        $result['telephone']['validation']['min-digits'] = 8;
    }

    return $result;
}

But from this also minimum digits validation does not perform.
can anyone suggest me which thing i am going to miss ?

I also try to just change the Magento default validation in

<item name="company" xsi:type="array">
    <item name="validation" xsi:type="array">
        <item name="min_text_length" xsi:type="number">5</item>
    </item>
</item>

here I just change from 0 to 5 but still that also not working.

Magento version i used is 2.3.0


texts:
I've added slick.js to my website,there is no error log.

I put css in my_vendor/my_theme/web/css

But I don't think the css had been loaded,b/c when I open the developer tools,

there is no slick.css or slick-theme.css.

Now the page messed up.

Am I missing something ?

----Update----

I try to copy all the css from slick.css or slick-theme.css to my css.file,and it still not showing the style.

Any idea? :(


texts: How to return a Magento 404 page in nginx?

texts:
I have some URLs that I are coming up as "soft 404s" with Google. I want to make them genuine 404s, but would like them to use Magento's 404 pages.

I am using NGINX with php-fpm and here is what I currently have:

if ($request_uri ~* "catalogsearch/result/index\/\/l/") {
  return 404;
}

This returns an NGINX 404, but I want a Magento (user friendly) 404.

Is there a way to achieve this?


texts: Magento 2 Api Getting Error '%fieldName is a required field'?

texts:
I am not getting result (id) while using POST method using url is rest/V1/hello/test/3

Screenshot:

I have followed this link For Reference Please Click Here

  1) webapi.xml

<?xml version="1.0"?>
    <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
        <route url="/V1/hello/name/:name" method="GET">
            <service class="Inchoo\Hello\Api\HelloInterface" method="name"/>
            <resources>
                <resource ref="anonymous"/>
            </resources>
        </route>
        <route url="/V1/hello/test/:test" method="POST">
            <service class="Inchoo\Hello\Api\TestInterface" method="test"/>
            <resources>
                <resource ref="anonymous"/>
            </resources>
        </route>
    </routes>

  2) TestInterface.php

<?php
namespace Inchoo\Hello\Api;

interface TestInterface
{
    /**
     * Returns greeting message to user
     *
     * @api
     * @param id $name Users id.
     * @return id Greeting message with users id.
     */
    public function test($id);
}

  3) Test.php

<?php
namespace Inchoo\Hello\Model;
use Inchoo\Hello\Api\TestInterface;

class Test implements TestInterface
{
    /**
     * Returns greeting message to user
     *
     * @api
     * @param string $name Users name.
     * @return string Greeting message with users name.
     */
    public function test($id) {
        return "Hello How are you your id is:," .$id;
    }
}

  4) di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Inchoo\Hello\Api\HelloInterface" type="Inchoo\Hello\Model\Hello" />
    <preference for="Inchoo\Hello\Api\TestInterface" type="Inchoo\Hello\Model\Test" />
</config>

Now i cleared cache and pagecache and opened the postmen app and kept the url like http://10.0.0.33/nagarajuM2/rest/V1/hello/test/3

but i am getting error.

Please help me out.


texts: how do i get controller value to template file

texts:
I am going to create reward point extension in which the calculation of grand total are in my module controller and now I want to show the final value at the place of grand total for that I want to implement grandtotal.phtml

at line 55

<td style="<?php echo $this->getStyle() ?>" class="a-right">
    <?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()+10) ?>

I Want to put value instead of 10 from my controller which are in different module so how can i put this value.


texts: Magento2: Cant change store in product listing and product detail page

texts:
I have successfully created multistore with different languages with URLs like:

http://localhost/magento22/english/
http://localhost/magento22/french/

I can change store only in homepage. When I go in product detail page or product listing page, I am unable to switch store. When I click on french store it always redirects to existing(English) store.

This is Magento 2.2 default issue


texts: Create a multi-language REST API's in Magento 2

texts:
I have multi-language store in Magento v 2.2.5

English

French

Now,I have created multiple REST API's, like

Custom Home Page REST API's
GET Products, Categories
Add to cart
Checkout
Place an Order (In short whole front-store)

Now I want these API's in multi-language, Any one have achieved the same with Magento 2 or with custom code.

Only Guidance will be helpful.


texts: Database Repair Tool Not Working doesn't support InnoDB storage engine

texts:
When we try to import products through the backend, we get an error that says foreign keys are not correct.

I went to run the Database Repair Tool. I made a copy of our current db called dbrepair and made a clean install db called dbrepairref when I try to run the tool it says "Corrupted database doesn't support InnoDB storage engine". I am not sure what to do from here to fix the problem.


texts:
For a configurable product I want to get all related products of the linked simple products. How is it possible to merge multiple collections?

At the moment I overwrite the related products on each iteration of the foreach loop.

$product = $this->_coreRegistry->registry('product');
/* @var $product \Magento\Catalog\Model\Product */

if ($product->getTypeId() === 'configurable') {
    $simpleProducts = $product->getTypeInstance()->getUsedProducts($product);
}

$relatedProductCollection = false;
/* @var $simpleProduct \Magento\Catalog\Model\Product */
foreach ($simpleProducts as $simpleProduct) {
    /** @var $relatedProductCollection \Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection */
    $relatedProductCollection = $simpleProduct->getRelatedProductCollection()->addAttributeToSelect(
        'required_options'
    )->setPositionOrder()->addStoreFilter();
}


texts: TypeError: $.ui is undefined in checkout

texts:
This is driving me mad! Something is mucking up the loading of jQuery and jQueryui in our checkout - we have tried everything we can find on the web - (we are using theme porto)
Their support is almost useless - as when they looked it was fine on one persons computer, so they wasted 3 days ignoring us.
Does anyone have an idea - how i can identify which 3rd party script is the problem? The site is live and in production so i cannot simply take it apart- it seems to work for most people, but when it goes wrong - nothing ic an do can get it to work - clearing caches etc
So any ideas would be hugely appreciated

you can see from the image that i tested for jQuery loading

we are using magento 2.2.3


texts:
Model/Nic.php contains

public function toOptionArray()
         {

          $nicCollection = Mage::getModel('nic/nic')->getCollection();

          $nicarray = array(array('value'=>-1, 'label'=>'Please Select'));

          foreach ($nicCollection as $nicList){

                $nicarray[] = array('value'=>$nicList['nic_id']._.$nicList['nic_cost'],'label'=>$nicList['nic_name']);
          }

          return $nicarray;

        }

I have added a dropdown using toOptionArray in admin form using below code

    protected function _prepareForm()
  {
      $form = new Varien_Data_Form();
      $this->setForm($form);
      $id = $this->getRequest()->getParam('id');
      $nicModel = Mage::getModel('nic/nic')->load($id);
      $fieldset = $form->addFieldset('nic_form', array('legend'=>Mage::helper('nic')->__('Nic Information')));

      //Check if value selected from dropdown
        $Id = Mage::registry('nic_data')->getId();
        if($Id != ''){
        $nicId = Mage::registry('nic_data')->getNicId();
        $form->addValues(array('nic_id' => $nicId));
        }

      $fieldset->addField('nic_id', 'select', array(
          'label'     => Mage::helper('nic')->__('Nic'),
          'class'     => 'required-entry',
          'values'    => Mage::getModel('nic/nic')->toOptionArray(),
          'name'      => 'nic_id',
      ));

      if ( Mage::getSingleton('adminhtml/session')->getCoffeecomponentsData() )
      {
          $form->setValues(Mage::getSingleton('adminhtml/session')->getCoffeecomponentsData());
          Mage::getSingleton('adminhtml/session')->setCofeecomponentsData(null);
      } elseif ( Mage::registry('nic_data') ) {
          $form->setValues(Mage::registry('nic_data')->getData());
      }

      return parent::_prepareForm();
  }

Which outputs

<select name="nic_id" id="nic_id">
<option value="-1">Please Select</option>
<option value="1_3.4">America</option>
<option value="2_2.3">China</option>
<option value="3_4.5">India</option>
<option value="4_2.5">Japan</option>
</select>

Here the value for China is 2 and its country cost value is 2.3 which has been split and then saved into DB as nic_id = 2 and nic_cost = 2.3

Now while editing the same record I am not able to select the value China in dropdown as the value fetched form Model is like 2_2.3.

Also before add field I have used this code to make it selected, but somehow its not working

$Id = Mage::registry('nic_data')->getId();
if($Id != ''){
$nicId = Mage::registry('nic_data')->getNicId();
$form->addValues(array('nic_id' => $nicId ));
}

How can make it make it selected ?

Please Help !!!


texts:
I'm getting an strange issue in Magento 2.2.7.

Some of the orders are duplicating despite us only receiving one payment.

It is the exact same order information except for the order number (which increments by 1 every time) and the time (about 5 - 10 seconds between each order) which I think might indicate someone pushing the "Place Order" button multiple times.

This seems to be happening at random and doesn't seem to be confined to a single product or payment method.

I was wondering if there was a way to resolve this error and stop us receiving multiple versions of the same order.


texts: trying to limit products that a customer can buy with a voucher code , not working

texts:
I've been trying to create a voucher code .
i want to limit the products discount to 3 per person (so that the 100 % discount would be valid only on 3 products ) but for some reason it makes the whole SKU on the voucher code list discounted , it should be just maximum 3 products not all of them .

please view http://i.stack.imgur.com/yetQA.png


texts: How to hide custom option price (+$10.00) in magento2.1.7

texts: I am not able to hide the custom price (+$10.00) in Magento 2.1.7. I am using Mageworx Extension for custom option. How can I achieve this, its my client requirement, as I am not able to hide this.


texts: How to get magento data on the wordpress blog page?

texts: I have integrated WordPress into the Magento for the Blog. Now, I want to display Magento products from the specific category on the blog page. How can I achieve this?


texts:
I am trying to get attribute option Ids for a sku using this below api call.

http://localhost/rest/V1/configurable-products/sh8/options/all

I used this curl request:

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://localhost/rest/V1/configurable-products/sh8/options/all",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "postman-token: f1457b50-7a5e-4f08-d6ee-8e3b0aad21bd"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {

   echo $response;
    }

I got this below response:

[
    {
        "id": 26,
        "attribute_id": "145",
        "label": "size",
        "position": 1,
        "values": [
            {
                "value_index": 25
            },
            {
                "value_index": 27
            },
            {
                "value_index": 28
            },
            {
                "value_index": 29
            }
        ],
        "product_id": 161
    },
    {
        "id": 27,
        "attribute_id": "146",
        "label": "color",
        "position": 0,
        "values": [
            {
                "value_index": 30
            },
            {
                "value_index": 31
            },
            {
                "value_index": 32
            }
        ],
        "product_id": 161
    }
]

But when I try to access this in foreach like

 foreach ($response as  $value) {
       var_dump($value);
    }

I get this below error:

Exception #0 (Exception): Warning: Invalid argument supplied for foreach()


texts:
My Config.xml

    <?xml version="1.0"?>  <config>
      <modules>
        <MyCompany_MyModule>
          <version>1.0.0</version>
        </MyCompany_MyModule>
     </modules>
     <global>
       <helpers>
          <mycompany_mymodule>
             <class>MyCompany_MyModule_Helper</class>
          </mycompany_mymodule>
       </helpers>
     </global>
   </config>

Path Helper

http\app\code\local\MyCompany\MyModule\Helper

File i want call

http\app\code\local\MyCompany\MyModule\Helper\Config.php

My Config.php Class

class MyCompany_MyModule_Helper_Config {}

My Class inside Model call Helper

http\app\code\local\MyCompany\MyModule\Model\Form\FileName.php

The Call

class MyCompany_MyModule_Model_Form_Input {
public function initializes()
{
$helper = Mage::helper('MyCompany_MyModule/Config');
 Mage::Log($helper);
 } }

The Error

Warning: include(): Failed opening 'Mage/MyCompany/MyModule/Helper/Config.php' for inclusion

My http\app\etc\modules\MyCompany_MyModule.xml

<?xml version="1.0"?> <config>
<modules>
    <MyCompany_MyModule>
        <active>true</active>
        <codePool>local</codePool>
    </MyCompany_MyModule>
</modules> </config>


texts:
I have 1 magento instance with 2 websites set up inside it.
example.com/website1
example.com/website2

Products are either assigned to website 1 or website 2. However on the frontend I want customers to be able to view products from website 1 & 2 without changing websites.

Is this possible?


texts: Importing csv issue in order to populate table on Magento 2.3

texts:
i got a problem while i was trying to populate a table on Magento 2.3

I dont know why is this appearing, i was trying to populate the table salesrule_coupon with the following data on the csv

coupon_id,rule_id,code,usage_limit,usage_per_customer,times_used,created_at,type
10,1,R56Y2CU5FX8L,0,0,0,"2017-09-05 11:19:21",1
11,1,705E77MMDK3E,0,0,0,"2017-11-22 22:09:57",1

PLease help! i dont know what to do!
Thanks!


texts: How to add My Order link in My Account dropdown?

texts:
I have overriden app/code/Test/Sales/view/frontend/layout/default.xml file

  <referenceBlock name="top.links">
        <block class="Magento\Sales\Block\Order\Link" name="order-list-link" after="wish-list-link"/>
    </referenceBlock>

 <move element="top.links" destination="customer"/>

But no effect.


texts:
In my custom module have a custom ajax request for sending selected date (datepicker) to controller and found this exception when access controller

  Block1 exception(s):
  Exception #0 (BadMethodCallException): Missing required argument $resultJsonFactory of Larsa\ASlider\Controller\Index\indexquote

Controller:

namespace Larsa\ASlider\Controller\Index;
class Index extends \Magento\Framework\App\Action\Action{
protected $resultJsonFactory;

public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
) {
    parent::__construct($context);
    $this->resultJsonFactory = $resultJsonFactory;
}

public function execute()
{
    $result = $this->resultJsonFactory->create();
    if ($this->getRequest()->isAjax())
    {
        return $result->setData([
            'test'=>'test'
        ]);
    }
}}

JS:

var AjaxUrl = 'workshop/index/index';
    $('#datePicker').datepicker({
        onSelect: function (date) {
            $.ajax({
                showLoader: true,
                url: AjaxUrl,
                data: {
                    date: $("#datePicker").datepicker("getDate")
                },
                type: "POST",
                dataType: 'json'
            }).done(function (data) {
                alert('success');
            }).error(function () {
                alert('error');
            });
        }
    });
    $('#datePicker').show();

Thanks in advance for help.


texts: Wrong tax rates for grouped products in related block

texts:
The shop I am working on shows wrong tax rates in related block.

Instead of the correct 19% it shows 0%.

Changing tax rates in backend leads to no effects. So I think there is no wrong configuration but some wrong return-value in

FireGento_MageSetup_Block_Catalog_Product_Price->getFormattedTaxRate()

This only happens for grouped products. All linked simple products have correct tax class.

Any idea what could be wrong?


texts:
I have a customer group who gets 10% off on all products.

I have product with a tier price set.

Default Magento uses the highest "discount".

But that means my customer group in some cases gets the same discount as the regular visitors.

Is there any way to apply an extra discount on top of the tier price for my customer group?


texts: Magento 1 product and Magento 2 as Checkout

texts:
Is it possible to connect to two different Magento sites?
1. The first site has product details and purchased details. (in Magento 1.9)
2. The second site has a checkout and payment process.


texts: How do I set up two store fronts with separate tax rates and separate fixed prices?

texts:
Ok, long question coming up. Please have patience. TLDR: How can i deduct correct tax within eu given tax rate depending on a combination of store front and shipping address but still sell with no tax outside of EU.

So I have a Swedish store front and an UK store front. If a sweden resident shops in the Swedish store I want product X to cost 100 kr including tax with a tax rate of 25%. If a UK resident shops in the UK store I want the price to be £10 including tax with a tax rate of 20%. If someone from outside the EU shops in either store no tax should be taken so the price should be 80 kr in the swedish store and £8.33 in the UK store. Now for the tricky part: if someone from outside UK but within EU shops in the UK store I want the total price to still be £10 but with a tax rate of 25%. I also always want the price to be displayed as £10 in the store. The only time it changes from £10 is if a non-eu resident proceeds to the checkout.

The UK store has default tax destination and origin country set to UK. The Swedish store has default tax destination and origin country set to Sweden.

A tax rate for the UK is setup at 20% and one for Sweden at 25%. The product shares the same tax class. A tax rule is set up for that tax class and the customer class "End customer" that includes all tax paying regions (all EU countries including Sweden and the UK.

Catalog prices are set to be including tax.

The result is a correct price for a swedish resident at the swedish store  (80 kr + 20 kr tax = 100 kr total), correct for a UK resident at the UK store (£8.33 + £1.67 = £10 total) and correct for a non-eu resident in the EU store (£8.33 total).

The problem comes if now a German or other EU resident (outside of UK) shops in the UK store. The price is now (£8.34 + £2.08 = £10.42 total). The error being it calculates the price excluding tax using the UK tax rate instead of the German. Plus there is some rounding error to show a different price ex VAT now then when the country was UK but let's ignore that... :)

With Magento 1.9 I can though set Magento to cross border trade (CBT). This will then give me correct behaviour for all EU countries but leave the non-EU customer to pay full tax (although the tax won't be specified separately in the summary).

So I see two solutions:
1. Have CBT enabled but with an exception for non-EU customers where they get the final price excluding VAT.
2. Not enable CBT and have magento calculate the price excluding tax using the shipping tax rate but only if the tax rate is more than 0%, else it should use the tax rate of the origin country.

Any other ideas out there? If not, any suggestions to where I would hack the code to enable 1 or 2 (1 seems like the easiest path)?


texts:
I use porto theme and add attribute tab on product page . Now, I wanted to ask
how to move review tab ?


texts: Create filter group inside foreach dynamic filters

texts:
I'm following this link to create a filter group to be applied to my custom collection.

searchCriteria => [
  'filterGroups' => [
    0 => [
      'filters' => [
         0 => [
           'field' => 'date',
           'value' => '2018-05-31',
           'condition_type' => 'gt'
         ],
         1 => [
           'field' => 'venue',
           'value' => 'staples_center',
           'condition_type' => 'eq'
         ]
    1 => [
      'filters' => [
         0 => [
           'field' => 'audience',
           'value' => '15000',
           'condition_type' => 'gt'
         ],
         1 => [
           'field' => 'status',
           'value' => 'upcoming',
           'condition_type' => 'eq'
         ],
         2 => [
           'field' => 'performer',
           'value' => '%simple%',
           'condition_type' => 'like'
         ],
      ]
    ]
  ]

The above input in one of the example, the problem is the input will be in dynamic array so i need to create the foreach filter groups child. However  i dont know hot to create the filterGroupBuilder inside this for each.

public function __construct(
\Namespace\Module\Model\ConcertFactory $concert,
\Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
\Magento\Framework\Api\FilterBuilder $filterBuilder,
\Magento\Framework\Api\Search\FilterGroupBuilder $filterGroupBuilder
){
 $this->concert = $concert;
 $this->searchCriteriaBuilder = $searchCriteriaBuilder;
 $this->filterBuilder = $filterBuilder;
 $this->filterGroupBuilder = $filterGroupBuilder;
}

public function execute(){
  $searchCriteria = $this->request->getPostValue('searchCriteria');
  if (array_key_exists("filterGroups",$searchCriteria)) {
      foreach ($searchCriteria['filterGroups'] as $filterGroup) {
         foreach ($filterGroup['filters'] as $filter) {
               $filterBuilder[] = $this->filterBuilder->setField($filter['field'])
              ->setValue($filter['value'])
              ->setConditionType($filter['condition_type'])
              ->create();
         }
         //need to know how to group this filter builder here
      }
   }
}


texts: magento 2.3 add noindex,nofollow to category filter pages

texts:
I want to change the meta robots tag value from index,follow to noindex,nofollow to all category filter pages only.
How can I achieve this?

I am trying to do this by jquery below-

<script type="text/javascript">
     var getCurrentUrl = window.location.href;
    if(getCurrentUrl.includes("?")){
    document.getElementsByTagName('meta')["robots"].content="INDEX,NOFOLLOW" ;

    }

</script>

But it's not updating the value of current meta robots tag.


texts: How to determine if a simple product is a variant of a master configurable product?

texts: So let say I have a master configurable product that has many variant products under it. So if I understand it correctly, each of those variant products is a Simple Product type right? My question is how do I check if a Simple Product (given its ID) is a variant product that belong to a master configurable product programmatically?


texts: Magento 2 Make Not Required field on registration Page

texts:
I have enabled address field on Customer registration page and everything is working fine and fields street address,city,state,country and zip all are now appearing on page.

When I create an account these fields are required but I want to Make it Not required as per requirement.

I have checked admin settings but not found any option to make it Not required.
Please let me know what can I do without affecting other parts.


texts:
I have a problem with a Magento2 installation.

If I am logged in as a client on a browser, with another browser (client not logged in). If I do the same actions on both browsers, the second browser (on which I was not connected) takes the first session ....

I Try this solution :
Suddenly started using another logged in user's session - Magento 2

But It doesn't work

SID is disabled

I have the problem that the cache is enabled or disabled

And I still have the problem if session are stored on files or on db

After some modifications, it seems that the session is no longer "stolen". By cons there is always a problem in the display. For example with my logged session I go to https://example.com/customer/account/ as well as with my unlogged session at the same time: on the unlogged session I see the information of the other session.

I'm thinking of a cache problem, but by completely disabling the cache :

php bin/magento cache:disable

the problem persists

someone would have an idea of the origin of the problem?

It seem's that is a server issue, on my chrome console I've got this message :

Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon at character position 13. The default protections will be applied.


texts: How to add custom text in custom option in magento 2.3.2

texts: How to add custom text in particular custom option after in magento 2.3.2


texts: Get custom option_id and option_type_id from custom option sku

texts:
I would like to fetch results of the query below without using direct sql. Is it possible?
thanks

SELECT option_type_id, option_id FROM `catalog_product_option_type_value` optv left join catalog_product_option opt on optv.option_id=opt.option_id WHERE optv.sku='option-sku'  and opt.product_id=$product_id


texts: Magento 2 varnish Checkout to cart Redirect Problem

texts:
Preconditions

1.Magento 2.3.4

2.Must Varnish Enable

Steps to reproduce

1)Do not add any product to the cart.

2)Directly go to https://www.sample.domain/checkout/

3)Because No product in cart Redirect user to Cart page https://www.sample.domain/checkout/cart

4)Add any product in the cart.

5)Go to Checkout.

6)It will redirect you to the cart page because of the caching of step 3 in varnish.

Expected result

1)Do not add any product to the cart.

2)Directly go to https://www.sample.domain/checkout/

3)Because No product in cart Redirect user to Cart page https://www.sample.domain/checkout/cart

4)Add any product in the cart.

5)Go to Checkout.

6)It should allow the user to go to the cart when the product is available.

Actual result

Because of Varnish, It cache steps 2 and 3 redirection and next time when users come with the product at that time also it not allowing the user to go to the checkout page. So it should stop track of that redirection by varnish.


texts: I have 270 k product in my store. Now I want to create CSV and send to Google feed by custom script, how to achieve this in Magento2.


texts:
1 exception(s): Exception #0 (InvalidArgumentException): Class
  argument is invalid:
  Magento\Framework\View\Element\UiComponent\Context
  Class argument is invalid: Magento\Framework\View\Element\UiComponent\Context
  when i disable below code its worked fine

 <argument name="context" xsi:type="configurableObject">
    <argument name="class" xsi:type="string">Magento\Framework\View\Element\UiComponent\Context</argument>
    <argument name="namespace" xsi:type="string">productattach_grid_index</argument>
</argument>


texts: Cron 'catalogrule_apply_all' locks cron 'indexer_all_invalid' and catalogsearch_fulltext keeps processing Magento 2.3.5

texts:
Took me quite some time to debug this. Every night (default) at 0:00 catalogrule_apply_all is run by cron, and resets all indexes for all store.
As a consequence catalogserach_fulltext is launched (takes about 8 minutes in my store).
In the meantime, new crons run, and logs begin:
main.WARNING: Could not acquire lock for cron job: indexer_reindex_all_invalid [] []

At first five items, but after a day, it's about 60 of these, every minute. And catalogsearch_fulltext is then processing constantly. If it finished, another reindex is started again. Probably, because the all invalid index doesn't work anymore. indexer_reindex_all_invalid does not come back in action again.
The system does not unlock indexer_reindex_all_invalid once this error occurs.
If I do a grep I then see that the cronjob cron:run seems to hang and for about 20 minutes I have cron.php called at least twice.
[USER]+ 11321  0.0  0.0   4340   724 ?        Ss   10:09   0:00 /bin/sh -c /usr/bin/php /[PATH]/public_html/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /[PATH]/public_html/var/log/magento.cron.log

[USER]+ 11325 60.2  4.8 590908 197924 ?       R    10:09  10:14 /usr/bin/php /[PATH]/public_html/bin/magento cron:run

[USER]+ 12542  0.0  0.0   4340   772 ?        Ss   10:26   0:00 /bin/sh -c /usr/bin/php /[PATH]/public_html/bin/magento setup:cron:run >> /[PATH]/public_html/var/log/setup.cron.log

[USER]+ 12544 57.0  2.1 484272 88712 ?        R    10:26   0:01 /usr/bin/php /[PATH]/public_html/bin/magento setup:cron:run

All crons work perfect, normally - no single cron missed in cron_schedule.
I can reset the indexing by truncating all _cl tables, resetting mview_state version_id, truncating cron_schedule. Manual reindex and flush cache.
Everything works perfectly (also indexer_reindex_all_invalid) untill the next time 'catalogrule_apply_all is launched. I tested this by adding this manually to cron_schedule.
But now? I don't know what to do anymore, hopefully you have an answer.
The error is thrown by /vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php
I wouldn't know if this needs updating or adjustment.
Additional info

I do not have any catalog rules. Tried making one and deleting again, no difference.
I'm using Elasticsearch plugin by Mirasvit, Magento 2.3.5 on a cloudways server. Using Redis for sessions. (don't think it is Mirasvit related).
In env.php I have 'lock' set to 'db', I think just default settings.
I've set all cronjobs in config->system for seperate process to 'no'.
Migrated site from 1.9.x to 2.3.5

It is just the catalogrule_apply all that is messing up things. Does anyone have a suggestion?


texts: How to get placeholder image in a custom collection on the home page?

texts:
I want to get product's placeholder image in customs collection when products image is not set in admin side. I have set placeholder image in admin site.

<?php
$todayDate  = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);

$collection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate))
->addAttributeToFilter('news_to_date', array('or'=> array(
    0 => array('date' => true, 'from' => $todayDate),
    1 => array('is' => new Zend_Db_Expr('null')))
), 'left')
->addAttributeToSort('news_from_date', 'desc')
->addAttributeToSort('created_at', 'desc')
->addAttributeToSelect('*')
->load();
->addVisibleFilterToCollection($collection);
Mage::getSingleton('catalog/product_visibility')
->addVisibleInCatalogFilterToCollection($collection);

?>

<?php foreach ($collection as $_product){ ?>

            <a href="<?php echo $_product->getProductUrl(); ?>">
                <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$_product->getImage(); ?>">


texts: Why can't product weight be displayed on a category page while other attributes can?

texts:
I'm trying to display the product weight inside the category pages next to the price. I can display product name, price, id, url, etc, but not weight!
To achieve this I overrode final_price.phtml and added the following lines:
$_product = $finalPriceModel->getProduct();
echo $_product->getData('price'); // This works fine
echo $_product->getData('weight'); // This does not work!

The weight shows up in the product page, but not in the category page (product list/collection). While the price, name, url, ... all show up on both the product page and the category pages! Why doesn't this code display the weight for each product in the categories?


texts:
I created web api and trying to validate entered data ":postcode".

Here is code in etc/webapi.xml

<?xml version="1.0"?>
    <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
        <route url="/V1/postcode/check/:postcode" method="GET">
            <service class="Modules\ShippingMethod\Api\Data\PostcodeInterface" method="check"/>
            <resources>
                <resource ref="anonymous"/>
            </resources>
        </route>
    </routes>

When I send

curl http://site.dev/rest/default/V1/postcode/check/0003

the var_dump() inside "check" method gives me an integer value "3", but I need to get full variable with all zero symbols and, maybe, specify string type for it. How can I specify variable type or get full request variable?


texts: Magento 2: How to get first and last name of customer?

texts: I have a customer ID and I want to get first name and last name of that customer. Any solution?


texts: How to preview uploaded image in custom module form

texts:
I am learning Magento and trying to make a module to manage Chefs in a Restaurant. I created an upload button to upload image and it works (images save in directory, file name saved in database).

But I don't know how to have a small preview of the image next to the button when the image has been uploaded (like when uploading Catalog picture). At the moment, when I click "edit" to edit a Chef Info, the Image field look the same if I uploaded image already or not.

Here is my field:

 $fieldset->addField('image_url', 'image', array(
        'label'     => Mage::helper('tressympa_cheflist')->__('Profile Picture'),
        'required'  => false,
        'name'      => 'image_url',
    ));

Any suggestion? Thank you very much!


texts: I have installed a Plugin in Custom Theme(duplicate of RWD) but url is not loading and 500 http error has occurred

texts:
I have installed store locator (https://www.magentocommerce.com/magento-connect/google-map-store-locator.html) plugin in Magento 1.9.2.0 but the frontend is not responding.
Please give the solution.


texts:
Goal:

I need to display on homepage a list of colors of products available at the moment in the particular store view.

Description:

Products have color attribute (the default attribute which exists in Magento just after installation).
There are many colors but not all colors are associated with products yet.
There are a few store views and each has different products (so also the list of colors on homepage will be different in each store view).
If color is associated only with products that are out of stock, it shouldn't be on the list of colors on homepage.

Partial solution:

Based on this thread: https://stackoverflow.com/a/9562720/2461702 I was able to accomplish first part of the job:
get the list of colors which are associated with products.

How to filter this list further so that it contains only the colors which are associated with:

products that are NOT out of stock?
products from the current store view?
products from selected category?

Is there any easy way to speed up the code posten in: https://stackoverflow.com/a/9562720/2461702 ?


texts: Programmatically create invoice a single item of an order

texts: I would like to create an invoice for a particular item only. How can I go about doing this?


texts: Magento 2 Rest API For Android How to Create

texts:
Magento 2 site How to create the REST API and how to send data with authenticates for mobile app.Please describe Step by Step.

Thanks


texts: Magento 2 - How to add Attribute for cms_page?

texts:
I knew how to add attributes for product entity:

$eavSetup->addAttribute(
                \Magento\Catalog\Model\Product::ENTITY,
                'period_date_start',/* Custom Attribute Code */
                [
                        'group' => 'Period Date',/* Group name in which you want to display your custom attribute */
                        'type' => 'datetime',/* Data type in which formate your value save in database*/
                        'frontend' => 'Magento\Eav\Model\Entity\Attribute\Frontend\Datetime',
                        'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\Datetime',
                        'label' => 'Start Date', /* lablel of your attribute*/
                        'input' => 'date',
                        'class' => '',
                        'source' => '', /* Source of your select type custom attribute options*/
                        'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE, /*Scope of your attribute */
                        'visible' => true,
                        'required' => false,
                        'user_defined' => true,
                        'default' => '',
                        'searchable' => false,
                        'filterable' => false,
                        'comparable' => false,
                        'visible_on_front' => false,
                        'used_in_product_listing' => true,
                        'unique' => false,
                        'sort_order' => 1
                ]
        );

But how to add Attribute for cms_page ?


texts: Product Creation in Magento 2 by SOAP API

texts: I am able to create Product in magento 2 by using SOAP API but not able to add quntity , Category for simple product and not able to add simple products to configurable product.


texts: Magento 2: How to programatically check if an order exists without using try-catch?

texts:
I am looking at the implementation of  \Magento\Sales\Api\OrderRepositoryInterface
on https://github.com/magento/magento2/blob/eacac63d35b97961e3304dc007cd6b78519a93d0/app/code/Magento/Sales/Model/OrderRepository.php

According to the code, the repository will throw NoSuchEntityException if the order does not exist. However, I figure it might be expensive overtime to rely on a try-catch statement if my function gets called quite often.

Is there a command/function that I can use to just get true/false on whether an order exist by given Order ID?

Thank you,


texts:
How to add loader for image on page load .. I want to add loader until the main image is ready on page load.

how to do this

Thanks

Update:

Showing a display Loading Icon Until the Page Loads Completely..


texts: How to Integrate a payment gateway with Android app for Magento 2.3?

texts:
The website is: Magento 2.3.5
The app: Dart app
I have an agreement with local bank to provide a payments gateway (Credit card), so they provided two files:

Magento 2 plugin (work fine on website)
SDK for Android studio

The question is:
How can I setup the SDK file on the app and make sure it's works fine with Magento?
Because the first try for me was failed, Magento didn't received any information about the payments!
Note: I'm using now webview for payment, but it's so bad with a lot of crashing.


texts: Custom theme is not showing success messages on product page

texts:
My other pages showing messages properly but not working on the product page. when I try to add to cart it does nothing. When I goto cart page it shows multiple time the success message. I tried by adding this to my catalog_product_view but no luck.

<referenceContainer name="page.messages">
        <block class="Magento\Framework\View\Element\Template" name="ajax.message.placeholder" template="Magento_Theme::html/messages.phtml"/>
        <block class="Magento\Framework\View\Element\Messages" name="messages" as="messages" template="Magento_Theme::messages.phtml"/>
</referenceContainer>

Is there any way I can access the session or cookie messages  programmatcially, so I can show them where I want? Thanks.

Note: I am using custom theme


texts: How can i add Google Ads Tracking code in Success Page

texts:
Here is my code :

<!-- Event snippet for Final Page conversion page -->
<script>
  wtag('event', 'conversion', {
      'send_to': 'AW-23232323223232/23232323233434343443',
      'value': 0.0,
      'currency': 'INR',
      'transaction_id': ''
  });
</script>

How can i add in success page?


texts: Get a list of all category names and ID's - Magento 2

texts:
How can I get a list of all category names and their ID's from a store on Magento 2.2?

For example something like this

Clothes 2
Shirts 5
T-shirts 7
T-shirts 8
Shoes 10
Sport shoes 12
...

It can be in any format and displayed anywhere on the site as long as I can copy it as text. I will disable this functionality after, so I don't mind if it's a quick and dirty way as it's never going on the live site.

Basically I'm trying to find a way to get all product names and ID's without having to individually click through every item in the Magento category tree.


texts:
I am trying to remove language switcher and to do this I have added a line in:

  app/design/frontend/MyPackage/MyTheme/Magento_Theme/layout/default.xml

I just add a line in <body>

<referenceBlock name="store_language" remove="true"/>

Executed deployment script, but I am still seeing Magento_Store/templates/switch/languages.phtml in profiler files list

Any idea what should do to resolve it?


texts:
Magento has three code pools:

community
core
local

Core: It contains all Magento default modules

Community and local: We use these code pools for our custom module development.

Now I have doubt about this:

why does Magento use two code pools for our customization?
why doesn't Magento use one single code pool for customization?

Could someone explain about this?


texts: How to add "getAttributeText" to "related view" section?

texts:
I am getting the error Fatal error: Call to a member function getAttributeText() on a non-object in /catalog/product/list/related.phtml on line 21 while add "getAttributeText" in the file /catalog/product/list/related.phtml.

This is code:

<?php
$merchant_name = $_product->getAttributeText('merchant_name');
if ($merchant_name){
   echo "By ". $_product->getResource()->getAttribute('merchant_name')->getFrontend()->getValue($_product);
}
 elseif ($_product->getIsEbayaffiliate()){
        echo "By eBay";
}
 else {
        echo "By Home Done";
}
?>

FYI, I am using the same "getAttributeText" in the following files and it's working perfectly:

 1. catalog/product/view.phtml
 2. catalog/product/list.phtml
 3. catalog/product/new.phtml
 4. catalog/product/special.phtml


texts: Stop layered navigation retainining filter when moving between categories

texts: I am using layered navigation a custom theme (based on RWD) and the filter is keeping the value when moving between categories. Can anyone please tell me where I would start debugging this issue? Or is there anyway I can force the filter to clear when moving between categories?


texts:
I'm trying to publish extension to the magento marketplace. I receive an error when i press submit button on magento's web from:

    Can't connect to package repository

i have added my GitHub repository to package's composer.json. But i still receive this message.

According to documentation, i can just publish my extension to github and reference it from composer (it think it is about 'require' composer section)
magento doc

What i'm doing wrong? How to publish my package without this unclear error? Should i push my package to packagist?

composer.json:

{
  "name": "myvendorname/myextname",
...
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/myvendorname/repo"
    }
],
...
}


texts: How to add custom tab like "Up-Sell Products" in product edit in Magento 2.4.1

texts: I want to create custom tab like "Up-Sell Products"


texts: How to pass external script inside ajax response?

texts:
I am adding social share option on the page using Add This.

I have added the code to my phtml file and added the js script in the head, which is working fine.

Also, I have an option to filter data on the select category on the same page. In that case, data is coming from the controller using ajax. everything is working perfectly except social share option.

After selecting the category from dropdown the data filters using ajax, but social share option is not coming.

I think script needs to be the load again for the social share buttons.

social share button add this code:

<div class="addthis_inline_share_toolbox" data-url="<?php echo $baseURL_l.'video#'.$url?>" data-title="<?php echo $video->getVideoTitle(); ?>" addthis:media="<?php echo 'https://img.youtube.com/vi/'.$video->getVideoUrl() ?>/0.jpg" >

and script:


texts: Render Checkboxes in form modifier grid in Magento2 Admin

texts:
I'm building a feature where I need to render checkboxes for a set of comma-separated values in a column.

Here's my existing code:

protected function fillModifierMeta()
    {
        return [
            'id' => $this->getTextColumn('id', false, 'Product ID', 10),
            'product_sku' => $this->getTextColumn('product_sku', false, 'Product SKU', 20),
            'product_name' => $this->getTextColumn('product_name', false, 'Product Name', 30),
            'product_supplier_sku' => $this->getTextColumn('product_supplier_sku', false, 'Supplier SKU', 40),
            'available_qty' => $this->getTextColumn('available_qty', false, 'Available Qty', 50),
            'received_qty' => [
                'arguments' => [
                    'data' => [
                        'config' => [
                            'dataType' => Form\Element\DataType\Number::NAME,
                            'formElement' => Form\Element\Input::NAME,
                            'componentType' => Form\Field::NAME,
                            'dataScope' => 'received_qty',
                            'label' => __('Receive Qty'),
                            'fit' => true,
                            'additionalClasses' => 'admin__field-small',
                            'sortOrder' => 60,
                            'validation' => [
                                'validate-number' => true,
                                'validate-greater-than-zero' => true,
                                'required-entry' => true,
                            ],
                        ],
                    ],
                ],
            ],
            'actionDelete' => [
                'arguments' => [
                    'data' => [
                        'config' => [
                            'additionalClasses' => 'data-grid-actions-cell',
                            'componentType' => 'actionDelete',
                            'dataType' => Form\Element\DataType\Text::NAME,
                            'label' => __('Actions'),
                            'sortOrder' => 70,
                            'fit' => true,
                        ],
                    ],
                ],
            ]
        ];
    }

Which renders it like this:

Now, I want to add a field to this called barcodes which contains value such as EG6F2,A4GT5,EF58T,Y1W3R. I want to render these as selectable checkboxes in the column.

Is there a way to achieve this?


texts: Magento2 override core module translation file not working

texts:
Want to update some labels from vendor\magento\module-fedex\i18n\en_US.csv file.

Like from Standard Overnight, Standard Overnight to

Standard Overnight,FedEx Overnight (1-2 business days).

How can i do that and want the same label update for admin side also.


texts: No payment methods available after entering zip?

texts:
Magento 2.2.6 with standard checkout

I have 3 available countries in my checkout. After switching between the countries, the available payment methods are shown or hidden accordingly, so that works as expected.

As soon as I enter the zip (no matter if its a correct or wrong zip) though and switch the countries, it keeps showing me the "no payment methods available" message. Is there any settings that I am missing?

Thanks!


texts: Magento 2 Custom admin module not working

texts: I have created my custom module for order export and this is working fine in my magento 2.5 and magento 2.6 but this OR any other module is installed in my magento 2.2 it will not show in admin and when i try to access this with URL it will show 404.


texts: How to set background color of modal in magento2

texts:
I want to set background color in whole modal. How to do it..?

Please help me...

See the below code....

A


texts: Magento2 - Indexing / Full page cache problems

texts:
We are having long-term problems with indexer and cache settings.

After reading great guide by @johnhughes1984 about caching and indexing we thought that everything will be alright with settings adjustment. But it's just only less horrible :-)

  Problem: If I edit&save product A, then indexer "processed" changes in
  backlog(1). FPC (not sure if its FPC but product page load in 3
  seconds instead of regular 200ms) of every product is invalidated not
  just for product A. This cause huge load issues on our production
  Magento installation.

Our setup:

2 stores
25 k products
Magento 2.2.5
indexer:set-mode schedule

Any ideas?

Thank you


texts:
How can I get the breadcrumb array from my template?

I'm able to get the object:

$this->getLayout()->getBlock('breadcrumbs');

and full breadcrumb path as final HTML

$this->getLayout()->getBlock('breadcrumbs')->toHtml;

But when I use getData or toJson it returns the object, not the breadcrumb data.

$this->getLayout()->getBlock('breadcrumbs')->getData;

Returns

 array(2) { ["type"]=> string(36)
 "Magento\Theme\Block\Html\Breadcrumbs" ["module_name"]=> string(13)
 "Magento_Theme" }

$this->getLayout()->getBlock('breadcrumbs')->toJson;

Returns

 string(81)
 "{"type":"Magento\\Theme\\Block\\Html\\Breadcrumbs","module_name":"Magento_Theme"}"


texts: How to get totals sort order defined in checkout_index_index.xml to Rest API Model?

texts: I need totals sort order in Rest API model from checkout_index_index.xml. Is it possible? It is possible, How can I do this?


texts: Magento 2 Bundle product option Type Checkbox quantity user defined Quaqntity

texts: Is there any way to set/show quantity box on Bundle product Option type Checkbox like Radio Button?


texts: Magento 2.1.9 - Cannot seem to overwrite JS comonent template in custom module

texts:
Having trouble trying to overwrite a JS component template at checkout. Here is my module structure and code for this specific task:

app/code/MY/MODULE/view/frontend/layout/checkout_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="sidebar" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="iosc-place-order-button" xsi:type="array">
                                            <item name="component" xsi:type="string">Onestepcheckout_Iosc/js/view/placeorder</item>
                                            <item name="displayArea" xsi:type="string">summary</item>
                                            <item name="sortOrder" xsi:type="string">900</item>
                                            <item name="config" xsi:type="array">
                                                <item name="template" xsi:type="string">MY_MODULE/view/place_order</item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>

</page>

app/code/MY/MODULE/view/frontend/requirejs-config.js

var config = {
    map: {
        '*': {
            'Onestepcheckout/Iosc/template/view/place_order.html': 'MY/MODULE/template/view/place_order.html'
        }
    }
};

app/code/MY/MODULE/view/frontend/web/template/view/place_order.html

HELLO!!

I've echoed the contents of $this->_request->getFullActionName() and it returns checkout_index_index

Is there anything that looks out of place here, I cannot see why it's not working! Any help would be greatly appreicated. Many thanks.


texts: Listing subcategories on main category page

texts:
I want to list subcageroeis on main category page under category description.
I found this article but it's not working on Magento 2:https://www.templatemonster.com/help/magento-listing-sub-categories-on-a-category-page.html


texts: Create customer custom attribute with input type checkbox, multiselect, and radio Magento 2

texts:
I successfully created custom attribute for customer with input type select/dropdown like this:

$code = 'test';
$customerSetup = $this->customerSetupFactory->create();
$customerSetup->removeAttribute(\Magento\Customer\Model\Customer::ENTITY, $code);
$insertData = array(
        "type"     => "int",
        "backend"  => "",
        "label"    => 'test',
        "input"    => 'select',
        "source"   => "",
        "visible"  => true,
        "required" => false,
        "default" => "",
        "frontend" => "",
        "unique"     => false,
        "note"       => ""
      );

$insertData['option']['values'] = array(0 => 'No', 1 => 'Yes');
$customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, $code,  $insertData);
$attribute   = $customerSetup->getAttribute(\Magento\Customer\Model\Customer::ENTITY, $code);

$attribute = $customerSetup->getEavConfig()->getAttribute(\Magento\Customer\Model\Customer::ENTITY, $code);
$used_in_forms[]="adminhtml_customer";
$used_in_forms[]="checkout_register";
$used_in_forms[]="customer_account_create";
$used_in_forms[]="customer_account_edit";
$used_in_forms[]="adminhtml_checkout";
$attribute->setData("used_in_forms", $used_in_forms)
      ->setData("is_used_for_customer_segment", true)
      ->setData("is_system", 0)
      ->setData("is_user_defined", 1)
      ->setData("is_visible", 1)
      ->setData("sort_order", 11);

$attribute->save();

the problem is when i try to change the input type to checkbox "input"=>"checkbox", the custom attribute is saved but the values option do not appear when i try to add new customer via admin , here's how it looks:

and i need to add more custom attribute with input type radio and multiselect, but i havent tried it, i'm afraid it will be like the checkbox case


texts: Failed to load the "Magento_Tax/js/view/checkout/summary/subtotal" component. error on checkout/cart page after upgrading magento

texts: After upgrading Magento 2.2.3 to 2.3.5, I faced the list of these errors on my checkout cart page. Order summary details are also missing. I disable all the custom modules and extensions. Can any help me with this problem?


texts: Magereport is not able to scan Magento website

texts:
When I am trying to scan my website on Magereport.com for security patches, I am getting the following error:

www.xxx.com is returning "No Magento installation found"

The website is built upon Magento version 1.9.3.7.

Please guide me, what changes do I need to make to allow Magereport to scan my website.


texts: Creating an order in the admin panel using the sisow plugin completes the order without an actual payment

texts:
I am using the Sisow (Dutch payment processor) plugin to let the customers pay, but my client and I also regularly create orders for customers via the admin panel.
The problem with this is that when we create an order Magento sends an email to the client with an order confirmation. But in the admin panel the payment already seems to be completed... But i'd like to send an email where they pay the order first before they get an confirmation/invoice of said order.
Can this be done natively or do I need to custom code a extension for this?
Things to note:

I have turned on async messages


texts: Magento 2 - Generate customization image in product page and add it to product options in cart

texts:
I need to let users create a customization image in product page and than attach that image to product when users add product in cart.

Create a custom product option type seems to be very tricky.

I think that the simpliest solution is to customize product template adding the image builder and then add generated image in product options through an observer that take the image from request and put it in product options.

I'm new in magento, it could be the right solution?
How can I implement?
I'm able to create a module.


texts: Cancel the orders which are older than 3 days

texts:
I'm trying to execute cron job after customer click place order button and redirect to success page. So the purpose of my job, if admin did not respond the order in 3 days, the order status will automatically canceled.

I have override the \Magento\Checkout\Controller\Onepage\Success in my module and use execute function to run my job via terminal.

<?php namespace Mymodule\Checkout\Controller\Onepage;

class Success extends \Magento\Checkout\Controller\Onepage\Success
{
    /**
     * Order success action
     *
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {
        exec('php bin/magento cron:run --group="custom"');
        return parent::execute();
    }
}

Here is crontab.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="custom_group">
        <job name="test_cronjob" instance="Mymodule\Checkout\Cron\CancelOrder" method="execute">
            <schedule>* * */3 * *</schedule>
        </job>
    </group>
</config>

Here is CancelOrder.php

<?php namespace Mymodule\Checkout\Cron;

class CancelOrder {
    protected $orderFactory;

    protected $checkoutSession;

    public function __construct(
        \Magento\Sales\Model\OrderFactory $orderFactory,
        \Magento\Checkout\Model\Session $checkoutSession
    ){
        $this->orderFactory = $orderFactory;
        $this->checkoutSession = $checkoutSession;
    }

    public function execute() {
        $orderId = $this->checkoutSession->getLastOrderId();
        if (!empty($orderId)) {
            $order = $this->orderFactory->create();
            $order->load($orderId);

            if ($order->getStatus() == 'pending') {
                $order->setState('canceled');
                $order->setStatus('canceled');

                $order->save();

                // send email to customer
            } else {
                return 0;
            }
        }
    }
}

When i try place order, the job is not executed. Is there something wrong with my code?